]> Kevux Git Server - rit/commitdiff
Build: add NO_UINTMAX_T to support ancient systems
authorDavid M. Syzdek <david.syzdek@acsalaska.net>
Sun, 26 Oct 2008 11:52:37 +0000 (03:52 -0800)
committerJunio C Hamano <gitster@pobox.com>
Sun, 2 Nov 2008 08:09:34 +0000 (01:09 -0700)
This adds NO_UINTMAX_T for ancient systems, such as FreeBSD 4.9-SECURITY.
If NO_UINTMAX_T is defined, then uintmax_t is defined as uint32_t.

Signed-off-by: David M. Syzdek <david.syzdek@acsalaska.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Makefile
config.mak.in
configure.ac

index d6f3695..0698365 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -955,6 +955,9 @@ endif
 ifdef NO_IPV6
        BASIC_CFLAGS += -DNO_IPV6
 endif
+ifdef NO_UINTMAX_T
+       BASIC_CFLAGS += -Duintmax_t=uint32_t
+endif
 ifdef NO_SOCKADDR_STORAGE
 ifdef NO_IPV6
        BASIC_CFLAGS += -Dsockaddr_storage=sockaddr_in
index 17e9861..7170729 100644 (file)
@@ -41,6 +41,7 @@ NO_C99_FORMAT=@NO_C99_FORMAT@
 NO_STRCASESTR=@NO_STRCASESTR@
 NO_MEMMEM=@NO_MEMMEM@
 NO_STRLCPY=@NO_STRLCPY@
+NO_UINTMAX_T=@NO_UINTMAX_T@
 NO_STRTOUMAX=@NO_STRTOUMAX@
 NO_SETENV=@NO_SETENV@
 NO_UNSETENV=@NO_UNSETENV@
index 27bab00..a0d53f3 100644 (file)
@@ -436,6 +436,14 @@ AC_CHECK_FUNC(strlcpy,
 [NO_STRLCPY=YesPlease])
 AC_SUBST(NO_STRLCPY)
 #
+# Define NO_UINTMAX_T if your platform does not have uintmax_t
+AC_CHECK_TYPE(uintmax_t,
+[NO_UINTMAX_T=],
+[NO_UINTMAX_T=YesPlease],[
+#include <inttypes.h>
+])
+AC_SUBST(NO_UINTMAX_T)
+#
 # Define NO_STRTOUMAX if you don't have strtoumax in the C library.
 AC_CHECK_FUNC(strtoumax,
 [NO_STRTOUMAX=],