From 6c189a717a4bac34c91cbae53e66fefddc6350f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Wed, 13 Oct 2021 20:17:46 -0700 Subject: [PATCH] Define WIN32_LEAN_AND_MEAN if it's not defined when including windows.h. --- src/mutex.cpp | 3 +++ src/os.cpp | 3 +++ src/semaphore.cpp | 3 +++ src/thread.cpp | 3 +++ src/timer.cpp | 3 +++ 5 files changed, 15 insertions(+) diff --git a/src/mutex.cpp b/src/mutex.cpp index b3e9677..6f6da64 100644 --- a/src/mutex.cpp +++ b/src/mutex.cpp @@ -23,6 +23,9 @@ #elif BX_PLATFORM_WINDOWS \ || BX_PLATFORM_WINRT \ || BX_PLATFORM_XBOXONE +# ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +# endif // WIN32_LEAN_AND_MEAN # include # include #endif // BX_PLATFORM_ diff --git a/src/os.cpp b/src/os.cpp index 12586aa..65ce48a 100644 --- a/src/os.cpp +++ b/src/os.cpp @@ -15,6 +15,9 @@ #endif // BX_CRT_MSVC #if BX_PLATFORM_WINDOWS || BX_PLATFORM_WINRT +# ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +# endif // WIN32_LEAN_AND_MEAN # include # include #elif BX_PLATFORM_ANDROID \ diff --git a/src/semaphore.cpp b/src/semaphore.cpp index 3e3083d..4b62d08 100644 --- a/src/semaphore.cpp +++ b/src/semaphore.cpp @@ -20,6 +20,9 @@ #elif BX_PLATFORM_WINDOWS \ || BX_PLATFORM_WINRT \ || BX_PLATFORM_XBOXONE +# ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +# endif // WIN32_LEAN_AND_MEAN # include # include # if BX_PLATFORM_XBOXONE diff --git a/src/thread.cpp b/src/thread.cpp index 17ace09..c53aa87 100644 --- a/src/thread.cpp +++ b/src/thread.cpp @@ -34,6 +34,9 @@ || BX_PLATFORM_WINRT \ || BX_PLATFORM_XBOXONE \ || BX_PLATFORM_WINRT +# ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +# endif // WIN32_LEAN_AND_MEAN # include # include # include diff --git a/src/timer.cpp b/src/timer.cpp index 45806b1..b6ef62e 100644 --- a/src/timer.cpp +++ b/src/timer.cpp @@ -13,6 +13,9 @@ #elif BX_PLATFORM_EMSCRIPTEN # include #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 #else # include // gettimeofday