2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

Replace platform ISC_PLATFORM_HAVEEPOLL with config HAVE_EPOLL_CREATE1

This commit is contained in:
Ondřej Surý
2018-09-05 12:14:27 +02:00
parent 68f473a25e
commit 5d65392d18
5 changed files with 24 additions and 78 deletions

View File

@@ -188,6 +188,9 @@
/* Define to 1 if you have the <edit/readline/readline.h> header file. */ /* Define to 1 if you have the <edit/readline/readline.h> header file. */
#undef HAVE_EDIT_READLINE_READLINE_H #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. */ /* Define to 1 if you have the `EVP_aes_128_ecb' function. */
#undef HAVE_EVP_AES_128_ECB #undef HAVE_EVP_AES_128_ECB

53
configure vendored
View File

@@ -763,7 +763,6 @@ CHECK_DSA
GEOIPLINKOBJS GEOIPLINKOBJS
GEOIPLINKSRCS GEOIPLINKSRCS
ISC_PLATFORM_HAVEDEVPOLL ISC_PLATFORM_HAVEDEVPOLL
ISC_PLATFORM_HAVEEPOLL
ISC_PLATFORM_NORETURN_POST ISC_PLATFORM_NORETURN_POST
ISC_PLATFORM_NORETURN_PRE ISC_PLATFORM_NORETURN_PRE
ISC_SOCKADDR_LEN_T ISC_SOCKADDR_LEN_T
@@ -13905,53 +13904,25 @@ fi
# #
# Check whether --enable-epoll was given. # Check whether --enable-epoll was given.
if test "${enable_epoll+set}" = set; then : if test "${enable_epoll+set}" = set; then :
enableval=$enable_epoll; want_epoll="$enableval" enableval=$enable_epoll;
else else
want_epoll="auto" enable_epoll="yes"
fi 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 _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
;; fi
yes) done
ISC_PLATFORM_HAVEEPOLL="#define ISC_PLATFORM_HAVEEPOLL 1"
;;
*)
ISC_PLATFORM_HAVEEPOLL="#undef ISC_PLATFORM_HAVEEPOLL"
;;
esac
fi
# #
# check if we support /dev/poll # check if we support /dev/poll

View File

@@ -543,36 +543,13 @@ AS_IF([test "$enable_kqueue" = "yes"],
# check if we have epoll. Linux kernel 2.4 has epoll_create() which fails, # 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. # so we need to try running the code, not just test its existence.
# #
AC_ARG_ENABLE(epoll, AC_ARG_ENABLE([epoll],
AS_HELP_STRING([--enable-epoll], [AS_HELP_STRING([--enable-epoll],
[use Linux epoll when available [default=auto]]), [use Linux epoll when available [default=auto]])],
want_epoll="$enableval", want_epoll="auto") [], [enable_epoll="yes"])
case $want_epoll in
auto) AS_IF([test "$enable_epoll" = "yes"],
AC_MSG_CHECKING(epoll support) [AC_CHECK_FUNCS([epoll_create1])])
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)
# #
# check if we support /dev/poll # check if we support /dev/poll

View File

@@ -47,11 +47,6 @@
*/ */
@ISC_PLATFORM_HAVETFO@ @ISC_PLATFORM_HAVETFO@
/*! \brief
* Define if the system supports epoll multiplexing
*/
@ISC_PLATFORM_HAVEEPOLL@
/*! \brief /*! \brief
* Define if the system supports /dev/poll multiplexing * Define if the system supports /dev/poll multiplexing
*/ */

View File

@@ -68,7 +68,7 @@
#ifdef HAVE_KQUEUE #ifdef HAVE_KQUEUE
#include <sys/event.h> #include <sys/event.h>
#endif #endif
#ifdef ISC_PLATFORM_HAVEEPOLL #ifdef HAVE_EPOLL_CREATE1
#include <sys/epoll.h> #include <sys/epoll.h>
#endif #endif
#ifdef ISC_PLATFORM_HAVEDEVPOLL #ifdef ISC_PLATFORM_HAVEDEVPOLL
@@ -96,7 +96,7 @@
*/ */
#if defined(HAVE_KQUEUE) #if defined(HAVE_KQUEUE)
#define USE_KQUEUE #define USE_KQUEUE
#elif defined (ISC_PLATFORM_HAVEEPOLL) #elif defined(HAVE_EPOLL_CREATE1)
#define USE_EPOLL #define USE_EPOLL
#elif defined (ISC_PLATFORM_HAVEDEVPOLL) #elif defined (ISC_PLATFORM_HAVEDEVPOLL)
#define USE_DEVPOLL #define USE_DEVPOLL