mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 22:15:20 +00:00
Replace platform ISC_PLATFORM_HAVEEPOLL with config HAVE_EPOLL_CREATE1
This commit is contained in:
@@ -188,6 +188,9 @@
|
||||
/* Define to 1 if you have the <edit/readline/readline.h> header file. */
|
||||
#undef HAVE_EDIT_READLINE_READLINE_H
|
||||
|
||||
/* Define to 1 if you have the `epoll_create1' function. */
|
||||
#undef HAVE_EPOLL_CREATE1
|
||||
|
||||
/* Define to 1 if you have the `EVP_aes_128_ecb' function. */
|
||||
#undef HAVE_EVP_AES_128_ECB
|
||||
|
||||
|
53
configure
vendored
53
configure
vendored
@@ -763,7 +763,6 @@ CHECK_DSA
|
||||
GEOIPLINKOBJS
|
||||
GEOIPLINKSRCS
|
||||
ISC_PLATFORM_HAVEDEVPOLL
|
||||
ISC_PLATFORM_HAVEEPOLL
|
||||
ISC_PLATFORM_NORETURN_POST
|
||||
ISC_PLATFORM_NORETURN_PRE
|
||||
ISC_SOCKADDR_LEN_T
|
||||
@@ -13905,53 +13904,25 @@ fi
|
||||
#
|
||||
# Check whether --enable-epoll was given.
|
||||
if test "${enable_epoll+set}" = set; then :
|
||||
enableval=$enable_epoll; want_epoll="$enableval"
|
||||
enableval=$enable_epoll;
|
||||
else
|
||||
want_epoll="auto"
|
||||
enable_epoll="yes"
|
||||
fi
|
||||
|
||||
case $want_epoll in
|
||||
auto)
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking epoll support" >&5
|
||||
$as_echo_n "checking epoll support... " >&6; }
|
||||
if test "$cross_compiling" = yes; then :
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
ISC_PLATFORM_HAVEEPOLL="#undef ISC_PLATFORM_HAVEEPOLL"
|
||||
else
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
#include <sys/epoll.h>
|
||||
int main() {
|
||||
if (epoll_create(1) < 0)
|
||||
return (1);
|
||||
return (0);
|
||||
}
|
||||
|
||||
if test "$enable_epoll" = "yes"; then :
|
||||
for ac_func in epoll_create1
|
||||
do :
|
||||
ac_fn_c_check_func "$LINENO" "epoll_create1" "ac_cv_func_epoll_create1"
|
||||
if test "x$ac_cv_func_epoll_create1" = xyes; then :
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_EPOLL_CREATE1 1
|
||||
_ACEOF
|
||||
if ac_fn_c_try_run "$LINENO"; then :
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
ISC_PLATFORM_HAVEEPOLL="#define ISC_PLATFORM_HAVEEPOLL 1"
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
ISC_PLATFORM_HAVEEPOLL="#undef ISC_PLATFORM_HAVEEPOLL"
|
||||
fi
|
||||
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
|
||||
conftest.$ac_objext conftest.beam conftest.$ac_ext
|
||||
fi
|
||||
|
||||
;;
|
||||
yes)
|
||||
ISC_PLATFORM_HAVEEPOLL="#define ISC_PLATFORM_HAVEEPOLL 1"
|
||||
;;
|
||||
*)
|
||||
ISC_PLATFORM_HAVEEPOLL="#undef ISC_PLATFORM_HAVEEPOLL"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
done
|
||||
|
||||
fi
|
||||
|
||||
#
|
||||
# check if we support /dev/poll
|
||||
|
37
configure.in
37
configure.in
@@ -543,36 +543,13 @@ AS_IF([test "$enable_kqueue" = "yes"],
|
||||
# check if we have epoll. Linux kernel 2.4 has epoll_create() which fails,
|
||||
# so we need to try running the code, not just test its existence.
|
||||
#
|
||||
AC_ARG_ENABLE(epoll,
|
||||
AS_HELP_STRING([--enable-epoll],
|
||||
[use Linux epoll when available [default=auto]]),
|
||||
want_epoll="$enableval", want_epoll="auto")
|
||||
case $want_epoll in
|
||||
auto)
|
||||
AC_MSG_CHECKING(epoll support)
|
||||
AC_TRY_RUN([
|
||||
#include <sys/epoll.h>
|
||||
int main() {
|
||||
if (epoll_create(1) < 0)
|
||||
return (1);
|
||||
return (0);
|
||||
}
|
||||
],
|
||||
[AC_MSG_RESULT(yes)
|
||||
ISC_PLATFORM_HAVEEPOLL="#define ISC_PLATFORM_HAVEEPOLL 1"],
|
||||
[AC_MSG_RESULT(no)
|
||||
ISC_PLATFORM_HAVEEPOLL="#undef ISC_PLATFORM_HAVEEPOLL"],
|
||||
[AC_MSG_RESULT(no)
|
||||
ISC_PLATFORM_HAVEEPOLL="#undef ISC_PLATFORM_HAVEEPOLL"])
|
||||
;;
|
||||
yes)
|
||||
ISC_PLATFORM_HAVEEPOLL="#define ISC_PLATFORM_HAVEEPOLL 1"
|
||||
;;
|
||||
*)
|
||||
ISC_PLATFORM_HAVEEPOLL="#undef ISC_PLATFORM_HAVEEPOLL"
|
||||
;;
|
||||
esac
|
||||
AC_SUBST(ISC_PLATFORM_HAVEEPOLL)
|
||||
AC_ARG_ENABLE([epoll],
|
||||
[AS_HELP_STRING([--enable-epoll],
|
||||
[use Linux epoll when available [default=auto]])],
|
||||
[], [enable_epoll="yes"])
|
||||
|
||||
AS_IF([test "$enable_epoll" = "yes"],
|
||||
[AC_CHECK_FUNCS([epoll_create1])])
|
||||
|
||||
#
|
||||
# check if we support /dev/poll
|
||||
|
@@ -47,11 +47,6 @@
|
||||
*/
|
||||
@ISC_PLATFORM_HAVETFO@
|
||||
|
||||
/*! \brief
|
||||
* Define if the system supports epoll multiplexing
|
||||
*/
|
||||
@ISC_PLATFORM_HAVEEPOLL@
|
||||
|
||||
/*! \brief
|
||||
* Define if the system supports /dev/poll multiplexing
|
||||
*/
|
||||
|
@@ -68,7 +68,7 @@
|
||||
#ifdef HAVE_KQUEUE
|
||||
#include <sys/event.h>
|
||||
#endif
|
||||
#ifdef ISC_PLATFORM_HAVEEPOLL
|
||||
#ifdef HAVE_EPOLL_CREATE1
|
||||
#include <sys/epoll.h>
|
||||
#endif
|
||||
#ifdef ISC_PLATFORM_HAVEDEVPOLL
|
||||
@@ -96,7 +96,7 @@
|
||||
*/
|
||||
#if defined(HAVE_KQUEUE)
|
||||
#define USE_KQUEUE
|
||||
#elif defined (ISC_PLATFORM_HAVEEPOLL)
|
||||
#elif defined(HAVE_EPOLL_CREATE1)
|
||||
#define USE_EPOLL
|
||||
#elif defined (ISC_PLATFORM_HAVEDEVPOLL)
|
||||
#define USE_DEVPOLL
|
||||
|
Reference in New Issue
Block a user