?RCS: $Id: d_devpoll.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 2006, Christian Biere ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?MAKE:d_dev_poll: Trylink cat ?MAKE: -pick add $@ %< ?S:d_dev_poll: ?S: This variable conditionally defines the HAS_DEV_POLL symbol, which ?S: indicates to the C program that /dev/poll support is available. ?S:. ?C:HAS_DEV_POLL: ?C: This symbol is defined when /dev/poll can be used. ?C:. ?H:#$d_dev_poll HAS_DEV_POLL ?H:. ?LINT: set d_dev_poll : can we use /dev/poll? $cat >try.c < #include #include int main(void) { static struct pollfd pfd; static struct dvpoll dvp; static int ret; pfd.fd |= 1; pfd.events |= POLLIN; pfd.events |= POLLPRI; pfd.events |= POLLOUT; pfd.events |= POLLHUP; pfd.events |= POLLERR; pfd.events |= POLLNVAL; pfd.events |= POLLREMOVE; pfd.revents |= 1; dvp.dp_timeout |= 1; dvp.dp_nfds |= 1; dvp.dp_fds = &pfd; ret |= ioctl(1, DP_POLL, &dvp); return 0 != ret; } EOC cyn="whether /dev/poll can be used" set d_dev_poll eval $trylink