?RCS: $Id: d_epoll.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_epoll: Trylink cat ?MAKE: -pick add $@ %< ?S:d_epoll: ?S: This variable conditionally defines the HAS_EPOLL symbol, which ?S: indicates to the C program that epoll() support is available. ?S:. ?C:HAS_EPOLL: ?C: This symbol is defined when epoll() can be used. ?C:. ?H:#$d_epoll HAS_EPOLL ?H:. ?LINT: set d_epoll : can we use epoll? $cat >try.c < #include int main(void) { static struct epoll_event ev; static int ret, epfd; epfd |= epoll_create(1); ev.events |= EPOLLOUT; ev.events |= EPOLLPRI; ev.events |= EPOLLERR; ev.events |= EPOLLHUP; ev.events |= EPOLLET; ev.data.ptr = (void *) 0; ev.data.fd |= 1; ev.data.u32 |= 1; ev.data.u64 |= 1; ret |= epoll_ctl(epfd, 1, EPOLL_CTL_ADD, &ev); ret |= epoll_ctl(epfd, 1, EPOLL_CTL_MOD, &ev); ret |= epoll_ctl(epfd, 1, EPOLL_CTL_DEL, &ev); ret |= epoll_wait(epfd, &ev, 1, -1); return 0 != ret; } EOC cyn="whether epoll support is available" set d_epoll eval $trylink