From e3659329e0b91ea78afe32e231f2f75d3d728af9 Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Thu, 2 Dec 2010 17:27:05 +0000 Subject: WIN32_THREADS -> WIN32 Fixes nasty bug where some parts of the code didn't define WIN32_THREADS and were using the integer mutex implementation, causing even confusion to the debuggers. And there is little interest of other thread implemenation on Win32 besides Win32 threads. --- src/mapi/mapi/u_current.c | 4 ++-- src/mapi/mapi/u_thread.c | 4 ++-- src/mapi/mapi/u_thread.h | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src/mapi/mapi') diff --git a/src/mapi/mapi/u_current.c b/src/mapi/mapi/u_current.c index ed9ccfe229..77a593b330 100644 --- a/src/mapi/mapi/u_current.c +++ b/src/mapi/mapi/u_current.c @@ -128,7 +128,7 @@ static int ThreadSafe; void u_current_destroy(void) { -#if defined(THREADS) && defined(WIN32_THREADS) +#if defined(THREADS) && defined(WIN32) u_tsd_destroy(&u_current_table_tsd); u_tsd_destroy(&u_current_user_tsd); #endif @@ -147,7 +147,7 @@ u_current_init_tsd(void) /** * Mutex for multithread check. */ -#ifdef WIN32_THREADS +#ifdef WIN32 /* _glthread_DECLARE_STATIC_MUTEX is broken on windows. There will be race! */ #define CHECK_MULTITHREAD_LOCK() #define CHECK_MULTITHREAD_UNLOCK() diff --git a/src/mapi/mapi/u_thread.c b/src/mapi/mapi/u_thread.c index e0fa64ae03..e9eae55364 100644 --- a/src/mapi/mapi/u_thread.c +++ b/src/mapi/mapi/u_thread.c @@ -111,7 +111,7 @@ u_tsd_set(struct u_tsd *tsd, void *ptr) * Be sure that you compile using the Multithreaded runtime, otherwise * bad things will happen. */ -#ifdef WIN32_THREADS +#ifdef WIN32 static void InsteadOf_exit(int nCode) { @@ -172,7 +172,7 @@ u_tsd_set(struct u_tsd *tsd, void *ptr) } } -#endif /* WIN32_THREADS */ +#endif /* WIN32 */ /* * BeOS threads diff --git a/src/mapi/mapi/u_thread.h b/src/mapi/mapi/u_thread.h index b4487a3400..92a0a3916d 100644 --- a/src/mapi/mapi/u_thread.h +++ b/src/mapi/mapi/u_thread.h @@ -44,7 +44,7 @@ #include "u_compiler.h" -#if defined(PTHREADS) || defined(WIN32_THREADS) || defined(BEOS_THREADS) +#if defined(PTHREADS) || defined(WIN32) || defined(BEOS_THREADS) #ifndef THREADS #define THREADS #endif @@ -85,7 +85,7 @@ typedef pthread_mutex_t u_mutex; * IMPORTANT: Link with multithreaded runtime library when THREADS are * used! */ -#ifdef WIN32_THREADS +#ifdef WIN32 #include struct u_tsd { @@ -104,7 +104,7 @@ typedef CRITICAL_SECTION u_mutex; #define u_mutex_lock(name) EnterCriticalSection(&name) #define u_mutex_unlock(name) LeaveCriticalSection(&name) -#endif /* WIN32_THREADS */ +#endif /* WIN32 */ /* -- cgit v1.2.3