Commit 52e1c451 authored by Ondřej Surý's avatar Ondřej Surý
Browse files

Assume PTHREAD_ONCE_INIT is not broken (remove support for ancient Solaris)

parent a11a271b
......@@ -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"
......
......@@ -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"
......
......@@ -134,12 +134,6 @@
*/
@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.
*/
......
......@@ -22,17 +22,7 @@
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... */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment