From f90cf2b9203e81e3a2b70b15480628e9189b7e60 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Sun, 31 May 2009 18:15:15 +0200 Subject: MinGW: GCC >= 4 does not need SNPRINTF_SIZE_CORR anymore Signed-off-by: Johannes Schindelin Signed-off-by: Steffen Prohaska Signed-off-by: Junio C Hamano --- compat/snprintf.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'compat/snprintf.c') diff --git a/compat/snprintf.c b/compat/snprintf.c index 357e733074..6c0fb056a5 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) -- cgit v1.2.1