]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
According to POSIX.1-2001, POSIX.1-2008 #include <sys/select.h> is correct way to...
authorOndřej Surý <ondrej@sury.org>
Tue, 4 Sep 2018 10:42:48 +0000 (12:42 +0200)
committerOndřej Surý <ondrej@sury.org>
Fri, 7 Sep 2018 10:17:30 +0000 (12:17 +0200)
bin/tests/optional/zone_test.c
configure
configure.in
lib/isc/include/isc/platform.h.in
lib/isc/unix/socket_p.h

index d64bd189aeab861a3f0ab3d42e8aa9d43351460b..b26acea0b17ff42a85c897d3a74d37c291ee025b 100644 (file)
@@ -12,6 +12,7 @@
 #include <config.h>
 
 #include <sys/param.h>
+#include <sys/select.h>
 #include <sys/types.h>
 #include <sys/time.h>
 
 #include <dns/result.h>
 #include <dns/zone.h>
 
-#ifdef ISC_PLATFORM_NEEDSYSSELECTH
-#include <sys/select.h>
-#endif
-
 static int debug = 0;
 static int quiet = 0;
 static int stats = 0;
index cbf970700be6b763040dba763be68808270b27b6..8d44145be12fee0bb06b5a4bdaac21b861e60fd5 100755 (executable)
--- a/configure
+++ b/configure
@@ -765,7 +765,6 @@ ax_pthread_config
 CHECK_DSA
 GEOIPLINKOBJS
 GEOIPLINKSRCS
-ISC_PLATFORM_NEEDSYSSELECTH
 ISC_PLATFORM_HAVEDEVPOLL
 ISC_PLATFORM_HAVEEPOLL
 ISC_PLATFORM_HAVEKQUEUE
@@ -14003,58 +14002,6 @@ done
 esac
 
 
-#
-# check if we need to #include sys/select.h explicitly
-#
-case $ac_cv_header_unistd_h in
-yes)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if unistd.h or sys/types.h defines fd_set" >&5
-$as_echo_n "checking if unistd.h or sys/types.h defines fd_set... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <sys/types.h> /* Ultrix */
-#include <unistd.h>
-int
-main ()
-{
-fd_set read_set; return (0);
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-        ISC_PLATFORM_NEEDSYSSELECTH="#undef ISC_PLATFORM_NEEDSYSSELECTH"
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-       case $ac_cv_header_sys_select_h in
-       yes)
-        ISC_PLATFORM_NEEDSYSSELECTH="#define ISC_PLATFORM_NEEDSYSSELECTH 1"
-               ;;
-       no)
-               as_fn_error $? "need either working unistd.h or sys/select.h" "$LINENO" 5
-               ;;
-       esac
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-       ;;
-no)
-       case $ac_cv_header_sys_select_h in
-       yes)
-            ISC_PLATFORM_NEEDSYSSELECTH="#define ISC_PLATFORM_NEEDSYSSELECTH 1"
-               ;;
-       no)
-               as_fn_error $? "need either unistd.h or sys/select.h" "$LINENO" 5
-               ;;
-       esac
-       ;;
-esac
-
-
 #
 # Find the machine's endian flavor.
 #
index 04f51bc77f67a0b1e0a2e06bdcf3d6ef42d880b3..5de4a1e3004ee5869570693688770f73c4c13e25 100644 (file)
@@ -609,42 +609,6 @@ yes)
 esac
 AC_SUBST(ISC_PLATFORM_HAVEDEVPOLL)
 
-#
-# check if we need to #include sys/select.h explicitly
-#
-case $ac_cv_header_unistd_h in
-yes)
-AC_MSG_CHECKING(if unistd.h or sys/types.h defines fd_set)
-AC_TRY_COMPILE([
-#include <sys/types.h> /* Ultrix */
-#include <unistd.h>],
-[fd_set read_set; return (0);],
-       [AC_MSG_RESULT(yes)
-        ISC_PLATFORM_NEEDSYSSELECTH="#undef ISC_PLATFORM_NEEDSYSSELECTH"],
-       [AC_MSG_RESULT(no)
-       case $ac_cv_header_sys_select_h in
-       yes)
-        ISC_PLATFORM_NEEDSYSSELECTH="#define ISC_PLATFORM_NEEDSYSSELECTH 1"
-               ;;
-       no)
-               AC_MSG_ERROR([need either working unistd.h or sys/select.h])
-               ;;
-       esac
-       ])
-       ;;
-no)
-       case $ac_cv_header_sys_select_h in
-       yes)
-            ISC_PLATFORM_NEEDSYSSELECTH="#define ISC_PLATFORM_NEEDSYSSELECTH 1"
-               ;;
-       no)
-               AC_MSG_ERROR([need either unistd.h or sys/select.h])
-               ;;
-       esac
-       ;;
-esac
-AC_SUBST(ISC_PLATFORM_NEEDSYSSELECTH)
-
 #
 # Find the machine's endian flavor.
 #
index 13e138e6e1a932c0f8e738f61e2c744271adcdd1..ee6b87adb6df62de7d6298e3cb0666e696726401 100644 (file)
  *** Network.
  ***/
 
+/*! \brief
+ * Define if the system has struct lifconf which is a extended struct ifconf
+ * for IPv6.
+ */
+@ISC_PLATFORM_HAVELIFCONF@
+
 /*! \brief
  * Define if the system has TCP_FASTOPEN socket option.
  */
  *** Miscellaneous.
  ***/
 
-/*
- * Defined if unistd.h does not cause fd_set to be delared.
- */
-@ISC_PLATFORM_NEEDSYSSELECTH@
-
 /*
  * Defined to <gssapi.h> or <gssapi/gssapi.h> for how to include
  * the GSSAPI header.
index fb4fdb89d7856fbe53a51fdb50f0386879049e2f..6ab124d0545540ef7df839c191da922109dd3c92 100644 (file)
@@ -15,9 +15,7 @@
 
 /*! \file */
 
-#ifdef ISC_PLATFORM_NEEDSYSSELECTH
-#include <sys/select.h>
-#endif
+#include <sys/time.h>
 
 typedef struct isc_socketwait isc_socketwait_t;
 int isc__socketmgr_waitevents(isc_socketmgr_t *, struct timeval *,