Skip to content

Commit

Permalink
Merge branch 'bs/stdio-undef-before-redef'
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Junio C Hamano committed Feb 27, 2014
2 parents bfef492 + ab03803 commit a06f23c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions git-compat-util.h
Original file line number Diff line number Diff line change
Expand Up @@ -480,9 +480,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);
Expand Down

0 comments on commit a06f23c

Please sign in to comment.