Boost logo

Boost :

From: Thomas Witt (witt_at_[hidden])
Date: 2004-08-09 19:21:11


The attached patch fixes what I think is a bug in the win32 platform
detection code.

Thomas

-- 
Thomas Witt
witt_at_[hidden]

Index: mutex.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/pool/detail/mutex.hpp,v
retrieving revision 1.4
diff -u -3 -p -u -r1.4 mutex.hpp
--- mutex.hpp 14 Sep 2003 00:50:31 -0000 1.4
+++ mutex.hpp 10 Aug 2004 00:15:22 -0000
@@ -22,7 +22,7 @@
   // No multithreading -> make locks into no-ops
   #define BOOST_MUTEX_HELPER BOOST_MUTEX_HELPER_NONE
 #else
- #ifdef __WIN32__
+ #if defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
     #define BOOST_MUTEX_HELPER BOOST_MUTEX_HELPER_WIN32
   #else
     #include <unistd.h>
@@ -37,7 +37,7 @@
 #endif
 
 
-#ifdef __WIN32__
+#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
   #include <windows.h>
 #endif
 #ifdef _POSIX_THREADS
@@ -49,7 +49,7 @@ namespace boost {
 namespace details {
 namespace pool {
 
-#ifdef __WIN32__
+#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
 
 class win32_mutex
 {
@@ -73,7 +73,7 @@ class win32_mutex
     { LeaveCriticalSection(&mtx); }
 };
 
-#endif // defined(__WIN32__)
+#endif // defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
 
 #ifdef _POSIX_THREADS
 


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk