diff --git a/acconfig.h b/acconfig.h index efdb99455f..ee05bbc862 100644 --- a/acconfig.h +++ b/acconfig.h @@ -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 diff --git a/config.h.in b/config.h.in index f7cce40986..0c5941ff64 100644 --- a/config.h.in +++ b/config.h.in @@ -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 @@ -470,12 +467,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 diff --git a/config.h.win32 b/config.h.win32 index f0be1db618..fe881f50cd 100644 --- a/config.h.win32 +++ b/config.h.win32 @@ -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 */ diff --git a/configure b/configure index 371f62000e..41d04d9ce8 100755 --- a/configure +++ b/configure @@ -13807,18 +13807,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; @@ -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 diff --git a/configure.in b/configure.in index ff783632f9..29cb31ca6a 100644 --- a/configure.in +++ b/configure.in @@ -498,21 +498,24 @@ 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 @@ -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([ diff --git a/lib/isc/unix/app.c b/lib/isc/unix/app.c index 8d5ec29366..db82bdd6af 100644 --- a/lib/isc/unix/app.c +++ b/lib/isc/unix/app.c @@ -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 */