Skip to content

Commit

Permalink
ticket: 3084
Browse files Browse the repository at this point in the history
status: open

* k5-thread.h (krb5int_pthread_loaded) [HAVE_PRAGMA_WEAK_REF]: Declare.
(K5_PTHREADS_LOADED) [HAVE_PRAGMA_WEAK_REF]: Use it.


git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17224 dc483132-0cff-0310-8789-dd5450dbe970
  • Loading branch information
raeburn committed Jun 1, 2005
1 parent 13bd8a7 commit cfa67e8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
6 changes: 6 additions & 0 deletions src/include/ChangeLog
@@ -1,3 +1,9 @@
2005-05-31 Ken Raeburn <raeburn@mit.edu>

* k5-thread.h (krb5int_pthread_loaded) [HAVE_PRAGMA_WEAK_REF]:
Declare.
(K5_PTHREADS_LOADED) [HAVE_PRAGMA_WEAK_REF]: Use it.

2005-05-28 Ken Raeburn <raeburn@mit.edu>

* k5-int.h (encode_krb5_sam_challenge, encode_krb5_sam_key,
Expand Down
12 changes: 4 additions & 8 deletions src/include/k5-thread.h
Expand Up @@ -410,14 +410,8 @@ typedef k5_os_nothread_mutex k5_os_mutex;
# ifdef HAVE_PTHREAD_MUTEXATTR_SETROBUST_NP_IN_THREAD_LIB
# pragma weak pthread_mutexattr_setrobust_np
# endif
# if !defined HAVE_PTHREAD_ONCE
# define K5_PTHREADS_LOADED (&pthread_once != 0)
# elif !defined HAVE_PTHREAD_MUTEXATTR_SETROBUST_NP \
&& defined HAVE_PTHREAD_MUTEXATTR_SETROBUST_NP_IN_THREAD_LIB
# define K5_PTHREADS_LOADED (&pthread_mutexattr_setrobust_np != 0)
# else
# define K5_PTHREADS_LOADED (1)
# endif
extern int krb5int_pthread_loaded(void);
# define K5_PTHREADS_LOADED (krb5int_pthread_loaded())
#else
/* no pragma weak support */
# define K5_PTHREADS_LOADED (1)
Expand All @@ -442,6 +436,8 @@ typedef k5_os_nothread_mutex k5_os_mutex;
#endif

#if !defined(HAVE_PTHREAD_MUTEX_LOCK) && !defined(USE_PTHREAD_LOCK_ONLY_IF_LOADED)
/* If we find a system with a broken stub for pthread_mutex_lock,
we may have to change this. */
# define USE_PTHREAD_LOCK_ONLY_IF_LOADED
#endif

Expand Down

0 comments on commit cfa67e8

Please sign in to comment.