From: Corinna Vinschen <vinschen@redhat.com>
To: newlib@sourceware.org
Subject: Re: APIs in New POSIX Edition
Date: Thu, 8 Apr 2021 14:07:22 +0200 [thread overview]
Message-ID: <YG7x+m6sd/tXHYpm@calimero.vinschen.de> (raw)
In-Reply-To: <YG7vaDU5V/4lJl84@calimero.vinschen.de>
On Apr 8 13:56, Corinna Vinschen wrote:
> On Apr 8 13:49, Corinna Vinschen wrote:
> > On Apr 8 06:38, Joel Sherrill wrote:
> > > What feature guard should these be behind? Will it change for the ones
> > > already in place?
> >
> > There will be a matching POSIX.1-2021 or so, given by date/month,
> > with guards along the lines of _POSIX_C_SOURCE >= 202107L.
> >
> > APIS we already have should keep their current guard or'ed with
> > the above _POSIX_C_SOURCE test.
> >
> > APIs we already have but have no guard should get _DEFAULT_SOURCE
> > or'ed with the above _POSIX_C_SOURCE test.
>
> There are also APIs which already exist per an older POSIX version,
> but which are not guarded. I. e., the sem_xxx functions manipulating
> POSIX semaphores. Those don't need aguard, because they have been
> introduced in conjunction with their own header, i. e., semaphore.h.
>
> In these cases, the already existing ones still don't need a guard,
> just APIs added to the header will get the new _POSIX_C_SOURCE test.
>
> I think...
s/_POSIX_C_SOURCE/__POSIX_VISIBLE/
and _DEFAULT_SOURCE is probably not required at all, given it's
just current POSIX anyway. We just have to tweka the definition
of _DEFAULT_SOURCE to include the latest POSIX.
Another one: APIs from this draft already in GlibC and newlib are
guarded with __GNU_VISIBLE in newlib (e. g. memmem). We have to change
__GNU_VISIBLE to imply the new _POSIX_C_SOURCE setting anyway, so these
symbols can be simply guarded with the new __POSIX_VISIBLE guard.
I'm sure I still forgot some situation...
Corinna
next prev parent reply other threads:[~2021-04-08 12:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-07 23:26 Joel Sherrill
2021-04-08 11:18 ` Corinna Vinschen
2021-04-08 11:38 ` Joel Sherrill
2021-04-08 11:49 ` Corinna Vinschen
2021-04-08 11:56 ` Corinna Vinschen
2021-04-08 12:07 ` Corinna Vinschen [this message]
2021-04-09 17:55 ` Yaakov Selkowitz
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=YG7x+m6sd/tXHYpm@calimero.vinschen.de \
--to=vinschen@redhat.com \
--cc=newlib@sourceware.org \
/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).