From 4db4eb20d8c0c05e8b8f7031145d92acd0ca4a07 Mon Sep 17 00:00:00 2001 From: staviq Date: Wed, 30 Aug 2023 23:26:52 +0200 Subject: [PATCH] make LOG_COMPAT easier to override and extend --- common/log.h | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/common/log.h b/common/log.h index 3d0c84a66..f7ae51e3c 100644 --- a/common/log.h +++ b/common/log.h @@ -13,14 +13,16 @@ #define LOG_COMPAT_WIN 2 #ifndef LOG_COMPAT + //default #define LOG_COMPAT LOG_COMPAT_GNU -#endif - -#ifdef _WIN32 - #ifdef __MINGW32__ - #define LOG_COMPAT LOG_COMPAT_GNU - #else - #define LOG_COMPAT LOG_COMPAT_WIN + //overrides + #ifdef _WIN32 + #ifdef _MSC_VER + #define LOG_COMPAT LOG_COMPAT_WIN + #endif + #ifdef __MINGW32__ + #define LOG_COMPAT LOG_COMPAT_GNU + #endif #endif #endif