diff options
author | Gary V. Vaughan <git@mlists.thewrittenword.com> | 2010-05-14 09:31:43 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-05-31 17:36:27 -0700 |
commit | f9f33cdc78b5893a4764b1437b59536f399a50d1 (patch) | |
tree | cd509cc43dcd284861f820c62ffa6395d9aaa2e6 /Makefile | |
parent | e88a135bc55a974ea04576ccc014c5e2bdc4b892 (diff) | |
download | git-f9f33cdc78b5893a4764b1437b59536f399a50d1.tar.gz |
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-- | Makefile | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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 |