|
nsz |
6a2161 |
#include <time.h>
|
|
nsz |
6a2161 |
#define T(t) (t*)0;
|
|
nsz |
6a2161 |
#define F(t,n) {t *y = &x.;;}
|
|
nsz |
6a2161 |
#define C(n) switch(n){case n:;}
|
|
nsz |
6a2161 |
static void f()
|
|
nsz |
6a2161 |
{
|
|
nsz |
6a2161 |
T(clock_t)
|
|
nsz |
6a2161 |
T(size_t)
|
|
nsz |
6a2161 |
T(time_t)
|
|
nsz |
6a2161 |
#ifdef _POSIX_C_SOURCE
|
|
nsz |
6a2161 |
T(clockid_t)
|
|
nsz |
6a2161 |
T(timer_t)
|
|
nsz |
6a2161 |
T(locale_t)
|
|
nsz |
6a2161 |
T(pid_t)
|
|
nsz |
6a2161 |
T(struct sigevent)
|
|
nsz |
6a2161 |
{
|
|
nsz |
6a2161 |
struct timespec x;
|
|
nsz |
6a2161 |
F(time_t,tv_sec)
|
|
nsz |
6a2161 |
F(long,tv_nsec)
|
|
nsz |
6a2161 |
}
|
|
nsz |
6a2161 |
{
|
|
nsz |
6a2161 |
struct itimerspec x;
|
|
nsz |
6a2161 |
F(struct timespec,it_interval)
|
|
nsz |
6a2161 |
F(struct timespec,it_value)
|
|
nsz |
6a2161 |
}
|
|
nsz |
6a2161 |
C(CLOCK_MONOTONIC)
|
|
nsz |
6a2161 |
C(CLOCK_PROCESS_CPUTIME_ID)
|
|
nsz |
6a2161 |
C(CLOCK_REALTIME)
|
|
nsz |
6a2161 |
C(CLOCK_THREAD_CPUTIME_ID)
|
|
nsz |
6a2161 |
#endif
|
|
nsz |
6a2161 |
{
|
|
nsz |
6a2161 |
struct tm x;
|
|
nsz |
6a2161 |
F(int,tm_sec)
|
|
nsz |
6a2161 |
F(int,tm_min)
|
|
nsz |
6a2161 |
F(int,tm_hour)
|
|
nsz |
6a2161 |
F(int,tm_mday)
|
|
nsz |
6a2161 |
F(int,tm_mon)
|
|
nsz |
6a2161 |
F(int,tm_year)
|
|
nsz |
6a2161 |
F(int,tm_wday)
|
|
nsz |
6a2161 |
F(int,tm_yday)
|
|
nsz |
6a2161 |
F(int,tm_isdst)
|
|
nsz |
6a2161 |
}
|
|
nsz |
6a2161 |
{void *x = NULL;}
|
|
nsz |
6a2161 |
{int x = CLOCKS_PER_SEC;}
|
|
nsz |
6a2161 |
C(TIMER_ABSTIME)
|
|
nsz |
0ef264 |
{char*(*p)(const struct tm*) = asctime;}
|
|
nsz |
0ef264 |
{clock_t(*p)(void) = clock;}
|
|
nsz |
0ef264 |
{char*(*p)(const time_t*) = ctime;}
|
|
nsz |
6a2161 |
{int i = daylight;}
|
|
nsz |
0ef264 |
{double(*p)(time_t,time_t) = difftime;}
|
|
nsz |
0ef264 |
{struct tm*(*p)(const time_t*) = gmtime;}
|
|
nsz |
0ef264 |
{struct tm*(*p)(const time_t*) = localtime;}
|
|
nsz |
0ef264 |
{time_t(*p)(struct tm*) = mktime;}
|
|
nsz |
0ef264 |
{size_t(*p)(char*restrict,size_t,const char*restrict,const struct tm*restrict) = strftime;}
|
|
nsz |
0ef264 |
{time_t(*p)(time_t*) = time;}
|
|
nsz |
6a2161 |
#ifdef _POSIX_C_SOURCE
|
|
nsz |
0ef264 |
{char*(*p)(const struct tm*restrict,char*restrict) = asctime_r;}
|
|
nsz |
0ef264 |
{int(*p)(pid_t,clockid_t*) = clock_getcpuclockid;}
|
|
nsz |
0ef264 |
{int(*p)(clockid_t,struct timespec*) = clock_getres;}
|
|
nsz |
0ef264 |
{int(*p)(clockid_t,struct timespec*) = clock_gettime;}
|
|
nsz |
0ef264 |
{int(*p)(clockid_t,int,const struct timespec*,struct timespec*) = clock_nanosleep;}
|
|
nsz |
0ef264 |
{int(*p)(clockid_t,const struct timespec*) = clock_settime;}
|
|
nsz |
0ef264 |
{char*(*p)(const time_t*,char*) = ctime_r;}
|
|
nsz |
0ef264 |
{struct tm*(*p)(const time_t*restrict,struct tm*restrict) = gmtime_r;}
|
|
nsz |
0ef264 |
{struct tm*(*p)(const time_t*restrict,struct tm*restrict) = localtime_r;}
|
|
nsz |
0ef264 |
{int(*p)(const struct timespec*,struct timespec*) = nanosleep;}
|
|
nsz |
0ef264 |
{size_t(*p)(char*restrict,size_t,const char*restrict,const struct tm*restrict,locale_t) = strftime_l;}
|
|
nsz |
0ef264 |
{int(*p)(timer_t) = timer_delete;}
|
|
nsz |
0ef264 |
{int(*p)(timer_t) = timer_getoverrun;}
|
|
nsz |
0ef264 |
{int(*p)(timer_t,struct itimerspec*) = timer_gettime;}
|
|
nsz |
0ef264 |
{int(*p)(timer_t,int,const struct itimerspec*restrict,struct itimerspec*restrict) = timer_settime;}
|
|
nsz |
6a2161 |
{char **x = tzname;}
|
|
nsz |
0ef264 |
{void(*p)(void) = tzset;}
|
|
nsz |
6a2161 |
#endif
|
|
nsz |
6a2161 |
#ifdef _XOPEN_SOURCE
|
|
nsz |
0ef264 |
{struct tm*(*p)(const char*) = getdate;}
|
|
nsz |
6a2161 |
{int i = getdate_err;}
|
|
nsz |
0ef264 |
{char*(*p)(const char*restrict,const char*restrict,struct tm*restrict) = strptime;}
|
|
nsz |
6a2161 |
{long i = timezone;}
|
|
nsz |
6a2161 |
#endif
|
|
nsz |
6a2161 |
}
|
|
nsz |
6a2161 |
#ifdef _POSIX_C_SOURCE
|
|
nsz |
6a2161 |
#include <signal.h>
|
|
nsz |
6a2161 |
static void g()
|
|
nsz |
6a2161 |
{
|
|
nsz |
0ef264 |
{int(*p)(clockid_t,struct sigevent*restrict,timer_t*restrict) = timer_create;}
|
|
nsz |
6a2161 |
}
|
|
nsz |
6a2161 |
#endif
|