]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Remove now dummy NEED_PTHREAD_INIT
authorOndřej Surý <ondrej@sury.org>
Wed, 5 Sep 2018 10:58:02 +0000 (12:58 +0200)
committerOndřej Surý <ondrej@sury.org>
Fri, 7 Sep 2018 10:17:30 +0000 (12:17 +0200)
acconfig.h
config.h.in
config.h.win32
configure
configure.in
lib/isc/unix/app.c

index efdb99455fe86b172e47f981542ff7812da72317..ee05bbc862d41c3eacf6d1b62c4042752e047aec 100644 (file)
@@ -17,9 +17,6 @@
  ***/
 @TOP@
 
-/** define if your system needs pthread_init() before using pthreads */
-#undef NEED_PTHREAD_INIT
-
 /** define if your system has sigwait() */
 #undef HAVE_SIGWAIT
 
index f7cce40986d2397f4efddeded92b5afe85d43857..0c5941ff64051357dca9074e7bda6b4d28077936 100644 (file)
@@ -17,9 +17,6 @@
  *** 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 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 <uchar.h> 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 <unistd.h> header file. */
 #undef HAVE_UNISTD_H
 
index f0be1db61875324e4027e6c62df04ca24799d5ac..fe881f50cd931e9e0dde3a6ebf22cae7e0ec755e 100644 (file)
@@ -67,9 +67,6 @@
 /* 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 */
 
index 371f62000e1b090c66b3fa042887f68d36ed1c14..41d04d9ce83874fc0ecbc584868f8690038ec248 100755 (executable)
--- a/configure
+++ b/configure
 $as_echo_n "checking for uname... " >&6; }
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
 #include <sys/utsname.h>
-#include <stdio.h>
+       #include <stdio.h>
 
 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;
@@ -13827,13 +13826,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
 
@@ -17877,11 +17879,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
index ff783632f90ca7d908caa24d2f9950c679ba6a9f..29cb31ca6a3bfa9c5b50170c80a7a80aad9ee0be 100644 (file)
@@ -498,21 +498,24 @@ AC_HEADER_TIME
 #
 # check for uname library routine
 #
-AC_MSG_CHECKING(for uname)
-AC_TRY_COMPILE([
-#include <sys/utsname.h>
-#include <stdio.h>
-],
-[
-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 <sys/utsname.h>
+       #include <stdio.h>
+      ]],
+     [[
+       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
@@ -1975,7 +1978,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([
index 8d5ec293669917f38681297d491ce1d1cc95b11b..db82bdd6afb48eeafea9c2a71ae66319a89b8867 100644 (file)
@@ -208,19 +208,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 */