From 5d7947df9d9ddce30bee7ba8db35e04339a60628 Mon Sep 17 00:00:00 2001 From: Rupert Steel Date: Mon, 12 Jan 2015 16:17:55 +1300 Subject: [PATCH] Fixed 2 macro redefinition warnings releated to WIN32_LEAN_AND_MEAN. --- include/spdlog/details/format.cc | 4 +++- include/spdlog/details/os.h | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/include/spdlog/details/format.cc b/include/spdlog/details/format.cc index bb1c5abf..5ca49bbc 100644 --- a/include/spdlog/details/format.cc +++ b/include/spdlog/details/format.cc @@ -39,7 +39,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #ifdef _WIN32 -# define WIN32_LEAN_AND_MEAN +# ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +# endif # ifdef __MINGW32__ # include # endif diff --git a/include/spdlog/details/os.h b/include/spdlog/details/os.h index d1dc7cb1..ee093b89 100644 --- a/include/spdlog/details/os.h +++ b/include/spdlog/details/os.h @@ -29,8 +29,10 @@ #include #ifdef _WIN32 -#define WIN32_LEAN_AND_MEAN -#include +# ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +# endif +# include #endif namespace spdlog