summaryrefslogtreecommitdiff
path: root/compat/winansi.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-07-09 15:25:45 -0700
committerJunio C Hamano <gitster@pobox.com>2019-07-09 15:25:45 -0700
commit88b10757593ab47354a3c9d191d7c03d584a40cf (patch)
tree363afdfa16b666e9d81cd254a9466e9a2e571cfc /compat/winansi.c
parent6624e07b36c97e04ba68c8310a70bc69433e187e (diff)
parent54b6110a9b2e11847e62d36f64ef80fd38009772 (diff)
downloadgit-88b10757593ab47354a3c9d191d7c03d584a40cf.tar.gz
Merge branch 'jh/msvc'
Support to build with MSVC has been updated. * jh/msvc: msvc: ignore .dll and incremental compile output msvc: avoid debug assertion windows in Debug Mode msvc: do not pretend to support all signals msvc: add pragmas for common warnings msvc: add a compile-time flag to allow detailed heap debugging msvc: support building Git using MS Visual C++ msvc: update Makefile to allow for spaces in the compiler path msvc: fix detect_msys_tty() msvc: define ftello() msvc: do not re-declare the timespec struct msvc: mark a variable as non-const msvc: define O_ACCMODE msvc: include sigset_t definition msvc: fix dependencies of compat/msvc.c mingw: replace mingw_startup() hack obstack: fix compiler warning cache-tree/blame: avoid reusing the DEBUG constant t0001 (mingw): do not expect a specific order of stdout/stderr Mark .bat files as requiring CR/LF endings mingw: fix a typo in the msysGit-specific section
Diffstat (limited to 'compat/winansi.c')
-rw-r--r--compat/winansi.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/compat/winansi.c b/compat/winansi.c
index a29d34ef44..efc0abcdac 100644
--- a/compat/winansi.c
+++ b/compat/winansi.c
@@ -540,7 +540,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)
{