[klibc] ISO C99 inline, again

H. Peter Anvin hpa at zytor.com
Mon Oct 4 11:05:10 PDT 2010

On 08/29/2010 08:11 AM, Thorsten Glaser wrote:
> Hi,
> I just saw this wasn’t merged for 1.5.20 (at least the stdio.h
> part, which I submitted somewhere earlier).
> I did a grep for "extern.*inline" and touched all functions,
> but this should be tested first (the klibc/compiler.h and
> ctype.h ones, at least), as I was not 100% clear on which
> behaviour exactly was *intended* in the first place.
> The general idea is:
> if __GNUC_STDC_INLINE__ use “static inline” else “extern inline”,
> and add __attribute__((__always_inline__)) if the compiler is new
> enough – which means to inline and not add a function version of
> the code.

klibc is written in the same style as the Linux kernel, which is
currently GNU style for inlining; I am not going to support more than
one style for reasons of maintainability.

Furthermore, your patch actually *removes* a fix by which we enforce
GNU-style even if it is not the default, so it's in fact doubly wrong.


More information about the klibc mailing list