1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-26 04:46:11 +02:00

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 <tsunanet@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Benoit Sigoure 2014-01-30 22:25:12 -08:00 committed by Junio C Hamano
parent f174a2583c
commit ab03803c02

View File

@ -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);