|
Message-ID: <20230503144346.GX4163@brightrain.aerifal.cx> Date: Wed, 3 May 2023 10:43:46 -0400 From: Rich Felker <dalias@...c.org> To: Jₑₙₛ Gustedt <jens.gustedt@...ia.fr> Cc: musl@...ts.openwall.com Subject: Re: patches for C23 On Wed, May 03, 2023 at 04:26:49PM +0200, Jₑₙₛ Gustedt wrote: > Rich, > > on Wed, 3 May 2023 10:06:20 -0400 you (Rich Felker <dalias@...c.org>) > wrote: > > > I'd rather just fix it in one place (the implementation-internal > > header) so we don't have to worry about it. > > I still don't understand which header that is supposed to be. See src/include/*.h. These headers so far mostly just declare additional __-prefixed versions of interfaces where needed, but some of them do additional things. For example, src/include/stdio.h does some additional things: - suppresses the complete definition of FILE, which conflicts with libc-internal use where we have a real structure not a gratuitous fake type for pre-c11 (and POSIX) conformance reasons. - replaces the stdin/out/err macros with ones that resolve directly to address-of the internal objects rather than pointer objects subject to copy relocations -- this makes internal codegen a lot more efficient for functions which implicitly use stdin/out. Some other things I eventually intend to do in src/include/*: - making memcpy expand to __builtin_memcpy if available, and similar for other string functions with builtins; the few places where that could be problem would need to #undef them. - making calls to some functions where the interposable call overhead is likely significant expand to direct calls to hidden aliases. - etc. Undefining macro definitions that are unsuitable for some reason to the implementation-internal code in libc is another perfectly good use for these. Rich
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.