Thread (80 messages) 80 messages, 5 authors, 2019-06-25
STALE2555d
Revisions (3)
  1. v1 [diff vs current]
  2. v2 current
  3. v3 [diff vs current]

[PATCH v2 13/20] msvc: fix detect_msys_tty()

From: Jeff Hostetler via GitGitGadget <hidden>
Date: 2019-06-19 21:06:19
Subsystem: the rest · Maintainer: Linus Torvalds

From: Jeff Hostetler <redacted>

The ntstatus.h header is only available in MINGW.

Signed-off-by: Jeff Hostetler <redacted>
Signed-off-by: Johannes Schindelin <redacted>
---
 compat/winansi.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)
diff --git a/compat/winansi.c b/compat/winansi.c
index f4f08237f9..11cd9b82cc 100644
--- 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)
 {
-- 
gitgitgadget
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help