[PATCH] Remove unnecessary non-standard & unportable inclusions.

Nick Alcock nick.alcock@oracle.com
Tue Nov 5 00:30:12 GMT 2024


On 4 Nov 2024, Jan Beulich spake thusly:

> On 04.11.2024 12:53, Jonas 'Sortie' Termansen wrote:
>> Thanks for the quick review Jan :)
>> 
>> On 11/4/24 09:01, Jan Beulich wrote:
>>> The question with such #include-s is virtually always: Are they there to
>>> work around issues on certain platforms (a detail which would imo be
>>> relevant to put in the patch description)? In the case here the line was
>>> present from the introduction of the helper tool, so that's hard to
>>> answer (may want to ask the author though, as it hasn't been _that_ long
>>> ago that the tool was introduced). On that basis I'd be okay to approve
>>> that change alone, while ...

I suspect I simply copied them in from a manpage :)

>> I'd say it's safe to remove. If not, we're dealing with a platform that
>> doesn't define memset in <string.h> and everything else would break.
>
> Right, hence why I said "On that basis I'd be okay to approve that change
> alone". Implying that you would go and split the patch.

Agreed.

>>>> <sys/param.h> is not needed and not standardized and contains a kitchen
>>>> sink of various unportable definitions not agreed upon and best done
>>>> manually or through other headers.
>>>
>>> ... I guess we will want Nick's input here, whom you didn't even Cc.
>> 
>> Who's Nick? Oh the author of the file.
>
> More precisely (for the context here) the maintainer of libctf, who you
> should Cc when sending patches.

I'd say, if this passes the trybots (which run tests on a whole bunch of
systems), it can go in. If it turns out to break on some of the even
more obscure systems I do local tests on, I can put whatever includes
are necessary back again. (mingw is the one that usually causes pain
here. I just tested this patch on mingw64 and cygwin and it looks fine.)

-- 
NULL && (void)


More information about the Binutils mailing list