Skip to content

Commit a06f23c

Browse files
committed
Merge branch 'bs/stdio-undef-before-redef'
When we replace broken macros from stdio.h in git-compat-util.h, preprocessor. * bs/stdio-undef-before-redef: git-compat-util.h: #undef (v)snprintf before #define them
2 parents bfef492 + ab03803 commit a06f23c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

git-compat-util.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -480,9 +480,15 @@ extern FILE *git_fopen(const char*, const char*);
480480
#endif
481481

482482
#ifdef SNPRINTF_RETURNS_BOGUS
483+
#ifdef snprintf
484+
#undef snprintf
485+
#endif
483486
#define snprintf git_snprintf
484487
extern int git_snprintf(char *str, size_t maxsize,
485488
const char *format, ...);
489+
#ifdef vsnprintf
490+
#undef vsnprintf
491+
#endif
486492
#define vsnprintf git_vsnprintf
487493
extern int git_vsnprintf(char *str, size_t maxsize,
488494
const char *format, va_list ap);

0 commit comments

Comments
 (0)