From 04428890b7480ff57aa1fd23230f3a7c9bf91fa5 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 12 Dec 2016 23:39:01 +0100 Subject: [PATCH] Fix warning about undefined macro when cross-compiling with MinGW __USE_MINGW_ANSI_STDIO is apparently not defined when using MinGW as a cross-compiler from Linux, so 7c730334a2021775bbfc6bbb16d8c393df4be003 resulted in -Wundef warning about this. Fix this by checking if the macro is defined before testing its value. See #17736. --- include/wx/defs.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/wx/defs.h b/include/wx/defs.h index 02eae35116..1fe6bdeecd 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -1083,7 +1083,8 @@ typedef wxUint32 wxDword; #define wxLongLong_t __int64 #define wxLongLongSuffix i64 #define wxLongLongFmtSpec "L" -#elif defined(__MINGW32__) && (__USE_MINGW_ANSI_STDIO != 1) +#elif defined(__MINGW32__) && \ + (defined(__USE_MINGW_ANSI_STDIO) && (__USE_MINGW_ANSI_STDIO != 1)) #define wxLongLong_t long long #define wxLongLongSuffix ll #define wxLongLongFmtSpec "I64"