X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fapi%2Fsys_time.c;fp=src%2Fapi%2Fsys_time.c;h=7aa089344830fffb67a4bce4a233a1aa875b826b;hb=6a2161f389e6115bb3b948d71c56c8c882eaeda6;hp=0000000000000000000000000000000000000000;hpb=f81126942f3b97eec5bdf2fb57a45579946be59d;p=libc-test diff --git a/src/api/sys_time.c b/src/api/sys_time.c new file mode 100644 index 0000000..7aa0893 --- /dev/null +++ b/src/api/sys_time.c @@ -0,0 +1,29 @@ +#include +#define T(t) (t*)0; +#define F(t,n) {t *y = &x.n;} +#define C(n) switch(n){case n:;} +static void f() +{ +T(suseconds_t) +T(fd_set) +{ +struct timeval x; +F(time_t, tv_sec) +F(suseconds_t,tv_usec) +} +C(FD_SETSIZE) +#ifndef FD_CLR +void(*p_FD_CLR)(int,fd_set*) = FD_CLR; +#endif +#ifndef FD_ISSET +int(*p_FD_ISSET)(int,fd_set*) = FD_ISSET; +#endif +#ifndef FD_SET +void(*p_FD_SET)(int,fd_set*) = FD_SET; +#endif +#ifndef FD_ZERO +void(*p_FD_ZERO)(fd_set*) = FD_ZERO; +#endif +int(*p_select)(int,fd_set*restrict,fd_set*restrict,fd_set*restrict,struct timeval*restrict) = select; +int(*p_utimes)(const char*,const struct timeval[]) = utimes; +}