This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PING] [PATCH v2] manual: Document missing feature test macros.
- From: Rical Jasan <ricaljasan at pacific dot net>
- To: Joseph Myers <joseph at codesourcery dot com>
- Cc: libc-alpha <libc-alpha at sourceware dot org>, Michael Kerrisk <mtk dot manpages at gmail dot com>, Zack Weinberg <zackw at panix dot com>, Carlos O'Donell <carlos at redhat dot com>
- Date: Thu, 10 Aug 2017 21:36:11 -0700
- Subject: Re: [PING] [PATCH v2] manual: Document missing feature test macros.
- Authentication-results: sourceware.org; auth=none
- References: <20170728034305.13389-1-ricaljasan@pacific.net> <98c619b4-7058-d281-1020-8455a806307d@pacific.net> <alpine.DEB.2.20.1708102220320.8101@digraph.polyomino.org.uk>
On 08/10/2017 03:26 PM, Joseph Myers wrote:
> OK, but suggested followups:
>
> * In the description of _DEFAULT_SOURCE, note that features from the C
> standard version used by the compiler are also enabled by default. (With
> GCC 5 and later, which defaults to -std=gnu11, that means C11 features are
> enabled, but unlike C99 they aren't part of the 2008 edition of POSIX, so
> aren't already included in the description of default features.)
How would you like that said? That whole paragraph refers to /either/
feature test macros /or/ compiler options, and uses examples of the
latter, so I already read it as implying if you use a specific compiler
option such as -std=gnu11, you get what it entails, along with anything
that is "default":
"defining it together with other feature test macros, or when options
such as @option{-ansi} are used, enables those features even when the
other options would otherwise cause them to be disabled."
Documenting the compiler's defaults is probably out of scope.
> * Remove the statement about C99 not being widely adopted from the
> description of _ISOC99_SOURCE. By now, C99 is widely adopted (in the Unix
> world; I'm not sure about the state of Microsoft's compiler in that
> regard, they've historically been better at keeping up with C++ than with
> C).
How is this:
"@Theglibc{} has a complete implementation of the @w{ISO C99} standard,
and to enable its features, the macro @code{_ISOC99_SOURCE} should be
defined."
> * Consider obsoleting _ATFILE_SOURCE and making it into an alias for
> _POSIX_C_SOURCE = 200809L if _POSIX_C_SOURCE is undefined or has a lower
> value (similar to the _REENTRANT obsoletion); I don't think we really need
> a separate feature test macro for this subset of POSIX features.
As this requires more extensive changes throughout, I'll do this
separately, but I think the other issues can be incorporated in a v3.
Rical