]> git.lizzy.rs Git - minetest.git/blobdiff - src/porting.h
Merge remote branch 'origin/master'
[minetest.git] / src / porting.h
index 74ee97f88efa8dcca558d2d4229e3ad018937578..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
 
@@ -72,7 +75,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
        #define THREAD_PRIORITY_BELOW_NORMAL 1
        #define THREAD_PRIORITY_NORMAL       2
        #define THREAD_PRIORITY_ABOVE_NORMAL 3
-       #define THREAD_PRIORITY_HIGHEST      4
+       #define THREAD_PRIORITY_HIGHEST      4
 #endif
 
 #ifdef _MSC_VER