Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'bs/stdio-undef-before-redef'
author
Junio C Hamano
<gitster@pobox.com>
Thu, 27 Feb 2014 22:01:28 +0000
(14:01 -0800)
committer
Junio C Hamano
<gitster@pobox.com>
Thu, 27 Feb 2014 22:01:28 +0000
(14:01 -0800)
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
git-compat-util.h
patch
|
blob
|
history
raw
(from parent 1:
bfef492
)
diff --git
a/git-compat-util.h
b/git-compat-util.h
index cbd86c37f51c00679498107d1a05131c19afa36e..614a5e95bd298097111efa54bbf190056c701c57 100644
(file)
--- a/
git-compat-util.h
+++ b/
git-compat-util.h
@@
-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);