Work around missing strtoumax on Solaris.
PATCH 1/1 Work around missing strtoumax on Solaris.
Solaris 9 apparently lacks the strtoumax function in its C library. But it does have strtoull and uintmax_t appears to be defined to be unsigned long long.
We now set NO_STRTOUMAX in the Makefile for SunOS systems, and if this is set define strtoumax to be strtoull.
Signed-off-by Shawn O. Pearce <[email protected]>
---
Too bad I missed 1.5.0.1! Time for 1.5.0.2 ? ;-)
Makefile | 6 ++++++ git-compat-util.h | 4 ++++ 2 files changed, 10 insertions(+), 0 deletions(-)
Makefile +6 -0
@@ -28,6 +28,8 @@ all:: # # Define NO_STRLCPY if you don't have strlcpy. # +# Define NO_STRTOUMAX if you don't have strtoumax. +# # Define NO_SETENV if you don't have setenv in the C library. # # Define NO_SYMLINK_HEAD if you never want .git/HEAD to be a symbolic link.
@@ -348,6 +350,7 @@ ifeq ($(uname_S),SunOS) NEEDS_NSL = YesPlease SHELL_PATH = /bin/bash NO_STRCASESTR = YesPlease + NO_STRTOUMAX = YesPlease ifeq ($(uname_R),5.8) NEEDS_LIBICONV = YesPlease NO_UNSETENV = YesPlease
@@ -517,6 +520,9 @@ ifdef NO_STRLCPY COMPAT_CFLAGS += -DNO_STRLCPY COMPAT_OBJS += compat/strlcpy.o endif +ifdef NO_STRTOUMAX + COMPAT_CFLAGS += -DNO_STRTOUMAX +endif ifdef NO_SETENV COMPAT_CFLAGS += -DNO_SETENV COMPAT_OBJS += compat/setenv.o
git-compat-util.h +4 -0
@@ -139,6 +139,10 @@ extern char *gitstrcasestr(const char *haystack, const char *needle);extern size_t gitstrlcpy (char *,const char *,size_t );#endif +#ifdef NO_STRTOUMAX +#define strtoumax strtoull +#endif +extern void release_pack_memory (size_t );static inline char *xstrdup (const char *str)
Signature · 1 line
1.5.0.552.ge1b1c