+2005-06-21 Ken Raeburn <raeburn@mit.edu>
+
+ * err_handle.c, kdb5.c: Test ENABLE_THREADS, not just
+ HAVE_PTHREAD_H.
+
2005-06-20 Ken Raeburn <raeburn@mit.edu>
Novell merge.
safety requirement stops me from putting there. if I do, then all
the applications have to link to pthread. */
-#ifdef HAVE_PTHREAD_H
+#if defined(ENABLE_THREADS) && defined(HAVE_PTHREAD_H)
#include <pthread.h>
#endif
#include "err_handle.h"
krb5_context kcontext;
} krb5_err_struct_t;
-#ifdef HAVE_PTHREAD_H
+#if defined(ENABLE_THREADS) && defined(HAVE_PTHREAD_H)
static void
tsd_key_destructor(void *data)
{
init_err_handling(void)
{
if (krb5_init_once) {
+#ifdef NOVELL
old_error_2_string = error_message;
error_message = krb5_get_err_string;
+#endif
krb5_init_once = FALSE;
}
}
/* It is not generated here. the remaining two cases are handled
by the default error string convertor. */
+#ifdef NOVELL
return old_error_2_string(err_code);
-
+#else
+ return error_message(err_code);
+#endif
}
void
* Include files
*/
-#ifdef HAVE_PTHREAD_H
+#if defined(ENABLE_THREADS) && defined(HAVE_PTHREAD_H)
#include <pthread.h>
#endif
* internal static variable
*/
-#ifdef HAVE_PTHREAD_H
+#if defined(ENABLE_THREADS) && defined(HAVE_PTHREAD_H)
/* static pthread_once_t db_inited = PTHREAD_ONCE_INIT; */
static pthread_mutex_t db_lock = PTHREAD_MUTEX_INITIALIZER;
#else
/*
* Helper Functions
*/
-#ifdef HAVE_PTHREAD_H
+#if defined(ENABLE_THREADS) && defined(HAVE_PTHREAD_H)
/*
* KNOWN ISSUES with locking: This code does not handle a scenario