summaryrefslogtreecommitdiff
path: root/git-compat-util.h
diff options
context:
space:
mode:
authorJason Riedy <ejr@EECS.Berkeley.EDU>2007-02-19 16:22:56 -0800
committerJunio C Hamano <junkio@cox.net>2007-02-19 18:20:30 -0800
commitbc6b4f52fc79712db637ff90a472b82b32695e11 (patch)
tree6a1f85627af40c0079f01e7099701efb349c81b2 /git-compat-util.h
parentf496454e0fd22d003e9c9b5c3742b12d526bc0a4 (diff)
downloadgit-bc6b4f52fc79712db637ff90a472b82b32695e11.tar.gz
Add a compat/strtoumax.c for Solaris 8.
Solaris 8 was pre-c99, and they weren't willing to commit to the strtoumax definition according to /usr/include/inttypes.h. This adds NO_STRTOUMAX and NO_STRTOULL for ancient systems. If NO_STRTOUMAX is defined, the routine in compat/strtoumax.c will be used instead. That routine passes its arguments to strtoull unless NO_STRTOULL is defined. If NO_STRTOULL, then the routine uses strtoul (unsigned long). Signed-off-by: Jason Riedy <ejr@cs.berkeley.edu> Acked-by: Shawn O Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-compat-util.h')
-rw-r--r--git-compat-util.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/git-compat-util.h b/git-compat-util.h
index 105ac28f97..9863cf671f 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -139,6 +139,11 @@ extern char *gitstrcasestr(const char *haystack, const char *needle);
extern size_t gitstrlcpy(char *, const char *, size_t);
#endif
+#ifdef NO_STRTOUMAX
+#define strtoumax gitstrtoumax
+extern uintmax_t gitstrtoumax(const char *, char **, int);
+#endif
+
extern void release_pack_memory(size_t);
static inline char* xstrdup(const char *str)