2004-06-02 Ken Raeburn <raeburn@mit.edu>
+ * k5-thread.h: Error out at compile time if thread support is
+ enabled but the thread system isn't pthreads. (This is after the
+ code disabling thread support for non-pthreads systems, so it's a
+ placeholder for now that should never get invoked.)
+
* k5-int.h (struct krb5_rc_st, struct _krb5_rc_ops, krb5_rc_ops):
Move type definitions to rc-int.h.
(krb5_rc_register_type, krb5_rc_dfl_ops): Move declarations to
For non-threaded case: A simple flag.
For Windows: Not needed; library init code takes care of it.
+ XXX: A general k5_once mechanism isn't possible for Windows,
+ without faking it through named mutexes or mutexes initialized at
+ startup. I was only using it in one place outside these headers,
+ so I'm dropping the general scheme. Eventually the existing uses
+ in k5-thread.h and k5-platform.h will be converted to pthread_once
+ or static variables.
+
Thread-specific data:
#ifdef ENABLE_THREADS
+#ifdef HAVE_PTHREAD_H
+
#include <pthread.h>
/* To do: Weak symbol support. Windows threads.
#define k5_once pthread_once
#endif
+#elif defined(_WIN32)
+
+# error "Windows thread support not implemented yet"
+/* N.B.: No k5_once support for this platform. */
+
+#else
+
+# error "Thread support enabled, but thread system unknown"
+
+#endif
+
#else /* ! ENABLE_THREADS */
#ifdef DEBUG_THREADS