mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 22:15:20 +00:00
Remove legacy BSD/OS support (ipv6,various hacks)
This commit is contained in:
32
acconfig.h
32
acconfig.h
@@ -77,38 +77,6 @@
|
||||
/** define if getc_unlocked() is available */
|
||||
#undef HAVE_GETCUNLOCKED
|
||||
|
||||
/** Shut up warnings about sputaux in stdio.h on BSD/OS pre-4.1 */
|
||||
#undef SHUTUP_SPUTAUX
|
||||
#ifdef SHUTUP_SPUTAUX
|
||||
struct __sFILE;
|
||||
extern __inline int __sputaux(int _c, struct __sFILE *_p);
|
||||
#endif
|
||||
|
||||
/** Shut up warnings about missing sigwait prototype on BSD/OS 4.0* */
|
||||
#undef SHUTUP_SIGWAIT
|
||||
#ifdef SHUTUP_SIGWAIT
|
||||
int sigwait(const unsigned int *set, int *sig);
|
||||
#endif
|
||||
|
||||
/** Shut up warnings from gcc -Wcast-qual on BSD/OS 4.1. */
|
||||
#undef SHUTUP_STDARG_CAST
|
||||
#if defined(SHUTUP_STDARG_CAST) && defined(__GNUC__)
|
||||
#include <stdarg.h> /** Grr. Must be included *every time*. */
|
||||
/**
|
||||
* The silly continuation line is to keep configure from
|
||||
* commenting out the #undef.
|
||||
*/
|
||||
|
||||
#undef \
|
||||
va_start
|
||||
#define va_start(ap, last) \
|
||||
do { \
|
||||
union { const void *konst; long *var; } _u; \
|
||||
_u.konst = &(last); \
|
||||
ap = (va_list)(_u.var + __va_words(__typeof(last))); \
|
||||
} while (0)
|
||||
#endif /** SHUTUP_STDARG_CAST && __GNUC__ */
|
||||
|
||||
/** define if the system has a random number generating device */
|
||||
#undef PATH_RANDOMDEV
|
||||
|
||||
|
32
config.h.in
32
config.h.in
@@ -77,38 +77,6 @@
|
||||
/** define if getc_unlocked() is available */
|
||||
#undef HAVE_GETCUNLOCKED
|
||||
|
||||
/** Shut up warnings about sputaux in stdio.h on BSD/OS pre-4.1 */
|
||||
#undef SHUTUP_SPUTAUX
|
||||
#ifdef SHUTUP_SPUTAUX
|
||||
struct __sFILE;
|
||||
extern __inline int __sputaux(int _c, struct __sFILE *_p);
|
||||
#endif
|
||||
|
||||
/** Shut up warnings about missing sigwait prototype on BSD/OS 4.0* */
|
||||
#undef SHUTUP_SIGWAIT
|
||||
#ifdef SHUTUP_SIGWAIT
|
||||
int sigwait(const unsigned int *set, int *sig);
|
||||
#endif
|
||||
|
||||
/** Shut up warnings from gcc -Wcast-qual on BSD/OS 4.1. */
|
||||
#undef SHUTUP_STDARG_CAST
|
||||
#if defined(SHUTUP_STDARG_CAST) && defined(__GNUC__)
|
||||
#include <stdarg.h> /** Grr. Must be included *every time*. */
|
||||
/**
|
||||
* The silly continuation line is to keep configure from
|
||||
* commenting out the #undef.
|
||||
*/
|
||||
|
||||
#undef \
|
||||
va_start
|
||||
#define va_start(ap, last) \
|
||||
do { \
|
||||
union { const void *konst; long *var; } _u; \
|
||||
_u.konst = &(last); \
|
||||
ap = (va_list)(_u.var + __va_words(__typeof(last))); \
|
||||
} while (0)
|
||||
#endif /** SHUTUP_STDARG_CAST && __GNUC__ */
|
||||
|
||||
/** define if the system has a random number generating device */
|
||||
#undef PATH_RANDOMDEV
|
||||
|
||||
|
@@ -50,11 +50,6 @@ case $host in
|
||||
use_threads=false ;;
|
||||
*-freebsd*)
|
||||
use_threads=true ;;
|
||||
[*-bsdi[234]*])
|
||||
# Thread signals do not work reliably on some versions of BSD/OS.
|
||||
use_threads=false ;;
|
||||
*-bsdi5*)
|
||||
use_threads=true ;;
|
||||
*-linux*)
|
||||
use_threads=true ;;
|
||||
*-darwin[[123456789]].*)
|
||||
|
194
configure
vendored
194
configure
vendored
@@ -723,7 +723,6 @@ ISC_PLATFORM_HAVESTRINGSH
|
||||
ISC_PLATFORM_BRACEPTHREADONCEINIT
|
||||
IRS_PLATFORM_USEDECLSPEC
|
||||
ISC_PLATFORM_USEDECLSPEC
|
||||
ISC_PLATFORM_RLIMITTYPE
|
||||
ISC_PLATFORM_HAVESTATNSEC
|
||||
ISC_PLATFORM_HAVESYSUNH
|
||||
LIBCAP_LIBS
|
||||
@@ -759,7 +758,6 @@ ISC_PLATFORM_HAVEIN6PKTINFO
|
||||
ISC_PLATFORM_NEEDIN6ADDRLOOPBACK
|
||||
ISC_PLATFORM_NEEDIN6ADDRANY
|
||||
ISC_PLATFORM_HAVEINADDR6
|
||||
ISC_PLATFORM_NEEDNETINET6IN6H
|
||||
ISC_PLATFORM_HAVEIPV6
|
||||
BIND9_CO_RULE
|
||||
LIBTOOL_IN_MAIN
|
||||
@@ -981,7 +979,6 @@ with_readline
|
||||
enable_isc_spnego
|
||||
enable_chroot
|
||||
enable_linux_caps
|
||||
with_rlimtype
|
||||
enable_atomic
|
||||
enable_fixed_rrset
|
||||
enable_rpz_nsip
|
||||
@@ -1721,7 +1718,6 @@ Optional Packages:
|
||||
use gperftools CPU profiler
|
||||
--with-kame=PATH use Kame IPv6 [default path /usr/local/v6]
|
||||
--with-readline=LIBSPEC specify readline library [default auto]
|
||||
|
||||
--with-dnsrps-libname DNSRPS provider library name (librpz.so)
|
||||
--with-dnsrps-dir path to DNSRPS provider library
|
||||
--with-protobuf-c=path Path where protobuf-c is installed, for dnstap
|
||||
@@ -15723,15 +15719,6 @@ fi
|
||||
esac
|
||||
;;
|
||||
#
|
||||
# BSDI 3.0 through 4.0.1 needs pthread_init() to be
|
||||
# called before certain pthreads calls. This is deprecated
|
||||
# in BSD/OS 4.1.
|
||||
#
|
||||
*-bsdi3.*|*-bsdi4.0*)
|
||||
$as_echo "#define NEED_PTHREAD_INIT 1" >>confdefs.h
|
||||
|
||||
;;
|
||||
#
|
||||
# LinuxThreads requires some changes to the way we
|
||||
# deal with signals.
|
||||
#
|
||||
@@ -18028,27 +18015,6 @@ Please choose the proper path with the following command:
|
||||
;;
|
||||
esac
|
||||
|
||||
#
|
||||
# Whether netinet6/in6.h is needed has to be defined in isc/platform.h.
|
||||
# Including it on Kame-using platforms is very bad, though, because
|
||||
# Kame uses #error against direct inclusion. So include it on only
|
||||
# the platform that is otherwise broken without it -- BSD/OS 4.0 through 4.1.
|
||||
# This is done before the in6_pktinfo check because that's what
|
||||
# netinet6/in6.h is needed for.
|
||||
#
|
||||
|
||||
case "$host" in
|
||||
*-bsdi4.[01]*)
|
||||
ISC_PLATFORM_NEEDNETINET6IN6H="#define ISC_PLATFORM_NEEDNETINET6IN6H 1"
|
||||
isc_netinet6in6_hack="#include <netinet6/in6.h>"
|
||||
;;
|
||||
*)
|
||||
ISC_PLATFORM_NEEDNETINET6IN6H="#undef ISC_PLATFORM_NEEDNETINET6IN6H"
|
||||
isc_netinet6in6_hack=""
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
#
|
||||
# Now delve deeper into the suitability of the IPv6 support.
|
||||
#
|
||||
@@ -18064,7 +18030,6 @@ $as_echo_n "checking for in6_addr... " >&6; }
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
$isc_netinet6in6_hack
|
||||
|
||||
int
|
||||
main ()
|
||||
@@ -18095,7 +18060,6 @@ $as_echo_n "checking for in6addr_any... " >&6; }
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
$isc_netinet6in6_hack
|
||||
$isc_in_addr6_hack
|
||||
|
||||
int
|
||||
@@ -18126,7 +18090,6 @@ $as_echo_n "checking for in6addr_loopback... " >&6; }
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
$isc_netinet6in6_hack
|
||||
$isc_in_addr6_hack
|
||||
|
||||
int
|
||||
@@ -18157,7 +18120,6 @@ $as_echo_n "checking for sin6_scope_id in struct sockaddr_in6... " >&6; }
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
$isc_netinet6in6_hack
|
||||
|
||||
int
|
||||
main ()
|
||||
@@ -18186,7 +18148,6 @@ $as_echo_n "checking for in6_pktinfo... " >&6; }
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
$isc_netinet6in6_hack
|
||||
|
||||
int
|
||||
main ()
|
||||
@@ -18226,7 +18187,6 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
$isc_netinet6in6_hack
|
||||
|
||||
int
|
||||
main ()
|
||||
@@ -19270,120 +19230,6 @@ fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
|
||||
|
||||
#
|
||||
# BSD/OS, and perhaps some others, don't define rlim_t.
|
||||
#
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for type rlim_t" >&5
|
||||
$as_echo_n "checking for type rlim_t... " >&6; }
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/resource.h>
|
||||
int
|
||||
main ()
|
||||
{
|
||||
rlim_t rl = 19671212; 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_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE rlim_t"
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking type of rlim_cur" >&5
|
||||
$as_echo_n "checking type of rlim_cur... " >&6; }
|
||||
if test "$cross_compiling" = yes; then :
|
||||
|
||||
|
||||
# Check whether --with-rlimtype was given.
|
||||
if test "${with_rlimtype+set}" = set; then :
|
||||
withval=$with_rlimtype; rlimtype="$withval"
|
||||
else
|
||||
rlimtype="long long int"
|
||||
fi
|
||||
|
||||
ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE $rlimtype"
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot determine type of rlim_cur when cross compiling - assuming $rlimtype" >&5
|
||||
$as_echo "cannot determine type of rlim_cur when cross compiling - assuming $rlimtype" >&6; }
|
||||
else
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/resource.h>
|
||||
main() { struct rlimit r; exit(!(sizeof(r.rlim_cur) == sizeof(int)));}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_run "$LINENO"; then :
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: int" >&5
|
||||
$as_echo "int" >&6; }
|
||||
ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE int"
|
||||
else
|
||||
|
||||
if test "$cross_compiling" = yes; then :
|
||||
as_fn_error $? "this cannot happen" "$LINENO" 5
|
||||
else
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/resource.h>
|
||||
main() { struct rlimit r; exit(!(sizeof(r.rlim_cur) == sizeof(long int)));}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_run "$LINENO"; then :
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: long int" >&5
|
||||
$as_echo "long int" >&6; }
|
||||
ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE long int"
|
||||
else
|
||||
|
||||
if test "$cross_compiling" = yes; then :
|
||||
as_fn_error $? "this cannot happen" "$LINENO" 5
|
||||
else
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/resource.h>
|
||||
main() { struct rlimit r; exit((!sizeof(r.rlim_cur) == sizeof(long long int)));}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_run "$LINENO"; then :
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: long long int" >&5
|
||||
$as_echo "long long int" >&6; }
|
||||
ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE long long int"
|
||||
else
|
||||
as_fn_error $? "unable to determine sizeof rlim_cur" "$LINENO" 5
|
||||
|
||||
fi
|
||||
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
|
||||
conftest.$ac_objext conftest.beam conftest.$ac_ext
|
||||
fi
|
||||
|
||||
|
||||
fi
|
||||
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
|
||||
conftest.$ac_objext conftest.beam conftest.$ac_ext
|
||||
fi
|
||||
|
||||
|
||||
fi
|
||||
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
|
||||
conftest.$ac_objext conftest.beam conftest.$ac_ext
|
||||
fi
|
||||
|
||||
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
|
||||
|
||||
#
|
||||
# Older HP-UX doesn't have gettune
|
||||
#
|
||||
@@ -19496,16 +19342,6 @@ case "$host" in
|
||||
*-aix5.[123].*)
|
||||
hack_shutup_pthreadonceinit=yes
|
||||
;;
|
||||
*-bsdi3.1*)
|
||||
hack_shutup_sputaux=yes
|
||||
;;
|
||||
*-bsdi4.0*)
|
||||
hack_shutup_sigwait=yes
|
||||
hack_shutup_sputaux=yes
|
||||
;;
|
||||
*-bsdi4.[12]*)
|
||||
hack_shutup_stdargcast=yes
|
||||
;;
|
||||
*-solaris2.[89])
|
||||
hack_shutup_pthreadonceinit=yes
|
||||
;;
|
||||
@@ -19537,36 +19373,6 @@ case "$hack_shutup_pthreadonceinit" in
|
||||
;;
|
||||
esac
|
||||
|
||||
case "$hack_shutup_sigwait" in
|
||||
yes)
|
||||
#
|
||||
# Shut up a -Wmissing-prototypes warning for sigwait().
|
||||
#
|
||||
$as_echo "#define SHUTUP_SIGWAIT 1" >>confdefs.h
|
||||
|
||||
;;
|
||||
esac
|
||||
|
||||
case "$hack_shutup_sputaux" in
|
||||
yes)
|
||||
#
|
||||
# Shut up a -Wmissing-prototypes warning from <stdio.h>.
|
||||
#
|
||||
$as_echo "#define SHUTUP_SPUTAUX 1" >>confdefs.h
|
||||
|
||||
;;
|
||||
esac
|
||||
|
||||
case "$hack_shutup_stdargcast" in
|
||||
yes)
|
||||
#
|
||||
# Shut up a -Wcast-qual warning from va_start().
|
||||
#
|
||||
$as_echo "#define SHUTUP_STDARG_CAST 1" >>confdefs.h
|
||||
|
||||
;;
|
||||
esac
|
||||
|
||||
for ac_header in strings.h
|
||||
do :
|
||||
ac_fn_c_check_header_mongrel "$LINENO" "strings.h" "ac_cv_header_strings_h" "$ac_includes_default"
|
||||
|
120
configure.in
120
configure.in
@@ -909,14 +909,6 @@ case "$host" in
|
||||
esac
|
||||
;;
|
||||
#
|
||||
# BSDI 3.0 through 4.0.1 needs pthread_init() to be
|
||||
# called before certain pthreads calls. This is deprecated
|
||||
# in BSD/OS 4.1.
|
||||
#
|
||||
*-bsdi3.*|*-bsdi4.0*)
|
||||
AC_DEFINE(NEED_PTHREAD_INIT)
|
||||
;;
|
||||
#
|
||||
# LinuxThreads requires some changes to the way we
|
||||
# deal with signals.
|
||||
#
|
||||
@@ -2085,27 +2077,6 @@ Please choose the proper path with the following command:
|
||||
;;
|
||||
esac
|
||||
|
||||
#
|
||||
# Whether netinet6/in6.h is needed has to be defined in isc/platform.h.
|
||||
# Including it on Kame-using platforms is very bad, though, because
|
||||
# Kame uses #error against direct inclusion. So include it on only
|
||||
# the platform that is otherwise broken without it -- BSD/OS 4.0 through 4.1.
|
||||
# This is done before the in6_pktinfo check because that's what
|
||||
# netinet6/in6.h is needed for.
|
||||
#
|
||||
changequote({, })
|
||||
case "$host" in
|
||||
*-bsdi4.[01]*)
|
||||
ISC_PLATFORM_NEEDNETINET6IN6H="#define ISC_PLATFORM_NEEDNETINET6IN6H 1"
|
||||
isc_netinet6in6_hack="#include <netinet6/in6.h>"
|
||||
;;
|
||||
*)
|
||||
ISC_PLATFORM_NEEDNETINET6IN6H="#undef ISC_PLATFORM_NEEDNETINET6IN6H"
|
||||
isc_netinet6in6_hack=""
|
||||
;;
|
||||
esac
|
||||
changequote([, ])
|
||||
|
||||
#
|
||||
# Now delve deeper into the suitability of the IPv6 support.
|
||||
#
|
||||
@@ -2118,7 +2089,6 @@ case "$found_ipv6" in
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
$isc_netinet6in6_hack
|
||||
],
|
||||
[struct in6_addr in6; return (0);],
|
||||
[AC_MSG_RESULT(yes)
|
||||
@@ -2133,7 +2103,6 @@ $isc_netinet6in6_hack
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
$isc_netinet6in6_hack
|
||||
$isc_in_addr6_hack
|
||||
],
|
||||
[struct in6_addr in6; in6 = in6addr_any; return (in6.s6_addr[0]);],
|
||||
@@ -2147,7 +2116,6 @@ $isc_in_addr6_hack
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
$isc_netinet6in6_hack
|
||||
$isc_in_addr6_hack
|
||||
],
|
||||
[struct in6_addr in6; in6 = in6addr_loopback; return (in6.s6_addr[0]);],
|
||||
@@ -2161,7 +2129,6 @@ $isc_in_addr6_hack
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
$isc_netinet6in6_hack
|
||||
],
|
||||
[struct sockaddr_in6 xyzzy; xyzzy.sin6_scope_id = 0; return (0);],
|
||||
[AC_MSG_RESULT(yes)
|
||||
@@ -2174,7 +2141,6 @@ $isc_netinet6in6_hack
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
$isc_netinet6in6_hack
|
||||
],
|
||||
[struct in6_pktinfo xyzzy; return (0);],
|
||||
[AC_MSG_RESULT(yes)
|
||||
@@ -2198,7 +2164,6 @@ AC_MSG_CHECKING(for struct sockaddr_storage)
|
||||
AC_TRY_COMPILE([
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
$isc_netinet6in6_hack
|
||||
],
|
||||
[struct sockaddr_storage storage; return (0);],
|
||||
[AC_MSG_RESULT(yes)
|
||||
@@ -2207,7 +2172,6 @@ ISC_PLATFORM_HAVESOCKADDRSTORAGE="#define ISC_PLATFORM_HAVESOCKADDRSTORAGE 1"],
|
||||
ISC_PLATFORM_HAVESOCKADDRSTORAGE="#undef ISC_PLATFORM_HAVESOCKADDRSTORAGE"])
|
||||
|
||||
AC_SUBST(ISC_PLATFORM_HAVEIPV6)
|
||||
AC_SUBST(ISC_PLATFORM_NEEDNETINET6IN6H)
|
||||
AC_SUBST(ISC_PLATFORM_HAVEINADDR6)
|
||||
AC_SUBST(ISC_PLATFORM_NEEDIN6ADDRANY)
|
||||
AC_SUBST(ISC_PLATFORM_NEEDIN6ADDRLOOPBACK)
|
||||
@@ -2708,53 +2672,6 @@ AC_TRY_COMPILE([#include <sys/fcntl.h>],[struct stat s; return(s.st_mtim.tv_nsec
|
||||
ISC_PLATFORM_HAVESTATNSEC="#undef ISC_PLATFORM_HAVESTATNSEC"])
|
||||
AC_SUBST(ISC_PLATFORM_HAVESTATNSEC)
|
||||
|
||||
#
|
||||
# BSD/OS, and perhaps some others, don't define rlim_t.
|
||||
#
|
||||
AC_MSG_CHECKING(for type rlim_t)
|
||||
AC_TRY_COMPILE([
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/resource.h>],
|
||||
[rlim_t rl = 19671212; return (0);],
|
||||
[AC_MSG_RESULT(yes)
|
||||
ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE rlim_t"],
|
||||
[AC_MSG_RESULT(no)
|
||||
|
||||
AC_MSG_CHECKING(type of rlim_cur)
|
||||
AC_TRY_RUN([
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/resource.h>
|
||||
main() { struct rlimit r; exit(!(sizeof(r.rlim_cur) == sizeof(int)));}],
|
||||
[AC_MSG_RESULT(int)
|
||||
ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE int"],
|
||||
[
|
||||
AC_TRY_RUN([
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/resource.h>
|
||||
main() { struct rlimit r; exit(!(sizeof(r.rlim_cur) == sizeof(long int)));}],
|
||||
[AC_MSG_RESULT(long int)
|
||||
ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE long int"],
|
||||
[
|
||||
AC_TRY_RUN([
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/resource.h>
|
||||
main() { struct rlimit r; exit((!sizeof(r.rlim_cur) == sizeof(long long int)));}],
|
||||
[AC_MSG_RESULT(long long int)
|
||||
ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE long long int"],
|
||||
[AC_MSG_ERROR([unable to determine sizeof rlim_cur])
|
||||
],[AC_MSG_ERROR(this cannot happen)])
|
||||
],[AC_MSG_ERROR(this cannot happen)])
|
||||
],[
|
||||
AC_ARG_WITH(rlimtype, , rlimtype="$withval", rlimtype="long long int")
|
||||
ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE $rlimtype"
|
||||
AC_MSG_RESULT(cannot determine type of rlim_cur when cross compiling - assuming $rlimtype)])
|
||||
])
|
||||
AC_SUBST(ISC_PLATFORM_RLIMITTYPE)
|
||||
|
||||
#
|
||||
# Older HP-UX doesn't have gettune
|
||||
#
|
||||
@@ -2812,16 +2729,6 @@ case "$host" in
|
||||
*-aix5.[[123]].*)
|
||||
hack_shutup_pthreadonceinit=yes
|
||||
;;
|
||||
*-bsdi3.1*)
|
||||
hack_shutup_sputaux=yes
|
||||
;;
|
||||
*-bsdi4.0*)
|
||||
hack_shutup_sigwait=yes
|
||||
hack_shutup_sputaux=yes
|
||||
;;
|
||||
[*-bsdi4.[12]*])
|
||||
hack_shutup_stdargcast=yes
|
||||
;;
|
||||
[*-solaris2.[89]])
|
||||
hack_shutup_pthreadonceinit=yes
|
||||
;;
|
||||
@@ -2839,33 +2746,6 @@ case "$hack_shutup_pthreadonceinit" in
|
||||
;;
|
||||
esac
|
||||
|
||||
case "$hack_shutup_sigwait" in
|
||||
yes)
|
||||
#
|
||||
# Shut up a -Wmissing-prototypes warning for sigwait().
|
||||
#
|
||||
AC_DEFINE(SHUTUP_SIGWAIT)
|
||||
;;
|
||||
esac
|
||||
|
||||
case "$hack_shutup_sputaux" in
|
||||
yes)
|
||||
#
|
||||
# Shut up a -Wmissing-prototypes warning from <stdio.h>.
|
||||
#
|
||||
AC_DEFINE(SHUTUP_SPUTAUX)
|
||||
;;
|
||||
esac
|
||||
|
||||
case "$hack_shutup_stdargcast" in
|
||||
yes)
|
||||
#
|
||||
# Shut up a -Wcast-qual warning from va_start().
|
||||
#
|
||||
AC_DEFINE(SHUTUP_STDARG_CAST)
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_CHECK_HEADERS(strings.h,
|
||||
ISC_PLATFORM_HAVESTRINGSH="#define ISC_PLATFORM_HAVESTRINGSH 1"
|
||||
,
|
||||
|
@@ -30,12 +30,6 @@
|
||||
*** Network.
|
||||
***/
|
||||
|
||||
/*! \brief
|
||||
* Define if this system needs the <netinet6/in6.h> header file included
|
||||
* to support in6_pkinfo (pretty much only BSD/OS).
|
||||
*/
|
||||
@ISC_PLATFORM_NEEDNETINET6IN6H@
|
||||
|
||||
/*! \brief
|
||||
* If sockaddrs on this system have an sa_len field, ISC_PLATFORM_HAVESALEN
|
||||
* will be defined.
|
||||
@@ -210,11 +204,6 @@
|
||||
*/
|
||||
@ISC_PLATFORM_HAVESTATNSEC@
|
||||
|
||||
/*
|
||||
* Type used for resource limits.
|
||||
*/
|
||||
@ISC_PLATFORM_RLIMITTYPE@
|
||||
|
||||
/*
|
||||
* Define if your compiler supports "long long int".
|
||||
*/
|
||||
|
@@ -76,9 +76,6 @@
|
||||
|
||||
#include <netinet/in.h> /* Contractual promise. */
|
||||
#include <arpa/inet.h> /* Contractual promise. */
|
||||
#ifdef ISC_PLATFORM_NEEDNETINET6IN6H
|
||||
#include <netinet6/in6.h> /* Required on BSD/OS for in6_pktinfo. */
|
||||
#endif
|
||||
|
||||
#ifndef ISC_PLATFORM_HAVEIPV6
|
||||
#include <isc/ipv6.h> /* Contractual promise. */
|
||||
|
@@ -100,7 +100,7 @@ resource2rlim(isc_resource_t resource, int *rlim_resource) {
|
||||
isc_result_t
|
||||
isc_resource_setlimit(isc_resource_t resource, isc_resourcevalue_t value) {
|
||||
struct rlimit rl;
|
||||
ISC_PLATFORM_RLIMITTYPE rlim_value;
|
||||
rlim_t rlim_value;
|
||||
int unixresult;
|
||||
int unixresource;
|
||||
isc_result_t result;
|
||||
@@ -118,17 +118,17 @@ isc_resource_setlimit(isc_resource_t resource, isc_resourcevalue_t value) {
|
||||
* integer so that it could contain the maximum range of
|
||||
* reasonable values. Unfortunately, this exceeds the typical
|
||||
* range on Unix systems. Ensure the range of
|
||||
* ISC_PLATFORM_RLIMITTYPE is not overflowed.
|
||||
* rlim_t is not overflowed.
|
||||
*/
|
||||
isc_resourcevalue_t rlim_max;
|
||||
bool rlim_t_is_signed =
|
||||
(((double)(ISC_PLATFORM_RLIMITTYPE)-1) < 0);
|
||||
(((double)(rlim_t)-1) < 0);
|
||||
|
||||
if (rlim_t_is_signed)
|
||||
rlim_max = ~((ISC_PLATFORM_RLIMITTYPE)1 <<
|
||||
(sizeof(ISC_PLATFORM_RLIMITTYPE) * 8 - 1));
|
||||
rlim_max = ~((rlim_t)1 <<
|
||||
(sizeof(rlim_t) * 8 - 1));
|
||||
else
|
||||
rlim_max = (ISC_PLATFORM_RLIMITTYPE)-1;
|
||||
rlim_max = (rlim_t)-1;
|
||||
|
||||
if (value > rlim_max)
|
||||
value = rlim_max;
|
||||
|
Reference in New Issue
Block a user