зеркало из https://github.com/microsoft/git.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 <tsunanet@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Родитель
f174a2583c
Коммит
ab03803c02
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче