This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/31117] c++locale.o thread-unsafe in libstdc++
- From: "craig dot lawson at centrify dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Mar 2007 19:26:30 -0000
- Subject: [Bug libstdc++/31117] c++locale.o thread-unsafe in libstdc++
- References: <bug-31117-9156@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #23 from craig dot lawson at centrify dot com 2007-03-15 19:26 -------
(In reply to comment #22)
> Oh yes, you are totally right. The problem is that <cerrno> is one of the very
> few c headers not including <bits/c++config.h> first. We can easily fix that.
Why did <cerrno> not include <bits/c++config.h>? Was this intentional?
> Ok, but on other targets I don't think we can trust locale.h to always include
> something similar and enable the thread safe errno.
I agree. They're all going to be different. But the evidence from basic_file.o
indicates that they all do something.
> Thus, my preference goes for the plan of adding that define in os_defines.h (+
> adjusting <cerrno> of course). Are you positive about figuring out something
> similar to _TS_ERRNO for the other targets?
Instead of _TS_ERRNO and equivalent, how about including <bits/c++config.h> in
<cerrno>? That appears sufficient for basic_file.o to be compiled correctly,
and it appears to work on the platforms I investigated.
What do you mean by "are you positive"?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31117