+2004-07-28 Ken Raeburn <raeburn@mit.edu>
+
+ * 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 <raeburn@mit.edu>
* fake-addrinfo.h: Include k5-thread.h.
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
# 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 {