Fix build on Windows
authorkwolekr <mirrorisim@gmail.com>
Sat, 23 Feb 2013 17:30:13 +0000 (12:30 -0500)
committerkwolekr <mirrorisim@gmail.com>
Tue, 26 Feb 2013 04:10:54 +0000 (23:10 -0500)
src/debug.h
src/jthread/jmutex.h
src/porting.h

index 69a215a42395352f0c2ab3f682aad346afdb80f7..56952427cfd2542789eba39fe191ac81f99a77c4 100644 (file)
@@ -32,6 +32,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 
 #ifdef _WIN32
        #define WIN32_LEAN_AND_MEAN
+       #ifndef _WIN32_WINNT
+               #define _WIN32_WINNT 0x0500
+       #endif
        #include <windows.h>
        #ifdef _MSC_VER
                #include <eh.h>
index 6675162a56b6070efdc22e3b021f5c20aa6d3f94..e528aeb4ab95216407dfcc4284a39a1e1edc6032 100644 (file)
@@ -30,6 +30,9 @@
 #define JMUTEX_H
 
 #if (defined(WIN32) || defined(_WIN32_WCE))
+       #ifndef _WIN32_WINNT
+               #define _WIN32_WINNT 0x0500
+       #endif
        #ifndef _WIN32_WCE
                #include <process.h>
        #endif // _WIN32_WCE
@@ -88,7 +91,7 @@ public:
        void signal() {
                SetEvent(hEvent);
        }
-}
+};
 
 #else
 
index 03d2fcbd360894671e13a8a9829a7001ef5b4298..d7d1073406e69a558d1452aa29b1e42e5178e374 100644 (file)
@@ -40,14 +40,17 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 //#define ALIGNOF(type) offsetof (alignment_trick<type>, member)
 
 #ifdef _WIN32
+       #ifndef _WIN32_WINNT
+               #define _WIN32_WINNT 0x0500
+       #endif
        #include <windows.h>
        
        #define sleep_ms(x) Sleep(x)
 #else
        #include <unistd.h>
        #include <stdint.h> //for uintptr_t
-
-       #if defined(linux) || defined(__linux)
+       
+       #if (defined(linux) || defined(__linux)) && !defined(_GNU_SOURCE)
                #define _GNU_SOURCE
        #endif