mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-28 06:56:16 +01:00
glib/gmessages.c: Fix build when targeting Windows Vista+
In my previous attempt to improve colored console output on Windows, we called GetFileInformationByHandleEx() directly if we target Vista or later, but the check macro for doing so via LoadLibrary() had a typo. Fix this by correcting the check macro. Pointed out by Ignacio Casal Quinteiro.
This commit is contained in:
parent
376e12e5a4
commit
9aaf7588fc
@ -1487,7 +1487,7 @@ win32_is_pipe_tty (int fd)
|
|||||||
gint length;
|
gint length;
|
||||||
|
|
||||||
/* XXX: Remove once XP support really dropped */
|
/* XXX: Remove once XP support really dropped */
|
||||||
#if _WINNT_WIN32 < 0x0600
|
#if _WIN32_WINNT < 0x0600
|
||||||
HANDLE h_kerneldll = NULL;
|
HANDLE h_kerneldll = NULL;
|
||||||
fGetFileInformationByHandleEx *GetFileInformationByHandleEx;
|
fGetFileInformationByHandleEx *GetFileInformationByHandleEx;
|
||||||
#endif
|
#endif
|
||||||
@ -1501,7 +1501,7 @@ win32_is_pipe_tty (int fd)
|
|||||||
/* mintty uses a pipe, in the form of \{cygwin|msys}-xxxxxxxxxxxxxxxx-ptyN-{from|to}-master */
|
/* mintty uses a pipe, in the form of \{cygwin|msys}-xxxxxxxxxxxxxxxx-ptyN-{from|to}-master */
|
||||||
|
|
||||||
/* XXX: Remove once XP support really dropped */
|
/* XXX: Remove once XP support really dropped */
|
||||||
#if _WINNT_WIN32 < 0x0600
|
#if _WIN32_WINNT < 0x0600
|
||||||
h_kerneldll = LoadLibraryW (L"kernel32.dll");
|
h_kerneldll = LoadLibraryW (L"kernel32.dll");
|
||||||
|
|
||||||
if (h_kerneldll == NULL)
|
if (h_kerneldll == NULL)
|
||||||
@ -1562,7 +1562,7 @@ done_query:
|
|||||||
g_free (info);
|
g_free (info);
|
||||||
|
|
||||||
/* XXX: Remove once XP support really dropped */
|
/* XXX: Remove once XP support really dropped */
|
||||||
#if _WINNT_WIN32 < 0x0600
|
#if _WIN32_WINNT < 0x0600
|
||||||
if (h_kerneldll != NULL)
|
if (h_kerneldll != NULL)
|
||||||
FreeLibrary (h_kerneldll);
|
FreeLibrary (h_kerneldll);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user