This source file includes following definitions.
- my_select
- main
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 #include <config.h>
18
19 #include <sys/select.h>
20
21 #include "signature.h"
22
23 SIGNATURE_CHECK (pselect, int,
24 (int, fd_set *restrict, fd_set *restrict, fd_set *restrict,
25 struct timespec const *restrict, const sigset_t *restrict));
26
27 #include "test-select.h"
28
29 static int
30 my_select (int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
31 struct timeval *timeout)
32 {
33 struct timespec ts;
34 struct timespec *pts = NULL;
35 if (timeout)
36 {
37 ts.tv_sec = timeout->tv_sec;
38 ts.tv_nsec = timeout->tv_usec * 1000;
39 pts = &ts;
40 }
41 return pselect (nfds, readfds, writefds, exceptfds, pts, NULL);
42 }
43
44 int
45 main (void)
46 {
47 return test_function (my_select);
48 }