tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: [PATCH] Add posix_spawn_file_actions_addclosefrom_np
On Jun 30, 2026, at 4:15 AM, Greg Troxel <gdt%lexort.com@localhost> wrote:
> Visibility defines are tricky business.
Indeed, a business I’m quite familiar with.
(My bona fides: I spent a good chunk of my career working on Xcode at Apple, so I’m familiar with the needs of backwards and forwards binary compatibility and how to introduce and deprecate API across a range of OS versions. One of the things I did was enable Xcode to build like other Mac applications, such that it could run on multiple versions of macOS, and take advantage of new APIs only when running on the versions that had them. And I also explained a lot of how all this worked to other internal and third party developers.)
> Chris: If you build a test program with no visibility defines that uses
> this API, does it build?
I think based on Taylor’s reply this isn’t necessary and that guarding the non-POSIX API with _NETBSD_SOURCE is the right thing since the “natural” build environment on NetBSD, with on other visibility defines, will set it.
It’s disappointing that some other platforms play more fast and loose with these definitions, it’s not very in the spirit of SUS or X/Open or POSIX to do so, but I don’t think NetBSD should let that really drive its choices. What NetBSD is doing is fine and works, and if someone is going to set one of the X/Open or POSIX or SUS defines they should really know what they’re getting themselves into and why.
-- Chris
Home |
Main Index |
Thread Index |
Old Index