Header symbols that shouldn't be visible to ports?
Date: Sat, 03 Sep 2022 16:19:12 UTC
Our /usr/include headers define a lot of symbols that are used by critical utilities in the base system like ps and ifconfig, but aren't stable across major releases. Since they aren't stable, utilities built for older releases won't run correctly on newer ones. Would it make sense to guard these symbols so they can't be used by programs in the ports tree? There is some precedent for that, for example _WANT_SOCKET and _WANT_MNTOPTNAMES. I'm particular, I'm thinking about symbols like the following: MINCORE_SUPER TDF_* PRI_MAX* PRI_MIN* PI_*, PRIBIO, PVFS, etc IFCAP_* RLIM_NLIMITS IFF_* *_MAXID Clearly delineating private symbols like this would ease the maintenance burden on languages that rely on FFI, like Ruby and Rust. FFI basically assumes that symbols once defined will never change. -Alan