diff --git a/CHANGES b/CHANGES index 959a8d32ec..9c714bd809 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,10 @@ +5031. [cleanup] Various defines in platform.h has been either dropped + if always or never triggered on supported platforms + or replaced with config.h equivalents if the defines + didn't have any impact on public headers. Workarounds + for LinuxThreads have been removed because NPTL is + available since Linux kernel 2.6.0. [GL #525] + 5030. [bug] Align CMSG buffers to a 64-bit boundary, fixes crash on architectures with strict alignment. [GL #521] diff --git a/PLATFORMS.md b/PLATFORMS.md index 6f2c0deaf6..840af14b34 100644 --- a/PLATFORMS.md +++ b/PLATFORMS.md @@ -66,3 +66,4 @@ These are platforms on which BIND is known *not* to build or run: * Windows Server 2012 and older * Platforms that don't support IPv6 Advanced Socket API (RFC 3542) * Platforms that don't support atomic operations (via compiler or library) +* Linux without NPTL (Native POSIX Thread Library) diff --git a/acconfig.h b/acconfig.h deleted file mode 100644 index efdb99455f..0000000000 --- a/acconfig.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -/*! \file */ - -/*** - *** This file is not to be included by any public header files, because - *** it does not get installed. - ***/ -@TOP@ - -/** define if your system needs pthread_init() before using pthreads */ -#undef NEED_PTHREAD_INIT - -/** define if your system has sigwait() */ -#undef HAVE_SIGWAIT - -/** define if sigwait() is the UnixWare flavor */ -#undef HAVE_UNIXWARE_SIGWAIT - -/** define if LinuxThreads is in use */ -#undef HAVE_LINUXTHREADS - -/** define if sysconf() is available */ -#undef HAVE_SYSCONF - -/** define if sysctlbyname() is available */ -#undef HAVE_SYSCTLBYNAME - -/** define if catgets() is available */ -#undef HAVE_CATGETS - -/** define if getifaddrs() exists */ -#undef HAVE_GETIFADDRS - -/** define if you have the NET_RT_IFLIST sysctl variable and sys/sysctl.h */ -#undef HAVE_IFLIST_SYSCTL - -/** define if tzset() is available */ -#undef HAVE_TZSET - -/** - * define if pthread_setconcurrency() should be called to tell the - * OS how many threads we might want to run. - */ -#undef CALL_PTHREAD_SETCONCURRENCY - -/** define if flockfile() is available */ -#undef HAVE_FLOCKFILE - -/** define if getc_unlocked() is available */ -#undef HAVE_GETCUNLOCKED - -/** define if the system has a random number generating device */ -#undef PATH_RANDOMDEV - -/** define if pthread_attr_getstacksize() is available */ -#undef HAVE_PTHREAD_ATTR_GETSTACKSIZE - -/** define if pthread_attr_setstacksize() is available */ -#undef HAVE_PTHREAD_ATTR_SETSTACKSIZE - -/** define if you have strerror in the C library. */ -#undef HAVE_STRERROR - -/* Define to the length type used by the socket API (socklen_t, size_t, int). */ -#undef ISC_SOCKADDR_LEN_T - -/* Define if threads need PTHREAD_SCOPE_SYSTEM */ -#undef NEED_PTHREAD_SCOPE_SYSTEM - -/* Define to 1 if you have the uname library function. */ -#undef HAVE_UNAME diff --git a/bin/named/unix/os.c b/bin/named/unix/os.c index 00052e8cf8..fc58d02737 100644 --- a/bin/named/unix/os.c +++ b/bin/named/unix/os.c @@ -59,54 +59,6 @@ static int singletonfd = -1; #define ISC_FACILITY LOG_DAEMON #endif -/* - * If there's no , we don't care about - */ -#ifndef HAVE_SYS_CAPABILITY_H -#undef HAVE_SYS_PRCTL_H -#endif - -/* - * Linux defines: - * (T) HAVE_LINUXTHREADS - * (C) HAVE_SYS_CAPABILITY_H - * (P) HAVE_SYS_PRCTL_H - * The possible cases are: - * none: setuid() normally - * T: no setuid() - * C: setuid() normally, drop caps (keep CAP_SETUID) - * T+C: no setuid(), drop caps (don't keep CAP_SETUID) - * T+C+P: setuid() early, drop caps (keep CAP_SETUID) - * C+P: setuid() normally, drop caps (keep CAP_SETUID) - * P: not possible - * T+P: not possible - * - * if (C) - * caps = BIND_SERVICE + CHROOT + SETGID - * if ((T && C && P) || !T) - * caps += SETUID - * endif - * capset(caps) - * endif - * if (T && C && P && -u) - * setuid() - * else if (T && -u) - * fail - * --> start threads - * if (!T && -u) - * setuid() - * if (C && (P || !-u)) - * caps = BIND_SERVICE - * capset(caps) - * endif - * - * It will be nice when Linux threads work properly with setuid(). - */ - -#ifdef HAVE_LINUXTHREADS -static pid_t mainpid = 0; -#endif - static struct passwd *runas_pw = NULL; static bool done_setuid = false; static int dfd[2] = { -1, -1 }; @@ -117,10 +69,7 @@ static bool non_root = false; static bool non_root_caps = false; #include - -#ifdef HAVE_SYS_PRCTL_H -#include /* Required for prctl(). */ -#endif /* HAVE_SYS_PRCTL_H */ +#include static void linux_setcaps(cap_t caps) { @@ -201,15 +150,11 @@ linux_initialprivs(void) { */ SET_CAP(CAP_SYS_CHROOT); -#if defined(HAVE_SYS_PRCTL_H) || !defined(HAVE_LINUXTHREADS) /* - * We can setuid() only if either the kernel supports keeping - * capabilities after setuid() (which we don't know until we've - * tried) or we're not using threads. If either of these is - * true, we want the setuid capability. + * We need setuid() as the kernel supports keeping capabilities after + * setuid(). */ SET_CAP(CAP_SETUID); -#endif /* * Since we call initgroups, we need this. @@ -275,7 +220,6 @@ linux_minprivs(void) { FREE_CAP; } -#ifdef HAVE_SYS_PRCTL_H static void linux_keepcaps(void) { char strbuf[ISC_STRERRORSIZE]; @@ -295,11 +239,9 @@ linux_keepcaps(void) { non_root = true; } } -#endif #endif /* HAVE_SYS_CAPABILITY_H */ - static void setup_syslog(const char *progname) { int options; @@ -317,9 +259,6 @@ named_os_init(const char *progname) { #ifdef HAVE_SYS_CAPABILITY_H linux_initialprivs(); #endif -#ifdef HAVE_LINUXTHREADS - mainpid = getpid(); -#endif #ifdef SIGXFSZ signal(SIGXFSZ, SIG_IGN); #endif @@ -362,10 +301,6 @@ named_os_daemonize(void) { * We're the child. */ -#ifdef HAVE_LINUXTHREADS - mainpid = getpid(); -#endif - if (setsid() == -1) { strerror_r(errno, strbuf, sizeof(strbuf)); named_main_earlyfatal("setsid(): %s", strbuf); @@ -499,20 +434,6 @@ named_os_changeuser(void) { done_setuid = true; -#ifdef HAVE_LINUXTHREADS -#ifdef HAVE_SYS_CAPABILITY_H - if (!non_root_caps) { - named_main_earlyfatal("-u with Linux threads not supported: " - "requires kernel support for " - "prctl(PR_SET_KEEPCAPS)"); - } -#else - named_main_earlyfatal("-u with Linux threads not supported: " - "no capabilities support or capabilities " - "disabled at build time"); -#endif -#endif - if (setgid(runas_pw->pw_gid) < 0) { strerror_r(errno, strbuf, sizeof(strbuf)); named_main_earlyfatal("setgid(): %s", strbuf); @@ -523,7 +444,7 @@ named_os_changeuser(void) { named_main_earlyfatal("setuid(): %s", strbuf); } -#if defined(HAVE_SYS_PRCTL_H) && defined(PR_SET_DUMPABLE) +#if defined(HAVE_SYS_CAPABILITY_H) /* * Restore the ability of named to drop core after the setuid() * call has disabled it. @@ -533,8 +454,7 @@ named_os_changeuser(void) { named_main_earlywarning("prctl(PR_SET_DUMPABLE) failed: %s", strbuf); } -#endif -#if defined(HAVE_SYS_CAPABILITY_H) && !defined(HAVE_LINUXTHREADS) + linux_minprivs(); #endif } @@ -548,7 +468,7 @@ ns_os_uid(void) { void named_os_adjustnofile(void) { -#ifdef HAVE_LINUXTHREADS +#if defined(__linux__) isc_result_t result; isc_resourcevalue_t newvalue; @@ -566,15 +486,8 @@ named_os_adjustnofile(void) { void named_os_minprivs(void) { -#ifdef HAVE_SYS_PRCTL_H +#if defined(HAVE_SYS_CAPABILITY_H) linux_keepcaps(); -#endif - -#ifdef HAVE_LINUXTHREADS - named_os_changeuser(); /* Call setuid() before threads are started */ -#endif - -#if defined(HAVE_SYS_CAPABILITY_H) && defined(HAVE_LINUXTHREADS) linux_minprivs(); #endif } @@ -759,21 +672,16 @@ named_os_openfile(const char *filename, mode_t mode, bool switch_user) { free(f); if (switch_user && runas_pw != NULL) { -#ifndef HAVE_LINUXTHREADS gid_t oldgid = getgid(); -#endif /* Set UID/GID to the one we'll be running with eventually */ setperms(runas_pw->pw_uid, runas_pw->pw_gid); fd = safe_open(filename, mode, false); -#ifndef HAVE_LINUXTHREADS /* Restore UID/GID to root */ setperms(0, oldgid); -#endif /* HAVE_LINUXTHREADS */ if (fd == -1) { -#ifndef HAVE_LINUXTHREADS fd = safe_open(filename, mode, false); if (fd != -1) { named_main_earlywarning("Required root " @@ -786,13 +694,6 @@ named_os_openfile(const char *filename, mode_t mode, bool switch_user) { named_main_earlywarning("Please check file and " "directory permissions " "or reconfigure the filename."); -#else /* HAVE_LINUXTHREADS */ - named_main_earlywarning("Could not open " - "'%s'.", filename); - named_main_earlywarning("Please check file and " - "directory permissions " - "or reconfigure the filename."); -#endif /* HAVE_LINUXTHREADS */ } } else { fd = safe_open(filename, mode, false); @@ -846,11 +747,7 @@ named_os_writepidfile(const char *filename, bool first_time) { cleanup_pidfile(); return; } -#ifdef HAVE_LINUXTHREADS - pid = mainpid; -#else pid = getpid(); -#endif if (fprintf(fh, "%ld\n", (long)pid) < 0) { (*report)("fprintf() to pid file '%s' failed", filename); (void)fclose(fh); @@ -956,11 +853,7 @@ named_os_shutdownmsg(char *command, isc_buffer_t *text) { return; } -#ifdef HAVE_LINUXTHREADS - pid = mainpid; -#else pid = getpid(); -#endif (void)isc_buffer_printf(text, "pid: %ld", (long)pid); } diff --git a/bin/tests/optional/zone_test.c b/bin/tests/optional/zone_test.c index d64bd189ae..b26acea0b1 100644 --- a/bin/tests/optional/zone_test.c +++ b/bin/tests/optional/zone_test.c @@ -12,6 +12,7 @@ #include #include +#include #include #include @@ -35,10 +36,6 @@ #include #include -#ifdef ISC_PLATFORM_NEEDSYSSELECTH -#include -#endif - static int debug = 0; static int quiet = 0; static int stats = 0; diff --git a/bin/tests/system/conf.sh.in b/bin/tests/system/conf.sh.in index 6c77ce7e58..a440a31a76 100644 --- a/bin/tests/system/conf.sh.in +++ b/bin/tests/system/conf.sh.in @@ -148,7 +148,6 @@ PYTHON=@PYTHON@ # # Determine if we support various optional features. # -CHECK_DSA=@CHECK_DSA@ HAVEXMLSTATS=@XMLSTATS@ HAVEJSONSTATS=@JSONSTATS@ ZLIB=@ZLIB@ diff --git a/bin/tests/system/conf.sh.win32 b/bin/tests/system/conf.sh.win32 index 737da36d3f..da89e167c2 100644 --- a/bin/tests/system/conf.sh.win32 +++ b/bin/tests/system/conf.sh.win32 @@ -147,7 +147,6 @@ PYTHON=@PYTHON@ # # Determine if we support various optional features. # -CHECK_DSA=@CHECK_DSA@ HAVEXMLSTATS=@XMLSTATS@ HAVEJSONSTATS=@JSONSTATS@ ZLIB=@ZLIB@ diff --git a/bin/tests/system/feature-test.c b/bin/tests/system/feature-test.c index f95ce4742a..44b0558d4f 100644 --- a/bin/tests/system/feature-test.c +++ b/bin/tests/system/feature-test.c @@ -175,7 +175,7 @@ main(int argc, char **argv) { int s; int n = -1; int v6only = -1; - ISC_SOCKADDR_LEN_T len = sizeof(v6only); + socklen_t len = sizeof(v6only); s = socket(AF_INET6, SOCK_DGRAM, IPPROTO_UDP); if (s >= 0) { diff --git a/bin/tests/system/inline/.gitignore b/bin/tests/system/inline/.gitignore deleted file mode 100644 index 67c4611e9c..0000000000 --- a/bin/tests/system/inline/.gitignore +++ /dev/null @@ -1 +0,0 @@ -checkdsa.sh diff --git a/bin/tests/system/inline/checkdsa.sh.in b/bin/tests/system/inline/checkdsa.sh.in deleted file mode 100644 index 5b6ea2ebd3..0000000000 --- a/bin/tests/system/inline/checkdsa.sh.in +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -if [ "@CHECK_DSA@" -eq 0 ]; then - exit 1 -fi -if [ ! -r /dev/random -o ! -r /dev/urandom ]; then - exit 1 -fi - -exit 0 diff --git a/bin/tests/system/inline/ns3/sign.sh b/bin/tests/system/inline/ns3/sign.sh index 09e3fc8874..eeb03032fd 100755 --- a/bin/tests/system/inline/ns3/sign.sh +++ b/bin/tests/system/inline/ns3/sign.sh @@ -135,22 +135,6 @@ rm -f K${zone}.+*+*.private for alg in ECDSAP256SHA256 NSEC3RSASHA1 DSA do - case $alg in - DSA) - $SHELL ../checkdsa.sh 2> /dev/null || continue - checkfile=../checkdsa - touch $checkfile ;; - ECDSAP256SHA256) - fail=0 - $KEYGEN -q -a ecdsap256sha256 test > /dev/null 2>&1 || fail=1 - rm -f Ktest* - [ $fail != 0 ] && continue - $SHELL ../checkdsa.sh 2> /dev/null || continue - checkfile=../checkecdsa - touch $checkfile ;; - *) ;; - esac - k1=`$KEYGEN -q -a $alg -b 1024 -n zone -f KSK $zone` k2=`$KEYGEN -q -a $alg -b 1024 -n zone $zone` k3=`$KEYGEN -q -a $alg -b 1024 -n zone $zone` @@ -161,9 +145,9 @@ do rm -f $k1.private mv $k1.key a-file $IMPORTKEY -P now -D now+3600 -f a-file $zone > /dev/null 2>&1 || - ( echo "importkey failed: $alg"; rm -f $checkfile ) + ( echo "importkey failed: $alg" ) rm -f $k2.private mv $k2.key a-file $IMPORTKEY -f a-file $zone > /dev/null 2>&1 || - ( echo "importkey failed: $alg"; rm -f $checkfile ) + ( echo "importkey failed: $alg" ) done diff --git a/config.h.in b/config.h.in index 775da4c95b..18cd748b74 100644 --- a/config.h.in +++ b/config.h.in @@ -1,84 +1,4 @@ /* config.h.in. Generated from configure.in by autoheader. */ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -/*! \file */ - -/*** - *** This file is not to be included by any public header files, because - *** it does not get installed. - ***/ - -/** define if your system needs pthread_init() before using pthreads */ -#undef NEED_PTHREAD_INIT - -/** define if your system has sigwait() */ -#undef HAVE_SIGWAIT - -/** define if sigwait() is the UnixWare flavor */ -#undef HAVE_UNIXWARE_SIGWAIT - -/** define if LinuxThreads is in use */ -#undef HAVE_LINUXTHREADS - -/** define if sysconf() is available */ -#undef HAVE_SYSCONF - -/** define if sysctlbyname() is available */ -#undef HAVE_SYSCTLBYNAME - -/** define if catgets() is available */ -#undef HAVE_CATGETS - -/** define if getifaddrs() exists */ -#undef HAVE_GETIFADDRS - -/** define if you have the NET_RT_IFLIST sysctl variable and sys/sysctl.h */ -#undef HAVE_IFLIST_SYSCTL - -/** define if tzset() is available */ -#undef HAVE_TZSET - -/** - * define if pthread_setconcurrency() should be called to tell the - * OS how many threads we might want to run. - */ -#undef CALL_PTHREAD_SETCONCURRENCY - -/** define if flockfile() is available */ -#undef HAVE_FLOCKFILE - -/** define if getc_unlocked() is available */ -#undef HAVE_GETCUNLOCKED - -/** define if the system has a random number generating device */ -#undef PATH_RANDOMDEV - -/** define if pthread_attr_getstacksize() is available */ -#undef HAVE_PTHREAD_ATTR_GETSTACKSIZE - -/** define if pthread_attr_setstacksize() is available */ -#undef HAVE_PTHREAD_ATTR_SETSTACKSIZE - -/** define if you have strerror in the C library. */ -#undef HAVE_STRERROR - -/* Define to the length type used by the socket API (socklen_t, size_t, int). */ -#undef ISC_SOCKADDR_LEN_T - -/* Define if threads need PTHREAD_SCOPE_SYSTEM */ -#undef NEED_PTHREAD_SCOPE_SYSTEM - -/* Define to 1 if you have the uname library function. */ -#undef HAVE_UNAME /* Define if building universal (internal helper macro) */ #undef AC_APPLE_UNIVERSAL_BUILD @@ -110,6 +30,9 @@ /* Define to enable rpz nsip rules. */ #undef ENABLE_RPZ_NSIP +/* define if you want TCP_FASTOPEN enabled if available */ +#undef ENABLE_TCP_FASTOPEN + /* Solaris hack to get select_large_fdset. */ #undef FD_SETSIZE @@ -137,6 +60,9 @@ /* Define to 1 if the compiler supports __builtin_expect. */ #undef HAVE_BUILTIN_EXPECT +/* Define to 1 if you have the `catgets' function. */ +#undef HAVE_CATGETS + /* Define to 1 if you have the `chroot' function. */ #undef HAVE_CHROOT @@ -188,6 +114,9 @@ /* Define to 1 if you have the 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 @@ -251,7 +180,7 @@ /* Define to 1 if you have the header file. */ #undef HAVE_IDN2_H -/* Define to 1 if you have the if_nametoindex function. */ +/* Define to 1 if you have the `if_nametoindex' function. */ #undef HAVE_IF_NAMETOINDEX /* Define to 1 if you have the header file. */ @@ -266,13 +195,16 @@ /* Define to 1 if you have the header file. */ #undef HAVE_KERBEROSV5_KRB5_H +/* Define to 1 if you have the `kqueue' function. */ +#undef HAVE_KQUEUE + /* Define to 1 if you have the header file. */ #undef HAVE_KRB5_H /* Define to 1 if you have the header file. */ #undef HAVE_KRB5_KRB5_H -/* if system have backtrace function */ +/* define if system have backtrace function */ #undef HAVE_LIBCTRACE /* Define if libidn2 was found */ @@ -389,6 +321,9 @@ /* Define to 1 if you have the `sigwait' function. */ #undef HAVE_SIGWAIT +/* define if struct stat has st_mtim.tv_nsec field */ +#undef HAVE_STAT_NSEC + /* Define to 1 if you have the header file. */ #undef HAVE_STDATOMIC_H @@ -404,6 +339,18 @@ /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H +/* Define to 1 if you have the `strlcat' function. */ +#undef HAVE_STRLCAT + +/* Define to 1 if you have the `strlcpy' function. */ +#undef HAVE_STRLCPY + +/* Define to 1 if you have the `sysconf' function. */ +#undef HAVE_SYSCONF + +/* Define to 1 if you have the `sysctlbyname' function. */ +#undef HAVE_SYSCTLBYNAME + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_CAPABILITY_H @@ -416,9 +363,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_PARAM_H -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_PRCTL_H - /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SELECT_H @@ -452,12 +396,18 @@ /* Define if Thread-Local Storage is available */ #undef HAVE_TLS +/* Define to 1 if you have the `tzset' function. */ +#undef HAVE_TZSET + /* Define to 1 if you have the header file. */ #undef HAVE_UCHAR_H /* Define to 1 if the system has the type `uintptr_t'. */ #undef HAVE_UINTPTR_T +/* define if uname is available */ +#undef HAVE_UNAME + /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H @@ -539,6 +489,9 @@ /* Define to use large-system tuning. */ #undef TUNE_LARGE +/* define if we can use backtrace */ +#undef USE_BACKTRACE + /* Enable DNS Response Policy Service API */ #undef USE_DNSRPS diff --git a/config.h.win32 b/config.h.win32 index 0595c543e1..01a0cddbcf 100644 --- a/config.h.win32 +++ b/config.h.win32 @@ -67,24 +67,15 @@ /* define on DEC OSF to enable 4.4BSD style sa_len support */ /* #undef _SOCKADDR_LEN */ -/* define if your system needs pthread_init() before using pthreads */ -/* #undef NEED_PTHREAD_INIT */ - /* define if your system has sigwait() */ /* #undef HAVE_SIGWAIT */ /* define on Solaris to get sigwait() to work using pthreads semantics */ /* #undef _POSIX_PTHREAD_SEMANTICS */ -/* define if LinuxThreads is in use */ -/* #undef HAVE_LINUXTHREADS */ - /* define if catgets() is available */ /* #undef HAVE_CATGETS */ -/* define if you have the NET_RT_IFLIST sysctl variable. */ -#define HAVE_IFLIST_SYSCTL 1 - /* define if you need to #define _XPG4_2 before including sys/socket.h */ /* #undef NEED_XPG4_2_BEFORE_SOCKET_H */ @@ -236,9 +227,6 @@ typedef __int64 off_t; */ #include -/* We actually are using the CryptAPI and not a device */ -#define PATH_RANDOMDEV "CryptAPI" - #include #include #include @@ -367,6 +355,9 @@ typedef __int64 off_t; /* Large system tuning */ @TUNE_LARGE@ +/* define if we can use backtrace */ +@USE_BACKTRACE@ + /* the default value of dnssec-validation option */ @VALIDATION_DEFAULT@ diff --git a/configure b/configure index 11f54d643d..d10db7f43b 100755 --- a/configure +++ b/configure @@ -706,23 +706,12 @@ DNSTAPSRCS DNSTAP FSTRM_CAPTURE PROTOC_C -ISC_PLATFORM_BUSYWAITNOP -ISC_PLATFORM_HAVEIFNAMETOINDEX -ISC_PLATFORM_HAVESTRINGSH -IRS_PLATFORM_USEDECLSPEC -ISC_PLATFORM_USEDECLSPEC -ISC_PLATFORM_HAVESTATNSEC ISC_PLATFORM_HAVESYSUNH LIBCAP_LIBS DST_EXTRA_SRCS DST_EXTRA_OBJS USE_ISC_SPNEGO READLINE_LIB -ISC_PLATFORM_NEEDSTRLCAT -ISC_PLATFORM_NEEDSTRLCPY -ISC_PLATFORM_HAVETFO -ISC_PLATFORM_HAVEIF_LADDRCONF -ISC_PLATFORM_HAVEIF_LADDRREQ BIND9_CO_RULE LIBTOOL_MODE_UNINSTALL LIBTOOL_MODE_LINK @@ -734,7 +723,6 @@ A O ALWAYS_MAKE_SYMTABLE MKSYMTBL_PROGRAM -ISC_PLATFORM_USEBACKTRACE PURIFY purify_path MKDEPPROG @@ -767,17 +755,10 @@ PTHREAD_CFLAGS PTHREAD_LIBS PTHREAD_CC ax_pthread_config -CHECK_DSA GEOIPLINKOBJS GEOIPLINKSRCS -ISC_PLATFORM_NEEDSYSSELECTH -ISC_PLATFORM_HAVEDEVPOLL -ISC_PLATFORM_HAVEEPOLL -ISC_PLATFORM_HAVEKQUEUE -ISC_PLATFORM_HAVELIFCONF ISC_PLATFORM_NORETURN_POST ISC_PLATFORM_NORETURN_PRE -ISC_SOCKADDR_LEN_T expanded_sysconfdir PYTHON_INSTALL_LIB PYTHON_INSTALL_DIR @@ -1619,7 +1600,7 @@ Optional Features: --enable-backtrace log stack backtrace on abort [default=yes] --enable-symtable use internal symbol table for backtrace [all|minimal(default)|none] - --disable-tcp-fastopen disable TCP Fast Open support [default=autodetect] + --disable-tcp-fastopen disable TCP Fast Open support [default=yes] --disable-isc-spnego use SPNEGO from GSSAPI library --disable-chroot disable chroot --disable-linux-caps disable Linux capabilities @@ -13590,12 +13571,6 @@ if test $ac_cv_c_volatile = no; then $as_echo "#define volatile /**/" >>confdefs.h -fi - -ac_fn_c_check_func "$LINENO" "sysctlbyname" "ac_cv_func_sysctlbyname" -if test "x$ac_cv_func_sysctlbyname" = xyes; then : - $as_echo "#define HAVE_SYSCTLBYNAME 1" >>confdefs.h - fi @@ -13641,6 +13616,18 @@ $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h fi +for ac_func in sysctlbyname +do : + ac_fn_c_check_func "$LINENO" "sysctlbyname" "ac_cv_func_sysctlbyname" +if test "x$ac_cv_func_sysctlbyname" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SYSCTLBYNAME 1 +_ACEOF + +fi +done + + # # Check for the existence of mmap to enable the fast format zones # @@ -13744,43 +13731,6 @@ fi -ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" " -#include -#include - -" -if test "x$ac_cv_type_socklen_t" = xyes; then : - $as_echo "#define ISC_SOCKADDR_LEN_T socklen_t" >>confdefs.h - -else - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -int getsockname(int, struct sockaddr *, size_t *); - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - $as_echo "#define ISC_SOCKADDR_LEN_T size_t" >>confdefs.h - -else - $as_echo "#define ISC_SOCKADDR_LEN_T int" >>confdefs.h - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } if ${ac_cv_header_time+:} false; then : @@ -13824,18 +13774,17 @@ fi $as_echo_n "checking for uname... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include -#include + #include int main () { -struct utsname uts; -uname(&uts); -printf("running on %s %s %s for %s\n", - uts.sysname, uts.release, uts.version, uts.machine); + struct utsname uts; + uname(&uts); + printf("running on %s %s %s for %s\n", + uts.sysname, uts.release, uts.version, uts.machine); ; return 0; @@ -13844,13 +13793,16 @@ _ACEOF if ac_fn_c_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - $as_echo "#define HAVE_UNAME 1" >>confdefs.h + +$as_echo "#define HAVE_UNAME 1" >>confdefs.h + else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: uname is not correctly supported" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: uname is not correctly supported" >&5 $as_echo "$as_me: WARNING: uname is not correctly supported" >&2;} + fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext @@ -13885,75 +13837,30 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -# -# check if we have lifconf -# -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lifconf" >&5 -$as_echo_n "checking for struct lifconf... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -#include - -int -main () -{ - -struct lifconf lifconf; -lifconf.lifc_len = 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_HAVELIFCONF="#define ISC_PLATFORM_HAVELIFCONF 1" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ISC_PLATFORM_HAVELIFCONF="#undef ISC_PLATFORM_HAVELIFCONF" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - # # check if we have kqueue # # Check whether --enable-kqueue was given. if test "${enable_kqueue+set}" = set; then : - enableval=$enable_kqueue; want_kqueue="$enableval" + enableval=$enable_kqueue; else - want_kqueue="yes" + enable_kqueue="yes" fi -case $want_kqueue in -yes) - ac_fn_c_check_func "$LINENO" "kqueue" "ac_cv_func_kqueue" + +if test "$enable_kqueue" = "yes"; then : + for ac_func in kqueue +do : + ac_fn_c_check_func "$LINENO" "kqueue" "ac_cv_func_kqueue" if test "x$ac_cv_func_kqueue" = xyes; then : - ac_cv_have_kqueue=yes -else - ac_cv_have_kqueue=no + cat >>confdefs.h <<_ACEOF +#define HAVE_KQUEUE 1 +_ACEOF + fi +done - case $ac_cv_have_kqueue in - yes) - ISC_PLATFORM_HAVEKQUEUE="#define ISC_PLATFORM_HAVEKQUEUE 1" - ;; - *) - ISC_PLATFORM_HAVEKQUEUE="#undef ISC_PLATFORM_HAVEKQUEUE" - ;; - esac - ;; -*) - ISC_PLATFORM_HAVEKQUEUE="#undef ISC_PLATFORM_HAVEKQUEUE" - ;; -esac - +fi # # check if we have epoll. Linux kernel 2.4 has epoll_create() which fails, @@ -13961,67 +13868,38 @@ esac # # 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 -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 # # Check whether --enable-devpoll was given. if test "${enable_devpoll+set}" = set; then : - enableval=$enable_devpoll; want_devpoll="$enableval" + enableval=$enable_devpoll; else - want_devpoll="yes" + enable_devpoll="yes" fi -case $want_devpoll in -yes) - for ac_header in sys/devpoll.h devpoll.h +if test "$enable_devpoll" = "yes"; then : + for ac_header in sys/devpoll.h devpoll.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" @@ -14029,73 +13907,12 @@ if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF - ISC_PLATFORM_HAVEDEVPOLL="#define ISC_PLATFORM_HAVEDEVPOLL 1" - -else - ISC_PLATFORM_HAVEDEVPOLL="#undef ISC_PLATFORM_HAVEDEVPOLL" fi done - ;; -*) - ISC_PLATFORM_HAVEDEVPOLL="#undef ISC_PLATFORM_HAVEDEVPOLL" - ;; -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 /* Ultrix */ -#include -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. @@ -14586,22 +14403,6 @@ esac -# XXXOND: Change this to deterministic DSA generation -# -# Only check dsa signature generation on these platforms when performing -# system tests. -# -CHECK_DSA=0 -if grep "#define PATH_RANDOMDEV " confdefs.h > /dev/null -then - case "$host" in - *darwin*|*freebsd*) - CHECK_DSA=1 - ;; - esac -fi - - # # Do we have arc4random(), etc ? # @@ -15415,77 +15216,6 @@ fi done -# -# Additional OS-specific issues related to pthreads and sigwait. -# -case "$host" in - # - # One more place to look for sigwait. - # - *-freebsd*) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigwait in -lc_r" >&5 -$as_echo_n "checking for sigwait in -lc_r... " >&6; } -if ${ac_cv_lib_c_r_sigwait+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lc_r $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char sigwait (); -int -main () -{ -return sigwait (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_c_r_sigwait=yes -else - ac_cv_lib_c_r_sigwait=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_sigwait" >&5 -$as_echo "$ac_cv_lib_c_r_sigwait" >&6; } -if test "x$ac_cv_lib_c_r_sigwait" = xyes; then : - $as_echo "#define HAVE_SIGWAIT 1" >>confdefs.h - -fi - - case $host in - *-freebsd5.[012]|*-freebsd5.[012].*);; - *-freebsd5.[3456789]|*-freebsd5.[3456789].*) - $as_echo "#define NEED_PTHREAD_SCOPE_SYSTEM 1" >>confdefs.h - - ;; - *-freebsd6.*) - $as_echo "#define NEED_PTHREAD_SCOPE_SYSTEM 1" >>confdefs.h - - ;; - esac - ;; - # - # LinuxThreads requires some changes to the way we - # deal with signals. - # - *-linux*) - $as_echo "#define HAVE_LINUXTHREADS 1" >>confdefs.h - - ;; -esac - # Look for functions relating to thread naming for ac_func in pthread_setname_np pthread_set_name_np do : @@ -15516,11 +15246,16 @@ done # # Look for sysconf to allow detection of the number of processors. # -ac_fn_c_check_func "$LINENO" "sysconf" "ac_cv_func_sysconf" +for ac_func in sysconf +do : + ac_fn_c_check_func "$LINENO" "sysconf" "ac_cv_func_sysconf" if test "x$ac_cv_func_sysconf" = xyes; then : - $as_echo "#define HAVE_SYSCONF 1" >>confdefs.h + cat >>confdefs.h <<_ACEOF +#define HAVE_SYSCONF 1 +_ACEOF fi +done @@ -17134,24 +16869,6 @@ _ACEOF fi -# -# flockfile is usually provided by pthreads, but we may want to use it -# even if compiled with --disable-threads. getc_unlocked might also not -# be defined. -# -ac_fn_c_check_func "$LINENO" "flockfile" "ac_cv_func_flockfile" -if test "x$ac_cv_func_flockfile" = xyes; then : - $as_echo "#define HAVE_FLOCKFILE 1" >>confdefs.h - -fi - -ac_fn_c_check_func "$LINENO" "getc_unlocked" "ac_cv_func_getc_unlocked" -if test "x$ac_cv_func_getc_unlocked" = xyes; then : - $as_echo "#define HAVE_GETCUNLOCKED 1" >>confdefs.h - -fi - - # # Large File # @@ -17262,11 +16979,16 @@ fi # # NLS # -ac_fn_c_check_func "$LINENO" "catgets" "ac_cv_func_catgets" +for ac_func in catgets +do : + ac_fn_c_check_func "$LINENO" "catgets" "ac_cv_func_catgets" if test "x$ac_cv_func_catgets" = xyes; then : - $as_echo "#define HAVE_CATGETS 1" >>confdefs.h + cat >>confdefs.h <<_ACEOF +#define HAVE_CATGETS 1 +_ACEOF fi +done # @@ -17511,38 +17233,37 @@ esac # # Check whether --enable-backtrace was given. if test "${enable_backtrace+set}" = set; then : - enableval=$enable_backtrace; want_backtrace="$enableval" + enableval=$enable_backtrace; else - want_backtrace="yes" + enable_backtrace="yes" fi -case $want_backtrace in -yes) - ISC_PLATFORM_USEBACKTRACE="#define ISC_PLATFORM_USEBACKTRACE 1" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + +if test "$enable_backtrace" = "yes"; then : + +$as_echo "#define USE_BACKTRACE 1" >>confdefs.h + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { return (backtrace((void **)0, 0)); + ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : -$as_echo "#define HAVE_LIBCTRACE /**/" >>confdefs.h +$as_echo "#define HAVE_LIBCTRACE 1" >>confdefs.h + fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - ;; -*) - ISC_PLATFORM_USEBACKTRACE="#undef ISC_PLATFORM_USEBACKTRACE" - ;; -esac - +fi # Check whether --enable-symtable was given. if test "${enable_symtable+set}" = set; then : @@ -17652,64 +17373,6 @@ See \`config.log' for more details" "$LINENO" 5; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct if_laddrreq" >&5 -$as_echo_n "checking for struct if_laddrreq... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include - -int -main () -{ - struct if_laddrreq a; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ISC_PLATFORM_HAVEIF_LADDRREQ="#define ISC_PLATFORM_HAVEIF_LADDRREQ 1" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ISC_PLATFORM_HAVEIF_LADDRREQ="#undef ISC_PLATFORM_HAVEIF_LADDRREQ" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct if_laddrconf" >&5 -$as_echo_n "checking for struct if_laddrconf... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include - -int -main () -{ - struct if_laddrconf a; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ISC_PLATFORM_HAVEIF_LADDRCONF="#define ISC_PLATFORM_HAVEIF_LADDRCONF 1" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ISC_PLATFORM_HAVEIF_LADDRCONF="#undef ISC_PLATFORM_HAVEIF_LADDRCONF" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - # # Allow forcibly disabling TCP Fast Open support as autodetection might yield # confusing results on some systems (e.g. FreeBSD; see set_tcp_fastopen() @@ -17719,65 +17382,31 @@ rm -f core conftest.err conftest.$ac_objext \ # Check whether --enable-tcp_fastopen was given. if test "${enable_tcp_fastopen+set}" = set; then : enableval=$enable_tcp_fastopen; -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for TCP_FASTOPEN socket option" >&5 -$as_echo_n "checking for TCP_FASTOPEN socket option... " >&6; } -case "$enable_tcp_fastopen" in -yes|''|autodetect) - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -#include -#ifdef TCP_FASTOPEN -int has_tfo() { return (0); } -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "has_tfo" >/dev/null 2>&1; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ISC_PLATFORM_HAVETFO="#define ISC_PLATFORM_HAVETFO 1" else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ISC_PLATFORM_HAVETFO="#undef ISC_PLATFORM_HAVETFO" + enable_tcp_fastopen="yes" fi -rm -f conftest* - ;; - no) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 -$as_echo "disabled" >&6; } - ISC_PLATFORM_HAVETFO="#undef ISC_PLATFORM_HAVETFO" - ;; -esac +if test "$enable_tcp_fastopen" = "yes"; then : +$as_echo "#define ENABLE_TCP_FASTOPEN 1" >>confdefs.h + +fi # # Check for some other useful functions that are not ever-present. # -ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy" -if test "x$ac_cv_func_strlcpy" = xyes; then : - ISC_PLATFORM_NEEDSTRLCPY="#undef ISC_PLATFORM_NEEDSTRLCPY" -else - ISC_PLATFORM_NEEDSTRLCPY="#define ISC_PLATFORM_NEEDSTRLCPY 1" +for ac_func in strlcpy strlcat +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + fi - - - -ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat" -if test "x$ac_cv_func_strlcat" = xyes; then : - ISC_PLATFORM_NEEDSTRLCAT="#undef ISC_PLATFORM_NEEDSTRLCAT" -else - ISC_PLATFORM_NEEDSTRLCAT="#define ISC_PLATFORM_NEEDSTRLCAT 1" -fi - +done @@ -18080,19 +17709,6 @@ $as_echo "no" >&6; } fi -for ac_header in sys/prctl.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "sys/prctl.h" "ac_cv_header_sys_prctl_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_prctl_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_PRCTL_H 1 -_ACEOF - -fi - -done - - for ac_header in sys/un.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/un.h" "ac_cv_header_sys_un_h" "$ac_includes_default" @@ -18122,11 +17738,16 @@ esac # # Time Zone Stuff # -ac_fn_c_check_func "$LINENO" "tzset" "ac_cv_func_tzset" +for ac_func in tzset +do : + ac_fn_c_check_func "$LINENO" "tzset" "ac_cv_func_tzset" if test "x$ac_cv_func_tzset" = xyes; then : - $as_echo "#define HAVE_TZSET 1" >>confdefs.h + cat >>confdefs.h <<_ACEOF +#define HAVE_TZSET 1 +_ACEOF fi +done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for optarg declaration" >&5 @@ -18160,84 +17781,41 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # # Check for nanoseconds in file stats # -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking st_mtim.tv_nsec" >&5 -$as_echo_n "checking st_mtim.tv_nsec... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_mtim.tv_nsec" >&5 +$as_echo_n "checking for st_mtim.tv_nsec... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { -struct stat s; return(s.st_mtim.tv_nsec); +struct stat s; + return(s.st_mtim.tv_nsec); + ; 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_HAVESTATNSEC="#define ISC_PLATFORM_HAVESTATNSEC 1" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ISC_PLATFORM_HAVESTATNSEC="#undef ISC_PLATFORM_HAVESTATNSEC" + +$as_echo "#define HAVE_STAT_NSEC 1" >>confdefs.h + fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -# -# Microsoft has their own way of handling shared libraries that requires -# additional qualifiers on extern variables. Unix systems don't need it. -# - -ISC_PLATFORM_USEDECLSPEC="#undef ISC_PLATFORM_USEDECLSPEC" - -IRS_PLATFORM_USEDECLSPEC="#undef IRS_PLATFORM_USEDECLSPEC" - -# -# Random remaining OS-specific issues involving compiler warnings. -# XXXDCL print messages to indicate some compensation is being done? -# - -for ac_header in strings.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "strings.h" "ac_cv_header_strings_h" "$ac_includes_default" -if test "x$ac_cv_header_strings_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_STRINGS_H 1 -_ACEOF - ISC_PLATFORM_HAVESTRINGSH="#define ISC_PLATFORM_HAVESTRINGSH 1" - -else - ISC_PLATFORM_HAVESTRINGSH="#undef ISC_PLATFORM_HAVESTRINGSH" - -fi - -done - - - # # Check for if_nametoindex() for IPv6 scoped addresses support # -ac_fn_c_check_func "$LINENO" "if_nametoindex" "ac_cv_func_if_nametoindex" +for ac_func in if_nametoindex +do : + ac_fn_c_check_func "$LINENO" "if_nametoindex" "ac_cv_func_if_nametoindex" if test "x$ac_cv_func_if_nametoindex" = xyes; then : - ac_cv_have_if_nametoindex=yes -else - ac_cv_have_if_nametoindex=no + cat >>confdefs.h <<_ACEOF +#define HAVE_IF_NAMETOINDEX 1 +_ACEOF + fi - -case $ac_cv_have_if_nametoindex in -yes) - ISC_PLATFORM_HAVEIFNAMETOINDEX="#define ISC_PLATFORM_HAVEIFNAMETOINDEX 1" - -$as_echo "#define HAVE_IF_NAMETOINDEX 1" >>confdefs.h - - ;; -*) - ISC_PLATFORM_HAVEIFNAMETOINDEX="#undef ISC_PLATFORM_HAVEIFNAMETOINDEX" - ;; -esac +done for ac_func in nanosleep usleep explicit_bzero @@ -18463,112 +18041,6 @@ $as_echo "#define HAVE_BUILTIN_CLZ 1" >>confdefs.h fi -# -# CPU relax (for spin locks) -# -case "$host" in -i[3456]86-*) - # x86_32 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if asm(\"rep; nop\"); works" >&5 -$as_echo_n "checking if asm(\"rep; nop\"); works... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -asm("rep; nop"); - ; - 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_BUSYWAITNOP="#define ISC_PLATFORM_BUSYWAITNOP asm(\"rep; nop\")" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ;; -x86_64-*|amd64-*) - # x86_64 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if asm(\"rep; nop\"); works" >&5 -$as_echo_n "checking if asm(\"rep; nop\"); works... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -asm("rep; nop"); - ; - 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_BUSYWAITNOP="#define ISC_PLATFORM_BUSYWAITNOP asm(\"rep; nop\")" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ;; -ia64-*) - # ia64 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if asm(\"hint @pause\"); works" >&5 -$as_echo_n "checking if asm(\"hint @pause\"); works... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -asm("hint @pause"); - ; - 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_BUSYWAITNOP="#define ISC_PLATFORM_BUSYWAITNOP asm(\"hint @pause\")" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ;; -sparc-*) - # sparc - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if cpu_relax(); or __cpu_relax(); works" >&5 -$as_echo_n "checking if cpu_relax(); or __cpu_relax(); works... " >&6; } - ac_fn_c_check_func "$LINENO" "cpu_relax" "ac_cv_func_cpu_relax" -if test "x$ac_cv_func_cpu_relax" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ISC_PLATFORM_BUSYWAITNOP="#define ISC_PLATFORM_BUSYWAITNOP cpu_relax()" -else - ac_fn_c_check_func "$LINENO" "__cpu_relax" "ac_cv_func___cpu_relax" -if test "x$ac_cv_func___cpu_relax" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ISC_PLATFORM_BUSYWAITNOP="#define ISC_PLATFORM_BUSYWAITNOP __cpu_relax()" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - -fi - - ;; -esac - - - # # Activate "rrset-order fixed" or not? # @@ -21954,7 +21426,7 @@ ac_config_commands="$ac_config_commands chmod" # elsewhere if there's a good reason for doing so. # -ac_config_files="$ac_config_files make/Makefile make/mkdep Makefile bin/Makefile bin/check/Makefile bin/confgen/Makefile bin/confgen/unix/Makefile bin/delv/Makefile bin/dig/Makefile bin/dnssec/Makefile bin/named/Makefile bin/named/unix/Makefile bin/nsupdate/Makefile bin/pkcs11/Makefile bin/python/Makefile bin/python/isc/Makefile bin/python/isc/utils.py bin/python/isc/tests/Makefile bin/python/dnssec-checkds.py bin/python/dnssec-coverage.py bin/python/dnssec-keymgr.py bin/python/isc/__init__.py bin/python/isc/checkds.py bin/python/isc/coverage.py bin/python/isc/dnskey.py bin/python/isc/eventlist.py bin/python/isc/keydict.py bin/python/isc/keyevent.py bin/python/isc/keymgr.py bin/python/isc/keyseries.py bin/python/isc/keyzone.py bin/python/isc/policy.py bin/python/isc/rndc.py bin/python/isc/tests/dnskey_test.py bin/python/isc/tests/policy_test.py bin/rndc/Makefile bin/tests/Makefile bin/tests/headerdep_test.sh bin/tests/optional/Makefile bin/tests/pkcs11/Makefile bin/tests/pkcs11/benchmarks/Makefile bin/tests/system/Makefile bin/tests/system/conf.sh bin/tests/system/dlz/prereq.sh bin/tests/system/dlzexternal/Makefile bin/tests/system/dlzexternal/ns1/dlzs.conf bin/tests/system/dyndb/Makefile bin/tests/system/dyndb/driver/Makefile bin/tests/system/inline/checkdsa.sh bin/tests/system/pipelined/Makefile bin/tests/system/rndc/Makefile bin/tests/system/rpz/Makefile bin/tests/system/rsabigexponent/Makefile bin/tests/system/tkey/Makefile bin/tests/virtual-time/Makefile bin/tests/virtual-time/conf.sh bin/tools/Makefile contrib/scripts/check-secure-delegation.pl contrib/scripts/zone-edit.sh doc/Makefile doc/arm/Makefile doc/arm/noteversion.xml doc/arm/pkgversion.xml doc/arm/releaseinfo.xml doc/doxygen/Doxyfile doc/doxygen/Makefile doc/doxygen/doxygen-input-filter doc/misc/Makefile doc/tex/Makefile doc/tex/armstyle.sty doc/xsl/Makefile doc/xsl/isc-docbook-chunk.xsl doc/xsl/isc-docbook-html.xsl doc/xsl/isc-manpage.xsl doc/xsl/isc-notes-html.xsl isc-config.sh lib/Makefile lib/bind9/Makefile lib/bind9/include/Makefile lib/bind9/include/bind9/Makefile lib/dns/Makefile lib/dns/include/Makefile lib/dns/include/dns/Makefile lib/dns/include/dst/Makefile lib/dns/tests/Makefile lib/irs/Makefile lib/irs/include/Makefile lib/irs/include/irs/Makefile lib/irs/include/irs/netdb.h lib/irs/include/irs/platform.h lib/irs/tests/Makefile lib/isc/pthreads/Makefile lib/isc/pthreads/include/Makefile lib/isc/pthreads/include/isc/Makefile lib/isc/Makefile lib/isc/include/Makefile lib/isc/include/isc/Makefile lib/isc/include/isc/platform.h lib/isc/include/pk11/Makefile lib/isc/include/pkcs11/Makefile lib/isc/tests/Makefile lib/isc/nls/Makefile lib/isc/unix/Makefile lib/isc/unix/include/Makefile lib/isc/unix/include/isc/Makefile lib/isc/unix/include/pkcs11/Makefile lib/isccc/Makefile lib/isccc/include/Makefile lib/isccc/include/isccc/Makefile lib/isccfg/Makefile lib/isccfg/include/Makefile lib/isccfg/include/isccfg/Makefile lib/isccfg/tests/Makefile lib/ns/Makefile lib/ns/include/Makefile lib/ns/include/ns/Makefile lib/ns/tests/Makefile lib/samples/Makefile lib/samples/Makefile-postinstall unit/Makefile unit/unittest.sh fuzz/Makefile" +ac_config_files="$ac_config_files make/Makefile make/mkdep Makefile bin/Makefile bin/check/Makefile bin/confgen/Makefile bin/confgen/unix/Makefile bin/delv/Makefile bin/dig/Makefile bin/dnssec/Makefile bin/named/Makefile bin/named/unix/Makefile bin/nsupdate/Makefile bin/pkcs11/Makefile bin/python/Makefile bin/python/isc/Makefile bin/python/isc/utils.py bin/python/isc/tests/Makefile bin/python/dnssec-checkds.py bin/python/dnssec-coverage.py bin/python/dnssec-keymgr.py bin/python/isc/__init__.py bin/python/isc/checkds.py bin/python/isc/coverage.py bin/python/isc/dnskey.py bin/python/isc/eventlist.py bin/python/isc/keydict.py bin/python/isc/keyevent.py bin/python/isc/keymgr.py bin/python/isc/keyseries.py bin/python/isc/keyzone.py bin/python/isc/policy.py bin/python/isc/rndc.py bin/python/isc/tests/dnskey_test.py bin/python/isc/tests/policy_test.py bin/rndc/Makefile bin/tests/Makefile bin/tests/headerdep_test.sh bin/tests/optional/Makefile bin/tests/pkcs11/Makefile bin/tests/pkcs11/benchmarks/Makefile bin/tests/system/Makefile bin/tests/system/conf.sh bin/tests/system/dlz/prereq.sh bin/tests/system/dlzexternal/Makefile bin/tests/system/dlzexternal/ns1/dlzs.conf bin/tests/system/dyndb/Makefile bin/tests/system/dyndb/driver/Makefile bin/tests/system/pipelined/Makefile bin/tests/system/rndc/Makefile bin/tests/system/rpz/Makefile bin/tests/system/rsabigexponent/Makefile bin/tests/system/tkey/Makefile bin/tests/virtual-time/Makefile bin/tests/virtual-time/conf.sh bin/tools/Makefile contrib/scripts/check-secure-delegation.pl contrib/scripts/zone-edit.sh doc/Makefile doc/arm/Makefile doc/arm/noteversion.xml doc/arm/pkgversion.xml doc/arm/releaseinfo.xml doc/doxygen/Doxyfile doc/doxygen/Makefile doc/doxygen/doxygen-input-filter doc/misc/Makefile doc/tex/Makefile doc/tex/armstyle.sty doc/xsl/Makefile doc/xsl/isc-docbook-chunk.xsl doc/xsl/isc-docbook-html.xsl doc/xsl/isc-manpage.xsl doc/xsl/isc-notes-html.xsl isc-config.sh lib/Makefile lib/bind9/Makefile lib/bind9/include/Makefile lib/bind9/include/bind9/Makefile lib/dns/Makefile lib/dns/include/Makefile lib/dns/include/dns/Makefile lib/dns/include/dst/Makefile lib/dns/tests/Makefile lib/irs/Makefile lib/irs/include/Makefile lib/irs/include/irs/Makefile lib/irs/include/irs/netdb.h lib/irs/include/irs/platform.h lib/irs/tests/Makefile lib/isc/pthreads/Makefile lib/isc/pthreads/include/Makefile lib/isc/pthreads/include/isc/Makefile lib/isc/Makefile lib/isc/include/Makefile lib/isc/include/isc/Makefile lib/isc/include/isc/platform.h lib/isc/include/pk11/Makefile lib/isc/include/pkcs11/Makefile lib/isc/tests/Makefile lib/isc/nls/Makefile lib/isc/unix/Makefile lib/isc/unix/include/Makefile lib/isc/unix/include/isc/Makefile lib/isc/unix/include/pkcs11/Makefile lib/isccc/Makefile lib/isccc/include/Makefile lib/isccc/include/isccc/Makefile lib/isccfg/Makefile lib/isccfg/include/Makefile lib/isccfg/include/isccfg/Makefile lib/isccfg/tests/Makefile lib/ns/Makefile lib/ns/include/Makefile lib/ns/include/ns/Makefile lib/ns/tests/Makefile lib/samples/Makefile lib/samples/Makefile-postinstall unit/Makefile unit/unittest.sh fuzz/Makefile" # @@ -23004,7 +22476,6 @@ do "bin/tests/system/dlzexternal/ns1/dlzs.conf") CONFIG_FILES="$CONFIG_FILES bin/tests/system/dlzexternal/ns1/dlzs.conf" ;; "bin/tests/system/dyndb/Makefile") CONFIG_FILES="$CONFIG_FILES bin/tests/system/dyndb/Makefile" ;; "bin/tests/system/dyndb/driver/Makefile") CONFIG_FILES="$CONFIG_FILES bin/tests/system/dyndb/driver/Makefile" ;; - "bin/tests/system/inline/checkdsa.sh") CONFIG_FILES="$CONFIG_FILES bin/tests/system/inline/checkdsa.sh" ;; "bin/tests/system/pipelined/Makefile") CONFIG_FILES="$CONFIG_FILES bin/tests/system/pipelined/Makefile" ;; "bin/tests/system/rndc/Makefile") CONFIG_FILES="$CONFIG_FILES bin/tests/system/rndc/Makefile" ;; "bin/tests/system/rpz/Makefile") CONFIG_FILES="$CONFIG_FILES bin/tests/system/rpz/Makefile" ;; diff --git a/configure.in b/configure.in index 8703dfc3b5..1210ed5c4c 100644 --- a/configure.in +++ b/configure.in @@ -458,9 +458,10 @@ AC_CHECK_HEADERS([threads.h], AC_C_CONST AC_C_INLINE AC_C_VOLATILE -AC_CHECK_FUNC(sysctlbyname, AC_DEFINE(HAVE_SYSCTLBYNAME)) AC_C_FLEXIBLE_ARRAY_MEMBER +AC_CHECK_FUNCS([sysctlbyname]) + # # Check for the existence of mmap to enable the fast format zones # @@ -476,43 +477,29 @@ AC_TYPE_SIZE_T AC_TYPE_SSIZE_T AC_TYPE_UINTPTR_T -AC_CHECK_TYPE(socklen_t, -[AC_DEFINE(ISC_SOCKADDR_LEN_T, socklen_t)], -[ -AC_TRY_COMPILE( -[ -#include -#include -int getsockname(int, struct sockaddr *, size_t *); -],[], -[AC_DEFINE(ISC_SOCKADDR_LEN_T, size_t)], -[AC_DEFINE(ISC_SOCKADDR_LEN_T, int)]) -], -[ -#include -#include -]) -AC_SUBST(ISC_SOCKADDR_LEN_T) AC_HEADER_TIME # # check for uname library routine # -AC_MSG_CHECKING(for uname) -AC_TRY_COMPILE([ -#include -#include -], -[ -struct utsname uts; -uname(&uts); -printf("running on %s %s %s for %s\n", - uts.sysname, uts.release, uts.version, uts.machine); -], - [AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_UNAME)], - [AC_MSG_RESULT(no) - AC_MSG_WARN([uname is not correctly supported])]) +AC_MSG_CHECKING([for uname]) +AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include + #include + ]], + [[ + struct utsname uts; + uname(&uts); + printf("running on %s %s %s for %s\n", + uts.sysname, uts.release, uts.version, uts.machine); + ]])], + [AC_MSG_RESULT(yes) + AC_DEFINE([HAVE_UNAME], [1], [define if uname is available]) + ], + [AC_MSG_RESULT(no) + AC_MSG_WARN([uname is not correctly supported]) + ]) # # check for GCC noreturn attribute @@ -528,142 +515,38 @@ AC_TRY_COMPILE([],[void foo() __attribute__((noreturn));], AC_SUBST(ISC_PLATFORM_NORETURN_PRE) AC_SUBST(ISC_PLATFORM_NORETURN_POST) -# -# check if we have lifconf -# -AC_MSG_CHECKING(for struct lifconf) -AC_TRY_COMPILE([ -#include -#include -#include -], -[ -struct lifconf lifconf; -lifconf.lifc_len = 0; -] -, - [AC_MSG_RESULT(yes) - ISC_PLATFORM_HAVELIFCONF="#define ISC_PLATFORM_HAVELIFCONF 1"], - [AC_MSG_RESULT(no) - ISC_PLATFORM_HAVELIFCONF="#undef ISC_PLATFORM_HAVELIFCONF"]) -AC_SUBST(ISC_PLATFORM_HAVELIFCONF) - # # check if we have kqueue # -AC_ARG_ENABLE(kqueue, - AS_HELP_STRING([--enable-kqueue], - [use BSD kqueue when available [default=yes]]), - want_kqueue="$enableval", want_kqueue="yes") -case $want_kqueue in -yes) - AC_CHECK_FUNC(kqueue, ac_cv_have_kqueue=yes, ac_cv_have_kqueue=no) - case $ac_cv_have_kqueue in - yes) - ISC_PLATFORM_HAVEKQUEUE="#define ISC_PLATFORM_HAVEKQUEUE 1" - ;; - *) - ISC_PLATFORM_HAVEKQUEUE="#undef ISC_PLATFORM_HAVEKQUEUE" - ;; - esac - ;; -*) - ISC_PLATFORM_HAVEKQUEUE="#undef ISC_PLATFORM_HAVEKQUEUE" - ;; -esac -AC_SUBST(ISC_PLATFORM_HAVEKQUEUE) +AC_ARG_ENABLE([kqueue], + [AS_HELP_STRING([--enable-kqueue], + [use BSD kqueue when available [default=yes]])], + [], enable_kqueue="yes") + +AS_IF([test "$enable_kqueue" = "yes"], + [AC_CHECK_FUNCS([kqueue])]) # # 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 -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 # -AC_ARG_ENABLE(devpoll, - AS_HELP_STRING([--enable-devpoll], - [use /dev/poll when available [default=yes]]), - want_devpoll="$enableval", want_devpoll="yes") -case $want_devpoll in -yes) - AC_CHECK_HEADERS(sys/devpoll.h devpoll.h, - ISC_PLATFORM_HAVEDEVPOLL="#define ISC_PLATFORM_HAVEDEVPOLL 1" - , - ISC_PLATFORM_HAVEDEVPOLL="#undef ISC_PLATFORM_HAVEDEVPOLL" - ) - ;; -*) - ISC_PLATFORM_HAVEDEVPOLL="#undef ISC_PLATFORM_HAVEDEVPOLL" - ;; -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 /* Ultrix */ -#include ], -[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) +AC_ARG_ENABLE([devpoll], + [AS_HELP_STRING([--enable-devpoll], + [use /dev/poll when available [default=yes]])], + [], [enable_devpoll="yes"]) +AS_IF([test "$enable_devpoll" = "yes"], + [AC_CHECK_HEADERS([sys/devpoll.h devpoll.h])]) # # Find the machine's endian flavor. @@ -767,22 +650,6 @@ esac AC_SUBST(GEOIPLINKSRCS) AC_SUBST(GEOIPLINKOBJS) -# XXXOND: Change this to deterministic DSA generation -# -# Only check dsa signature generation on these platforms when performing -# system tests. -# -CHECK_DSA=0 -if grep "#define PATH_RANDOMDEV " confdefs.h > /dev/null -then - case "$host" in - *darwin*|*freebsd*) - CHECK_DSA=1 - ;; - esac -fi -AC_SUBST(CHECK_DSA) - # # Do we have arc4random(), etc ? # @@ -834,34 +701,6 @@ AC_CHECK_HEADERS([sched.h]) AC_SEARCH_LIBS([sched_yield],[rt]) AC_CHECK_FUNCS([sched_yield pthread_yield pthread_yield_np]) -# -# Additional OS-specific issues related to pthreads and sigwait. -# -case "$host" in - # - # One more place to look for sigwait. - # - *-freebsd*) - AC_CHECK_LIB(c_r, sigwait, AC_DEFINE(HAVE_SIGWAIT),) - case $host in - *-freebsd5.[[012]]|*-freebsd5.[[012]].*);; - *-freebsd5.[[3456789]]|*-freebsd5.[[3456789]].*) - AC_DEFINE(NEED_PTHREAD_SCOPE_SYSTEM) - ;; - *-freebsd6.*) - AC_DEFINE(NEED_PTHREAD_SCOPE_SYSTEM) - ;; - esac - ;; - # - # LinuxThreads requires some changes to the way we - # deal with signals. - # - *-linux*) - AC_DEFINE(HAVE_LINUXTHREADS) - ;; -esac - # Look for functions relating to thread naming AC_CHECK_FUNCS([pthread_setname_np pthread_set_name_np]) AC_CHECK_HEADERS([pthread_np.h], [], [], [#include ]) @@ -869,7 +708,7 @@ AC_CHECK_HEADERS([pthread_np.h], [], [], [#include ]) # # Look for sysconf to allow detection of the number of processors. # -AC_CHECK_FUNC(sysconf, AC_DEFINE(HAVE_SYSCONF),) +AC_CHECK_FUNCS([sysconf]) AC_SUBST(ALWAYS_DEFINES) @@ -1637,14 +1476,6 @@ AC_SUBST(ZLIB) # AC_CHECK_LIB(scf, smf_enable_instance) -# -# flockfile is usually provided by pthreads, but we may want to use it -# even if compiled with --disable-threads. getc_unlocked might also not -# be defined. -# -AC_CHECK_FUNC(flockfile, AC_DEFINE(HAVE_FLOCKFILE),) -AC_CHECK_FUNC(getc_unlocked, AC_DEFINE(HAVE_GETCUNLOCKED),) - # # Large File # @@ -1714,7 +1545,7 @@ AC_SUBST(MKDEPPROG) # # NLS # -AC_CHECK_FUNC(catgets, AC_DEFINE(HAVE_CATGETS),) +AC_CHECK_FUNCS([catgets]) # # -lxnet buys us one big porting headache... standards, gotta love 'em. @@ -1811,22 +1642,20 @@ esac # enable/disable dumping stack backtrace. Also check if the system supports # glibc-compatible backtrace() function. # -AC_ARG_ENABLE(backtrace, - AS_HELP_STRING([--enable-backtrace], - [log stack backtrace on abort [default=yes]]), - want_backtrace="$enableval", want_backtrace="yes") -case $want_backtrace in -yes) - ISC_PLATFORM_USEBACKTRACE="#define ISC_PLATFORM_USEBACKTRACE 1" - AC_TRY_LINK([#include ], - [return (backtrace((void **)0, 0));], - [AC_DEFINE([HAVE_LIBCTRACE], [], [if system have backtrace function])],) - ;; -*) - ISC_PLATFORM_USEBACKTRACE="#undef ISC_PLATFORM_USEBACKTRACE" - ;; -esac -AC_SUBST(ISC_PLATFORM_USEBACKTRACE) +AC_ARG_ENABLE([backtrace], + [AS_HELP_STRING([--enable-backtrace], + [log stack backtrace on abort [default=yes]])], + [], [enable_backtrace="yes"]) + +AS_IF([test "$enable_backtrace" = "yes"], + [AC_DEFINE([USE_BACKTRACE], [1], [define if we can use backtrace]) + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#include ]], + [[return (backtrace((void **)0, 0));]] + )], + [AC_DEFINE([HAVE_LIBCTRACE], [1], [define if system have backtrace function])] + )]) AC_ARG_ENABLE(symtable, AS_HELP_STRING([--enable-symtable], @@ -1916,74 +1745,24 @@ AC_COMPILE_IFELSE( [AC_MSG_RESULT([yes])], [AC_MSG_FAILURE([IPv6 support is mandatory])]) -AC_MSG_CHECKING([for struct if_laddrreq]) -AC_TRY_LINK([ -#include -#include -],[ struct if_laddrreq a; ], - [AC_MSG_RESULT(yes) - ISC_PLATFORM_HAVEIF_LADDRREQ="#define ISC_PLATFORM_HAVEIF_LADDRREQ 1"], - [AC_MSG_RESULT(no) - ISC_PLATFORM_HAVEIF_LADDRREQ="#undef ISC_PLATFORM_HAVEIF_LADDRREQ"]) -AC_SUBST(ISC_PLATFORM_HAVEIF_LADDRREQ) - -AC_MSG_CHECKING([for struct if_laddrconf]) -AC_TRY_LINK([ -#include -#include -],[ struct if_laddrconf a; ], - [AC_MSG_RESULT(yes) - ISC_PLATFORM_HAVEIF_LADDRCONF="#define ISC_PLATFORM_HAVEIF_LADDRCONF 1"], - [AC_MSG_RESULT(no) - ISC_PLATFORM_HAVEIF_LADDRCONF="#undef ISC_PLATFORM_HAVEIF_LADDRCONF"]) -AC_SUBST(ISC_PLATFORM_HAVEIF_LADDRCONF) - # # Allow forcibly disabling TCP Fast Open support as autodetection might yield # confusing results on some systems (e.g. FreeBSD; see set_tcp_fastopen() # comment in lib/isc/unix/socket.c). # -AC_ARG_ENABLE(tcp_fastopen, - AS_HELP_STRING([--disable-tcp-fastopen], - [disable TCP Fast Open support [default=autodetect]])) +AC_ARG_ENABLE([tcp_fastopen], + [AS_HELP_STRING([--disable-tcp-fastopen], + [disable TCP Fast Open support [default=yes]])], + [], [enable_tcp_fastopen="yes"]) -AC_MSG_CHECKING(for TCP_FASTOPEN socket option) -case "$enable_tcp_fastopen" in -yes|''|autodetect) - AC_EGREP_CPP(has_tfo, [ -#include -#include -#include -#ifdef TCP_FASTOPEN -int has_tfo() { return (0); } -#endif -], - [AC_MSG_RESULT(yes) - ISC_PLATFORM_HAVETFO="#define ISC_PLATFORM_HAVETFO 1"], - [AC_MSG_RESULT(no) - ISC_PLATFORM_HAVETFO="#undef ISC_PLATFORM_HAVETFO"]) - - ;; - no) - AC_MSG_RESULT(disabled) - ISC_PLATFORM_HAVETFO="#undef ISC_PLATFORM_HAVETFO" - ;; -esac -AC_SUBST(ISC_PLATFORM_HAVETFO) +AS_IF([test "$enable_tcp_fastopen" = "yes"], + [AC_DEFINE([ENABLE_TCP_FASTOPEN], [1], [define if you want TCP_FASTOPEN enabled if available])]) # # Check for some other useful functions that are not ever-present. # -AC_CHECK_FUNC(strlcpy, - [ISC_PLATFORM_NEEDSTRLCPY="#undef ISC_PLATFORM_NEEDSTRLCPY"], - [ISC_PLATFORM_NEEDSTRLCPY="#define ISC_PLATFORM_NEEDSTRLCPY 1"]) -AC_SUBST(ISC_PLATFORM_NEEDSTRLCPY) - -AC_CHECK_FUNC(strlcat, - [ISC_PLATFORM_NEEDSTRLCAT="#undef ISC_PLATFORM_NEEDSTRLCAT"], - [ISC_PLATFORM_NEEDSTRLCAT="#define ISC_PLATFORM_NEEDSTRLCAT 1"]) -AC_SUBST(ISC_PLATFORM_NEEDSTRLCAT) +AC_CHECK_FUNCS([strlcpy strlcat]) AC_SUBST(READLINE_LIB) AC_ARG_WITH(readline, @@ -2112,8 +1891,6 @@ AS_IF([test "$enable_linux_caps" = "yes"], [AC_MSG_RESULT([no])]) AC_SUBST([LIBCAP_LIBS]) -AC_CHECK_HEADERS(sys/prctl.h) - AC_CHECK_HEADERS(sys/un.h, ISC_PLATFORM_HAVESYSUNH="#define ISC_PLATFORM_HAVESYSUNH 1" , @@ -2131,7 +1908,7 @@ esac # # Time Zone Stuff # -AC_CHECK_FUNC(tzset, AC_DEFINE(HAVE_TZSET)) +AC_CHECK_FUNCS([tzset]) AC_MSG_CHECKING(for optarg declaration) AC_TRY_COMPILE([ @@ -2146,51 +1923,19 @@ AC_DEFINE(NEED_OPTARG, 1, [Defined if extern char *optarg is not declared.])]) # # Check for nanoseconds in file stats # -AC_MSG_CHECKING(st_mtim.tv_nsec) -AC_TRY_COMPILE([#include ],[struct stat s; return(s.st_mtim.tv_nsec);], - [AC_MSG_RESULT(yes) - ISC_PLATFORM_HAVESTATNSEC="#define ISC_PLATFORM_HAVESTATNSEC 1"], - [AC_MSG_RESULT(no) - ISC_PLATFORM_HAVESTATNSEC="#undef ISC_PLATFORM_HAVESTATNSEC"]) -AC_SUBST(ISC_PLATFORM_HAVESTATNSEC) - -# -# Microsoft has their own way of handling shared libraries that requires -# additional qualifiers on extern variables. Unix systems don't need it. -# -AC_SUBST(ISC_PLATFORM_USEDECLSPEC) -ISC_PLATFORM_USEDECLSPEC="#undef ISC_PLATFORM_USEDECLSPEC" -AC_SUBST(IRS_PLATFORM_USEDECLSPEC) -IRS_PLATFORM_USEDECLSPEC="#undef IRS_PLATFORM_USEDECLSPEC" - -# -# Random remaining OS-specific issues involving compiler warnings. -# XXXDCL print messages to indicate some compensation is being done? -# - -AC_CHECK_HEADERS(strings.h, - ISC_PLATFORM_HAVESTRINGSH="#define ISC_PLATFORM_HAVESTRINGSH 1" -, - ISC_PLATFORM_HAVESTRINGSH="#undef ISC_PLATFORM_HAVESTRINGSH" -) -AC_SUBST(ISC_PLATFORM_HAVESTRINGSH) +AC_MSG_CHECKING([for st_mtim.tv_nsec]) +AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include ]], + [[struct stat s; + return(s.st_mtim.tv_nsec); + ]])], + [AC_DEFINE([HAVE_STAT_NSEC], [1], [define if struct stat has st_mtim.tv_nsec field])]) # # Check for if_nametoindex() for IPv6 scoped addresses support # -AC_CHECK_FUNC(if_nametoindex, ac_cv_have_if_nametoindex=yes, - ac_cv_have_if_nametoindex=no) -case $ac_cv_have_if_nametoindex in -yes) - ISC_PLATFORM_HAVEIFNAMETOINDEX="#define ISC_PLATFORM_HAVEIFNAMETOINDEX 1" - AC_DEFINE(HAVE_IF_NAMETOINDEX, 1, - [Define to 1 if you have the if_nametoindex function.]) - ;; -*) - ISC_PLATFORM_HAVEIFNAMETOINDEX="#undef ISC_PLATFORM_HAVEIFNAMETOINDEX" - ;; -esac -AC_SUBST(ISC_PLATFORM_HAVEIFNAMETOINDEX) +AC_CHECK_FUNCS([if_nametoindex]) AC_CHECK_FUNCS(nanosleep usleep explicit_bzero) @@ -2277,55 +2022,6 @@ if test "yes" = "$have_builtin_clz"; then AC_DEFINE(HAVE_BUILTIN_CLZ, 1, [Define to 1 if the compiler supports __builtin_clz.]) fi -# -# CPU relax (for spin locks) -# -case "$host" in -[i[3456]86-*]) - # x86_32 - AC_MSG_CHECKING([if asm("rep; nop"); works]) - AC_TRY_COMPILE(,[asm("rep; nop");], - [AC_MSG_RESULT(yes) - ISC_PLATFORM_BUSYWAITNOP="#define ISC_PLATFORM_BUSYWAITNOP asm(\"rep; nop\")"], - [AC_MSG_RESULT(no)], - [AC_MSG_RESULT([cross compile, assume yes]) - ISC_PLATFORM_BUSYWAITNOP="#define ISC_PLATFORM_BUSYWAITNOP asm(\"rep; nop\")"]) - ;; -x86_64-*|amd64-*) - # x86_64 - AC_MSG_CHECKING([if asm("rep; nop"); works]) - AC_TRY_COMPILE(,[asm("rep; nop");], - [AC_MSG_RESULT(yes) - ISC_PLATFORM_BUSYWAITNOP="#define ISC_PLATFORM_BUSYWAITNOP asm(\"rep; nop\")"], - [AC_MSG_RESULT(no)], - [AC_MSG_RESULT([cross compile, assume yes]) - ISC_PLATFORM_BUSYWAITNOP="#define ISC_PLATFORM_BUSYWAITNOP asm(\"rep; nop\")"]) - ;; -ia64-*) - # ia64 - AC_MSG_CHECKING([if asm("hint @pause"); works]) - AC_TRY_COMPILE(,[asm("hint @pause");], - [AC_MSG_RESULT(yes) - ISC_PLATFORM_BUSYWAITNOP="#define ISC_PLATFORM_BUSYWAITNOP asm(\"hint @pause\")"], - [AC_MSG_RESULT(no)], - [AC_MSG_RESULT([cross compile, assume yes]) - ISC_PLATFORM_BUSYWAITNOP="#define ISC_PLATFORM_BUSYWAITNOP asm(\"hint @pause\")"]) - ;; -sparc-*) - # sparc - AC_MSG_CHECKING([if cpu_relax(); or __cpu_relax(); works]) - AC_CHECK_FUNC(cpu_relax, - [AC_MSG_RESULT(yes) - ISC_PLATFORM_BUSYWAITNOP="#define ISC_PLATFORM_BUSYWAITNOP cpu_relax()"], - [AC_CHECK_FUNC(__cpu_relax, - [AC_MSG_RESULT(yes) - ISC_PLATFORM_BUSYWAITNOP="#define ISC_PLATFORM_BUSYWAITNOP __cpu_relax()"], - [AC_MSG_RESULT(no)])]) - ;; -esac - -AC_SUBST(ISC_PLATFORM_BUSYWAITNOP) - # # Activate "rrset-order fixed" or not? # @@ -3329,7 +3025,6 @@ AC_CONFIG_FILES([ bin/tests/system/dlzexternal/ns1/dlzs.conf bin/tests/system/dyndb/Makefile bin/tests/system/dyndb/driver/Makefile - bin/tests/system/inline/checkdsa.sh bin/tests/system/pipelined/Makefile bin/tests/system/rndc/Makefile bin/tests/system/rpz/Makefile diff --git a/lib/irs/include/irs/platform.h.in b/lib/irs/include/irs/platform.h.in index 78c91ce144..5599374078 100644 --- a/lib/irs/include/irs/platform.h.in +++ b/lib/irs/include/irs/platform.h.in @@ -18,15 +18,7 @@ ***** Platform-dependent defines. *****/ -#ifndef IRS_PLATFORM_USEDECLSPEC #define LIBIRS_EXTERNAL_DATA -#else -#ifdef LIBIRS_EXPORTS -#define LIBIRS_EXTERNAL_DATA __declspec(dllexport) -#else -#define LIBIRS_EXTERNAL_DATA __declspec(dllimport) -#endif -#endif /* * Tell Emacs to use C mode on this file. diff --git a/lib/irs/win32/include/irs/platform.h b/lib/irs/win32/include/irs/platform.h index 78c91ce144..7170a73f07 100644 --- a/lib/irs/win32/include/irs/platform.h +++ b/lib/irs/win32/include/irs/platform.h @@ -18,15 +18,11 @@ ***** Platform-dependent defines. *****/ -#ifndef IRS_PLATFORM_USEDECLSPEC -#define LIBIRS_EXTERNAL_DATA -#else #ifdef LIBIRS_EXPORTS #define LIBIRS_EXTERNAL_DATA __declspec(dllexport) #else #define LIBIRS_EXTERNAL_DATA __declspec(dllimport) #endif -#endif /* * Tell Emacs to use C mode on this file. diff --git a/lib/isc/backtrace.c b/lib/isc/backtrace.c index 0ea145511e..7c645d7d04 100644 --- a/lib/isc/backtrace.c +++ b/lib/isc/backtrace.c @@ -24,7 +24,7 @@ #include #include -#ifdef ISC_PLATFORM_USEBACKTRACE +#ifdef USE_BACKTRACE /* * Getting a back trace of a running process is tricky and highly platform * dependent. Our current approach is as follows: @@ -52,9 +52,9 @@ #else #define BACKTRACE_DISABLED #endif /* HAVE_LIBCTRACE */ -#else /* !ISC_PLATFORM_USEBACKTRACE */ +#else /* USE_BACKTRACE */ #define BACKTRACE_DISABLED -#endif /* ISC_PLATFORM_USEBACKTRACE */ +#endif /* USE_BACKTRACE */ #ifdef BACKTRACE_LIBC isc_result_t diff --git a/lib/isc/include/isc/platform.h.in b/lib/isc/include/isc/platform.h.in index ba34ed6ff8..90b9a2ee36 100644 --- a/lib/isc/include/isc/platform.h.in +++ b/lib/isc/include/isc/platform.h.in @@ -32,80 +32,10 @@ #define ISC_STRERRORSIZE 128 -/*** - *** 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 struct if_laddrconf which is a extended struct - * ifconf for IPv6. - */ -@ISC_PLATFORM_HAVEIF_LADDRCONF@ - -/*! \brief - * Define if the system has struct if_laddrreq. - */ -@ISC_PLATFORM_HAVEIF_LADDRREQ@ - -/*! \brief - * Define if the system supports if_nametoindex. - */ -@ISC_PLATFORM_HAVEIFNAMETOINDEX@ - -/*! \brief - * Define if the system has TCP_FASTOPEN socket option. - */ -@ISC_PLATFORM_HAVETFO@ - -/*! \brief - * Define if the system supports kqueue multiplexing - */ -@ISC_PLATFORM_HAVEKQUEUE@ - -/*! \brief - * Define if the system supports epoll multiplexing - */ -@ISC_PLATFORM_HAVEEPOLL@ - -/*! \brief - * Define if the system supports /dev/poll multiplexing - */ -@ISC_PLATFORM_HAVEDEVPOLL@ - -/*! \brief - * Define if we want to log backtrace - */ -@ISC_PLATFORM_USEBACKTRACE@ - -/* - *** Printing. - ***/ - -/* - * If the system needs strlcpy(), ISC_PLATFORM_NEEDSTRLCPY will be defined. - */ -@ISC_PLATFORM_NEEDSTRLCPY@ - -/* - * If the system needs strlcat(), ISC_PLATFORM_NEEDSTRLCAT will be defined. - */ -@ISC_PLATFORM_NEEDSTRLCAT@ - /*** *** Miscellaneous. ***/ -/* - * Defined if unistd.h does not cause fd_set to be delared. - */ -@ISC_PLATFORM_NEEDSYSSELECTH@ - /* * Defined to or for how to include * the GSSAPI header. @@ -124,31 +54,11 @@ */ @ISC_PLATFORM_KRB5HEADER@ -/* - * Define if the system has nanosecond-level accuracy in file stats. - */ -@ISC_PLATFORM_HAVESTATNSEC@ - -/* - * Used to control how extern data is linked; needed for Win32 platforms. - */ -@ISC_PLATFORM_USEDECLSPEC@ - /* * Define if the platform has . */ @ISC_PLATFORM_HAVESYSUNH@ -/* - * Define with the busy wait nop asm or function call. - */ -@ISC_PLATFORM_BUSYWAITNOP@ - -/* - * Define if the platform has . - */ -@ISC_PLATFORM_HAVESTRINGSH@ - /* * Defines for the noreturn attribute. */ @@ -159,7 +69,6 @@ *** Windows dll support. ***/ -#ifndef ISC_PLATFORM_USEDECLSPEC #define LIBISC_EXTERNAL_DATA #define LIBDNS_EXTERNAL_DATA #define LIBISCCC_EXTERNAL_DATA @@ -167,43 +76,6 @@ #define LIBNS_EXTERNAL_DATA #define LIBBIND9_EXTERNAL_DATA #define LIBTESTS_EXTERNAL_DATA -#else /*! \brief ISC_PLATFORM_USEDECLSPEC */ -#ifdef LIBISC_EXPORTS -#define LIBISC_EXTERNAL_DATA __declspec(dllexport) -#else -#define LIBISC_EXTERNAL_DATA __declspec(dllimport) -#endif -#ifdef LIBDNS_EXPORTS -#define LIBDNS_EXTERNAL_DATA __declspec(dllexport) -#else -#define LIBDNS_EXTERNAL_DATA __declspec(dllimport) -#endif -#ifdef LIBISCCC_EXPORTS -#define LIBISCCC_EXTERNAL_DATA __declspec(dllexport) -#else -#define LIBISCCC_EXTERNAL_DATA __declspec(dllimport) -#endif -#ifdef LIBISCCFG_EXPORTS -#define LIBISCCFG_EXTERNAL_DATA __declspec(dllexport) -#else -#define LIBISCCFG_EXTERNAL_DATA __declspec(dllimport) -#endif -#ifdef LIBNS_EXPORTS -#define LIBNS_EXTERNAL_DATA __declspec(dllexport) -#else -#define LIBNS_EXTERNAL_DATA __declspec(dllimport) -#endif -#ifdef LIBBIND9_EXPORTS -#define LIBBIND9_EXTERNAL_DATA __declspec(dllexport) -#else -#define LIBBIND9_EXTERNAL_DATA __declspec(dllimport) -#endif -#ifdef LIBTESTS_EXPORTS -#define LIBTESTS_EXTERNAL_DATA __declspec(dllexport) -#else -#define LIBTESTS_EXTERNAL_DATA __declspec(dllimport) -#endif -#endif /*! \brief ISC_PLATFORM_USEDECLSPEC */ /* * Tell emacs to use C mode for this file. diff --git a/lib/isc/include/isc/string.h b/lib/isc/include/isc/string.h index 52c959e340..309b1277a6 100644 --- a/lib/isc/include/isc/string.h +++ b/lib/isc/include/isc/string.h @@ -20,18 +20,14 @@ ISC_LANG_BEGINDECLS +#if !defined(HAVE_STRLCPY) size_t -isc_string_strlcpy(char *dst, const char *src, size_t size); - -#ifdef ISC_PLATFORM_NEEDSTRLCPY -#define strlcpy isc_string_strlcpy -#endif +strlcpy(char *dst, const char *src, size_t size); +#endif /* !defined(HAVE_STRLCPY) */ +#if !defined(HAVE_STRLCAT) size_t -isc_string_strlcat(char *dst, const char *src, size_t size); - -#ifdef ISC_PLATFORM_NEEDSTRLCAT -#define strlcat isc_string_strlcat +strlcat(char *dst, const char *src, size_t size); #endif int diff --git a/lib/isc/netscope.c b/lib/isc/netscope.c index 7fed44ecc1..da0046398a 100644 --- a/lib/isc/netscope.c +++ b/lib/isc/netscope.c @@ -24,7 +24,7 @@ isc_result_t isc_netscope_pton(int af, char *scopename, void *addr, uint32_t *zoneid) { char *ep; -#ifdef ISC_PLATFORM_HAVEIFNAMETOINDEX +#ifdef HAVE_IF_NAMETOINDEX unsigned int ifid; struct in6_addr *in6; #endif @@ -43,7 +43,7 @@ isc_netscope_pton(int af, char *scopename, void *addr, uint32_t *zoneid) { * interface names as link names, assuming one to one mapping between * interfaces and links. */ -#ifdef ISC_PLATFORM_HAVEIFNAMETOINDEX +#ifdef HAVE_IF_NAMETOINDEX in6 = (struct in6_addr *)addr; if (IN6_IS_ADDR_LINKLOCAL(in6) && (ifid = if_nametoindex((const char *)scopename)) != 0) @@ -58,7 +58,7 @@ isc_netscope_pton(int af, char *scopename, void *addr, uint32_t *zoneid) { zone = (uint32_t)(llz & 0xffffffffUL); if (zone != llz) return (ISC_R_FAILURE); -#ifdef ISC_PLATFORM_HAVEIFNAMETOINDEX +#ifdef HAVE_IF_NAMETOINDEX } #endif diff --git a/lib/isc/pthreads/thread.c b/lib/isc/pthreads/thread.c index c84196799b..ba7ae52daa 100644 --- a/lib/isc/pthreads/thread.c +++ b/lib/isc/pthreads/thread.c @@ -51,12 +51,6 @@ isc_thread_create(isc_threadfunc_t func, isc_threadarg_t arg, } #endif -#if defined(PTHREAD_SCOPE_SYSTEM) && defined(NEED_PTHREAD_SCOPE_SYSTEM) - ret = pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM); - if (ret != 0) - return (ISC_R_UNEXPECTED); -#endif - ret = pthread_create(thread, &attr, func, arg); if (ret != 0) return (ISC_R_UNEXPECTED); @@ -68,11 +62,7 @@ isc_thread_create(isc_threadfunc_t func, isc_threadarg_t arg, void isc_thread_setconcurrency(unsigned int level) { -#if defined(CALL_PTHREAD_SETCONCURRENCY) (void)pthread_setconcurrency(level); -#else - UNUSED(level); -#endif } void diff --git a/lib/isc/rwlock.c b/lib/isc/rwlock.c index 622cd7d276..91482e6c64 100644 --- a/lib/isc/rwlock.c +++ b/lib/isc/rwlock.c @@ -41,6 +41,25 @@ #define RWLOCK_MAX_ADAPTIVE_COUNT 100 #endif +#if defined(_MSC_VER) +# include +# define isc_rwlock_pause() YieldProcessor() +#elif defined(__x86_64__) || defined(__i386__) +# include +# define isc_rwlock_pause() _mm_pause() +#elif defined(__ia64__) +# define isc_rwlock_pause() __asm__ __volatile__ ("hint @pause") +#elif defined(__arm__) +# define isc_rwlock_pause() __asm__ __volatile__ ("yield") +#elif defined(__sparc) || defined(__sparc__) +# define plasma_spin_pause() __asm__ __volatile__ ("pause") +#elif defined(__ppc__) || defined(_ARCH_PPC) || \ + defined(_ARCH_PWR) || defined(_ARCH_PWR2) || defined(_POWER) +# define isc_rwlock_pause() __asm__ volatile ("or 27,27,27") +#else +# define isc_rwlock_pause() +#endif + static isc_result_t isc__rwlock_lock(isc_rwlock_t *rwl, isc_rwlocktype_t type); @@ -350,9 +369,7 @@ isc_rwlock_lock(isc_rwlock_t *rwl, isc_rwlocktype_t type) { result = isc__rwlock_lock(rwl, type); break; } -#ifdef ISC_PLATFORM_BUSYWAITNOP - ISC_PLATFORM_BUSYWAITNOP; -#endif + isc_rwlock_pause(); } while (isc_rwlock_trylock(rwl, type) != ISC_R_SUCCESS); rwl->spins += (cnt - rwl->spins) / 8; diff --git a/lib/isc/string.c b/lib/isc/string.c index 46e5303166..096793da77 100644 --- a/lib/isc/string.c +++ b/lib/isc/string.c @@ -49,8 +49,9 @@ #include "isc/string.h" // IWYU pragma: keep +#if !defined(HAVE_STRLCPY) size_t -isc_string_strlcpy(char *dst, const char *src, size_t size) +strlcpy(char *dst, const char *src, size_t size) { char *d = dst; const char *s = src; @@ -76,9 +77,11 @@ isc_string_strlcpy(char *dst, const char *src, size_t size) return(s - src - 1); /* count does not include NUL */ } +#endif /* !defined(HAVE_STRLCPY) */ +#if !defined(HAVE_STRLCAT) size_t -isc_string_strlcat(char *dst, const char *src, size_t size) +strlcat(char *dst, const char *src, size_t size) { char *d = dst; const char *s = src; @@ -106,6 +109,7 @@ isc_string_strlcat(char *dst, const char *src, size_t size) return(dlen + (s - src)); /* count does not include NUL */ } +#endif /* !defined(HAVE_STRLCAT) */ int isc_string_strerror_r(int errnum, char *buf, size_t buflen) { diff --git a/lib/isc/tests/Atffile b/lib/isc/tests/Atffile index 335b1dbb64..742cad3a6b 100644 --- a/lib/isc/tests/Atffile +++ b/lib/isc/tests/Atffile @@ -3,7 +3,6 @@ Content-Type: application/X-atf-atffile; version="1" prop: test-suite = bind9 tp: aes_test -tp: atomic_test tp: buffer_test tp: counter_test tp: errno_test diff --git a/lib/isc/tests/Kyuafile b/lib/isc/tests/Kyuafile index b1005e7e9b..401cbe5d1d 100644 --- a/lib/isc/tests/Kyuafile +++ b/lib/isc/tests/Kyuafile @@ -2,7 +2,6 @@ syntax(2) test_suite('bind9') atf_test_program{name='aes_test'} -atf_test_program{name='atomic_test'} atf_test_program{name='buffer_test'} atf_test_program{name='counter_test'} atf_test_program{name='errno_test'} diff --git a/lib/isc/tests/Makefile.in b/lib/isc/tests/Makefile.in index fe570b56f8..4f585af9b3 100644 --- a/lib/isc/tests/Makefile.in +++ b/lib/isc/tests/Makefile.in @@ -31,7 +31,7 @@ CMOCKA_CFLAGS = @CMOCKA_CFLAGS@ CMOCKA_LIBS = @CMOCKA_LIBS@ OBJS = isctest.@O@ -SRCS = isctest.c aes_test.c atomic_test.c buffer_test.c \ +SRCS = isctest.c aes_test.c buffer_test.c \ counter_test.c errno_test.c file_test.c hash_test.c \ heap_test.c ht_test.c lex_test.c \ mem_test.c netaddr_test.c parse_test.c pool_test.c \ @@ -41,7 +41,7 @@ SRCS = isctest.c aes_test.c atomic_test.c buffer_test.c \ taskpool_test.c time_test.c timer_test.c SUBDIRS = -TARGETS = aes_test@EXEEXT@ atomic_test@EXEEXT@ buffer_test@EXEEXT@ \ +TARGETS = aes_test@EXEEXT@ buffer_test@EXEEXT@ \ counter_test@EXEEXT@ errno_test@EXEEXT@ file_test@EXEEXT@ \ hash_test@EXEEXT@ heap_test@EXEEXT@ ht_test@EXEEXT@ \ lex_test@EXEEXT@ mem_test@EXEEXT@ \ @@ -54,10 +54,6 @@ TARGETS = aes_test@EXEEXT@ atomic_test@EXEEXT@ buffer_test@EXEEXT@ \ @BIND9_MAKE_RULES@ -atomic_test@EXEEXT@: atomic_test.@O@ isctest.@O@ ${ISCDEPLIBS} - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \ - atomic_test.@O@ isctest.@O@ ${ISCLIBS} ${LIBS} - aes_test@EXEEXT@: aes_test.@O@ ${ISCDEPLIBS} ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \ aes_test.@O@ ${ISCLIBS} ${LIBS} diff --git a/lib/isc/tests/atomic_test.c b/lib/isc/tests/atomic_test.c deleted file mode 100644 index 801301049d..0000000000 --- a/lib/isc/tests/atomic_test.c +++ /dev/null @@ -1,354 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#include - -#include -#include - -#include - -#include -#include -#include - -#include "isctest.h" - -#define TASKS 32 -#define ITERATIONS 1000 -#define COUNTS_PER_ITERATION 1000 -#define INCREMENT_64 (int64_t)0x0000000010000000 -#define EXPECTED_COUNT_32 (TASKS * ITERATIONS * COUNTS_PER_ITERATION) -#define EXPECTED_COUNT_64 (TASKS * ITERATIONS * COUNTS_PER_ITERATION * INCREMENT_64) - -typedef struct { - uint32_t iteration; -} counter_t; - -counter_t counters[TASKS]; - -#if defined(ISC_PLATFORM_HAVEXADD) -static int32_t counter_32; - -static void -do_xadd(isc_task_t *task, isc_event_t *ev) { - counter_t *state = (counter_t *)ev->ev_arg; - int i; - - for (i = 0 ; i < COUNTS_PER_ITERATION ; i++) { - isc_atomic_xadd(&counter_32, 1); - } - - state->iteration++; - if (state->iteration < ITERATIONS) { - isc_task_send(task, &ev); - } else { - isc_event_free(&ev); - } -} - -ATF_TC(atomic_xadd); -ATF_TC_HEAD(atomic_xadd, tc) { - atf_tc_set_md_var(tc, "descr", "atomic XADD"); -} -ATF_TC_BODY(atomic_xadd, tc) { - isc_result_t result; - isc_task_t *tasks[TASKS]; - isc_event_t *event = NULL; - int i; - - UNUSED(tc); - - result = isc_test_begin(NULL, true, 0); - ATF_REQUIRE_EQ(result, ISC_R_SUCCESS); - - memset(counters, 0, sizeof(counters)); - counter_32 = 0; - - /* - * Create our tasks, and allocate an event to get the counters going. - */ - for (i = 0 ; i < TASKS ; i++) { - tasks[i] = NULL; - ATF_REQUIRE_EQ(isc_task_create(taskmgr, 0, &tasks[i]), - ISC_R_SUCCESS); - event = isc_event_allocate(mctx, NULL, 1000, do_xadd, - &counters[i], - sizeof(struct isc_event)); - ATF_REQUIRE(event != NULL); - isc_task_sendanddetach(&tasks[i], &event); - } - - isc_test_end(); - - printf("32-bit counter %d, expected %d\n", - counter_32, EXPECTED_COUNT_32); - - ATF_CHECK_EQ(counter_32, EXPECTED_COUNT_32); - counter_32 = 0; -} -#endif - -#if defined(ISC_PLATFORM_HAVEXADDQ) -static int64_t counter_64; - -static void -do_xaddq(isc_task_t *task, isc_event_t *ev) { - counter_t *state = (counter_t *)ev->ev_arg; - int i; - - for (i = 0 ; i < COUNTS_PER_ITERATION ; i++) { - isc_atomic_xaddq(&counter_64, INCREMENT_64); - } - - state->iteration++; - if (state->iteration < ITERATIONS) { - isc_task_send(task, &ev); - } else { - isc_event_free(&ev); - } -} - -ATF_TC(atomic_xaddq); -ATF_TC_HEAD(atomic_xaddq, tc) { - atf_tc_set_md_var(tc, "descr", "atomic XADDQ"); -} -ATF_TC_BODY(atomic_xaddq, tc) { - isc_result_t result; - isc_task_t *tasks[TASKS]; - isc_event_t *event = NULL; - int i; - - UNUSED(tc); - - result = isc_test_begin(NULL, true, 0); - ATF_REQUIRE_EQ(result, ISC_R_SUCCESS); - - memset(counters, 0, sizeof(counters)); - counter_64 = 0; - - /* - * Create our tasks, and allocate an event to get the counters going. - */ - for (i = 0 ; i < TASKS ; i++) { - tasks[i] = NULL; - ATF_REQUIRE_EQ(isc_task_create(taskmgr, 0, &tasks[i]), - ISC_R_SUCCESS); - event = isc_event_allocate(mctx, NULL, 1000, do_xaddq, - &counters[i], - sizeof(struct isc_event)); - ATF_REQUIRE(event != NULL); - isc_task_sendanddetach(&tasks[i], &event); - } - - isc_test_end(); - - printf("64-bit counter %" PRId64 ", " - "expected %" PRId64 "\n", - counter_64, EXPECTED_COUNT_64); - - ATF_CHECK_EQ(counter_64, EXPECTED_COUNT_64); - counter_32 = 0; -} -#endif - -#if defined(ISC_PLATFORM_HAVEATOMICSTORE) -static int32_t store_32; - -static void -do_store(isc_task_t *task, isc_event_t *ev) { - counter_t *state = (counter_t *)ev->ev_arg; - int i; - uint32_t r; - uint32_t val; - - r = random() % 256; - val = (r << 24) | (r << 16) | (r << 8) | r; - - for (i = 0 ; i < COUNTS_PER_ITERATION ; i++) { - isc_atomic_store(&store_32, val); - } - - state->iteration++; - if (state->iteration < ITERATIONS) { - isc_task_send(task, &ev); - } else { - isc_event_free(&ev); - } -} - -ATF_TC(atomic_store); -ATF_TC_HEAD(atomic_store, tc) { - atf_tc_set_md_var(tc, "descr", "atomic STORE"); -} -ATF_TC_BODY(atomic_store, tc) { - isc_result_t result; - isc_task_t *tasks[TASKS]; - isc_event_t *event = NULL; - uint32_t val; - uint32_t r; - int i; - - UNUSED(tc); - - result = isc_test_begin(NULL, true, 0); - ATF_REQUIRE_EQ(result, ISC_R_SUCCESS); - - memset(counters, 0, sizeof(counters)); - store_32 = 0; - - /* - * Create our tasks, and allocate an event to get the counters - * going. - */ - for (i = 0 ; i < TASKS ; i++) { - tasks[i] = NULL; - ATF_REQUIRE_EQ(isc_task_create(taskmgr, 0, &tasks[i]), - ISC_R_SUCCESS); - event = isc_event_allocate(mctx, NULL, 1000, do_store, - &counters[i], - sizeof(struct isc_event)); - ATF_REQUIRE(event != NULL); - isc_task_sendanddetach(&tasks[i], &event); - } - - isc_test_end(); - - r = store_32 & 0xff; - val = (r << 24) | (r << 16) | (r << 8) | r; - - printf("32-bit store 0x%x, expected 0x%x\n", - (uint32_t) store_32, val); - - ATF_CHECK_EQ((uint32_t) store_32, val); - store_32 = 0; -} -#endif - -#if defined(ISC_PLATFORM_HAVEATOMICSTOREQ) -static int64_t store_64; - -static void -do_storeq(isc_task_t *task, isc_event_t *ev) { - counter_t *state = (counter_t *)ev->ev_arg; - int i; - uint8_t r; - uint64_t val; - - r = random() % 256; - val = (((uint64_t) r << 24) | - ((uint64_t) r << 16) | - ((uint64_t) r << 8) | - (uint64_t) r); - val |= ((uint64_t) val << 32); - - for (i = 0 ; i < COUNTS_PER_ITERATION ; i++) { - isc_atomic_storeq(&store_64, val); - } - - state->iteration++; - if (state->iteration < ITERATIONS) { - isc_task_send(task, &ev); - } else { - isc_event_free(&ev); - } -} - -ATF_TC(atomic_storeq); -ATF_TC_HEAD(atomic_storeq, tc) { - atf_tc_set_md_var(tc, "descr", "atomic STOREQ"); -} -ATF_TC_BODY(atomic_storeq, tc) { - isc_result_t result; - isc_task_t *tasks[TASKS]; - isc_event_t *event = NULL; - uint64_t val; - uint32_t r; - int i; - - UNUSED(tc); - - result = isc_test_begin(NULL, true, 0); - ATF_REQUIRE_EQ(result, ISC_R_SUCCESS); - - memset(counters, 0, sizeof(counters)); - store_64 = 0; - - /* - * Create our tasks, and allocate an event to get the counters - * going. - */ - for (i = 0 ; i < TASKS ; i++) { - tasks[i] = NULL; - ATF_REQUIRE_EQ(isc_task_create(taskmgr, 0, &tasks[i]), - ISC_R_SUCCESS); - event = isc_event_allocate(mctx, NULL, 1000, do_storeq, - &counters[i], - sizeof(struct isc_event)); - ATF_REQUIRE(event != NULL); - isc_task_sendanddetach(&tasks[i], &event); - } - - isc_test_end(); - - r = store_64 & 0xff; - val = (((uint64_t) r << 24) | - ((uint64_t) r << 16) | - ((uint64_t) r << 8) | - (uint64_t) r); - val |= ((uint64_t) val << 32); - - printf("64-bit store 0x%" PRIx64 ", " - "expected 0x%" PRIx64 "\n", - (uint64_t) store_64, val); - - ATF_CHECK_EQ((uint64_t) store_64, val); - store_64 = 0; -} -#endif - -#if !defined(ISC_PLATFORM_HAVEXADD) && \ - !defined(ISC_PLATFORM_HAVEXADDQ) && \ - !defined(ISC_PLATFORM_HAVEATOMICSTOREQ) -ATF_TC(untested); -ATF_TC_HEAD(untested, tc) { - atf_tc_set_md_var(tc, "descr", "skipping aes test"); -} -ATF_TC_BODY(untested, tc) { - UNUSED(tc); - atf_tc_skip("AES not available"); -} -#endif /* !HAVEXADD, !HAVEXADDQ, !HAVEATOMICSTOREQ */ - -/* - * Main - */ -ATF_TP_ADD_TCS(tp) { -#if defined(ISC_PLATFORM_HAVEXADD) - ATF_TP_ADD_TC(tp, atomic_xadd); -#endif -#if defined(ISC_PLATFORM_HAVEXADDQ) - ATF_TP_ADD_TC(tp, atomic_xaddq); -#endif -#ifdef ISC_PLATFORM_HAVEATOMICSTORE - ATF_TP_ADD_TC(tp, atomic_store); -#endif -#if defined(ISC_PLATFORM_HAVEATOMICSTOREQ) - ATF_TP_ADD_TC(tp, atomic_storeq); -#endif -#if !defined(ISC_PLATFORM_HAVEXADD) && \ - !defined(ISC_PLATFORM_HAVEXADDQ) && \ - !defined(ISC_PLATFORM_HAVEATOMICSTOREQ) - ATF_TP_ADD_TC(tp, untested); -#endif - - return (atf_no_error()); -} diff --git a/lib/isc/unix/app.c b/lib/isc/unix/app.c index 8d5ec29366..eb742ff030 100644 --- a/lib/isc/unix/app.c +++ b/lib/isc/unix/app.c @@ -144,20 +144,6 @@ static struct { (void *)isc__app_unblock }; -#ifdef HAVE_LINUXTHREADS -/*! - * Linux has sigwait(), but it appears to prevent signal handlers from - * running, even if they're not in the set being waited for. This makes - * it impossible to get the default actions for SIGILL, SIGSEGV, etc. - * Instead of messing with it, we just use sigsuspend() instead. - */ -#undef HAVE_SIGWAIT -/*! - * We need to remember which thread is the main thread... - */ -static pthread_t main_thread; -#endif - #ifndef HAVE_SIGWAIT static void exit_action(int arg) { @@ -208,23 +194,6 @@ isc__app_ctxstart(isc_appctx_t *ctx0) { * Start an ISC library application. */ -#ifdef NEED_PTHREAD_INIT - /* - * BSDI 3.1 seg faults in pthread_sigmask() if we don't do this. - */ - presult = pthread_init(); - if (presult != 0) { - strerror_r(presult, strbuf, sizeof(strbuf)); - UNEXPECTED_ERROR(__FILE__, __LINE__, - "isc_app_start() pthread_init: %s", strbuf); - return (ISC_R_UNEXPECTED); - } -#endif - -#ifdef HAVE_LINUXTHREADS - main_thread = pthread_self(); -#endif /* HAVE_LINUXTHREADS */ - result = isc_mutex_init(&ctx->readylock); if (result != ISC_R_SUCCESS) return (result); @@ -401,10 +370,6 @@ isc__app_ctxrun(isc_appctx_t *ctx0) { REQUIRE(VALID_APPCTX(ctx)); -#ifdef HAVE_LINUXTHREADS - REQUIRE(main_thread == pthread_self()); -#endif - LOCK(&ctx->lock); if (!ctx->running) { @@ -458,7 +423,6 @@ isc__app_ctxrun(isc_appctx_t *ctx0) { return (ISC_R_UNEXPECTED); } -#ifndef HAVE_UNIXWARE_SIGWAIT result = sigwait(&sset, &sig); if (result == 0) { if (sig == SIGINT || sig == SIGTERM) @@ -467,15 +431,6 @@ isc__app_ctxrun(isc_appctx_t *ctx0) { ctx->want_reload = true; } -#else /* Using UnixWare sigwait semantics. */ - sig = sigwait(&sset); - if (sig >= 0) { - if (sig == SIGINT || sig == SIGTERM) - ctx->want_shutdown = true; - else if (sig == SIGHUP) - ctx->want_reload = true; - } -#endif /* HAVE_UNIXWARE_SIGWAIT */ } else { /* * External, or BIND9 using multiple contexts: @@ -577,23 +532,6 @@ isc__app_ctxshutdown(isc_appctx_t *ctx0) { /* BIND9 internal, but using multiple contexts */ ctx->want_shutdown = true; else { -#ifdef HAVE_LINUXTHREADS - if (isc_bind9) { - /* BIND9 internal, single context */ - int result; - - result = pthread_kill(main_thread, SIGTERM); - if (result != 0) { - strerror_r(result, - strbuf, sizeof(strbuf)); - UNEXPECTED_ERROR(__FILE__, __LINE__, - "isc_app_shutdown() " - "pthread_kill: %s", - strbuf); - return (ISC_R_UNEXPECTED); - } - } -#else if (isc_bind9) { /* BIND9 internal, single context */ if (kill(getpid(), SIGTERM) < 0) { @@ -605,7 +543,6 @@ isc__app_ctxshutdown(isc_appctx_t *ctx0) { return (ISC_R_UNEXPECTED); } } -#endif /* HAVE_LINUXTHREADS */ else { /* External, multiple contexts */ LOCK(&ctx->readylock); @@ -650,23 +587,6 @@ isc__app_ctxsuspend(isc_appctx_t *ctx0) { ctx->want_reload = true; else { ctx->want_reload = true; -#ifdef HAVE_LINUXTHREADS - if (isc_bind9) { - /* BIND9 internal, single context */ - int result; - - result = pthread_kill(main_thread, SIGHUP); - if (result != 0) { - strerror_r(result, - strbuf, sizeof(strbuf)); - UNEXPECTED_ERROR(__FILE__, __LINE__, - "isc_app_reload() " - "pthread_kill: %s", - strbuf); - return (ISC_R_UNEXPECTED); - } - } -#else if (isc_bind9) { /* BIND9 internal, single context */ if (kill(getpid(), SIGHUP) < 0) { @@ -678,7 +598,6 @@ isc__app_ctxsuspend(isc_appctx_t *ctx0) { return (ISC_R_UNEXPECTED); } } -#endif /* HAVE_LINUXTHREADS */ else { /* External, multiple contexts */ LOCK(&ctx->readylock); diff --git a/lib/isc/unix/file.c b/lib/isc/unix/file.c index 6f214602d6..d2d3e101ff 100644 --- a/lib/isc/unix/file.c +++ b/lib/isc/unix/file.c @@ -146,7 +146,7 @@ isc_file_getmodtime(const char *file, isc_time_t *modtime) { result = file_stats(file, &stats); if (result == ISC_R_SUCCESS) -#ifdef ISC_PLATFORM_HAVESTATNSEC +#if defined(HAVE_STAT_NSEC) isc_time_set(modtime, stats.st_mtime, stats.st_mtim.tv_nsec); #else isc_time_set(modtime, stats.st_mtime, 0); diff --git a/lib/isc/unix/interfaceiter.c b/lib/isc/unix/interfaceiter.c index 0e7712a77e..3f0f1053c2 100644 --- a/lib/isc/unix/interfaceiter.c +++ b/lib/isc/unix/interfaceiter.c @@ -62,7 +62,7 @@ get_addr(unsigned int family, isc_netaddr_t *dst, struct sockaddr *src, { struct sockaddr_in6 *sa6; -#if !defined(ISC_PLATFORM_HAVEIFNAMETOINDEX) +#if !defined(HAVE_IF_NAMETOINDEX) UNUSED(ifname); #endif @@ -106,7 +106,7 @@ get_addr(unsigned int family, isc_netaddr_t *dst, struct sockaddr *src, (uint32_t)zone16); dst->type.in6.s6_addr[2] = 0; dst->type.in6.s6_addr[3] = 0; -#ifdef ISC_PLATFORM_HAVEIFNAMETOINDEX +#ifdef HAVE_IF_NAMETOINDEX } else if (ifname != NULL) { unsigned int zone; diff --git a/lib/isc/unix/net.c b/lib/isc/unix/net.c index 5b5fb4db0e..7d663c2df4 100644 --- a/lib/isc/unix/net.c +++ b/lib/isc/unix/net.c @@ -36,8 +36,8 @@ #include #include -#ifndef ISC_SOCKADDR_LEN_T -#define ISC_SOCKADDR_LEN_T unsigned int +#ifndef socklen_t +#define socklen_t unsigned int #endif /*% @@ -366,24 +366,24 @@ isc_net_probe_ipv6pktinfo(void) { #if ISC_CMSG_IP_TOS || defined(IPV6_TCLASS) -static inline ISC_SOCKADDR_LEN_T -cmsg_len(ISC_SOCKADDR_LEN_T len) { +static inline socklen_t +cmsg_len(socklen_t len) { #ifdef CMSG_LEN return (CMSG_LEN(len)); #else - ISC_SOCKADDR_LEN_T hdrlen; + socklen_t hdrlen; /* * Cast NULL so that any pointer arithmetic performed by CMSG_DATA * is correct. */ - hdrlen = (ISC_SOCKADDR_LEN_T)CMSG_DATA(((struct cmsghdr *)NULL)); + hdrlen = (socklen_t)CMSG_DATA(((struct cmsghdr *)NULL)); return (hdrlen + len); #endif } -static inline ISC_SOCKADDR_LEN_T -cmsg_space(ISC_SOCKADDR_LEN_T len) { +static inline socklen_t +cmsg_space(socklen_t len) { #ifdef CMSG_SPACE return (CMSG_SPACE(len)); #else @@ -448,7 +448,7 @@ static bool cmsgsend(int s, int level, int type, struct addrinfo *res) { char strbuf[ISC_STRERRORSIZE]; struct sockaddr_storage ss; - ISC_SOCKADDR_LEN_T len = sizeof(ss); + socklen_t len = sizeof(ss); struct msghdr msg; union { struct cmsghdr h; diff --git a/lib/isc/unix/socket.c b/lib/isc/unix/socket.c index 62a00cddac..f59a85e5cc 100644 --- a/lib/isc/unix/socket.c +++ b/lib/isc/unix/socket.c @@ -65,19 +65,17 @@ #ifdef ISC_PLATFORM_HAVESYSUNH #include #endif -#ifdef ISC_PLATFORM_HAVEKQUEUE +#ifdef HAVE_KQUEUE #include #endif -#ifdef ISC_PLATFORM_HAVEEPOLL +#ifdef HAVE_EPOLL_CREATE1 #include #endif -#ifdef ISC_PLATFORM_HAVEDEVPOLL #if defined(HAVE_SYS_DEVPOLL_H) #include #elif defined(HAVE_DEVPOLL_H) #include #endif -#endif #include @@ -87,18 +85,18 @@ #include #endif -#ifdef ISC_PLATFORM_HAVETFO +#ifdef ENABLE_TCP_FASTOPEN #include #endif /*% * Choose the most preferable multiplex method. */ -#ifdef ISC_PLATFORM_HAVEKQUEUE +#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) +#elif defined(HAVE_SYS_DEVPOLL_H) || defined(HAVE_DEVPOLL_H) #define USE_DEVPOLL typedef struct { unsigned int want_read : 1, @@ -106,7 +104,7 @@ typedef struct { } pollinfo_t; #else #define USE_SELECT -#endif /* ISC_PLATFORM_HAVEKQUEUE */ +#endif /* HAVE_KQUEUE */ /* * Set by the -T dscp option on the command line. If set to a value @@ -209,8 +207,8 @@ typedef enum { poll_idle, poll_active, poll_checking } pollstate_t; * Some systems define the socket length argument as an int, some as size_t, * some as socklen_t. This is here so it can be easily changed if needed. */ -#ifndef ISC_SOCKADDR_LEN_T -#define ISC_SOCKADDR_LEN_T unsigned int +#ifndef socklen_t +#define socklen_t unsigned int #endif /*% @@ -1197,24 +1195,24 @@ make_nonblock(int fd) { * Note that cmsg_space() could run slow on OSes that do not have * CMSG_SPACE. */ -static inline ISC_SOCKADDR_LEN_T -cmsg_len(ISC_SOCKADDR_LEN_T len) { +static inline socklen_t +cmsg_len(socklen_t len) { #ifdef CMSG_LEN return (CMSG_LEN(len)); #else - ISC_SOCKADDR_LEN_T hdrlen; + socklen_t hdrlen; /* * Cast NULL so that any pointer arithmetic performed by CMSG_DATA * is correct. */ - hdrlen = (ISC_SOCKADDR_LEN_T)CMSG_DATA(((struct cmsghdr *)NULL)); + hdrlen = (socklen_t)CMSG_DATA(((struct cmsghdr *)NULL)); return (hdrlen + len); #endif } -static inline ISC_SOCKADDR_LEN_T -cmsg_space(ISC_SOCKADDR_LEN_T len) { +static inline socklen_t +cmsg_space(socklen_t len) { #ifdef CMSG_SPACE return (CMSG_SPACE(len)); #else @@ -2276,7 +2274,7 @@ static void set_rcvbuf(void) { int fd; int max = rcvbuf, min; - ISC_SOCKADDR_LEN_T len; + socklen_t len; fd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); if (fd == -1) { @@ -2330,7 +2328,7 @@ static void set_sndbuf(void) { int fd; int max = sndbuf, min; - ISC_SOCKADDR_LEN_T len; + socklen_t len; fd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); #if defined(ISC_PLATFORM_HAVEIPV6) @@ -2465,7 +2463,7 @@ opensocket(isc__socketmgr_t *manager, isc__socket_t *sock, int on = 1; #endif #if defined(SO_RCVBUF) || defined(SO_SNDBUF) - ISC_SOCKADDR_LEN_T optlen; + socklen_t optlen; int size = 0; #endif @@ -3414,7 +3412,7 @@ internal_accept(isc_task_t *me, isc_event_t *ev) { isc__socketmgr_t *manager; isc_socket_newconnev_t *dev; isc_task_t *task; - ISC_SOCKADDR_LEN_T addrlen; + socklen_t addrlen; int fd; isc_result_t result = ISC_R_SUCCESS; char strbuf[ISC_STRERRORSIZE]; @@ -5466,7 +5464,7 @@ isc__socket_filter(isc_socket_t *sock0, const char *filter) { */ static void set_tcp_fastopen(isc__socket_t *sock, unsigned int backlog) { -#if defined(ISC_PLATFORM_HAVETFO) && defined(TCP_FASTOPEN) +#if defined(ENABLE_TCP_FASTOPEN) && defined(TCP_FASTOPEN) char strbuf[ISC_STRERRORSIZE]; /* @@ -5814,7 +5812,7 @@ internal_connect(isc_task_t *me, isc_event_t *ev) { isc_socket_connev_t *dev; int cc; isc_result_t result; - ISC_SOCKADDR_LEN_T optlen; + socklen_t optlen; char strbuf[ISC_STRERRORSIZE]; char peerbuf[ISC_SOCKADDR_FORMATSIZE]; @@ -5950,7 +5948,7 @@ isc__socket_getpeername(isc_socket_t *sock0, isc_sockaddr_t *addressp) { isc_result_t isc__socket_getsockname(isc_socket_t *sock0, isc_sockaddr_t *addressp) { isc__socket_t *sock = (isc__socket_t *)sock0; - ISC_SOCKADDR_LEN_T len; + socklen_t len; isc_result_t result; char strbuf[ISC_STRERRORSIZE]; @@ -6306,7 +6304,7 @@ isc_socketmgr_renderxml(isc_socketmgr_t *mgr0, xmlTextWriterPtr writer) { isc__socket_t *sock = NULL; char peerbuf[ISC_SOCKADDR_FORMATSIZE]; isc_sockaddr_t addr; - ISC_SOCKADDR_LEN_T len; + socklen_t len; int xmlrc; LOCK(&mgr->lock); @@ -6418,7 +6416,7 @@ isc_socketmgr_renderjson(isc_socketmgr_t *mgr0, json_object *stats) { isc__socket_t *sock = NULL; char peerbuf[ISC_SOCKADDR_FORMATSIZE]; isc_sockaddr_t addr; - ISC_SOCKADDR_LEN_T len; + socklen_t len; json_object *obj, *array = json_object_new_array(); CHECKMEM(array); diff --git a/lib/isc/unix/socket_p.h b/lib/isc/unix/socket_p.h index fb4fdb89d7..6ab124d054 100644 --- a/lib/isc/unix/socket_p.h +++ b/lib/isc/unix/socket_p.h @@ -15,9 +15,7 @@ /*! \file */ -#ifdef ISC_PLATFORM_NEEDSYSSELECTH -#include -#endif +#include typedef struct isc_socketwait isc_socketwait_t; int isc__socketmgr_waitevents(isc_socketmgr_t *, struct timeval *, diff --git a/lib/isc/win32/include/isc/platform.h.in b/lib/isc/win32/include/isc/platform.h.in index a0fc5c644a..b927888f1c 100644 --- a/lib/isc/win32/include/isc/platform.h.in +++ b/lib/isc/win32/include/isc/platform.h.in @@ -34,6 +34,10 @@ #ifndef strtoull #define strtoull _strtoui64 #endif + +#include +typedef uint32_t socklen_t; + #endif /*** @@ -46,73 +50,17 @@ #undef MSG_TRUNC -#define ISC_PLATFORM_NEEDSTRSEP -#define ISC_PLATFORM_NEEDSTRLCPY -#define ISC_PLATFORM_NEEDSTRLCAT -#define ISC_PLATFORM_NEEDSTRLCPY - -/* - * Used to control how extern data is linked; needed for Win32 platforms. - */ -#define ISC_PLATFORM_USEDECLSPEC 1 - -/* - * Define this here for now as winsock2.h defines h_errno - * and we don't want to redeclare it. - */ -#define ISC_PLATFORM_NONSTDHERRNO - /* * Define if the platform has . */ #undef ISC_PLATFORM_HAVESYSUNH -/* - * Define if we want to log backtrace - */ -@ISC_PLATFORM_USEBACKTRACE@ - /* * Defines for the noreturn attribute. */ #define ISC_PLATFORM_NORETURN_PRE __declspec(noreturn) #define ISC_PLATFORM_NORETURN_POST -/* - * If the "xadd" operation is available on this architecture, - * ISC_PLATFORM_HAVEXADD will be defined. - */ -@ISC_PLATFORM_HAVEXADD@ - -/* - * If the "xaddq" operation (64bit xadd) is available on this architecture, - * ISC_PLATFORM_HAVEXADDQ will be defined. - */ -@ISC_PLATFORM_HAVEXADDQ@ - -/* - * If the "atomic swap" operation is available on this architecture, - * ISC_PLATFORM_HAVEATOMICSTORE" will be defined. - */ -@ISC_PLATFORM_HAVEATOMICSTORE@ - -/* - * If the "compare-and-exchange" operation is available on this architecture, - * ISC_PLATFORM_HAVECMPXCHG will be defined. - */ -@ISC_PLATFORM_HAVECMPXCHG@ - -/* - * Define with the busy wait nop asm or function call. - */ -@ISC_PLATFORM_BUSYWAITNOP@ - -/* - * If the strcasestr() operation is not available on this platform, - * ISC_PLATFORM_NEEDSTRCASESTR will be defined. - */ -@ISC_PLATFORM_NEEDSTRCASESTR@ - /* * Set up a macro for importing and exporting from the DLL */ diff --git a/lib/isc/win32/socket.c b/lib/isc/win32/socket.c index 9add374881..22aa74fb86 100644 --- a/lib/isc/win32/socket.c +++ b/lib/isc/win32/socket.c @@ -112,14 +112,6 @@ static void consistent(isc_socket_t *sock); #define SIO_UDP_CONNRESET _WSAIOW(IOC_VENDOR,12) #endif -/* - * Some systems define the socket length argument as an int, some as size_t, - * some as socklen_t. This is here so it can be easily changed if needed. - */ -#ifndef ISC_SOCKADDR_LEN_T -#define ISC_SOCKADDR_LEN_T unsigned int -#endif - /* * Define what the possible "soft" errors can be. These are non-fatal returns * of various network related functions, like recv() and so on. @@ -1649,7 +1641,7 @@ socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type, int on = 1; #endif #if defined(SO_RCVBUF) - ISC_SOCKADDR_LEN_T optlen; + socklen_t optlen; int size; #endif int socket_errno; @@ -3318,7 +3310,7 @@ isc__socket_filter(isc_socket_t *sock, const char *filter) { isc_result_t isc__socket_listen(isc_socket_t *sock, unsigned int backlog) { char strbuf[ISC_STRERRORSIZE]; -#if defined(ISC_PLATFORM_HAVETFO) && defined(TCP_FASTOPEN) +#if defined(ENABLE_TCP_FASTOPEN) && defined(TCP_FASTOPEN) char on = 1; #endif @@ -3351,7 +3343,7 @@ isc__socket_listen(isc_socket_t *sock, unsigned int backlog) { return (ISC_R_UNEXPECTED); } -#if defined(ISC_PLATFORM_HAVETFO) && defined(TCP_FASTOPEN) +#if defined(ENABLE_TCP_FASTOPEN) && defined(TCP_FASTOPEN) if (setsockopt(sock->fd, IPPROTO_TCP, TCP_FASTOPEN, &on, sizeof(on)) < 0) { strerror_r(errno, strbuf, sizeof(strbuf)); @@ -3655,7 +3647,7 @@ isc__socket_getpeername(isc_socket_t *sock, isc_sockaddr_t *addressp) { isc_result_t isc__socket_getsockname(isc_socket_t *sock, isc_sockaddr_t *addressp) { - ISC_SOCKADDR_LEN_T len; + socklen_t len; isc_result_t result; char strbuf[ISC_STRERRORSIZE]; @@ -4007,7 +3999,7 @@ isc_socketmgr_renderxml(isc_socketmgr_t *mgr, xmlTextWriterPtr writer) isc_socket_t *sock = NULL; char peerbuf[ISC_SOCKADDR_FORMATSIZE]; isc_sockaddr_t addr; - ISC_SOCKADDR_LEN_T len; + socklen_t len; int xmlrc; LOCK(&mgr->lock); @@ -4118,7 +4110,7 @@ isc_socketmgr_renderjson(isc_socketmgr_t *mgr, json_object *stats) { isc_socket_t *sock = NULL; char peerbuf[ISC_SOCKADDR_FORMATSIZE]; isc_sockaddr_t addr; - ISC_SOCKADDR_LEN_T len; + socklen_t len; json_object *obj, *array = json_object_new_array(); CHECKMEM(array); diff --git a/util/copyrights b/util/copyrights index 4b2dfd62d1..a2fd57f224 100644 --- a/util/copyrights +++ b/util/copyrights @@ -10,7 +10,6 @@ ./OPTIONS X 2017,2018 ./PLATFORMS X 2018 ./README X 1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018 -./acconfig.h C 1999,2000,2001,2002,2003,2004,2005,2007,2008,2012,2014,2016,2018 ./aclocal.m4 X 1999,2000,2001,2012,2014,2018 ./autogen.sh SH 2015,2016,2018 ./bin/check/check-tool.c C 2000,2001,2002,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018 @@ -1331,7 +1330,6 @@ ./bin/tests/system/idna/tests.sh SH 2018 ./bin/tests/system/ifconfig.bat BAT 2016,2018 ./bin/tests/system/ifconfig.sh SH 2000,2001,2002,2003,2004,2007,2008,2009,2010,2012,2013,2016,2018 -./bin/tests/system/inline/checkdsa.sh.in SH 2013,2014,2016,2018 ./bin/tests/system/inline/clean.sh SH 2011,2012,2013,2014,2015,2016,2017,2018 ./bin/tests/system/inline/ns1/named.conf.in CONF-C 2011,2016,2018 ./bin/tests/system/inline/ns1/root.db.in ZONE 2011,2012,2013,2016,2017,2018 @@ -3465,7 +3463,6 @@ ./lib/isc/tests/Atffile X 2011,2017,2018 ./lib/isc/tests/Kyuafile X 2017,2018 ./lib/isc/tests/aes_test.c C 2014,2016,2018 -./lib/isc/tests/atomic_test.c C 2018 ./lib/isc/tests/buffer_test.c C 2014,2015,2016,2017,2018 ./lib/isc/tests/counter_test.c C 2014,2016,2018 ./lib/isc/tests/errno_test.c C 2016,2018 diff --git a/win32utils/Configure b/win32utils/Configure index b8f8ae2b7c..d2eed20e83 100644 --- a/win32utils/Configure +++ b/win32utils/Configure @@ -207,6 +207,7 @@ my @substdefh = ("AES_CC", "HAVE_DSA_GET0_PQG", "HAVE_ECDSA_SIG_GET0", "HAVE_RSA_SET0_KEY", + "USE_BACKTRACE", "USE_OPENSSL", "USE_PKCS11", "HAVE_PKCS11_ED25519", @@ -219,27 +220,20 @@ my @substdefh = ("AES_CC", "TUNE_LARGE", "WANT_QUERYTRACE", "WITH_IDN", + "CPU_RELAX", "VALIDATION_DEFAULT"); # for platform.h my %configdefp; -my @substdefp = ("ISC_PLATFORM_BUSYWAITNOP", - "ISC_PLATFORM_HAVEATOMICSTORE", - "ISC_PLATFORM_HAVEATOMICSTOREQ", - "ISC_PLATFORM_HAVECMPXCHG", - "ISC_PLATFORM_HAVEXADD", - "ISC_PLATFORM_HAVEXADDQ", - "ISC_PLATFORM_NEEDSTRCASESTR", - "ISC_PLATFORM_USEBACKTRACE"); +my @substdefp = (); # for conf.sh my %configtest; -my @substtest = ("CHECK_DSA", - "CHECKDS", +my @substtest = ("CHECKDS", "COVERAGE", "DNSTAP", "FSTRM_CAPTURE", @@ -576,13 +570,11 @@ if (($want_win32 eq "yes") && ($want_x64 eq "yes")) { $configvar{"BUILD_PLATFORM"} = "Win32"; $configvar{"MACHINE"} = "/machine:X86"; $configvar{"BUILD_MACHINE"} = "/machine:X86"; - $configdefp{"ISC_PLATFORM_BUSYWAITNOP"} = "__asm { rep nop }"; } elsif ($want_x64 eq "yes") { $configvar{"PLATFORM"} = "x64"; $configvar{"BUILD_PLATFORM"} = "x64"; $configvar{"MACHINE"} = "/machine:X64"; $configvar{"BUILD_MACHINE"} = "/machine:X64"; - $configdefp{"ISC_PLATFORM_BUSYWAITNOP"} = "_mm_pause()"; } # Standard configure variable $configvar{"EXEEXT"} = ".exe"; @@ -1160,12 +1152,9 @@ if ($msc_ver < 1400) { # backtrace for >= VS 2012 if ($msc_ver >= 1700) { - $configdefp{"ISC_PLATFORM_USEBACKTRACE"} = 1; + $configdefh{"USE_BACKTRACE"} = 1; } -# no version of MSVS supports strcasestr() yet -$configdefp{"ISC_PLATFORM_NEEDSTRCASESTR"} = 1; - # warn when cross compiling if ($cross_compile eq "yes") { @@ -1231,22 +1220,6 @@ EOF # Process arguments -# enable-intrinsics -if ($enable_intrinsics eq "yes") { - $configcond{"ATOMIC"} = 1; - $configvar{"INTRINSIC"} = "true"; - $configvar{"COPTI"} = "/Oi"; - $configdefp{"ISC_PLATFORM_HAVEXADD"} = 1; - if ($want_x64 eq "yes") { - $configdefp{"ISC_PLATFORM_HAVEXADDQ"} = 1; - $configdefp{"ISC_PLATFORM_HAVEATOMICSTOREQ"} = 1; - } - $configdefp{"ISC_PLATFORM_HAVEATOMICSTORE"} = 1; - $configdefp{"ISC_PLATFORM_HAVECMPXCHG"} = 1; -} else { - $configvar{"INTRINSIC"} = "false"; -} - # enable-native-pkcs11 if ($enable_native_pkcs11 eq "yes") { $cryptolib = "pkcs11"; @@ -1411,7 +1384,7 @@ if ($use_openssl eq "yes") { die "find more than one OpenSSL libcrypto-*.dll DLL candidate\n"; } $openssl_dll = File::Spec->catdir($openssl_path, "@dirlist[0]"); - } + } $cryptolib = "openssl"; $configvar{"OPENSSL_PATH"} = "$openssl_path"; @@ -2863,9 +2836,6 @@ sub makeinstallfile { # Adjust system tests -# WIN32 not a BSD -$configtest{"CHECK_DSA"} = 0; - # dnstap not supported #$configtest{"DNSTAP"} = "dnstap"; #$configtest{"FSTRM_CAPTURE"} = "fstrm_capture";