summaryrefslogtreecommitdiff
path: root/lib/util
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2009-04-20 04:25:26 -0700
committerJeremy Allison <jra@samba.org>2009-04-20 04:25:26 -0700
commit5cbd7556c23c4dddc96f19b6977d57b8e3f551d7 (patch)
treebae10393bf449e55cb5ed8e6b05543d46f51f595 /lib/util
parent86b0d56897435c1a95c17d32a914b9757358d358 (diff)
downloadsamba-5cbd7556c23c4dddc96f19b6977d57b8e3f551d7.tar.gz
samba-5cbd7556c23c4dddc96f19b6977d57b8e3f551d7.tar.bz2
samba-5cbd7556c23c4dddc96f19b6977d57b8e3f551d7.zip
Ensure we have all the definitions needed in both threaded and non-threaded versions.
Jeremy.
Diffstat (limited to 'lib/util')
-rw-r--r--lib/util/smb_threads.h13
1 files changed, 4 insertions, 9 deletions
diff --git a/lib/util/smb_threads.h b/lib/util/smb_threads.h
index 682e142c5b..3d3d48ecb2 100644
--- a/lib/util/smb_threads.h
+++ b/lib/util/smb_threads.h
@@ -20,22 +20,17 @@
#ifndef _smb_threads_h_
#define _smb_threads_h_
-#if defined(HAVE_PTHREAD_H)
-#include <pthread.h>
-#endif
-
/* Data types needed for smb_thread_once call. */
-#if defined(HAVE_PTHREAD_H)
-#define smb_thread_once_t pthread_once_t
-#else
-#define smb_thread_once_t bool
-#endif
#if defined(HAVE_PTHREAD_H)
+#include <pthread.h>
+#define smb_thread_once_t pthread_once_t
#define SMB_THREAD_ONCE_INIT PTHREAD_ONCE_INIT
#define SMB_THREAD_ONCE_IS_INITIALIZED(val) (true)
#define SMB_THREAD_ONCE_INITIALIZE(val)
#else
+#define smb_thread_once_t bool
+#define SMB_THREAD_ONCE_INIT false
#define SMB_THREAD_ONCE_IS_INITIALIZED(val) ((val) == true)
#define SMB_THREAD_ONCE_INITIALIZE(val) ((val) = true)
#endif