git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Add support for uintmax_t type on FreeBSD 4.9
@ 2008-10-26 11:52 David M. Syzdek
  2008-10-27  5:30 ` Junio C Hamano
  0 siblings, 1 reply; 6+ messages in thread
From: David M. Syzdek @ 2008-10-26 11:52 UTC (permalink / raw)
  To: git; +Cc: David M. Syzdek

This adds NO_UINTMAX_T for ancient systems. If NO_UINTMAX_T is defined, then
uintmax_t is defined as uint32_t. This adds a test to configure.ac for
uintmax_t and adds a check to the Makefile for FreeBSD 4.9-SECURITY.

Signed-off-by: David M. Syzdek <david.syzdek@acsalaska.net>
---
 Makefile      |    3 +++
 config.mak.in |    1 +
 configure.ac  |    8 ++++++++
 3 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/Makefile b/Makefile
index 0d40f0e..bf6a6dc 100644
--- a/Makefile
+++ b/Makefile
@@ -931,6 +931,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
diff --git a/config.mak.in b/config.mak.in
index b776149..c6558eb 100644
--- a/config.mak.in
+++ b/config.mak.in
@@ -39,6 +39,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@
diff --git a/configure.ac b/configure.ac
index d3b8bc3..d9de93f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -415,6 +415,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,[
  AC_SEARCH_LIBS(strtoumax,,
-- 
1.6.0.2.GIT

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-10-28  4:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-26 11:52 [PATCH] Add support for uintmax_t type on FreeBSD 4.9 David M. Syzdek
2008-10-27  5:30 ` Junio C Hamano
     [not found]   ` <9a0027270810262239r311074m51d382bdd95fd0dc@mail.gmail.com>
2008-10-27  5:46     ` David Syzdek
2008-10-27  6:17       ` Junio C Hamano
2008-10-27 13:23         ` David Syzdek
2008-10-28  4:14           ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).