summaryrefslogtreecommitdiff
path: root/git-compat-util.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-02-27 22:01:28 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-02-27 22:01:28 (GMT)
commita06f23c7393d187be3ded662102ec2b7b1b28bd0 (patch)
treecc35cf38e12861d7fbd2bf4853720434c3b8c9f4 /git-compat-util.h
parentbfef492d769cbea25c3cd951fe452be85402b160 (diff)
parentab03803c02ef6b41ed5086771bab2de4860c96a9 (diff)
downloadgit-a06f23c7393d187be3ded662102ec2b7b1b28bd0.zip
git-a06f23c7393d187be3ded662102ec2b7b1b28bd0.tar.gz
git-a06f23c7393d187be3ded662102ec2b7b1b28bd0.tar.bz2
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
Diffstat (limited to 'git-compat-util.h')
-rw-r--r--git-compat-util.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/git-compat-util.h b/git-compat-util.h
index cbd86c3..614a5e9 100644
--- 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);