]> git.ipfire.org Git - thirdparty/krb5.git/commit
Fix thread support for Solaris and simplify 528/head
authorGreg Hudson <ghudson@mit.edu>
Fri, 26 Aug 2016 16:55:40 +0000 (12:55 -0400)
committerGreg Hudson <ghudson@mit.edu>
Mon, 29 Aug 2016 18:43:40 +0000 (14:43 -0400)
commit703e5b0347f43a7cedaf336175b25b3a18ba53e2
tree1b5d76aec97c8ca5074642c4ab3bfa5609c88be6
parente3d9f03a658e247dbb43cb345aa93a28782fd995
Fix thread support for Solaris and simplify

threads.c failed to build on Solaris afer commit
17932091cc0d5981c5a78d389ffa4a5c7b532bd6 because k5-thread.h did not
define the conditional k5_once_t structure (because NO_WEAK_PTHREADS
is defined) but threads.c tried to build the conditional k5_once()
function.

Use a single preprocessor symbol, USE_CONDITIONAL_PTHREADS, to
determine whether to use and define pthreads functions which
conditionalize on whether pthreads is loaded.  In threads.c, move the
new k5_once() definitions into the USE_CONDITIONAL_PTHREADS block,
defining a stub function if other code will not refer to it.

Also move #pragma weak declarations from k5-threads.h into threads.c,
as we should no longer be conditionally referring to those symbols
outside of threads.c.

Also eliminate some missing-prototype warnings where we define
functions for linker-visibility but don't have corresponding
prototypes in k5-threads.h.
src/include/k5-thread.h
src/util/support/threads.c