bad autoconf variable names
|Reported by:||rwbarton||Owned by:|
|Type of failure:||None/Unknown||Test Case:|
|Related Tickets:||Differential Rev(s):|
if test "$ac_cv_header_sys_epoll_h" = yes -a "$ac_cv_func_epoll_ctl" = yes; then AC_DEFINE([HAVE_EPOLL], , [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], , [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], , [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.