api: add remaining functions
[libc-test] / src / api / sys_time.c
1 #include <sys/time.h>
2 #define T(t) (t*)0;
3 #define F(t,n) {t *y = &x.n;}
4 #define C(n) switch(n){case n:;}
5 static void f()
6 {
7 T(suseconds_t)
8 T(fd_set)
9 {
10 struct timeval x;
11 F(time_t, tv_sec)
12 F(suseconds_t,tv_usec)
13 }
14 C(FD_SETSIZE)
15 #ifndef FD_CLR
16 void(*p_FD_CLR)(int,fd_set*) = FD_CLR;
17 #endif
18 #ifndef FD_ISSET
19 int(*p_FD_ISSET)(int,fd_set*) = FD_ISSET;
20 #endif
21 #ifndef FD_SET
22 void(*p_FD_SET)(int,fd_set*) = FD_SET;
23 #endif
24 #ifndef FD_ZERO
25 void(*p_FD_ZERO)(fd_set*) = FD_ZERO;
26 #endif
27 int(*p_select)(int,fd_set*restrict,fd_set*restrict,fd_set*restrict,struct timeval*restrict) = select;
28 int(*p_utimes)(const char*,const struct timeval[]) = utimes;
29 }