summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f9275c6)
raw | patch | inline | side by side (parent: f9275c6)
author | Johannes Schindelin <johannes.schindelin@gmx.de> | |
Sun, 31 May 2009 16:15:15 +0000 (18:15 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 1 Jun 2009 07:07:21 +0000 (00:07 -0700) |
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>
Signed-off-by: Steffen Prohaska <prohaska@zib.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Makefile | patch | blob | history | |
compat/snprintf.c | patch | blob | history |
diff --git a/Makefile b/Makefile
index 0ab1cff30de7b3cc745ce79acca4a3f7cfbd1977..f63eaeae4f6abe034aa6bcdcae970344d4aa7537 100644 (file)
--- a/Makefile
+++ b/Makefile
UNRELIABLE_FSTAT = UnfortunatelyYes
OBJECT_CREATION_USES_RENAMES = UnfortunatelyNeedsTo
COMPAT_CFLAGS += -D__USE_MINGW_ACCESS -DNOGDI -Icompat -Icompat/regex -Icompat/fnmatch
- COMPAT_CFLAGS += -DSNPRINTF_SIZE_CORR=1
COMPAT_CFLAGS += -DSTRIP_EXTENSION=\".exe\"
COMPAT_OBJS += compat/mingw.o compat/fnmatch/fnmatch.o compat/regex/regex.o compat/winansi.o
EXTLIBS += -lws2_32
diff --git a/compat/snprintf.c b/compat/snprintf.c
index 357e733074ea7c85f880fa577ad65dfb3787fec7..6c0fb056a571b30627e404d7f164de31ed1a8699 100644 (file)
--- a/compat/snprintf.c
+++ b/compat/snprintf.c
* 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)