Selaa lähdekoodia

Define WIN32_LEAN_AND_MEAN if it's not defined when including windows.h.

Branimir Karadžić 4 vuotta sitten
vanhempi
sitoutus
6c189a717a
5 muutettua tiedostoa jossa 15 lisäystä ja 0 poistoa
  1. 3 0
      src/mutex.cpp
  2. 3 0
      src/os.cpp
  3. 3 0
      src/semaphore.cpp
  4. 3 0
      src/thread.cpp
  5. 3 0
      src/timer.cpp

+ 3 - 0
src/mutex.cpp

@@ -23,6 +23,9 @@
 #elif  BX_PLATFORM_WINDOWS \
 #elif  BX_PLATFORM_WINDOWS \
 	|| BX_PLATFORM_WINRT   \
 	|| BX_PLATFORM_WINRT   \
 	|| BX_PLATFORM_XBOXONE
 	|| BX_PLATFORM_XBOXONE
+#	ifndef WIN32_LEAN_AND_MEAN
+#		define WIN32_LEAN_AND_MEAN
+#	endif // WIN32_LEAN_AND_MEAN
 #	include <windows.h>
 #	include <windows.h>
 #	include <errno.h>
 #	include <errno.h>
 #endif // BX_PLATFORM_
 #endif // BX_PLATFORM_

+ 3 - 0
src/os.cpp

@@ -15,6 +15,9 @@
 #endif // BX_CRT_MSVC
 #endif // BX_CRT_MSVC
 
 
 #if BX_PLATFORM_WINDOWS || BX_PLATFORM_WINRT
 #if BX_PLATFORM_WINDOWS || BX_PLATFORM_WINRT
+#	ifndef WIN32_LEAN_AND_MEAN
+#		define WIN32_LEAN_AND_MEAN
+#	endif // WIN32_LEAN_AND_MEAN
 #	include <windows.h>
 #	include <windows.h>
 #	include <psapi.h>
 #	include <psapi.h>
 #elif  BX_PLATFORM_ANDROID    \
 #elif  BX_PLATFORM_ANDROID    \

+ 3 - 0
src/semaphore.cpp

@@ -20,6 +20,9 @@
 #elif  BX_PLATFORM_WINDOWS \
 #elif  BX_PLATFORM_WINDOWS \
 	|| BX_PLATFORM_WINRT   \
 	|| BX_PLATFORM_WINRT   \
 	|| BX_PLATFORM_XBOXONE
 	|| BX_PLATFORM_XBOXONE
+#	ifndef WIN32_LEAN_AND_MEAN
+#		define WIN32_LEAN_AND_MEAN
+#	endif // WIN32_LEAN_AND_MEAN
 #	include <windows.h>
 #	include <windows.h>
 #	include <limits.h>
 #	include <limits.h>
 #	if BX_PLATFORM_XBOXONE
 #	if BX_PLATFORM_XBOXONE

+ 3 - 0
src/thread.cpp

@@ -34,6 +34,9 @@
 	|| BX_PLATFORM_WINRT   \
 	|| BX_PLATFORM_WINRT   \
 	|| BX_PLATFORM_XBOXONE \
 	|| BX_PLATFORM_XBOXONE \
 	|| BX_PLATFORM_WINRT
 	|| BX_PLATFORM_WINRT
+#	ifndef WIN32_LEAN_AND_MEAN
+#		define WIN32_LEAN_AND_MEAN
+#	endif // WIN32_LEAN_AND_MEAN
 #	include <windows.h>
 #	include <windows.h>
 #	include <limits.h>
 #	include <limits.h>
 #	include <errno.h>
 #	include <errno.h>

+ 3 - 0
src/timer.cpp

@@ -13,6 +13,9 @@
 #elif BX_PLATFORM_EMSCRIPTEN
 #elif BX_PLATFORM_EMSCRIPTEN
 #	include <emscripten.h>
 #	include <emscripten.h>
 #elif BX_PLATFORM_WINDOWS || BX_PLATFORM_XBOXONE || BX_PLATFORM_WINRT
 #elif BX_PLATFORM_WINDOWS || BX_PLATFORM_XBOXONE || BX_PLATFORM_WINRT
+#	ifndef WIN32_LEAN_AND_MEAN
+#		define WIN32_LEAN_AND_MEAN
+#	endif // WIN32_LEAN_AND_MEAN
 #	include <windows.h>
 #	include <windows.h>
 #else
 #else
 #	include <sys/time.h> // gettimeofday
 #	include <sys/time.h> // gettimeofday