Define __MINGW64_TOOLCHAIN__ and __MINGW32_TOOLCHAIN__ symbols.
__MINGW64_TOOLCHAIN__ macro is more readable and shorter than the standard predefined __MINGW64_VERSION_MAJOR and __MINGW32_TOOLCHAIN__ is defined for the symmetry and also because it will make many tests simpler as we often need to test not so much for MinGW-w64 for its own sake but rather to disable the workarounds for MinGW32 when using it. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74885 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -147,7 +147,10 @@ compiler used.
|
|||||||
@itemdef{__EVC4__, Embedded Visual C++ 4 (can be only used for building wxWinCE)}
|
@itemdef{__EVC4__, Embedded Visual C++ 4 (can be only used for building wxWinCE)}
|
||||||
@itemdef{__GNUG__, Gnu C++ on any platform, see also wxCHECK_GCC_VERSION}
|
@itemdef{__GNUG__, Gnu C++ on any platform, see also wxCHECK_GCC_VERSION}
|
||||||
@itemdef{__GNUWIN32__, Gnu-Win32 compiler, see also wxCHECK_W32API_VERSION}
|
@itemdef{__GNUWIN32__, Gnu-Win32 compiler, see also wxCHECK_W32API_VERSION}
|
||||||
@itemdef{__MINGW32__, MinGW}
|
@itemdef{__MINGW32__, Either MinGW32 or MinGW-w64 in either 32 or 64 bits}
|
||||||
|
@itemdef{__MINGW32_TOOLCHAIN, MinGW32 only (32 bits only right now)}
|
||||||
|
@itemdef{__MINGW64__, MinGW-w64 in 64 bit builds}
|
||||||
|
@itemdef{__MINGW64_TOOLCHAIN__, MinGW-w64 in either 32 or 64 bit builds}
|
||||||
@itemdef{__SUNCC__, Sun CC, see also wxCHECK_SUNCC_VERSION}
|
@itemdef{__SUNCC__, Sun CC, see also wxCHECK_SUNCC_VERSION}
|
||||||
@itemdef{__SYMANTECC__, Symantec C++}
|
@itemdef{__SYMANTECC__, Symantec C++}
|
||||||
@itemdef{__VISAGECPP__, IBM Visual Age (OS/2)}
|
@itemdef{__VISAGECPP__, IBM Visual Age (OS/2)}
|
||||||
|
@@ -144,6 +144,28 @@
|
|||||||
#define wxCHECK_MINGW32_VERSION( major, minor ) \
|
#define wxCHECK_MINGW32_VERSION( major, minor ) \
|
||||||
( ( ( __MINGW32_MAJOR_VERSION > (major) ) \
|
( ( ( __MINGW32_MAJOR_VERSION > (major) ) \
|
||||||
|| ( __MINGW32_MAJOR_VERSION == (major) && __MINGW32_MINOR_VERSION >= (minor) ) ) )
|
|| ( __MINGW32_MAJOR_VERSION == (major) && __MINGW32_MINOR_VERSION >= (minor) ) ) )
|
||||||
|
|
||||||
|
/*
|
||||||
|
MinGW-w64 project provides compilers for both Win32 and Win64 but only
|
||||||
|
defines the same __MINGW32__ symbol for the former as MinGW32 toolchain
|
||||||
|
which is quite different (notably doesn't provide many SDK headers that
|
||||||
|
MinGW-w64 does include). So we define a separate symbol which, unlike the
|
||||||
|
predefined __MINGW64__, can be used to detect this toolchain in both 32 and
|
||||||
|
64 bit builds.
|
||||||
|
|
||||||
|
And define __MINGW32_TOOLCHAIN__ for consistency and also because it's
|
||||||
|
convenient as we often want to have some workarounds only for the (old)
|
||||||
|
MinGW32 but not (newer) MinGW-w64, which still predefines __MINGW32__.
|
||||||
|
*/
|
||||||
|
# ifdef __MINGW64_VERSION_MAJOR
|
||||||
|
# ifndef __MINGW64_TOOLCHAIN__
|
||||||
|
# define __MINGW64_TOOLCHAIN__
|
||||||
|
# endif
|
||||||
|
# else
|
||||||
|
# ifndef __MINGW32_TOOLCHAIN__
|
||||||
|
# define __MINGW32_TOOLCHAIN__
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
#else
|
#else
|
||||||
#define wxCHECK_MINGW32_VERSION( major, minor ) (0)
|
#define wxCHECK_MINGW32_VERSION( major, minor ) (0)
|
||||||
#endif
|
#endif
|
||||||
|
@@ -664,7 +664,7 @@ typedef struct
|
|||||||
#include <_mingw.h>
|
#include <_mingw.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR)
|
#ifdef __MINGW32_TOOLCHAIN__
|
||||||
typedef enum CommandStateChangeConstants {
|
typedef enum CommandStateChangeConstants {
|
||||||
CSC_UPDATECOMMANDS = (int) 0xFFFFFFFF,
|
CSC_UPDATECOMMANDS = (int) 0xFFFFFFFF,
|
||||||
CSC_NAVIGATEFORWARD = 0x1,
|
CSC_NAVIGATEFORWARD = 0x1,
|
||||||
|
Reference in New Issue
Block a user