fix regression/pthread_once-deadlock
[libc-test.git] / src / api / sys_select.c
blob077930c36eda62616da02332009dc730561d1327
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()
7 T(time_t)
8 T(suseconds_t)
9 T(sigset_t)
10 T(struct timespec)
11 T(fd_set)
13 struct timeval x;
14 F(time_t, tv_sec)
15 F(suseconds_t, tv_usec)
17 C(FD_SETSIZE)
18 #ifndef FD_CLR
19 {void(*p)(int,fd_set*) = FD_CLR;}
20 #endif
21 #ifndef FD_ISSET
22 {int(*p)(int,fd_set*) = FD_ISSET;}
23 #endif
24 #ifndef FD_SET
25 {void(*p)(int,fd_set*) = FD_SET;}
26 #endif
27 #ifndef FD_ZERO
28 {void(*p)(fd_set*) = FD_ZERO;}
29 #endif
30 {int(*p)(int,fd_set*restrict,fd_set*restrict,fd_set*restrict,const struct timespec*restrict,const sigset_t*restrict) = pselect;}
31 {int(*p)(int,fd_set*restrict,fd_set*restrict,fd_set*restrict,struct timeval*restrict) = select;}