]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
2994. [port] NetBSD: use pthreads by default on NetBSD >= 5.0, and
authorMark Andrews <marka@isc.org>
Tue, 21 Dec 2010 04:20:23 +0000 (04:20 +0000)
committerMark Andrews <marka@isc.org>
Tue, 21 Dec 2010 04:20:23 +0000 (04:20 +0000)
                        do not use threads on earlier versions.  Also kill
                        the unproven-pthreads, mit-pthreads, and ptl2 support.

CHANGES
config.threads.in
lib/tests/t_api.c

diff --git a/CHANGES b/CHANGES
index ae6e90ae26e00c4ba629d923e34d57e04d856a41..8b34a2e625b4d6b2f7dc8431595e41f6b1be45c6 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,7 @@
+2994.  [port]          NetBSD: use pthreads by default on NetBSD >= 5.0, and
+                       do not use threads on earlier versions.  Also kill
+                       the unproven-pthreads, mit-pthreads, and ptl2 support.
+
 2993.  [func]          Dynamically grow adb hash tables. [RT #21186]
 
 2992.  [contrib]       contrib/check-secure-delegation.pl:  A simple tool
index c1c113b937267f9341d0e5c1d12e4556cc78f5d4..e7a8d609ccb12f1299e5ec20fca29fd2f1884b17 100644 (file)
@@ -33,15 +33,11 @@ case $host in
 *-*-sysv*OpenUNIX*)
         # UnixWare
        use_threads=true ;;
+*-netbsd[1234].*)
+       # NetBSD earlier than NetBSD 5.0 has poor pthreads.  Don't use it by default.
+       use_threads=false ;;
 *-netbsd*)
-       if test -r /usr/lib/libpthread.so ; then
-           use_threads=true
-       else
-           # Socket I/O optimizations introduced in 9.2 expose a
-           # bug in unproven-pthreads; see PR #12650
-           use_threads=false
-       fi
-       ;;
+       use_threads=true ;;
 *-openbsd*)
        # OpenBSD users have reported that named dumps core on
        # startup when built with threads.
@@ -92,54 +88,6 @@ then
        # Search for / configure pthreads in a system-dependent fashion.
        #
        case "$host" in
-         *-netbsd*)
-               # NetBSD has multiple pthreads implementations.  The
-               # recommended one to use is "unproven-pthreads".  The
-               # older "mit-pthreads" may also work on some NetBSD
-               # versions.  The PTL2 thread library does not
-               # currently work with bind9, but can be chosen with
-               # the --with-ptl2 option for those who wish to
-               # experiment with it.
-               CC="gcc"
-               AC_MSG_CHECKING(which NetBSD thread library to use)
-
-               AC_ARG_WITH(ptl2,
-[  --with-ptl2         on NetBSD, use the ptl2 thread library (experimental)],
-                   use_ptl2="$withval", use_ptl2="no")
-
-               : ${LOCALBASE:=/usr/pkg}
-
-               if test "X$use_ptl2" = "Xyes"
-               then
-                       AC_MSG_RESULT(PTL2)
-                       AC_MSG_WARN(
-[linking with PTL2 is highly experimental and not expected to work])
-                       CC=ptlgcc
-               else
-                       if test -r /usr/lib/libpthread.so
-                       then
-                               AC_MSG_RESULT(native)
-                               LIBS="-lpthread $LIBS"
-                       else
-                               if test ! -d $LOCALBASE/pthreads
-                               then
-                                       AC_MSG_RESULT(none)
-                                       AC_MSG_ERROR("could not find thread libraries")
-                               fi
-
-                               if $use_threads
-                               then
-                                       AC_MSG_RESULT(mit-pthreads/unproven-pthreads)
-                                       pkg="$LOCALBASE/pthreads"
-                                       lib1="-L$pkg/lib -Wl,-R$pkg/lib"
-                                       lib2="-lpthread -lm -lgcc -lpthread"
-                                       LIBS="$lib1 $lib2 $LIBS"
-                                       CPPFLAGS="$CPPFLAGS -I$pkg/include"
-                                       STD_CINCLUDES="$STD_CINCLUDES -I$pkg/include"
-                               fi
-                       fi
-               fi
-               ;;
                *-freebsd*)
                        # We don't want to set -lpthread as that break
                        # the ability to choose threads library at final
index 9782830ed971a68467a80c9f51b4cae018fc04f6..49605365feaea996b47bdb7faeb496ed3dcbc2b2 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: t_api.c,v 1.67 2010/06/08 23:50:24 tbox Exp $ */
+/* $Id: t_api.c,v 1.68 2010/12/21 04:20:23 marka Exp $ */
 
 /*! \file */
 
@@ -243,15 +243,6 @@ main(int argc, char **argv) {
        sa.sa_flags = 0;
        sigfillset(&sa.sa_mask);
 
-#ifdef SIGCHLD
-       /*
-        * This is mostly here for NetBSD's pthread implementation, until
-        * people catch up to the latest unproven-pthread package.
-        */
-       sa.sa_handler = SIG_DFL;
-       (void)sigaction(SIGCHLD, &sa, NULL);
-#endif
-
        sa.sa_handler = t_sighandler;
        (void)sigaction(SIGINT,  &sa, NULL);
        (void)sigaction(SIGALRM, &sa, NULL);