From: Benoit Sigoure Date: Fri, 31 Jan 2014 06:25:12 +0000 (-0800) Subject: git-compat-util.h: #undef (v)snprintf before #define them X-Git-Tag: v2.0.0-rc0~159^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ab03803c02ef6b41ed5086771bab2de4860c96a9;p=thirdparty%2Fgit.git git-compat-util.h: #undef (v)snprintf before #define them When we detect that vsnprintf / snprintf are broken, we #define them to an alternative implementation. On OS X, stdio.h already re-define them in `git-compat-util.h'. Signed-off-by: Benoit Sigoure Signed-off-by: Junio C Hamano --- diff --git a/git-compat-util.h b/git-compat-util.h index 041cbdb93e..f1fa9e611b 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -374,9 +374,15 @@ extern FILE *git_fopen(const char*, const char*); #endif #ifdef SNPRINTF_RETURNS_BOGUS +#ifdef snprintf +#undef snprintf +#endif #define snprintf git_snprintf extern int git_snprintf(char *str, size_t maxsize, const char *format, ...); +#ifdef vsnprintf +#undef vsnprintf +#endif #define vsnprintf git_vsnprintf extern int git_vsnprintf(char *str, size_t maxsize, const char *format, va_list ap);