]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Assume PTHREAD_ONCE_INIT is not broken (remove support for ancient Solaris)
authorOndřej Surý <ondrej@sury.org>
Tue, 21 Aug 2018 13:33:08 +0000 (15:33 +0200)
committerOndřej Surý <ondrej@sury.org>
Tue, 28 Aug 2018 08:31:48 +0000 (10:31 +0200)
configure
configure.in
lib/isc/include/isc/platform.h.in
lib/isc/pthreads/include/isc/once.h

index 9c500585cc5cfe5ce3b6e693e6dfb25b08509a8f..6d3b3c2ce5afb37e1cf1d82d119f547148291f11 100755 (executable)
--- a/configure
+++ b/configure
@@ -719,7 +719,6 @@ ISC_PLATFORM_HAVEXADD
 ISC_PLATFORM_HAVESTDATOMIC
 ISC_PLATFORM_HAVEIFNAMETOINDEX
 ISC_PLATFORM_HAVESTRINGSH
-ISC_PLATFORM_BRACEPTHREADONCEINIT
 IRS_PLATFORM_USEDECLSPEC
 ISC_PLATFORM_USEDECLSPEC
 ISC_PLATFORM_HAVESTATNSEC
@@ -18396,40 +18395,6 @@ IRS_PLATFORM_USEDECLSPEC="#undef IRS_PLATFORM_USEDECLSPEC"
 # XXXDCL print messages to indicate some compensation is being done?
 #
 
-ISC_PLATFORM_BRACEPTHREADONCEINIT="#undef ISC_PLATFORM_BRACEPTHREADONCEINIT"
-
-case "$host" in
-       *-solaris2.[89])
-               hack_shutup_pthreadonceinit=yes
-               ;;
-       *-solaris2.1[0-9])
-               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
- #include <pthread.h>
-int
-main ()
-{
- static pthread_once_t once_test = { PTHREAD_ONCE_INIT };
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  hack_shutup_pthreadonceinit=yes
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-               ;;
-esac
-
-case "$hack_shutup_pthreadonceinit" in
-       yes)
-               #
-               # Shut up PTHREAD_ONCE_INIT unbraced initializer warnings.
-               #
-               ISC_PLATFORM_BRACEPTHREADONCEINIT="#define ISC_PLATFORM_BRACEPTHREADONCEINIT 1"
-               ;;
-esac
-
 for ac_header in strings.h
 do :
   ac_fn_c_check_header_mongrel "$LINENO" "strings.h" "ac_cv_header_strings_h" "$ac_includes_default"
index 7b58c42558d6020d4b5635e29b52bd86814240fb..be9a178edc16266e5b2990935a9d120fa9c86495 100644 (file)
@@ -2206,26 +2206,6 @@ 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_SUBST(ISC_PLATFORM_BRACEPTHREADONCEINIT)
-ISC_PLATFORM_BRACEPTHREADONCEINIT="#undef ISC_PLATFORM_BRACEPTHREADONCEINIT"
-
-case "$host" in
-       [*-solaris2.[89]])
-               hack_shutup_pthreadonceinit=yes
-               ;;
-       *-solaris2.1[[0-9]])
-               AC_TRY_COMPILE([ #include <pthread.h> ], [ static pthread_once_t once_test = { PTHREAD_ONCE_INIT }; ], [hack_shutup_pthreadonceinit=yes], )
-               ;;
-esac
-
-case "$hack_shutup_pthreadonceinit" in
-       yes)
-               #
-               # Shut up PTHREAD_ONCE_INIT unbraced initializer warnings.
-               #
-               ISC_PLATFORM_BRACEPTHREADONCEINIT="#define ISC_PLATFORM_BRACEPTHREADONCEINIT 1"
-               ;;
-esac
 
 AC_CHECK_HEADERS(strings.h,
   ISC_PLATFORM_HAVESTRINGSH="#define ISC_PLATFORM_HAVESTRINGSH 1"
index d2bcdd8aa1010319439972d956657f7ed074c4ad..a2d3a37a03a4a7f849da81075d0ba6dce3c2df25 100644 (file)
  */
 @ISC_PLATFORM_HAVELONGLONG@
 
-/*
- * Define if PTHREAD_ONCE_INIT should be surrounded by braces to
- * prevent compiler warnings (such as with gcc on Solaris 2.8).
- */
-@ISC_PLATFORM_BRACEPTHREADONCEINIT@
-
 /*
  * Used to control how extern data is linked; needed for Win32 platforms.
  */
index a0e955939c5b9ee017c23fe44c19e611454712a4..71cd16b82fdf0edd7a8597f589cf1fa2feb0763a 100644 (file)
 
 typedef pthread_once_t isc_once_t;
 
-#ifdef ISC_PLATFORM_BRACEPTHREADONCEINIT
-/*!
- * This accomodates systems that define PTHRAD_ONCE_INIT improperly.
- */
-#define ISC_ONCE_INIT { PTHREAD_ONCE_INIT }
-#else
-/*!
- * This is the usual case.
- */
 #define ISC_ONCE_INIT PTHREAD_ONCE_INIT
-#endif
 
 /* XXX We could do fancier error handling... */