Fix make-array transforms.
[sbcl.git] / tools-for-build / os-provides-poll-test.c
1 /* test to build and run so that we know if we have poll that works on
2  * stdin and /dev/zero -- which is hopefully a sufficient sample to weed
3  * out crappy versions like that on Darwin.
4  */
5
6 #include <fcntl.h>
7 #include <poll.h>
8
9 int main ()
10 {
11     struct pollfd fds;
12
13     fds.fd = 0;
14     fds.events = POLLIN|POLLPRI;
15     fds.revents = 0;
16     if (!((1 == poll(&fds, 1, -1)) && ((POLLIN|POLLPRI) & fds.revents)))
17         return 0;
18
19     fds.fd = open("/dev/zero", O_RDONLY);
20     fds.events = POLLIN|POLLPRI;
21     fds.revents = 0;
22     if (!((1 == poll(&fds, 1, -1)) && ((POLLIN|POLLPRI) & fds.revents)))
23         return 0;
24
25     return 104;
26 }