Skip to content

Commit

Permalink
Select polling mechanism based on configure checks, not OS macros.
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Sustrik <[email protected]>
  • Loading branch information
sustrik committed Dec 24, 2016
1 parent 4cc2b52 commit b092596
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ AC_CHECK_FUNC([mprotect], [AC_DEFINE([HAVE_MPROTECT])])
AC_CHECK_LIB([rt], [clock_gettime])
AC_CHECK_FUNCS([clock_gettime])
AC_CHECK_LIB([socket], [socket])
AC_CHECK_FUNCS([epoll_create], [] ,[AC_DEFINE([DILL_NO_EPOLL])])
AC_CHECK_FUNCS([kqueue], [] ,[AC_DEFINE([DILL_NO_KQUEUE])])
AC_CHECK_FUNCS([epoll_create], [AC_DEFINE([HAVE_EPOLL])])
AC_CHECK_FUNCS([kqueue], [AC_DEFINE([HAVE_KQUEUE])])

################################################################################
# Libtool #
Expand Down
4 changes: 2 additions & 2 deletions pollset.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
#elif defined DILL_POLL
#include "poll.c.inc"
/* Defaults. */
#elif defined __linux__ && !defined DILL_NO_EPOLL
#elif defined HAVE_EPOLL
#include "epoll.c.inc"
#elif (defined __FreeBSD__ || defined __APPLE__) && !defined DILL_NO_KQUEUE
#elif defined HAVE_KQUEUE
#include "kqueue.c.inc"
#else
#include "poll.c.inc"
Expand Down
4 changes: 2 additions & 2 deletions pollset.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
#elif defined DILL_POLL
#include "poll.h.inc"
/* Defaults. */
#elif defined __linux__ && !defined DILL_NO_EPOLL
#elif defined HAVE_EPOLL
#include "epoll.h.inc"
#elif (defined __FreeBSD__ || defined __APPLE__) && !defined DILL_NO_KQUEUE
#elif defined HAVE_KQUEUE
#include "kqueue.h.inc"
#else
#include "poll.h.inc"
Expand Down

0 comments on commit b092596

Please sign in to comment.