summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorGary V. Vaughan <git@mlists.thewrittenword.com>2010-05-14 09:31:43 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-06-01 00:36:27 (GMT)
commitf9f33cdc78b5893a4764b1437b59536f399a50d1 (patch)
treecd509cc43dcd284861f820c62ffa6395d9aaa2e6 /Makefile
parente88a135bc55a974ea04576ccc014c5e2bdc4b892 (diff)
downloadgit-f9f33cdc78b5893a4764b1437b59536f399a50d1.zip
git-f9f33cdc78b5893a4764b1437b59536f399a50d1.tar.gz
git-f9f33cdc78b5893a4764b1437b59536f399a50d1.tar.bz2
Allow disabling "inline"
Compiler support for inline is sometimes buggy, and occasionally missing entirely. This patch adds a test for inline support, and redefines the keyword with the preprocessor if necessary at compile time. Signed-off-by: Gary V. Vaughan <gary@thewrittenword.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 7 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index f3717f1..7f62996 100644
--- a/Makefile
+++ b/Makefile
@@ -11,6 +11,9 @@ all::
# Define SOCKLEN_T to a suitable type (such as 'size_t') if your
# system headers do not define a socklen_t type.
#
+# Define INLINE to a suitable substitute (such as '__inline' or '') if git
+# fails to compile with errors about undefined inline functions or similar.
+#
# Define SNPRINTF_RETURNS_BOGUS if your are on a system which snprintf()
# or vsnprintf() return -1 instead of number of characters which would
# have been written to the final string if enough space had been available.
@@ -1090,6 +1093,10 @@ else
BROKEN_PATH_FIX = '/^\# @@BROKEN_PATH_FIX@@$$/d'
endif
+ifneq (,$(INLINE))
+ BASIC_CFLAGS += -Dinline=$(INLINE)
+endif
+
ifneq (,$(SOCKLEN_T))
BASIC_CFLAGS += -Dsocklen_t=$(SOCKLEN_T)
endif