From: Jeremy Allison Date: Mon, 20 Apr 2009 11:25:26 +0000 (-0700) Subject: Ensure we have all the definitions needed in both threaded and non-threaded versions. X-Git-Tag: tdb-1.1.5~958^2~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5cbd7556c23c4dddc96f19b6977d57b8e3f551d7;p=thirdparty%2Fsamba.git Ensure we have all the definitions needed in both threaded and non-threaded versions. Jeremy. --- diff --git a/lib/util/smb_threads.h b/lib/util/smb_threads.h index 682e142c5bc..3d3d48ecb2e 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 -#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 +#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