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.
See the thread at https://gcc.gnu.org/pipermail/libstdc++/2021-January/051843.html
Separately, it would be good to provide a libintl-based implementation of std::messages, for targets where that's not part of glibc.
(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.
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
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