[glib] gwin32.c: Fix build on Visual Studio



commit 556705cb9c826d70c043d67a87d997f82e2a559d
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Sat Oct 24 11:05:27 2015 +0800

    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.

 glib/gwin32.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/glib/gwin32.c b/glib/gwin32.c
index a0cbd1d..ce462bb 100644
--- a/glib/gwin32.c
+++ b/glib/gwin32.c
@@ -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"


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]