Freeze-type random-state.
[sbcl.git] / tools-for-build / os-provides-poll-test.c
blob8ff8b60f53616109235db227281826183e9452c3
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 */
6 #include <fcntl.h>
7 #include <poll.h>
9 int main ()
11 struct pollfd fds;
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;
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;
25 return 104;