Blame src/api/sys_select.c
|
nsz |
f81126 |
#include <sys/select.h>
|
|
nsz |
f81126 |
#define T(t) (t*)0;
|
|
nsz |
f81126 |
#define F(t,n) {t *y = &x.;;}
|
|
nsz |
f81126 |
#define C(n) switch(n){case n:;}
|
|
nsz |
f81126 |
static void f()
|
|
nsz |
f81126 |
{
|
|
nsz |
f81126 |
T(time_t)
|
|
nsz |
f81126 |
T(suseconds_t)
|
|
nsz |
f81126 |
T(sigset_t)
|
|
nsz |
f81126 |
T(struct timespec)
|
|
nsz |
f81126 |
T(fd_set)
|
|
nsz |
f81126 |
{
|
|
nsz |
f81126 |
struct timeval x;
|
|
nsz |
f81126 |
F(time_t, tv_sec)
|
|
nsz |
f81126 |
F(suseconds_t, tv_usec)
|
|
nsz |
f81126 |
}
|
|
nsz |
f81126 |
C(FD_SETSIZE)
|
|
nsz |
f81126 |
#ifndef FD_CLR
|
|
nsz |
0ef264 |
{void(*p)(int,fd_set*) = FD_CLR;}
|
|
nsz |
f81126 |
#endif
|
|
nsz |
f81126 |
#ifndef FD_ISSET
|
|
nsz |
0ef264 |
{int(*p)(int,fd_set*) = FD_ISSET;}
|
|
nsz |
f81126 |
#endif
|
|
nsz |
f81126 |
#ifndef FD_SET
|
|
nsz |
0ef264 |
{void(*p)(int,fd_set*) = FD_SET;}
|
|
nsz |
f81126 |
#endif
|
|
nsz |
f81126 |
#ifndef FD_ZERO
|
|
nsz |
0ef264 |
{void(*p)(fd_set*) = FD_ZERO;}
|
|
nsz |
f81126 |
#endif
|
|
nsz |
0ef264 |
{int(*p)(int,fd_set*restrict,fd_set*restrict,fd_set*restrict,const struct timespec*restrict,const sigset_t*restrict) = pselect;}
|
|
nsz |
0ef264 |
{int(*p)(int,fd_set*restrict,fd_set*restrict,fd_set*restrict,struct timeval*restrict) = select;}
|
|
nsz |
f81126 |
}
|