This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: `newlocale ()' clarifications
- From: Roland McGrath <roland at redhat dot com>
- To: ludo at chbouib dot org (Ludovic Courtès)
- Cc: libc-alpha at sources dot redhat dot com
- Date: Fri, 12 Jan 2007 13:11:54 -0800 (PST)
- Subject: Re: `newlocale ()' clarifications
> Agreed. Are you in a position to influence the spec?
We are. And anyone can submit requests for clarification or
recommendations for changes.
> > I think you can use newlocale (LC_ALL_MASK, setlocale (LC_ALL, NULL), NULL).
> > I don't see why that wouldn't work, and portably.
>
> Right, although it is IMO less elegant than using `LC_GLOBAL_LOCALE' and
> actually requires two `newlocale ()' calls (one to get a `locale_t' for
> the current locale and a second one to use it as BASE).
But no more real work. Moreover, it works now while allowing
LC_GLOBAL_LOCALE would not be portable for applications to use even if
glibc were to change.