gwin32.c: Fix build on Visual Studio

ntdef.h is a header that is normally only shipped with MinGW, not Visual
Studio, which broke the build in commit 975cb91.  Fix this by including
winternl.h, which typedef's the NTSTATUS type in question on both Visual
Studio and MinGW/mingw-w64, as well as pre-2008 Visual Studio.

Clean up this inclusion part a little bit as well.
This commit is contained in:
Chun-wei Fan 2015-10-24 11:05:27 +08:00
parent af0a47701d
commit 556705cb9c

View File

@ -51,10 +51,6 @@
#define MODERN_API_FAMILY 2
#if WINAPI_FAMILY != MODERN_API_FAMILY
# include <ntdef.h>
#endif
#if WINAPI_FAMILY == MODERN_API_FAMILY
/* This is for modern UI Builds, where we can't use LoadLibraryW()/GetProcAddress() */
/* ntddk.h is found in the WDK, and MinGW */
@ -63,6 +59,8 @@
#ifdef _MSC_VER
#pragma comment (lib, "ntoskrnl.lib")
#endif
#else
#include <winternl.h>
#endif
#include "glib.h"