NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: lib/58674: HEAD fails to build tools on recent Linux (Fedora 40)



On Tue, 2024-09-17 at 13:55 +0000, Robert Elz via gnats wrote:
> The following reply was made to PR lib/58674; it has been noted by
> GNATS.
> 
> From: Robert Elz <kre%munnari.OZ.AU@localhost>
> To: gnats-bugs%netbsd.org@localhost
> Cc: 
> Subject: Re: lib/58674: HEAD fails to build tools on recent Linux
> (Fedora 40)
> Date: Tue, 17 Sep 2024 20:52:16 +0700
> 
>      Date:        Tue, 17 Sep 2024 00:20:00 +0000 (UTC)
>      From:        david%gutteridge.ca@localhost
>      Message-ID:  <20240917002000.AD1831A9244%mollari.NetBSD.org@localhost>
>  
>    | So, on NetBSD the idea is those various defines are required
>    | universally, but on Linux "the program ... should do that". Which
> is it?
>  
>  Strictly, all programs should say what standard(s) they are being
>  written for, and so which the compiler should apply.
>  
>  However, for normal NetBSD applications we simply set
> __NetBSD_SOURCE__
>  and allow everything conceivable to be visible (and so used), and
> then
>  make sure the code doesn't use anything that exposes in incompatible
> ways.
>  
>  The #ifdef __NetBSD__ section you showed is attempting to undo that
> for
>  tools builds, so we can (hopefully) catch things in the tools build
> before
>  they get to foreign systems ... but our headers aren't all perfect in
>  what they actually expose, when __NetBSD_SOURCE__ isn't defined.

I see, so it's like there are two layers to this. We're trying to avoid
NetBSD-specific features, but XOPEN_SOURCE is one of the things then
set, so if those are indeed correct, we still won't catch everything
unexpected on other platforms.

Dave



Home | Main Index | Thread Index | Old Index