This is the mail archive of the gcc-bugs@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: libstdc++/6015: 3.1 pre libstdc++ number formatting isnotmt-safe.


On Sat, 2002-03-23 at 23:11, Paolo Carlini wrote:
> Teemu Torma wrote:
> 
> > I don't see how glibc2.3 would help,
> 
> What do you mean by "I don't see"? Did you actually read that thread?

I did.  glibc 2.3 is not in any recent Linux distribution, nor in
Solaris (any version), nor in HP-UX, nor .. 

> > and it would not work on other
> > systems, like Solaris, nor any present system.  Since this is regression
> > from any previous g++ (well, at least since 2.95) version, a different
> > solution is needed.
> 
> How this can be regression from 2.95? libstdc++-v2, the run time library bundled
> with 2.95 did'nt have locale at all!

MT safeness.  I have been using iostreams in threaded environments for
years, and when I tried 3.1, the first thing it did was crash, every
time in same place elsewhere in the code.  The crash itself was probably
some glibc 2.1.3 bug (old, I know), but that is not the point.

> If you think it's easy to provide a thread-safe locale implementation, you are
> welcome to submit one to the libstdc++ list for public scrutiny.

Isn't the whole idea here to format numbers in "C" locale, i.e., ascii
characters using '.' as decimal separator?  If locale specific
formatting is required, sprintf does the job without changing locales.

Teemu



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