From: Jonathan Callen Date: Thu, 27 May 2010 08:19:43 GMT Subject: [PATCH 2/3] Support building without inttypes.h Message-ID: <1274948384-167-3-git-send-email-abcd@gentoo.org> In-Reply-To: <1274948384-167-1-git-send-email-abcd@gentoo.org> Some systems, such as Interix, do not have a inttypes.h header. Attempt to use stdint.h instead. Signed-off-by: Jonathan Callen --- Makefile | 6 ++++++ git-compat-util.h | 4 ++++ 2 files changed, 10 insertions(+), 0 deletions(-) diff --git a/Makefile b/Makefile index 4b36534..1722bf0 100644 --- a/Makefile +++ b/Makefile @@ -70,6 +70,8 @@ all:: # # Define NO_SYS_SELECT_H if you don't have sys/select.h. # +# Define NO_INTTYPES_H if you don't have inttypes.h. +# # Define NO_SYMLINK_HEAD if you never want .git/HEAD to be a symbolic link. # Enable it on Windows. By default, symrefs are still used. # @@ -1333,6 +1335,10 @@ ifdef NO_POLL BASIC_CFLAGS += -DNO_POLL endif +ifdef NO_INTTYPES_H + BASIC_CFLAGS += -DNO_INTTYPES_H +endif + ifdef NO_DEFLATE_BOUND BASIC_CFLAGS += -DNO_DEFLATE_BOUND endif diff --git a/git-compat-util.h b/git-compat-util.h index c5188e5..6f2aaca 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -108,7 +108,11 @@ #include #include #include +#ifdef NO_INTTYPES_H +#include +#else #include +#endif #if defined(__CYGWIN__) #undef _XOPEN_SOURCE #include -- 1.7.1