From e39fa49d7e58b6d13e5b00852cc73654cd6c4ab9 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 27 Nov 2013 16:12:31 +0000 Subject: [PATCH] Fix wxCHECK_MINGW32_VERSION() definition. Include _mingw.h before testing for __MINGW32_MAJOR_VERSION as it's only defined in that header. Closes #15696. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75304 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/compiler.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/include/wx/compiler.h b/include/wx/compiler.h index 34a4718cb6..5ad4df8561 100644 --- a/include/wx/compiler.h +++ b/include/wx/compiler.h @@ -135,12 +135,15 @@ #endif /* - This macro can be used to check that the version of mingw32 compiler is - at least maj.min + This macro can be used to check that the version of mingw32 CRT is at least + maj.min */ /* Check for Mingw runtime version: */ -#if defined(__MINGW32_MAJOR_VERSION) && defined(__MINGW32_MINOR_VERSION) +#ifdef __MINGW32__ + /* Include the header defining __MINGW32_{MAJ,MIN}OR_VERSION */ + #include <_mingw.h> + #define wxCHECK_MINGW32_VERSION( major, minor ) \ ( ( ( __MINGW32_MAJOR_VERSION > (major) ) \ || ( __MINGW32_MAJOR_VERSION == (major) && __MINGW32_MINOR_VERSION >= (minor) ) ) )