@matheusbsbs / matheus-bagliano / commits / 0bc3e781de
Fork 0

Build: add NO_UINTMAX_T to support ancient systems

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>

David M. Syzdek committed Oct 26, 2008 at 03:52 UTC 0bc3e781deb543ac2042cbd862c035403404c93d
3 files changed +12
Makefile
+3
@@ -955,6 +955,9 @@ endif
955 ifdef NO_IPV6
956 BASIC_CFLAGS += -DNO_IPV6
957 endif
958 +ifdef NO_UINTMAX_T
959 + BASIC_CFLAGS += -Duintmax_t=uint32_t
960 +endif
961 ifdef NO_SOCKADDR_STORAGE
962 ifdef NO_IPV6
963 BASIC_CFLAGS += -Dsockaddr_storage=sockaddr_in
config.mak.in
+1
@@ -41,6 +41,7 @@ NO_C99_FORMAT=@NO_C99_FORMAT@
41 NO_STRCASESTR=@NO_STRCASESTR@
42 NO_MEMMEM=@NO_MEMMEM@
43 NO_STRLCPY=@NO_STRLCPY@
44 +NO_UINTMAX_T=@NO_UINTMAX_T@
45 NO_STRTOUMAX=@NO_STRTOUMAX@
46 NO_SETENV=@NO_SETENV@
47 NO_UNSETENV=@NO_UNSETENV@
configure.ac
+8
@@ -436,6 +436,14 @@ AC_CHECK_FUNC(strlcpy,
436 [NO_STRLCPY=YesPlease])
437 AC_SUBST(NO_STRLCPY)
438 #
439 +# Define NO_UINTMAX_T if your platform does not have uintmax_t
440 +AC_CHECK_TYPE(uintmax_t,
441 +[NO_UINTMAX_T=],
442 +[NO_UINTMAX_T=YesPlease],[
443 +#include <inttypes.h>
444 +])
445 +AC_SUBST(NO_UINTMAX_T)
446 +#
447 # Define NO_STRTOUMAX if you don't have strtoumax in the C library.
448 AC_CHECK_FUNC(strtoumax,
449 [NO_STRTOUMAX=],