This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [v3] libstdc++/7811


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]