From: Ken Raeburn Date: Wed, 28 Jul 2004 23:38:54 +0000 (+0000) Subject: * k5-thread.h [HAVE_PRAGMA_WEAK_REF]: Declare the pthread mutex functions as X-Git-Tag: krb5-1.4-beta1~183 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=85dd2b37542bde6fb31fcccdd40dc8b880a94750;p=krb5.git * k5-thread.h [HAVE_PRAGMA_WEAK_REF]: Declare the pthread mutex functions as weak. (USE_PTHREAD_LOCK_ONLY_IF_LOADED): Define if pthread_mutex_lock isn't available by default. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16625 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/include/ChangeLog b/src/include/ChangeLog index 103d4d7d7..f41ec9e95 100644 --- a/src/include/ChangeLog +++ b/src/include/ChangeLog @@ -1,3 +1,10 @@ +2004-07-28 Ken Raeburn + + * k5-thread.h [HAVE_PRAGMA_WEAK_REF]: Declare the pthread mutex + functions as weak. + (USE_PTHREAD_LOCK_ONLY_IF_LOADED): Define if pthread_mutex_lock + isn't available by default. + 2004-07-23 Ken Raeburn * fake-addrinfo.h: Include k5-thread.h. diff --git a/src/include/k5-thread.h b/src/include/k5-thread.h index 74e384366..97247c5b8 100644 --- a/src/include/k5-thread.h +++ b/src/include/k5-thread.h @@ -349,6 +349,10 @@ typedef k5_os_nothread_mutex k5_os_mutex; symbol tables of the current process. */ #ifdef HAVE_PRAGMA_WEAK_REF # pragma weak pthread_once +# pragma weak pthread_mutex_lock +# pragma weak pthread_mutex_unlock +# pragma weak pthread_mutex_destroy +# pragma weak pthread_mutex_init # ifdef HAVE_PTHREAD_MUTEXATTR_SETROBUST_NP_IN_THREAD_LIB # pragma weak pthread_mutexattr_setrobust_np # endif @@ -383,6 +387,10 @@ typedef k5_os_nothread_mutex k5_os_mutex; # define USE_PTHREAD_LOCK_ONLY_IF_LOADED #endif +#if !defined(HAVE_PTHREAD_MUTEX_LOCK) && !defined(USE_PTHREAD_LOCK_ONLY_IF_LOADED) +# define USE_PTHREAD_LOCK_ONLY_IF_LOADED +#endif + #ifdef HAVE_PRAGMA_WEAK_REF /* Can't rely on useful stubs -- see above regarding Solaris. */ typedef struct {