mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 11:26:16 +01:00
gwin32: Fix detection of MinGW32 vs MinGW-w64
__MINGW32__ is defined on all MinGW variants including MinGW-w64. __MINGW64_VERSION_MAJOR is only defined on MinGW-w64. This difference is important because on MinGW-w64 we must #include winternl.h because including ntdef.h results in compiler errors about symbol redefinition, and the header warns that it is deprecated and may be removed in the future. https://bugzilla.gnome.org/show_bug.cgi?id=795849
This commit is contained in:
parent
ab0a0c706c
commit
a9fe62aa2c
@ -59,8 +59,8 @@
|
|||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
#pragma comment (lib, "ntoskrnl.lib")
|
#pragma comment (lib, "ntoskrnl.lib")
|
||||||
#endif
|
#endif
|
||||||
#elif defined (__MINGW32__)
|
#elif defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR)
|
||||||
/* mingw-w64, not MinGW, has winternl.h */
|
/* mingw-w64 must use winternl.h, but not MinGW */
|
||||||
#include <ntdef.h>
|
#include <ntdef.h>
|
||||||
#else
|
#else
|
||||||
#include <winternl.h>
|
#include <winternl.h>
|
||||||
|
Loading…
Reference in New Issue
Block a user