Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
BIND
Commits
4014bc42
Commit
4014bc42
authored
Sep 04, 2018
by
Ondřej Surý
Browse files
According to POSIX.1-2001, POSIX.1-2008 #include <sys/select.h> is correct way to get fd_set
parent
1333d4a7
Changes
5
Hide whitespace changes
Inline
Side-by-side
bin/tests/optional/zone_test.c
View file @
4014bc42
...
...
@@ -12,6 +12,7 @@
#include
<config.h>
#include
<sys/param.h>
#include
<sys/select.h>
#include
<sys/types.h>
#include
<sys/time.h>
...
...
@@ -35,10 +36,6 @@
#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
;
...
...
configure
View file @
4014bc42
...
...
@@ -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.
#
...
...
configure.in
View file @
4014bc42
...
...
@@ -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.
#
...
...
lib/isc/include/isc/platform.h.in
View file @
4014bc42
...
...
@@ -36,6 +36,12 @@
*** 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.
*/
...
...
@@ -69,11 +75,6 @@
*** 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.
...
...
lib/isc/unix/socket_p.h
View file @
4014bc42
...
...
@@ -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
*
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment