From: Jonathan Callen <abcd@gentoo.org>
To: git@vger.kernel.org
Cc: mduft@gentoo.org, jrnieder@gmail.com, Jonathan Callen <abcd@gentoo.org>
Subject: [PATCH 2/3] Support building without inttypes.h
Date: Thu, 27 May 2010 04:19:43 -0400 [thread overview]
Message-ID: <1274948384-167-3-git-send-email-abcd@gentoo.org> (raw)
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 <abcd@gentoo.org>
---
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 <arpa/inet.h>
#include <netdb.h>
#include <pwd.h>
+#ifdef NO_INTTYPES_H
+#include <stdint.h>
+#else
#include <inttypes.h>
+#endif
#if defined(__CYGWIN__)
#undef _XOPEN_SOURCE
#include <grp.h>
--
1.7.1
next prev parent reply other threads:[~2010-05-27 8:20 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-27 8:19 [PATCH 0/3] Interix support Jonathan Callen
2010-05-27 8:19 ` [PATCH 1/3] Support building on systems without poll(2) Jonathan Callen
2010-05-27 8:43 ` Sverre Rabbelier
2010-05-27 13:02 ` Jeff King
2010-05-27 8:51 ` Michael J Gruber
2010-05-27 9:13 ` Jonathan Callen
2010-05-27 10:10 ` [PATCH] compat: Add another rudimentary poll() emulation Jonathan Nieder
2010-05-27 11:00 ` Erik Faye-Lund
2010-05-27 11:39 ` Marko Kreen
2010-05-27 12:00 ` Erik Faye-Lund
2010-05-27 12:36 ` Marko Kreen
2010-05-27 12:57 ` Erik Faye-Lund
2010-05-27 13:43 ` [msysGit] " Albert Dvornik
2010-05-30 7:44 ` Paolo Bonzini
2010-05-27 13:06 ` Erik Faye-Lund
2010-05-27 13:29 ` Marko Kreen
2010-05-27 13:46 ` Erik Faye-Lund
2010-05-27 13:58 ` Marko Kreen
2010-05-27 14:06 ` Erik Faye-Lund
2010-05-27 14:11 ` Marko Kreen
2010-05-27 14:15 ` Erik Faye-Lund
2010-05-27 14:32 ` Marko Kreen
2010-05-27 14:44 ` Erik Faye-Lund
2010-05-27 15:17 ` Peter Kjellerstedt
2010-05-27 14:14 ` [msysGit] " Albert Dvornik
2010-05-27 14:05 ` Albert Dvornik
2010-05-30 0:37 ` [PATCH v2] " Jonathan Nieder
2010-05-30 19:19 ` Johannes Sixt
2010-05-30 20:40 ` Jonathan Nieder
2010-05-30 22:39 ` Joshua Juran
2010-05-31 3:19 ` Mac OS 9 (Lamp) port Jonathan Nieder
2010-05-31 4:35 ` Joshua Juran
2010-05-31 5:49 ` Jonathan Nieder
2010-05-31 12:12 ` [PATCH v2] compat: Add another rudimentary poll() emulation Albert Dvornik
2010-05-31 12:46 ` Jonathan Nieder
2010-05-31 13:10 ` Albert Dvornik
2010-05-27 8:19 ` Jonathan Callen [this message]
2010-05-27 8:19 ` [PATCH 3/3] Add Interix support Jonathan Callen
2010-05-28 2:11 ` [PATCH 0/3] " Jakub Narebski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1274948384-167-3-git-send-email-abcd@gentoo.org \
--to=abcd@gentoo.org \
--cc=git@vger.kernel.org \
--cc=jrnieder@gmail.com \
--cc=mduft@gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).