Skip to content

Commit 6c189a7

Browse files
committed
Define WIN32_LEAN_AND_MEAN if it's not defined when including windows.h.
1 parent 5c4fdc8 commit 6c189a7

File tree

5 files changed

+15
-0
lines changed

5 files changed

+15
-0
lines changed

src/mutex.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
#elif BX_PLATFORM_WINDOWS \
2424
|| BX_PLATFORM_WINRT \
2525
|| BX_PLATFORM_XBOXONE
26+
# ifndef WIN32_LEAN_AND_MEAN
27+
# define WIN32_LEAN_AND_MEAN
28+
# endif // WIN32_LEAN_AND_MEAN
2629
# include <windows.h>
2730
# include <errno.h>
2831
#endif // BX_PLATFORM_

src/os.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
#endif // BX_CRT_MSVC
1616

1717
#if BX_PLATFORM_WINDOWS || BX_PLATFORM_WINRT
18+
# ifndef WIN32_LEAN_AND_MEAN
19+
# define WIN32_LEAN_AND_MEAN
20+
# endif // WIN32_LEAN_AND_MEAN
1821
# include <windows.h>
1922
# include <psapi.h>
2023
#elif BX_PLATFORM_ANDROID \

src/semaphore.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
#elif BX_PLATFORM_WINDOWS \
2121
|| BX_PLATFORM_WINRT \
2222
|| BX_PLATFORM_XBOXONE
23+
# ifndef WIN32_LEAN_AND_MEAN
24+
# define WIN32_LEAN_AND_MEAN
25+
# endif // WIN32_LEAN_AND_MEAN
2326
# include <windows.h>
2427
# include <limits.h>
2528
# if BX_PLATFORM_XBOXONE

src/thread.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@
3434
|| BX_PLATFORM_WINRT \
3535
|| BX_PLATFORM_XBOXONE \
3636
|| BX_PLATFORM_WINRT
37+
# ifndef WIN32_LEAN_AND_MEAN
38+
# define WIN32_LEAN_AND_MEAN
39+
# endif // WIN32_LEAN_AND_MEAN
3740
# include <windows.h>
3841
# include <limits.h>
3942
# include <errno.h>

src/timer.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
#elif BX_PLATFORM_EMSCRIPTEN
1414
# include <emscripten.h>
1515
#elif BX_PLATFORM_WINDOWS || BX_PLATFORM_XBOXONE || BX_PLATFORM_WINRT
16+
# ifndef WIN32_LEAN_AND_MEAN
17+
# define WIN32_LEAN_AND_MEAN
18+
# endif // WIN32_LEAN_AND_MEAN
1619
# include <windows.h>
1720
#else
1821
# include <sys/time.h> // gettimeofday

0 commit comments

Comments
 (0)