1570af302Sopenharmony_ci#include <time.h> 2570af302Sopenharmony_ci#define T(t) (t*)0; 3570af302Sopenharmony_ci#define F(t,n) {t *y = &x.n;} 4570af302Sopenharmony_ci#define C(n) switch(n){case n:;} 5570af302Sopenharmony_cistatic void f() 6570af302Sopenharmony_ci{ 7570af302Sopenharmony_ciT(clock_t) 8570af302Sopenharmony_ciT(size_t) 9570af302Sopenharmony_ciT(time_t) 10570af302Sopenharmony_ci#ifdef _POSIX_C_SOURCE 11570af302Sopenharmony_ciT(clockid_t) 12570af302Sopenharmony_ciT(timer_t) 13570af302Sopenharmony_ciT(locale_t) 14570af302Sopenharmony_ciT(pid_t) 15570af302Sopenharmony_ciT(struct sigevent) 16570af302Sopenharmony_ci{ 17570af302Sopenharmony_cistruct timespec x; 18570af302Sopenharmony_ciF(time_t,tv_sec) 19570af302Sopenharmony_ciF(long,tv_nsec) 20570af302Sopenharmony_ci} 21570af302Sopenharmony_ci{ 22570af302Sopenharmony_cistruct itimerspec x; 23570af302Sopenharmony_ciF(struct timespec,it_interval) 24570af302Sopenharmony_ciF(struct timespec,it_value) 25570af302Sopenharmony_ci} 26570af302Sopenharmony_ciC(CLOCK_MONOTONIC) 27570af302Sopenharmony_ciC(CLOCK_PROCESS_CPUTIME_ID) 28570af302Sopenharmony_ciC(CLOCK_REALTIME) 29570af302Sopenharmony_ciC(CLOCK_THREAD_CPUTIME_ID) 30570af302Sopenharmony_ci#endif 31570af302Sopenharmony_ci{ 32570af302Sopenharmony_cistruct tm x; 33570af302Sopenharmony_ciF(int,tm_sec) 34570af302Sopenharmony_ciF(int,tm_min) 35570af302Sopenharmony_ciF(int,tm_hour) 36570af302Sopenharmony_ciF(int,tm_mday) 37570af302Sopenharmony_ciF(int,tm_mon) 38570af302Sopenharmony_ciF(int,tm_year) 39570af302Sopenharmony_ciF(int,tm_wday) 40570af302Sopenharmony_ciF(int,tm_yday) 41570af302Sopenharmony_ciF(int,tm_isdst) 42570af302Sopenharmony_ci} 43570af302Sopenharmony_ci{void *x = NULL;} 44570af302Sopenharmony_ci{int x = CLOCKS_PER_SEC;} 45570af302Sopenharmony_ciC(TIMER_ABSTIME) 46570af302Sopenharmony_ci{char*(*p)(const struct tm*) = asctime;} 47570af302Sopenharmony_ci{clock_t(*p)(void) = clock;} 48570af302Sopenharmony_ci{char*(*p)(const time_t*) = ctime;} 49570af302Sopenharmony_ci{double(*p)(time_t,time_t) = difftime;} 50570af302Sopenharmony_ci{struct tm*(*p)(const time_t*) = gmtime;} 51570af302Sopenharmony_ci{struct tm*(*p)(const time_t*) = localtime;} 52570af302Sopenharmony_ci{time_t(*p)(struct tm*) = mktime;} 53570af302Sopenharmony_ci{size_t(*p)(char*restrict,size_t,const char*restrict,const struct tm*restrict) = strftime;} 54570af302Sopenharmony_ci{time_t(*p)(time_t*) = time;} 55570af302Sopenharmony_ci#ifdef _POSIX_C_SOURCE 56570af302Sopenharmony_ci{char*(*p)(const struct tm*restrict,char*restrict) = asctime_r;} 57570af302Sopenharmony_ci{int(*p)(pid_t,clockid_t*) = clock_getcpuclockid;} 58570af302Sopenharmony_ci{int(*p)(clockid_t,struct timespec*) = clock_getres;} 59570af302Sopenharmony_ci{int(*p)(clockid_t,struct timespec*) = clock_gettime;} 60570af302Sopenharmony_ci{int(*p)(clockid_t,int,const struct timespec*,struct timespec*) = clock_nanosleep;} 61570af302Sopenharmony_ci{int(*p)(clockid_t,const struct timespec*) = clock_settime;} 62570af302Sopenharmony_ci{char*(*p)(const time_t*,char*) = ctime_r;} 63570af302Sopenharmony_ci{struct tm*(*p)(const time_t*restrict,struct tm*restrict) = gmtime_r;} 64570af302Sopenharmony_ci{struct tm*(*p)(const time_t*restrict,struct tm*restrict) = localtime_r;} 65570af302Sopenharmony_ci{int(*p)(const struct timespec*,struct timespec*) = nanosleep;} 66570af302Sopenharmony_ci{size_t(*p)(char*restrict,size_t,const char*restrict,const struct tm*restrict,locale_t) = strftime_l;} 67570af302Sopenharmony_ci{int(*p)(clockid_t,struct sigevent*restrict,timer_t*restrict) = timer_create;} 68570af302Sopenharmony_ci{int(*p)(timer_t) = timer_delete;} 69570af302Sopenharmony_ci{int(*p)(timer_t) = timer_getoverrun;} 70570af302Sopenharmony_ci{int(*p)(timer_t,struct itimerspec*) = timer_gettime;} 71570af302Sopenharmony_ci{int(*p)(timer_t,int,const struct itimerspec*restrict,struct itimerspec*restrict) = timer_settime;} 72570af302Sopenharmony_ci{char **x = tzname;} 73570af302Sopenharmony_ci{void(*p)(void) = tzset;} 74570af302Sopenharmony_ci#endif 75570af302Sopenharmony_ci#ifdef _XOPEN_SOURCE 76570af302Sopenharmony_ci{struct tm*(*p)(const char*) = getdate;} 77570af302Sopenharmony_ci{int i = getdate_err;} 78570af302Sopenharmony_ci{char*(*p)(const char*restrict,const char*restrict,struct tm*restrict) = strptime;} 79570af302Sopenharmony_ci{long i = timezone;} 80570af302Sopenharmony_ci{int i = daylight;} 81570af302Sopenharmony_ci#endif 82570af302Sopenharmony_ci} 83