From f4e1ff192f706204e8eb1688c96bff37ca3aa895 Mon Sep 17 00:00:00 2001 From: Scott Ramsby Date: Fri, 9 Nov 2018 16:08:07 -0800 Subject: [PATCH] Fix potential double-definition of WIN32_LEAN_AND_MEAN macro --- src/regex.cpp | 4 +++- src/static_mutex.cpp | 4 +++- src/w32_regex_traits.cpp | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/regex.cpp b/src/regex.cpp index e9e97627..5a8bbdc0 100644 --- a/src/regex.cpp +++ b/src/regex.cpp @@ -28,7 +28,9 @@ # include #endif #ifdef BOOST_REGEX_HAS_MS_STACK_GUARD -#define WIN32_LEAN_AND_MEAN +#ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +#endif #ifndef NOMINMAX # define NOMINMAX #endif diff --git a/src/static_mutex.cpp b/src/static_mutex.cpp index d02b01fc..35dd0c79 100644 --- a/src/static_mutex.cpp +++ b/src/static_mutex.cpp @@ -28,7 +28,9 @@ #ifndef NOMINMAX # define NOMINMAX #endif -#define WIN32_LEAN_AND_MEAN +#ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +#endif #include #include #endif diff --git a/src/w32_regex_traits.cpp b/src/w32_regex_traits.cpp index 0f825702..5b5236aa 100644 --- a/src/w32_regex_traits.cpp +++ b/src/w32_regex_traits.cpp @@ -23,7 +23,9 @@ #include #include -#define WIN32_LEAN_AND_MEAN +#ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +#endif #ifndef NOMINMAX # define NOMINMAX #endif