summaryrefslogtreecommitdiff
path: root/compat/msvc.h
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2019-07-09 15:25:45 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2019-07-09 15:25:45 -0700
commit88b10757593ab47354a3c9d191d7c03d584a40cf (patch)
tree363afdfa16b666e9d81cd254a9466e9a2e571cfc /compat/msvc.h
parentMerge branch 'sg/rebase-progress' (diff)
parentmsvc: ignore .dll and incremental compile output (diff)
downloadtgif-88b10757593ab47354a3c9d191d7c03d584a40cf.tar.xz
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/msvc.h')
-rw-r--r--compat/msvc.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/compat/msvc.h b/compat/msvc.h
index 29a8ce8204..1d7a8c6145 100644
--- a/compat/msvc.h
+++ b/compat/msvc.h
@@ -6,6 +6,10 @@
#include <malloc.h>
#include <io.h>
+#pragma warning(disable: 4018) /* signed/unsigned comparison */
+#pragma warning(disable: 4244) /* type conversion, possible loss of data */
+#pragma warning(disable: 4090) /* 'function' : different 'const' qualifiers (ALLOC_GROW etc.)*/
+
/* porting function */
#define inline __inline
#define __inline__ __inline
@@ -18,6 +22,12 @@
#undef ERROR
+#define ftello _ftelli64
+
+typedef int sigset_t;
+/* open for reading, writing, or both (not in fcntl.h) */
+#define O_ACCMODE (_O_RDONLY | _O_WRONLY | _O_RDWR)
+
#include "compat/mingw.h"
#endif