]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
Ensure we have all the definitions needed in both threaded and non-threaded versions.
authorJeremy Allison <jra@samba.org>
Mon, 20 Apr 2009 11:25:26 +0000 (04:25 -0700)
committerJeremy Allison <jra@samba.org>
Mon, 20 Apr 2009 11:25:26 +0000 (04:25 -0700)
Jeremy.

lib/util/smb_threads.h

index 682e142c5bc28bfb62b71499904eafc01b9f6a80..3d3d48ecb2ec9077e0c0819d3ce9211a132fd616 100644 (file)
 #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