Windows: actually detect mingw-w64 and not 64 bits mode
__MINGW64__ is only defined when using mingw-w64 in 64bits mode, not when using the 32bits version of the compiler. Instead, to detect usage of mingw-w64 instead of mingw version of GCC we should look at __MINGW64_VERSION_MAJOR and __MINGW64_VERSION_MINOR. If one of these is defined means we are running on mingw-w64 compiler and headers and not mingw.org build. Read more here: http://bit.ly/detect-mingw-w64-vs-mingw Closes #384
This commit is contained in:
parent
42a86693a7
commit
b6e3dcc799
@ -4079,8 +4079,8 @@
|
||||
(FACILITY_NTWIN32 << 16) | ERROR_SEVERITY_WARNING)))
|
||||
|
||||
/* from ntifs.h */
|
||||
/* MinGW already has it */
|
||||
#if defined(_MSC_VER) || defined(__MINGW64__)
|
||||
/* MinGW already has it, mingw-w64 does not. */
|
||||
#if defined(_MSC_VER) || defined(__MINGW64_VERSION_MAJOR)
|
||||
typedef struct _REPARSE_DATA_BUFFER {
|
||||
ULONG ReparseTag;
|
||||
USHORT ReparseDataLength;
|
||||
@ -4335,7 +4335,7 @@ typedef NTSTATUS (NTAPI *sNtSetInformationFile)
|
||||
# define SYMBOLIC_LINK_FLAG_DIRECTORY 0x1
|
||||
#endif
|
||||
|
||||
#ifdef __MINGW32__
|
||||
#if defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR)
|
||||
typedef struct _OVERLAPPED_ENTRY {
|
||||
ULONG_PTR lpCompletionKey;
|
||||
LPOVERLAPPED lpOverlapped;
|
||||
|
||||
@ -112,7 +112,7 @@ typedef struct _AFD_RECV_INFO {
|
||||
#define IOCTL_AFD_RECEIVE_DATAGRAM \
|
||||
_AFD_CONTROL_CODE(AFD_RECEIVE_DATAGRAM, METHOD_NEITHER)
|
||||
|
||||
#if defined(__MINGW32__) && !defined(__MINGW64__)
|
||||
#if defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR)
|
||||
|
||||
typedef struct _IP_ADAPTER_UNICAST_ADDRESS_XP {
|
||||
/* FIXME: __C89_NAMELESS was removed */
|
||||
|
||||
Loading…
Reference in New Issue
Block a user