summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorNick Alcock <nix@esperi.org.uk>2011-11-02 15:46:22 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-11-02 20:06:30 (GMT)
commite3eed7f8d238e895922851315447f5df9c475f11 (patch)
tree23a236f94d6d13c52fc022530702db0696463d2f /Makefile
parentf696543dad6c7ba27b0c4fab167a5687263a9ba0 (diff)
downloadgit-e3eed7f8d238e895922851315447f5df9c475f11.zip
git-e3eed7f8d238e895922851315447f5df9c475f11.tar.gz
git-e3eed7f8d238e895922851315447f5df9c475f11.tar.bz2
Add strtoimax() compatibility function.
Since systems that omit strtoumax() will likely omit strtomax() too, and likewise for strtoull() and strtoll(), we arrange for the make variables NO_STRTOUMAX and NO_STRTOULL to cover both the signed and unsigned functions, and define compatibility implementations for them. Signed-off-by: Nick Alcock <nix@esperi.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 3 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index e40ac0c..c5c1fd7 100644
--- a/Makefile
+++ b/Makefile
@@ -57,8 +57,8 @@ all::
#
# Define NO_STRLCPY if you don't have strlcpy.
#
-# Define NO_STRTOUMAX if you don't have strtoumax in the C library.
-# If your compiler also does not support long long or does not have
+# Define NO_STRTOUMAX if you don't have both strtoimax and strtoumax in the
+# C library. If your compiler also does not support long long or does not have
# strtoull, define NO_STRTOULL.
#
# Define NO_SETENV if you don't have setenv in the C library.
@@ -1402,7 +1402,7 @@ ifdef NO_STRLCPY
endif
ifdef NO_STRTOUMAX
COMPAT_CFLAGS += -DNO_STRTOUMAX
- COMPAT_OBJS += compat/strtoumax.o
+ COMPAT_OBJS += compat/strtoumax.o compat/strtoimax.o
endif
ifdef NO_STRTOULL
COMPAT_CFLAGS += -DNO_STRTOULL