d013d96d44613f40c232aa2611d814b02e073c25
[libc-test] / src / api / sys_select.c
1 #include <sys/select.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(time_t)
8 T(suseconds_t)
9 T(sigset_t)
10 T(struct timespec)
11 T(fd_set)
12 {
13 struct timeval x;
14 F(time_t, tv_sec)
15 F(suseconds_t, tv_usec)
16 }
17 C(FD_SETSIZE)
18 #ifndef FD_CLR
19 void(*p_FD_CLR)(int,fd_set*) = FD_CLR;
20 #endif
21 #ifndef FD_ISSET
22 int(*p_FD_ISSET)(int,fd_set*) = FD_ISSET;
23 #endif
24 #ifndef FD_SET
25 void(*p_FD_SET)(int,fd_set*) = FD_SET;
26 #endif
27 #ifndef FD_ZERO
28 void(*p_FD_ZERO)(fd_set*) = FD_ZERO;
29 #endif
30 int(*p_pselect)(int,fd_set*restrict,fd_set*restrict,fd_set*restrict,const struct timespec*restrict,const sigset_t*restrict) = pselect;
31 int(*p_select)(int,fd_set*restrict,fd_set*restrict,fd_set*restrict,struct timeval*restrict) = select;
32 }