mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-14 00:06:24 +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
|
||||
#pragma comment (lib, "ntoskrnl.lib")
|
||||
#endif
|
||||
#elif defined (__MINGW32__)
|
||||
/* mingw-w64, not MinGW, has winternl.h */
|
||||
#elif defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR)
|
||||
/* mingw-w64 must use winternl.h, but not MinGW */
|
||||
#include <ntdef.h>
|
||||
#else
|
||||
#include <winternl.h>
|
||||
|
Loading…
Reference in New Issue
Block a user