diff options
| author | Ken Raeburn <raeburn@mit.edu> | 2004-06-02 23:47:36 +0000 |
|---|---|---|
| committer | Ken Raeburn <raeburn@mit.edu> | 2004-06-02 23:47:36 +0000 |
| commit | 4a7895d8c1f8b08ebd0e3bcfd975783fcc8bd057 (patch) | |
| tree | a886bee8f2ebf40cc9bee68b1a9f60bdda0c0bbc /src/include | |
| parent | 2727091fd6ca14b4c05b054ece24d141ff448556 (diff) | |
| download | krb5-4a7895d8c1f8b08ebd0e3bcfd975783fcc8bd057.tar.gz krb5-4a7895d8c1f8b08ebd0e3bcfd975783fcc8bd057.tar.xz krb5-4a7895d8c1f8b08ebd0e3bcfd975783fcc8bd057.zip | |
* 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.)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16393 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/ChangeLog | 5 | ||||
| -rw-r--r-- | src/include/k5-thread.h | 20 |
2 files changed, 25 insertions, 0 deletions
diff --git a/src/include/ChangeLog b/src/include/ChangeLog index 87707074e8..9fe30891b3 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 24ce6770da..dcdd49283b 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 |
