Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 3 Sep 2022 10:19:12 -0600
From:      Alan Somers <asomers@freebsd.org>
To:        FreeBSD CURRENT <freebsd-current@freebsd.org>
Subject:   Header symbols that shouldn't be visible to ports?
Message-ID:  <CAOtMX2h_=6AXYDSZNF77qQH9fF1gsJKuDP%2BM3dD%2Bq6Xw97bHmg@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOtMX2h_=6AXYDSZNF77qQH9fF1gsJKuDP%2BM3dD%2Bq6Xw97bHmg>