bad autoconf variable names
if test "$ac_cv_header_sys_epoll_h" = yes -a "$ac_cv_func_epoll_ctl" = yes; then
AC_DEFINE([HAVE_EPOLL], [1], [Define if you have epoll support.])
fi
if test "$ac_cv_header_sys_event_h" = yes -a "$ac_cv_func_kqueue" = yes; then
AC_DEFINE([HAVE_KQUEUE], [1], [Define if you have kqueue support.])
AC_CHECK_SIZEOF([kev.filter], [], [#include <sys/event.h>
struct kevent kev;])
AC_CHECK_SIZEOF([kev.flags], [], [#include <sys/event.h>
struct kevent kev;])
fi
if test "$ac_cv_header_poll_h" = yes -a "$ac_cv_func_poll" = yes; then
AC_DEFINE([HAVE_POLL], [1], [Define if you have poll support.])
fi
The AC_DEFINE
lines for HAVE_KQUEUE
and HAVE_POLL
don't do anything, because earlier we have
AC_CHECK_FUNCS([epoll_ctl eventfd kevent kevent64 kqueue poll])
and that already defines HAVE_KQUEUE
(and sets ac_cv_func_kqueue
) when the kqueue
function is found.
Not entirely sure what the right thing to do is here, do we rely on having a prototype for kqueue
in sys/event.h
specifically? Technically that wouldn't be what we check for even if we used a renamed HAVE_KQUEUE
variable.
AFAIK this doesn't cause any real problems except that it really confused me when I tried to simulate not having poll
by moving /usr/include/poll.h
away temporarily.
Trac metadata
Trac field | Value |
---|---|
Version | 7.9 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | low |
Resolution | Unresolved |
Component | libraries/base |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | ekmett, hvr |
Operating system | |
Architecture |