1 #ifndef time_h 2 3 extern "C" { 4 5 #ifdef __time_h_recursive 6 #include_next <time.h> 7 #else 8 #define __time_h_recursive 9 10 #include <_G_config.h> 11 12 // A clean way to use and/or define time_t might allow removal of this crud. 13 #ifndef __sys_time_h_recursive 14 #define time __hide_time 15 #define clock __hide_clock 16 #define difftime __hide_difftime 17 #define gmtime __hide_gmtime 18 #define localtime __hide_localtime 19 #define ctime __hide_ctime 20 #define asctime __hide_asctime 21 #define strftime __hide_strftime 22 #endif 23 #define mktime __hide_mktime 24 #define tzset __hide_tzset 25 #define tzsetwall __hide_tzsetwall 26 #define getitimer __hide_getitimer 27 #define setitimer __hide_setitimer 28 #define gettimeofday __hide_gettimeofday 29 #define settimeofday __hide_settimeofday 30 31 #ifdef VMS 32 struct unix_time 33 { 34 long int tv_sec; 35 long int tv_usec; 36 }; 37 38 struct rusage 39 { 40 struct unix_time ru_utime; 41 }; 42 43 #define RUSAGE_SELF 0 //define it, it will be unused 44 #else 45 #ifdef hpux 46 #define _INCLUDE_POSIX_SOURCE 47 #endif 48 49 #include_next <time.h> 50 #endif 51 #undef __time_h_recursive 52 53 #define time_h 1 54 55 #undef time 56 #undef clock 57 #undef difftime 58 #undef gmtime 59 #undef localtime 60 #undef asctime 61 #undef ctime 62 #undef mktime 63 #undef strftime 64 #undef tzset 65 #undef tzsetwall 66 #undef getitimer 67 #undef setitimer 68 #undef gettimeofday 69 #undef settimeofday 70 71 extern char* asctime _G_ARGS((const struct tm*)); 72 extern char* ctime _G_ARGS((const _G_time_t*)); 73 double difftime _G_ARGS((_G_time_t, _G_time_t)); 74 extern struct tm* gmtime _G_ARGS((const _G_time_t*)); 75 extern struct tm* localtime _G_ARGS((const _G_time_t*)); 76 extern _G_time_t mktime(struct tm*); 77 extern _G_size_t strftime _G_ARGS((char*,_G_size_t,const char*,const struct tm*)); 78 extern void tzset(); 79 extern void tzsetwall(); 80 81 extern int getitimer(int, struct itimerval*); 82 extern int setitimer _G_ARGS((int, const struct itimerval*,struct itimerval*)); 83 extern int gettimeofday(struct timeval*, struct timezone*); 84 extern int settimeofday _G_ARGS((const struct timeval*,const struct timezone*)); 85 extern int stime _G_ARGS((const _G_time_t*)); 86 extern int dysize(int); 87 88 #if defined(___AIX__) 89 int clock (void); 90 #elif defined(hpux) 91 unsigned long clock(void); 92 #else 93 long clock(void); 94 #endif 95 _G_time_t time(_G_time_t*); 96 unsigned ualarm(unsigned, unsigned); 97 void usleep(unsigned); 98 int profil _G_ARGS((char *, int, int, int)); 99 100 #endif 101 } 102 #endif 103