summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/aclocal.m44
-rw-r--r--src/include/k5-thread.h13
-rw-r--r--src/util/support/threads.c5
3 files changed, 8 insertions, 14 deletions
diff --git a/src/aclocal.m4 b/src/aclocal.m4
index f3711c1836..20f2154242 100644
--- a/src/aclocal.m4
+++ b/src/aclocal.m4
@@ -219,7 +219,7 @@ dnl We want to know where these routines live, so on systems with weak
dnl reference support we can figure out whether or not the pthread library
dnl has been linked in.
dnl If we don't add any libraries for thread support, don't bother.
-AC_CHECK_FUNCS(pthread_once pthread_mutexattr_setrobust_np pthread_rwlock_init)
+AC_CHECK_FUNCS(pthread_once pthread_rwlock_init)
old_CC="$CC"
test "$PTHREAD_CC" != "" && test "$ac_cv_c_compiler_gnu" = no && CC=$PTHREAD_CC
old_CFLAGS="$CFLAGS"
@@ -229,8 +229,6 @@ AC_SUBST(PTHREAD_CFLAGS)
old_LIBS="$LIBS"
LIBS="$PTHREAD_LIBS $LIBS"
AC_MSG_NOTICE(rechecking with PTHREAD_... options)
-AC_CHECK_LIB(c, pthread_mutexattr_setrobust_np,
- [AC_DEFINE(HAVE_PTHREAD_MUTEXATTR_SETROBUST_NP_IN_THREAD_LIB,1,[Define if pthread_mutexattr_setrobust_np is provided in the thread library.])])
AC_CHECK_LIB(c, pthread_rwlock_init,
[AC_DEFINE(HAVE_PTHREAD_RWLOCK_INIT_IN_THREAD_LIB,1,[Define if pthread_rwlock_init is provided in the thread library.])])
LIBS="$old_LIBS"
diff --git a/src/include/k5-thread.h b/src/include/k5-thread.h
index 5373f836ad..13c2391fb2 100644
--- a/src/include/k5-thread.h
+++ b/src/include/k5-thread.h
@@ -388,9 +388,13 @@ typedef k5_os_nothread_mutex k5_os_mutex;
Linux: Stub mutex routines exist, but pthread_once does not.
- Solaris: In libc there's a pthread_once that doesn't seem
- to do anything. Bleah. But pthread_mutexattr_setrobust_np
- is defined only in libpthread.
+ Solaris: In libc there's a pthread_once that doesn't seem to do
+ anything. Bleah. But pthread_mutexattr_setrobust_np is defined
+ only in libpthread. However, some version of GNU libc (Red Hat's
+ Fedora Core 5, reportedly) seems to have that function, but no
+ declaration, so we'd have to declare it in order to test for its
+ address. We now have tests to see if pthread_once actually works,
+ so stick with that for now.
IRIX 6.5 stub pthread support in libc is really annoying. The
pthread_mutex_lock function returns ENOSYS for a program not linked
@@ -414,9 +418,6 @@ typedef k5_os_nothread_mutex k5_os_mutex;
# pragma weak pthread_mutex_init
# pragma weak pthread_self
# pragma weak pthread_equal
-# ifdef HAVE_PTHREAD_MUTEXATTR_SETROBUST_NP_IN_THREAD_LIB
-# pragma weak pthread_mutexattr_setrobust_np
-# endif
extern int krb5int_pthread_loaded(void);
# define K5_PTHREADS_LOADED (krb5int_pthread_loaded())
#else
diff --git a/src/util/support/threads.c b/src/util/support/threads.c
index 1ac9c61500..ebc1dafaea 100644
--- a/src/util/support/threads.c
+++ b/src/util/support/threads.c
@@ -144,11 +144,6 @@ int krb5int_pthread_loaded (void)
|| &pthread_mutex_init == 0
|| &pthread_self == 0
|| &pthread_equal == 0
- /* This catches Solaris 9. May be redundant with the above
- tests now. */
-# ifdef HAVE_PTHREAD_MUTEXATTR_SETROBUST_NP_IN_THREAD_LIB
- || &pthread_mutexattr_setrobust_np == 0
-# endif
/* Any program that's really multithreaded will have to be
able to create threads. */
|| &pthread_create == 0