From ab03803c02ef6b41ed5086771bab2de4860c96a9 Mon Sep 17 00:00:00 2001 From: Benoit Sigoure Date: Thu, 30 Jan 2014 22:25:12 -0800 Subject: 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 041cbdb..f1fa9e6 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); -- cgit v0.10.2-6-g49f6