aboutsummaryrefslogtreecommitdiffstats
path: root/compat/snprintf.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-04-29 14:15:54 -0700
committerJunio C Hamano <gitster@pobox.com>2016-04-29 14:15:54 -0700
commit3bb56a91be7d136f5f03902ea900185e01a2cdcb (patch)
treecc0974859ee762ed3c99594acb5c6ec94ebcd34e /compat/snprintf.c
parentMerge tag 'l10n-2.8.0-rnd3-fr' of git://github.com/git-l10n/git-po into maint (diff)
parentMSVC: use shipped headers instead of fallback definitions (diff)
downloadgit-3bb56a91be7d136f5f03902ea900185e01a2cdcb.tar.gz
git-3bb56a91be7d136f5f03902ea900185e01a2cdcb.zip
Merge branch 'ss/msvc' into maint
Build updates for MSVC. * ss/msvc: MSVC: use shipped headers instead of fallback definitions MSVC: vsnprintf in Visual Studio 2015 doesn't need SNPRINTF_SIZE_CORR any more
Diffstat (limited to 'compat/snprintf.c')
-rw-r--r--compat/snprintf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/compat/snprintf.c b/compat/snprintf.c
index 42ea1ac110..0b11688537 100644
--- a/compat/snprintf.c
+++ b/compat/snprintf.c
@@ -9,7 +9,7 @@
* always have room for a trailing NUL byte.
*/
#ifndef SNPRINTF_SIZE_CORR
-#if defined(WIN32) && (!defined(__GNUC__) || __GNUC__ < 4)
+#if defined(WIN32) && (!defined(__GNUC__) || __GNUC__ < 4) && (!defined(_MSC_VER) || _MSC_VER < 1900)
#define SNPRINTF_SIZE_CORR 1
#else
#define SNPRINTF_SIZE_CORR 0