Commit 68f473a2 authored by Ondřej Surý's avatar Ondřej Surý

Replace platform ISC_PLATFORM_HAVEKQUEUE with config HAVE_KQUEUE

parent d00ef56d
......@@ -266,6 +266,9 @@
/* Define to 1 if you have the <kerberosv5/krb5.h> header file. */
#undef HAVE_KERBEROSV5_KRB5_H
/* Define to 1 if you have the `kqueue' function. */
#undef HAVE_KQUEUE
/* Define to 1 if you have the <krb5.h> header file. */
#undef HAVE_KRB5_H
......
......@@ -764,7 +764,6 @@ GEOIPLINKOBJS
GEOIPLINKSRCS
ISC_PLATFORM_HAVEDEVPOLL
ISC_PLATFORM_HAVEEPOLL
ISC_PLATFORM_HAVEKQUEUE
ISC_PLATFORM_NORETURN_POST
ISC_PLATFORM_NORETURN_PRE
ISC_SOCKADDR_LEN_T
......@@ -13880,34 +13879,25 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
#
# Check whether --enable-kqueue was given.
if test "${enable_kqueue+set}" = set; then :
enableval=$enable_kqueue; want_kqueue="$enableval"
enableval=$enable_kqueue;
else
want_kqueue="yes"
enable_kqueue="yes"
fi
case $want_kqueue in
yes)
ac_fn_c_check_func "$LINENO" "kqueue" "ac_cv_func_kqueue"
if test "$enable_kqueue" = "yes"; then :
for ac_func in kqueue
do :
ac_fn_c_check_func "$LINENO" "kqueue" "ac_cv_func_kqueue"
if test "x$ac_cv_func_kqueue" = xyes; then :
ac_cv_have_kqueue=yes
else
ac_cv_have_kqueue=no
fi
cat >>confdefs.h <<_ACEOF
#define HAVE_KQUEUE 1
_ACEOF
case $ac_cv_have_kqueue in
yes)
ISC_PLATFORM_HAVEKQUEUE="#define ISC_PLATFORM_HAVEKQUEUE 1"
;;
*)
ISC_PLATFORM_HAVEKQUEUE="#undef ISC_PLATFORM_HAVEKQUEUE"
;;
esac
;;
*)
ISC_PLATFORM_HAVEKQUEUE="#undef ISC_PLATFORM_HAVEKQUEUE"
;;
esac
fi
done
fi
#
# check if we have epoll. Linux kernel 2.4 has epoll_create() which fails,
......
......@@ -531,27 +531,13 @@ AC_SUBST(ISC_PLATFORM_NORETURN_POST)
#
# check if we have kqueue
#
AC_ARG_ENABLE(kqueue,
AS_HELP_STRING([--enable-kqueue],
[use BSD kqueue when available [default=yes]]),
want_kqueue="$enableval", want_kqueue="yes")
case $want_kqueue in
yes)
AC_CHECK_FUNC(kqueue, ac_cv_have_kqueue=yes, ac_cv_have_kqueue=no)
case $ac_cv_have_kqueue in
yes)
ISC_PLATFORM_HAVEKQUEUE="#define ISC_PLATFORM_HAVEKQUEUE 1"
;;
*)
ISC_PLATFORM_HAVEKQUEUE="#undef ISC_PLATFORM_HAVEKQUEUE"
;;
esac
;;
*)
ISC_PLATFORM_HAVEKQUEUE="#undef ISC_PLATFORM_HAVEKQUEUE"
;;
esac
AC_SUBST(ISC_PLATFORM_HAVEKQUEUE)
AC_ARG_ENABLE([kqueue],
[AS_HELP_STRING([--enable-kqueue],
[use BSD kqueue when available [default=yes]])],
[], enable_kqueue="yes")
AS_IF([test "$enable_kqueue" = "yes"],
[AC_CHECK_FUNCS([kqueue])])
#
# check if we have epoll. Linux kernel 2.4 has epoll_create() which fails,
......
......@@ -47,11 +47,6 @@
*/
@ISC_PLATFORM_HAVETFO@
/*! \brief
* Define if the system supports kqueue multiplexing
*/
@ISC_PLATFORM_HAVEKQUEUE@
/*! \brief
* Define if the system supports epoll multiplexing
*/
......
......@@ -65,7 +65,7 @@
#ifdef ISC_PLATFORM_HAVESYSUNH
#include <sys/un.h>
#endif
#ifdef ISC_PLATFORM_HAVEKQUEUE
#ifdef HAVE_KQUEUE
#include <sys/event.h>
#endif
#ifdef ISC_PLATFORM_HAVEEPOLL
......@@ -94,7 +94,7 @@
/*%
* Choose the most preferable multiplex method.
*/
#ifdef ISC_PLATFORM_HAVEKQUEUE
#if defined(HAVE_KQUEUE)
#define USE_KQUEUE
#elif defined (ISC_PLATFORM_HAVEEPOLL)
#define USE_EPOLL
......@@ -106,7 +106,7 @@ typedef struct {
} pollinfo_t;
#else
#define USE_SELECT
#endif /* ISC_PLATFORM_HAVEKQUEUE */
#endif /* HAVE_KQUEUE */
/*
* Set by the -T dscp option on the command line. If set to a value
......
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