summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/ChangeLog5
-rw-r--r--src/include/k5-thread.h20
2 files changed, 25 insertions, 0 deletions
diff --git a/src/include/ChangeLog b/src/include/ChangeLog
index 87707074e..9fe30891b 100644
--- a/src/include/ChangeLog
+++ b/src/include/ChangeLog
@@ -1,5 +1,10 @@
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
diff --git a/src/include/k5-thread.h b/src/include/k5-thread.h
index 24ce6770d..dcdd49283 100644
--- a/src/include/k5-thread.h
+++ b/src/include/k5-thread.h
@@ -90,6 +90,13 @@
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:
@@ -181,6 +188,8 @@ typedef enum {
#ifdef ENABLE_THREADS
+#ifdef HAVE_PTHREAD_H
+
#include <pthread.h>
/* To do: Weak symbol support. Windows threads.
@@ -296,6 +305,17 @@ typedef pthread_once_t k5_once_t;
#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