>
> building. What is the easy way to differentiate MinGW-w64
> 32bit compiler and MinGW.org 32bit compiler? Then we
> can add ifdefs in the source codes to cater for both in the
> future.
>
> The current codes are set up in a way to support MinGW.org
> for 32bit build and MinGW-w64 64bit for 64bit build.
>
> --
> Xiaofan
>
The way WebKit does this is the following:
#if defined(__MINGW32__) /* compiler built-in define for all mingw compilers
> */
> // general mingw code
> #include <_mingw.h> /* private MinGW header */
> #if defined(__MINGW64_VERSION_MAJOR) /* best way to check for mingw-w64
> vs mingw.org */
> /* mingw-w64/w32 specific code */
>
#else
>
/* mingw.org specific code */
>
#endif /* __MINGW64_VERSION_MAJOR */
>
#endif /* __MINGW32__ */
>
They define some macro used by special macro functions (see
JavaScriptCore/wtf/Platform.h):
> #if OS(WINDOWS)
> #if COMPILER(MINGW) && !COMPILER(MINGW64)
> /* do something mingw.org specific */
> #elif COMPILER(MSVC) || COMPILER(MINGW64)
> /* other stuff */
> #endif
> #endif
>
I hope this helps!
Ruben
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public