public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Joseph Myers <joseph@codesourcery.com>
To: Rical Jasan <ricaljasan@pacific.net>
Cc: <libc-alpha@sourceware.org>,
	Michael Kerrisk <mtk.manpages@gmail.com>,
	Carlos O'Donell <carlos@redhat.com>
Subject: Re: [PATCH 3/3] manual: Add new header and standards annotations.
Date: Wed, 30 Nov 2016 12:38:00 -0000	[thread overview]
Message-ID: <alpine.DEB.2.20.1611301221190.3647@digraph.polyomino.org.uk> (raw)
In-Reply-To: <951c0013-8227-46c3-6d05-678bca61f2ce@pacific.net>

On Wed, 30 Nov 2016, Rical Jasan wrote:

> I don't think I'm completely following this.  Is this a redundant test,
> then:
> 
> ./math/bits/math-finite.h:#if defined __USE_MISC && defined __USE_ISOC99

Formally it's redundant.  The use of __USE_ISOC99 there is to mirror the 
conditions under which bits/mathcalls.h is included to declare float and 
long double functions at all (see my comments in commit 
3bfee8beb8caa939020d942dfa405a3d98975749).  Arguably bits/math-finite.h 
should be merged into bits/mathcalls.h (i.e. have a way for the macros 
there to map to the __*_finite functions when appropriate), though that's 
complicated by the separate ia64 version of bits/math-finite.h.

> My practical question is, if MISC is nonstandard, what would we document
> in @standards?  Just MISC?  I see it replaces deprecated feature test

My suggestion was DEFAULT.

> macros _BSD_SOURCE and _SVID_SOURCE (or rather _DEFAULT_SOURCE does,
> which is the only thing that sets __USE_MISC).  Would we not want to
> document that something came from BSD, for example?  (Also see comment
> below about handling deprecation.)

I'd say any such historical information about sources of functions should 
go in free text.  Likewise if we say anything about a function that was 
BSD or SVID or GNU before it was adopted by POSIX, @standards would only 
mention (the relevant version of) POSIX, but free text could say more 
about the history.

> What do you think about handling the common, "This function is a GNU
> extension.", throughout the descriptions?  Would you remove those in
> lieu of "Standards: GNU (...)"?  It's one of the few consistent and
> widespread phrases throughout the manual.

Yes, I think free text describing standards could be removed when it 
doesn't give any more information than the @standards text.  Likewise free 
text saying what header has a declaration.

> Also, what about deprecation?  I saw the exceptional case of gets
> mentioned recently.  There are quite a few BSD things the manual warns
> about being deprecated.  Maybe anything that can't be coloured properly
> in @standards just deserves a nice paragraph somewhere in the description.

Indeed, something not handled by @standards needs free text.

Eventually it would be good for all of the conform/ data, the header 
contents and the standards annotations to be cross-checked against each 
other by the glibc testsuite.  (conform/ and headers are already checked 
against each other.  conform/ should correspond closely to the manual for 
standards properly handled in both, if everything including structure 
elements gets annotations in the manual.  Correspondence between the 
headers and the manual is necessarily weaker, because of symbols exposed 
by headers where the standards permit but don't require this and we don't 
want to define it to be a stable API for those headers, but checking such 
a correspondence is still useful and can cover more standards than 
conform/, including DEFAULT and GNU.)  That includes automatically finding 
undocumented interfaces, for which bugs should then be filed if not 
already open (we have extremely out-of-date scripts/documented.sh for 
listing undocumented functions as well).

When you're checking that the sets of implemented and documented 
interfaces match, you get into needing to document that an interface is 
only available in certain configurations of glibc (e.g. Linux-specific 
interfaces).  Thus I can see us eventually wanting macros (whether or not 
variants of @standards) that will insert text indicating how an interface 
is system-specific, for use by such checks to avoid complaining that an 
interface is documented that doesn't actually exist.

-- 
Joseph S. Myers
joseph@codesourcery.com

  parent reply	other threads:[~2016-11-30 12:38 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-23  6:38 [PATCH 0/3] manual: Header & Standards Cleanup Rical Jasan
2016-11-23  6:38 ` [PATCH 3/3] manual: Add new header and standards annotations Rical Jasan
2016-11-23 17:42   ` Joseph Myers
2016-11-24 10:22     ` Rical Jasan
2016-11-24 13:37       ` Joseph Myers
2016-11-25  5:59         ` Rical Jasan
2016-11-25 14:53           ` Joseph Myers
2016-11-25 15:09             ` Joseph Myers
2016-11-30 10:39             ` Rical Jasan
2016-11-30 10:45               ` Florian Weimer
2016-11-30 12:50                 ` Joseph Myers
2016-12-02 11:54                   ` Rical Jasan
2016-12-02 13:56                     ` Joseph Myers
2016-12-05  7:59                       ` Rical Jasan
2016-11-30 12:38               ` Joseph Myers [this message]
2016-12-05  5:33         ` Rical Jasan
2016-12-05 18:22           ` Joseph Myers
2016-12-06 10:57         ` Rical Jasan
2016-12-06 15:59           ` Joseph Myers
2016-12-06 16:36           ` Zack Weinberg
2016-11-25  7:36     ` Rical Jasan
2016-11-25 16:17       ` Joseph Myers
2016-11-30 10:46         ` Rical Jasan
2016-11-30 12:52           ` Joseph Myers
2016-11-23  6:38 ` [PATCH 1/3] manual: Refactor " Rical Jasan
2016-11-23 17:31   ` Joseph Myers
2016-11-24  9:34     ` Rical Jasan
2016-11-24 13:17       ` Joseph Myers
2016-11-25  3:44         ` Rical Jasan
2016-11-25 14:25           ` Joseph Myers
2016-11-30  8:58             ` Rical Jasan
2016-11-23  6:38 ` [PATCH 2/3] manual: Convert @tables of variables to @vtables Rical Jasan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.20.1611301221190.3647@digraph.polyomino.org.uk \
    --to=joseph@codesourcery.com \
    --cc=carlos@redhat.com \
    --cc=libc-alpha@sourceware.org \
    --cc=mtk.manpages@gmail.com \
    --cc=ricaljasan@pacific.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).