From: Jonathan Wakely <jwakely@redhat.com>
To: "CHIGOT, CLEMENT" <clement.chigot@atos.net>
Cc: Rainer Orth <ro@cebitec.uni-bielefeld.de>,
libstdc++ <libstdc++@gcc.gnu.org>,
David Edelsohn via Gcc-patches <gcc-patches@gcc.gnu.org>,
David Edelsohn <dje.gcc@gmail.com>
Subject: Re: [PATCH] libstdc++: implement locale support for AIX
Date: Fri, 22 Jan 2021 11:12:41 +0000 [thread overview]
Message-ID: <20210122111241.GH541588@redhat.com> (raw)
In-Reply-To: <PA4PR02MB6686A1AE6FA0C0EA009BF81DEAA00@PA4PR02MB6686.eurprd02.prod.outlook.com>
On 22/01/21 09:57 +0000, CHIGOT, CLEMENT via Libstdc++ wrote:
>Hi Rainer
>
>> > 3) POSIX 2017 and non-POSIX functions
>> > Many of the *_l functions being used in GNU or dragonfly models aren't
>> > POSIX 2008, but mainly POSIX 2017 or like strtof_l not POSIX at all.
>> > However, there are really useful in the code, thus I've made a double
>> > implementation based on "#ifdef HAVE_". Is it ok for you ? It's not really
>> > POSIX 2008 but more POSIX 2008 with 2017 compatibility.
>> > For the configure, I didn't find any better way to check each syscall, as
>> > they all depend on different includes. Tell me if you have a better idea.
>>
>> First a general observation: there are two groups of functions you're
>> testing for:
>>
>> * Pure BSD additions, not available in either POSIX.1, ISO C, or glibc:
>>
>> localeconv_l
>> mbstowcs_l
>> strtod_l
>> strtof_l
>> strtold_l
>> wcsftime_l
>>
>> * Part of XPG7:
>>
>> iswctype_l
>> strcoll_l
>> strftime_l
>> strxfrm_l
>> towlower_l
>> towupper_l
>> wcscoll_l
>> wcsxfrm_l
>> wctype_l
>>
>> My suggestion would be not to have configure tests _GLIBCXX_HAVE_<FUNC>
>> for any of the second group at all: this is ieee_1003.1-2008, after all,
>> so if some OS selects that clocale variant, it better implement all of
>> those. If really need be, one could a configure check for those and
>> error out if any is missing. This makes the code way more readable than
>> trying to handle some hypothetical partial implementation.
>
>In this case, it would be better to call it ieee_1003.1-2017 but I agree
>it would be better to avoid all these #ifdef.
Yes, 2017 is the current standard (equivalent to 2008 plus
corrigenda), but we could also use a shorter, easier to remember name,
like posix.1-2017, xpg7, or susv4 (or even accept all four and make
them mean the same thing, though that will probably cause confusion).
>Some are still needed as for example only the last version of AIX have
>strftime_l.
>
>> As for the BSD group, I suggest to have one representative configure
>> test (for localeconv_l perhaps) and then use an appropriate name for the
>> group as a whole. Again, this will most likely be an all-or-nothing
>> thing.
>
>I'm not sure this is really all-or-nothing for these. Maybe strtof_l and cie
>can be grouped by. But the 3 others are really different. Linux have wcsftime_l
>but not the others. AIX avec none. BSD have all.
Glibc has strto{f,d,ld,l,ul,ll,ull}_l too:
See https://sourceware.org/git/?p=glibc.git;a=blob;f=stdlib/stdlib.h;h=6360845d98e6e1c3f42821def14312dc2279d74c;hb=HEAD#l268
next prev parent reply other threads:[~2021-01-22 11:12 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <PA4PR02MB6686075C6C254E583B72BC2AEAAB0@PA4PR02MB6686.eurprd02.prod.outlook.com>
[not found] ` <CAGWvny=XpcWGnyb=MWg5ziYSND7O1AnQ6-NAX811p1b5urH0YA@mail.gmail.com>
2021-01-11 15:35 ` Rainer Orth
2021-01-11 15:40 ` Jonathan Wakely
2021-01-11 15:56 ` CHIGOT, CLEMENT
2021-01-11 22:20 ` David Edelsohn
2021-01-12 15:14 ` CHIGOT, CLEMENT
2021-01-12 15:23 ` CHIGOT, CLEMENT
2021-01-12 15:25 ` Jonathan Wakely
2021-01-12 15:40 ` CHIGOT, CLEMENT
2021-01-12 15:44 ` David Edelsohn
2021-01-12 17:34 ` Jonathan Wakely
2021-01-12 15:52 ` Rainer Orth
2021-01-12 17:41 ` Rainer Orth
2021-01-12 17:44 ` David Edelsohn
2021-01-12 19:58 ` Rainer Orth
2021-01-13 11:57 ` Rainer Orth
2021-01-13 12:23 ` CHIGOT, CLEMENT
2021-01-13 12:31 ` Rainer Orth
2021-01-13 12:41 ` CHIGOT, CLEMENT
2021-01-13 12:47 ` Rainer Orth
2021-01-21 12:48 ` CHIGOT, CLEMENT
2021-01-21 16:36 ` Rainer Orth
2021-01-22 9:57 ` CHIGOT, CLEMENT
2021-01-22 11:04 ` Rainer Orth
2021-01-22 11:29 ` Jonathan Wakely
2021-01-22 11:54 ` Rainer Orth
2021-01-22 12:23 ` CHIGOT, CLEMENT
2021-01-27 12:52 ` CHIGOT, CLEMENT
2021-01-27 14:26 ` Rainer Orth
2021-01-27 14:44 ` CHIGOT, CLEMENT
2021-01-28 10:09 ` CHIGOT, CLEMENT
2021-05-17 9:17 ` CHIGOT, CLEMENT
2021-06-08 6:59 ` CHIGOT, CLEMENT
2021-06-09 14:50 ` Rainer Orth
2021-07-21 12:00 ` CHIGOT, CLEMENT
2021-07-21 13:04 ` Rainer Orth
2021-07-22 12:09 ` CHIGOT, CLEMENT
2021-07-22 12:19 ` Rainer Orth
2021-07-30 14:02 ` CHIGOT, CLEMENT
2022-03-16 9:57 ` CHIGOT, CLEMENT
2021-01-22 11:12 ` Jonathan Wakely [this message]
2021-01-22 11:02 ` Jonathan Wakely
2021-01-12 16:00 ` Rainer Orth
[not found] ` <PA4PR02MB6686C2022E2B42D82DC9F269EAAB0@PA4PR02MB6686.eurprd02.prod.outlook.com>
2021-01-11 15:38 ` Rainer Orth
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=20210122111241.GH541588@redhat.com \
--to=jwakely@redhat.com \
--cc=clement.chigot@atos.net \
--cc=dje.gcc@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=libstdc++@gcc.gnu.org \
--cc=ro@cebitec.uni-bielefeld.de \
/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).