Commit 092edb5b authored by Ondřej Surý's avatar Ondřej Surý
Browse files

Replace platform ISC_PLATFORM_HAVEDEVPOLL with check for devpoll.h headers

parent 5d65392d
......@@ -762,7 +762,6 @@ ax_pthread_config
CHECK_DSA
GEOIPLINKOBJS
GEOIPLINKSRCS
ISC_PLATFORM_HAVEDEVPOLL
ISC_PLATFORM_NORETURN_POST
ISC_PLATFORM_NORETURN_PRE
ISC_SOCKADDR_LEN_T
......@@ -13929,14 +13928,13 @@ fi
#
# Check whether --enable-devpoll was given.
if test "${enable_devpoll+set}" = set; then :
enableval=$enable_devpoll; want_devpoll="$enableval"
enableval=$enable_devpoll;
else
want_devpoll="yes"
enable_devpoll="yes"
fi
 
case $want_devpoll in
yes)
for ac_header in sys/devpoll.h devpoll.h
if test "$enable_devpoll" = "yes"; then :
for ac_header in sys/devpoll.h devpoll.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
......@@ -13944,21 +13942,12 @@ if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
ISC_PLATFORM_HAVEDEVPOLL="#define ISC_PLATFORM_HAVEDEVPOLL 1"
else
ISC_PLATFORM_HAVEDEVPOLL="#undef ISC_PLATFORM_HAVEDEVPOLL"
 
fi
 
done
 
;;
*)
ISC_PLATFORM_HAVEDEVPOLL="#undef ISC_PLATFORM_HAVEDEVPOLL"
;;
esac
fi
 
#
# Find the machine's endian flavor.
......
......@@ -554,23 +554,12 @@ AS_IF([test "$enable_epoll" = "yes"],
#
# check if we support /dev/poll
#
AC_ARG_ENABLE(devpoll,
AS_HELP_STRING([--enable-devpoll],
[use /dev/poll when available [default=yes]]),
want_devpoll="$enableval", want_devpoll="yes")
case $want_devpoll in
yes)
AC_CHECK_HEADERS(sys/devpoll.h devpoll.h,
ISC_PLATFORM_HAVEDEVPOLL="#define ISC_PLATFORM_HAVEDEVPOLL 1"
,
ISC_PLATFORM_HAVEDEVPOLL="#undef ISC_PLATFORM_HAVEDEVPOLL"
)
;;
*)
ISC_PLATFORM_HAVEDEVPOLL="#undef ISC_PLATFORM_HAVEDEVPOLL"
;;
esac
AC_SUBST(ISC_PLATFORM_HAVEDEVPOLL)
AC_ARG_ENABLE([devpoll],
[AS_HELP_STRING([--enable-devpoll],
[use /dev/poll when available [default=yes]])],
[], [enable_devpoll="yes"])
AS_IF([test "$enable_devpoll" = "yes"],
[AC_CHECK_HEADERS([sys/devpoll.h devpoll.h])])
#
# Find the machine's endian flavor.
......
......@@ -47,11 +47,6 @@
*/
@ISC_PLATFORM_HAVETFO@
/*! \brief
* Define if the system supports /dev/poll multiplexing
*/
@ISC_PLATFORM_HAVEDEVPOLL@
/***
*** Miscellaneous.
***/
......
......@@ -71,13 +71,11 @@
#ifdef HAVE_EPOLL_CREATE1
#include <sys/epoll.h>
#endif
#ifdef ISC_PLATFORM_HAVEDEVPOLL
#if defined(HAVE_SYS_DEVPOLL_H)
#include <sys/devpoll.h>
#elif defined(HAVE_DEVPOLL_H)
#include <devpoll.h>
#endif
#endif
#include <netinet/tcp.h>
......@@ -98,7 +96,7 @@
#define USE_KQUEUE
#elif defined(HAVE_EPOLL_CREATE1)
#define USE_EPOLL
#elif defined (ISC_PLATFORM_HAVEDEVPOLL)
#elif defined(HAVE_SYS_DEVPOLL_H) || defined(HAVE_DEVPOLL_H)
#define USE_DEVPOLL
typedef struct {
unsigned int want_read : 1,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment