[TUHS] Project Idea: The UNIX Programmer's Manual: Heritage Edition

Theodore Ts'o tytso at mit.edu
Thu Sep 21 23:37:00 AEST 2023


On Wed, Sep 20, 2023 at 12:56:35PM -0700, Larry McVoy wrote:
> On Tue, Sep 19, 2023 at 07:25:13PM -0700, Adam Thornton wrote:
> > Yeah, I'm less angry at GNU now--I didn't search as hard, but when I found
> > out 4.3BSD didn't have HISTORY (and neither does 2.11BSD, which is still
> > actively-ish maintained) then I figured it wasn't something classical that
> > GNU dropped, just never imported.  I feel like it existed on SunOS and
> > Solaris but I might be wrong about that?  Was it really FreeBSD that
> > introduced it?
> 
> I don't think SunOS had it.  The SunOS man pages were pretty terse, the
> powers that be wanted just the facts.  I remember get beat up for putting
> examples in some of the man pages I wrote, they got taken out "because
> examples are for user guides, man pages are not user guides, they are a
> reference guide" or something like that.

These days, I find the much more useful sections are VERSIONS and
STANDARDS, e.g.:

VERSIONS
	openat() was added in Linux 2.6.16; library support was added
       in glibc 2.4.

STANDARDS
       open(), creat() SVr4, 4.3BSD, POSIX.1‐2001, POSIX.1‐2008.

       openat(): POSIX.1‐2008.

       openat2(2) is Linux‐specific.

       The O_DIRECT, O_NOATIME, O_PATH, and O_TMPFILE flags are
       Linux‐specific.  One must define _GNU_SOURCE to obtain their
       definitions.

       The O_CLOEXEC, O_DIRECTORY, and O_NOFOLLOW flags are not
       specified in POSIX.1‐2001, but are specified in POSIX.1‐2008.
       Since glibc 2.12, one can obtain their definitions by defining
       either _POSIX_C_SOURCE with a value greater than or equal to
       200809L or _XOPEN_SOURCE with a value greater than or equal to
       700.  In glibc 2.11 and earlier, one obtains the definitions by
       defining _GNU_SOURCE.

       As noted in feature_test_macros(7), feature test macros such as
       _POSIX_C_SOURCE, _XOPEN_SOURCE, and _GNU_SOURCE must be defined
       before including any header files.

						- Ted


More information about the TUHS mailing list