Re: [PATCH 1/6] reftable/system: provide `REFTABLE_INLINE()` macro
- From
René Scharfe <l.s.r@web.de>
- Date
- Mar 31, 2026, 22:15 UTC
- Message-ID
- <b19785af-c8cf-4fdd-a44f-d4e8a0f754d5@web.de>
- In-Reply-To
- <xmqqpl4jy9p0.fsf@gitster.g>
On 3/31/26 11:23 PM, Junio C Hamano wrote:
Show 18 quoted lines
> René Scharfe <l.s.r@web.de> writes: > >> On 3/31/26 1:26 PM, Patrick Steinhardt wrote: >>> Not every compiler knows about the `inline` annotation for functions. >>> Consequently, Git knows to define `inline` as an empty macro in case >>> it's not available. >> >> Does it? Only in compat/regex/regex_internal.h, which does not leak >> to other code, no? > > As we also do > > ifneq (,$(INLINE)) > BASIC_CFLAGS += -Dinline=$(INLINE) > endif > > in the Makefile so we cannot tell what people do with their > config.mak ;-).
Ah, missed that.
So setting INLINE to an empty string does nothing. We do that for an ancient versions of HP-UX in config.mak.uname.
When I set it to '', like we do in config.mak.uname for an ancient version of AIX, I get lots of warnings about unused functions and linking errors due to duplicate symbols. I can only hope that the pre-C99 compilers targeted by this measure can better deal with that issue somehow.
> And obviously other projects do not share our Makefile, so it is not > too much of stretch to say Git "knows to define", even though it may > be more precise to say "knows to let users redefine", perhaps?
Fair enough.
René