This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 3/3] manual: Add new header and standards annotations.
- From: Rical Jasan <ricaljasan at pacific dot net>
- To: Joseph Myers <joseph at codesourcery dot com>
- Cc: libc-alpha at sourceware dot org, Michael Kerrisk <mtk dot manpages at gmail dot com>, "Carlos O'Donell" <carlos at redhat dot com>
- Date: Tue, 6 Dec 2016 02:57:06 -0800
- Subject: Re: [PATCH 3/3] manual: Add new header and standards annotations.
- Authentication-results: sourceware.org; auth=none
- References: <20161123063807.14845-1-ricaljasan@pacific.net> <20161123063807.14845-4-ricaljasan@pacific.net> <alpine.DEB.2.20.1611231733010.31292@digraph.polyomino.org.uk> <64fa1a5a-4af3-5e3f-b192-e79203c3e328@pacific.net> <alpine.DEB.2.20.1611241318060.2194@digraph.polyomino.org.uk>
On 11/24/2016 05:37 AM, Joseph Myers wrote:
> As for names corresponding to standards / feature test macros, I suggest
> one possibility:
>
> C90 (everything is a superset of this apart from gets obsoletion)
> C95
> C99
> C11
> (note that these four are normally selected with -std, not with feature
> test macros, though glibc has _ISOC99_SOURCE and _ISOC11_SOURCE)
> TR 27431-2:2010
> TS 18661-1:2014
> TS 18661-4:2015
> POSIX.1 (= 1990 edition)
> POSIX.2
> POSIX.1-1993
> POSIX.1-1995
> POSIX.1-2001
> XSI POSIX.1-2001
> POSIX.1-2008
> XSI POSIX.1-2008
> DEFAULT
> GNU
> XOPEN (= __USE_XOPEN; listed as XPG3 in conform/ tests; corresponds to
> functions in C435 that are not UX-shaded)
> XPG4 (= __USE_XOPEN_EXTENDED; corresponds to everything in C435)
> UNIX98
> LFS (= __USE_LARGEFILE64, i.e. *64 functions)
As food for thought, since nobody has suggested alternatives yet, and
I've been examining all the variations in current use, what about:
BSD
4.3BSD
4.4BSD
GNU
ISO C90
ISO C95
ISO C99
ISO C11
ISO/IEC TR 27431-2:2010
ISO/IEC TS 18661-1:2014
ISO/IEC TS 18661-4:2015
LFS
Linux
POSIX.1-1990
POSIX.1-1993
POSIX.1-1995
POSIX.1-2001
POSIX.1-2008
POSIX.2-1992
Sun
SVID
UNIX 98
XPG
XPG2
XPG3
XPG4
XPG4.2
XSI POSIX.1-2001
XSI POSIX.1-2008
Ideally, unversioned names would be replaced by ones with versions.
The major differences are the use of XPG instead of XOPEN, which makes
it consistent with the versioned uses; adding versions to POSIX.[12],
since they look like less-specific catchalls otherwise; including the
standards body for the ISO standards (though that's mainly for the C*
standards, and aesthetic); and keeping the BSD and SVID standards,
because I hate to see information lost, when we already have it. The
BSD/SVID standards could reference _DEFAULT_SOURCE, where the
description would state it encompasses BSD, SVID, MISC, etc.
I see the Unix standard typically formatted with a space, and capitalized.
Sun is a lame attempt; there are all of Sun, SunOS, and SUNRPC in
current use. Suggestions welcome.
There is also "IPv6 Basic API", which should probably be an RFC or
something.
POSIX.1g is also used.
I imagine whatever we finally settle on to be accompanied by changes to
the Introduction, where we can list in more detail the variety of names
given standards are referred to by, and which the "canonical" standard
will reference. I've been making a list of all the equivalent names one
tends to see. We can use simpler names in the standards annotations,
but it would be nice in the Standards and Portability section to be able
to refer unambiguously to a specific document.
Playing another part in how this eventually all ties together are the
references in the standards annotations: would we refer back to Feature
Test Macros, or the given section describing the standard in Standards
and Portability?
Rical