Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
msvc: fix detect_msys_tty()
author
Jeff Hostetler
<jeffhost@microsoft.com>
Wed, 19 Jun 2019 21:06:05 +0000
(14:06 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Thu, 20 Jun 2019 21:03:05 +0000
(14:03 -0700)
The ntstatus.h header is only available in MINGW.
Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
compat/winansi.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
f6f470f
)
diff --git
a/compat/winansi.c
b/compat/winansi.c
index f4f08237f9ed513e0dd3b3bfd9494f19944e3239..11cd9b82cc8909b5316d63a0fe35ad8b6c45c096 100644
(file)
--- a/
compat/winansi.c
+++ b/
compat/winansi.c
@@
-544,7
+544,20
@@
static HANDLE swap_osfhnd(int fd, HANDLE new_handle)
#ifdef DETECT_MSYS_TTY
#include <winternl.h>
+
+#if defined(_MSC_VER)
+
+typedef struct _OBJECT_NAME_INFORMATION
+{
+ UNICODE_STRING Name;
+ WCHAR NameBuffer[0];
+} OBJECT_NAME_INFORMATION, *POBJECT_NAME_INFORMATION;
+
+#define ObjectNameInformation 1
+
+#else
#include <ntstatus.h>
+#endif
static void detect_msys_tty(int fd)
{