From: Ken Raeburn Date: Fri, 4 Jun 2004 01:05:24 +0000 (+0000) Subject: * configure.in: Check for various _r functions needed for thread safety. If X-Git-Tag: krb5-1.4-beta1~367 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=5e6c08b80f652bc6808c3ddb4205cc3f057771d9;p=krb5.git * configure.in: Check for various _r functions needed for thread safety. If enable-thread-support is specified, complain about any that aren't found. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16405 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/ChangeLog b/src/ChangeLog index 632676843..c095304f6 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2004-06-03 Ken Raeburn + + * configure.in: Check for various _r functions needed for thread + safety. If enable-thread-support is specified, complain about + any that aren't found. + 2004-05-30 Ken Raeburn * aclocal.m4 (KRB5_AC_GCC_ATTRS): On AIX 4, mark the destructor diff --git a/src/configure.in b/src/configure.in index 307ddbdcb..099e10267 100644 --- a/src/configure.in +++ b/src/configure.in @@ -125,6 +125,28 @@ dnl for krb524 AC_TYPE_SIGNAL dnl dnl +dnl Check for thread safety issues. +dnl (Is there a better place for this?) +tsfuncs="getpwnam_r getpwuid_r gethostbyname_r getservbyname_r gmtime_r localtime_r" +AC_CHECK_FUNCS($tsfuncs) +if test "$enable_thread_support" = yes; then + tsmissing="" + for ts in $tsfuncs; do + if eval "test \"\${ac_cv_func_$ts}\" != yes"; then + tsmissing="$tsmissing $ts" + fi + done + if test "$tsmissing" != ""; then + AC_MSG_WARN([Some functions that are needed for library thread]) + AC_MSG_WARN([safety appear to be missing.]) + for ts in $tsmissing; do + AC_MSG_WARN([ missing thread-safe function: $ts]) + done + AC_MSG_WARN([Without these functions, the installed libraries]) + AC_MSG_WARN([may not be thread-safe.]) + fi # tsmissing not empty +fi # enable_thread_support +dnl HOST_TYPE=$krb5_cv_host AC_SUBST(HOST_TYPE) dnl