diff options
author | Paul Gilbert | 2016-03-20 14:55:41 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-03-20 14:55:41 -0400 |
commit | 3c852cc240221785598023de56e5a71a0d8806fa (patch) | |
tree | c2a64b811586e4e9d8a4d5baa04d5c4f9d23bd08 /backends/platform/sdl/win32 | |
parent | ea54e6244e75c609e6886ba210f80fb22c479d3f (diff) | |
parent | 509a00109e79156e91c062f145ac3aa86ec8584e (diff) | |
download | scummvm-rg350-3c852cc240221785598023de56e5a71a0d8806fa.tar.gz scummvm-rg350-3c852cc240221785598023de56e5a71a0d8806fa.tar.bz2 scummvm-rg350-3c852cc240221785598023de56e5a71a0d8806fa.zip |
Merge branch 'master' into titanic
Diffstat (limited to 'backends/platform/sdl/win32')
-rw-r--r-- | backends/platform/sdl/win32/win32-main.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/backends/platform/sdl/win32/win32-main.cpp b/backends/platform/sdl/win32/win32-main.cpp index c6339f0c8c..4864347d81 100644 --- a/backends/platform/sdl/win32/win32-main.cpp +++ b/backends/platform/sdl/win32/win32-main.cpp @@ -44,7 +44,12 @@ int __stdcall WinMain(HINSTANCE /*hInst*/, HINSTANCE /*hPrevInst*/, LPSTR /*lpC SDL_SetModuleHandle(GetModuleHandle(NULL)); #endif // HACK: __argc, __argv are broken and return zero when using mingwrt 4.0+ on MinGW -#if defined(__GNUC__) && defined(__MINGW32__) && !defined(__MINGW64__) +// HACK: MinGW-w64 based toolchains neither feature _argc nor _argv. The 32 bit +// incarnation only defines __MINGW32__. This leads to build breakage due to +// missing declarations. Luckily MinGW-w64 based toolchains define +// __MINGW64_VERSION_foo macros inside _mingw.h, which is included from all +// system headers. Thus we abuse that to detect them. +#if defined(__GNUC__) && defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR) return main(_argc, _argv); #else return main(__argc, __argv); |