Added support for library initialization and finalization, and verification
that the initializer completed successfully. Delay initialization on POSIX
until the first "verification" call. Currently specific to a few platforms,
but should still build on others without thread support enabled.
Use it to finish creating (if necessary) and destroy mutexes, and free some
other storage "permanently" allocated by libraries (currently, libkrb5
cache/keytab type registries only). Change initialization of static mutexes to
a two-step operation, a static "partial" initializer and a "finish_init"
routine called from a thread-safe environment like library initialization is
assumed to be. POSIX will use the former, Windows will use the latter, and the
debug support will check that *both* have been used.
Added init/fini functions to com_err, profile, krb5, and gssapi libraries.
(The profile library one may need to be removed later.) The existing ones, not
thread-safe, are still around.
Use weak symbol support if available to figure out if the pthread library has
been linked in, and avoid calling certain routines if the C library stubs are
known not to exist or work.
Stub declarations for thread-specific data.
Minor bugfixes, whitespace changes.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16268
dc483132-0cff-0310-8789-
dd5450dbe970