Bug 57585 - New --enable-clocale model using POSIX 2008
Summary: New --enable-clocale model using POSIX 2008
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: libstdc++ (show other bugs)
Version: 14.0
: P3 enhancement
Target Milestone: 16.0
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks: 69762 119105
  Show dependency treegraph
 
Reported: 2013-06-11 10:16 UTC by Jonathan Wakely
Modified: 2025-03-04 11:48 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2021-01-13 00:00:00


Attachments
Add --enable-clocale=ieee_1003.1-2008 (13.29 KB, patch)
2024-04-16 15:39 UTC, Jonathan Wakely
Details | Diff
Add --enable-clocale=ieee_1003.1-2008 (13.12 KB, patch)
2024-07-31 12:28 UTC, Jonathan Wakely
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Wakely 2013-06-11 10:16:57 UTC
Now that uselocale() is in POSIX we should consider a new --enable-clocale=ieee_1003.1-2008 based on the gnu model, which could be used on any POSIX-2008 OS and would reduce differences between targets.
Comment 1 Jonathan Wakely 2021-01-13 09:39:02 UTC
See the thread at https://gcc.gnu.org/pipermail/libstdc++/2021-January/051843.html
Comment 2 Jonathan Wakely 2024-04-16 09:51:44 UTC
Separately, it would be good to provide a libintl-based implementation of std::messages, for targets where that's not part of glibc.
Comment 3 Jonathan Wakely 2024-04-16 13:01:15 UTC
(In reply to Jonathan Wakely from comment #2)
> Separately, it would be good to provide a libintl-based implementation of
> std::messages, for targets where that's not part of glibc.

Although the POSIX catopen/catclose/catgets one might be good enough, once we support https://cplusplus.github.io/LWG/lwg-defects.html#2028 so that messages_base::catalog is large enough to store a nl_catd.
Comment 4 Jonathan Wakely 2024-04-16 15:39:11 UTC
Created attachment 57961 [details]
Add --enable-clocale=ieee_1003.1-2008

This is an initial prototype of a new clocale model.

The wide string info needs to be transcoded from the narrow string info, because unlike Glibc, POSIX doesn't provide wide character versions of nl_langinfo items like _NL_WMON_1
Comment 5 Jonathan Wakely 2024-07-31 12:28:17 UTC
Created attachment 58785 [details]
Add --enable-clocale=ieee_1003.1-2008

Updated patch, with a workaround for something I noticed on Solaris 11.4, as described at https://gcc.gnu.org/pipermail/libstdc++/2024-July/059298.html