summaryrefslogtreecommitdiff
path: root/git-compat-util.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-03-08 21:29:50 -0800
committerJunio C Hamano <gitster@pobox.com>2008-03-08 21:29:50 -0800
commit6e79a8858560a3a3e2b5e092a6cbdd5f3f1ad13b (patch)
treea33f91f700d7a683a6928505abc5721a6f296c0c /git-compat-util.h
parent5b278ebe87b24353fbac8231eeffd4c531fed8f4 (diff)
parentc4582f93a263bea534288e7f7ad8937405964cd4 (diff)
downloadgit-6e79a8858560a3a3e2b5e092a6cbdd5f3f1ad13b.tar.gz
Merge branch 'mr/compat-snprintf'
* mr/compat-snprintf: Add compat/snprintf.c for systems that return bogus
Diffstat (limited to 'git-compat-util.h')
-rw-r--r--git-compat-util.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/git-compat-util.h b/git-compat-util.h
index 591244351e..73968e02b0 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -209,6 +209,15 @@ void *gitmemmem(const void *haystack, size_t haystacklen,
extern FILE *git_fopen(const char*, const char*);
#endif
+#ifdef SNPRINTF_RETURNS_BOGUS
+#define snprintf git_snprintf
+extern int git_snprintf(char *str, size_t maxsize,
+ const char *format, ...);
+#define vsnprintf git_vsnprintf
+extern int git_vsnprintf(char *str, size_t maxsize,
+ const char *format, va_list ap);
+#endif
+
#ifdef __GLIBC_PREREQ
#if __GLIBC_PREREQ(2, 1)
#define HAVE_STRCHRNUL