summaryrefslogtreecommitdiff
path: root/compat/snprintf.c
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2009-05-31 16:15:15 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-06-01 07:07:21 (GMT)
commitf90cf2b9203e81e3a2b70b15480628e9189b7e60 (patch)
tree0c9a33a98851847fe4fe2a04a87cdf4c0c082b8b /compat/snprintf.c
parentf9275c68af58e0f65e1557b5109ccbfdbbbc384a (diff)
downloadgit-f90cf2b9203e81e3a2b70b15480628e9189b7e60.zip
git-f90cf2b9203e81e3a2b70b15480628e9189b7e60.tar.gz
git-f90cf2b9203e81e3a2b70b15480628e9189b7e60.tar.bz2
MinGW: GCC >= 4 does not need SNPRINTF_SIZE_CORR anymore
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Steffen Prohaska <prohaska@zib.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'compat/snprintf.c')
-rw-r--r--compat/snprintf.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/compat/snprintf.c b/compat/snprintf.c
index 357e733..6c0fb05 100644
--- a/compat/snprintf.c
+++ b/compat/snprintf.c
@@ -6,8 +6,12 @@
* number of characters to write without the trailing NUL.
*/
#ifndef SNPRINTF_SIZE_CORR
+#if defined(__MINGW32__) && defined(__GNUC__) && __GNUC__ < 4
+#define SNPRINTF_SIZE_CORR 1
+#else
#define SNPRINTF_SIZE_CORR 0
#endif
+#endif
#undef vsnprintf
int git_vsnprintf(char *str, size_t maxsize, const char *format, va_list ap)