Add run-time determination of whether thread support is available in the
authorKen Raeburn <raeburn@mit.edu>
Wed, 1 Jun 2005 00:56:01 +0000 (00:56 +0000)
committerKen Raeburn <raeburn@mit.edu>
Wed, 1 Jun 2005 00:56:01 +0000 (00:56 +0000)
commitf249fb8ae3f7ee30805efdda0375868a5b636a3f
treeb380f64e2e5753acf88bb143626b0d986d4bbbe9
parent9f2a7a71d53a08dafdf63616f4bab31749370393
Add run-time determination of whether thread support is available in the
support library.  Check lots of weak references, and call pthread_once a couple
of times, to distinguish a broken stub from the real thing.

* threads.c [HAVE_PRAGMA_WEAK_REF]: Declare pthread_{g,s}etspecific,
pthread_key_{create,delete}, pthread_{create,join} as weak references.
(krb5int_pthread_loaded, loaded_test_aux) [HAVE_PRAGMA_WEAK_REF]: New
functions.
(flag_pthread_loaded, loaded_test_once) [HAVE_PRAGMA_WEAK_REF]: New variables.
* libkrb5support.exports: Add krb5int_pthread_loaded.

ticket: 3084
status: open

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17223 dc483132-0cff-0310-8789-dd5450dbe970
src/util/support/ChangeLog
src/util/support/libkrb5support.exports
src/util/support/threads.c