summaryrefslogtreecommitdiff
path: root/compat/vcbuild/include
diff options
context:
space:
mode:
authorSven Strickroth <sven@cs-ware.de>2016-03-30 11:37:36 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-03-30 18:16:20 (GMT)
commit0ef60afdd4416345b16b5c4d8d0558a08d680bc5 (patch)
treea6447b153cc7c6e53a164cd2ec6188b73fd30ee6 /compat/vcbuild/include
parentdae26d30f4dfff352fb401e5a24c2df1a0a339f0 (diff)
downloadgit-0ef60afdd4416345b16b5c4d8d0558a08d680bc5.zip
git-0ef60afdd4416345b16b5c4d8d0558a08d680bc5.tar.gz
git-0ef60afdd4416345b16b5c4d8d0558a08d680bc5.tar.bz2
MSVC: use shipped headers instead of fallback definitions
VS2010 comes with stdint.h [1] VS2013 comes with inttypes.h [2] [1] https://stackoverflow.com/a/2628014/3906760 [2] https://blogs.msdn.microsoft.com/vcblog/2013/07/19/c99-library-support-in-visual-studio-2013/ Signed-off-by: Sven Strickroth <sven@cs-ware.de> Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Acked-by: Sebastian Schuberth <sschuberth@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'compat/vcbuild/include')
-rw-r--r--compat/vcbuild/include/unistd.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/compat/vcbuild/include/unistd.h b/compat/vcbuild/include/unistd.h
index c65c2cd..3a959d1 100644
--- a/compat/vcbuild/include/unistd.h
+++ b/compat/vcbuild/include/unistd.h
@@ -45,11 +45,15 @@ typedef unsigned long long uintmax_t;
typedef int64_t off64_t;
+#if !defined(_MSC_VER) || _MSC_VER < 1600
#define INTMAX_MIN _I64_MIN
#define INTMAX_MAX _I64_MAX
#define UINTMAX_MAX _UI64_MAX
#define UINT32_MAX 0xffffffff /* 4294967295U */
+#else
+#include <stdint.h>
+#endif
#define STDIN_FILENO 0
#define STDOUT_FILENO 1