This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [v3] libstdc++/7811
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Paolo Carlini <pcarlini at unitus dot it>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 5 Sep 2002 18:04:41 -0400
- Subject: Re: [v3] libstdc++/7811
- References: <3D77CF47.7090506@unitus.it>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Thu, Sep 05, 2002 at 11:40:23PM +0200, Paolo Carlini wrote:
> Hi,
>
> to fix this regression from 3.1.1 I have committed the below to mainline
> and 3.2.
> Tested i686-pc-linux-gnu, approved by Benjamin Kosnik (and myself ;)
This looks wrong. What about if you have
LC_MESSAGES=cs_CZ LC_CTYPE=cs_CZ LANG=en_US
or other mix of env variables? setlocale(LC_ALL, ""); in such case would
build a composite name, though current libstdc++-v3 will not.
For #ifndef _GLIBCPP_C_LOCALE_GNU you should do:
old = strdup(setlocale(LC_ALL, NULL));
ret = strdup(setlocale(LC_ALL, ""));
setlocale(LC_ALL, old);
free(old);
or some such, for _GLIBCPP_C_LOCALE_GNU maybe "" should be passed directly
to _Impl constructor...
Jakub