author | Frank Li <lznuaa@gmail.com> | |
Wed, 16 Sep 2009 08:20:22 +0000 (10:20 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 19 Sep 2009 03:00:42 +0000 (20:00 -0700) | ||
commit | 71064e3f86fbf2eb5c2b55a3024051f9542ae229 | |
tree | 9287bbdfe8a2196470fa7d5647f65baf82d6bbc9 | tree | snapshot |
parent | d7fa500fb598d725bda3427535e87f06caf93ee8 | commit | diff |
Test for WIN32 instead of __MINGW32_
The code which is conditional on MinGW32 is actually conditional on Windows.
Use the WIN32 symbol, which is defined by the MINGW32 and MSVC environments,
but not by Cygwin.
Define SNPRINTF_SIZE_CORR=1 for MSVC too, as its vsnprintf function does
not add NUL at the end of the buffer if the result fits the buffer size
exactly.
Signed-off-by: Frank Li <lznuaa@gmail.com>
Signed-off-by: Marius Storm-Olsen <mstormo@gmail.com>
Acked-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The code which is conditional on MinGW32 is actually conditional on Windows.
Use the WIN32 symbol, which is defined by the MINGW32 and MSVC environments,
but not by Cygwin.
Define SNPRINTF_SIZE_CORR=1 for MSVC too, as its vsnprintf function does
not add NUL at the end of the buffer if the result fits the buffer size
exactly.
Signed-off-by: Frank Li <lznuaa@gmail.com>
Signed-off-by: Marius Storm-Olsen <mstormo@gmail.com>
Acked-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
compat/snprintf.c | diff | blob | history | |
help.c | diff | blob | history | |
pager.c | diff | blob | history | |
run-command.c | diff | blob | history | |
run-command.h | diff | blob | history | |
setup.c | diff | blob | history |