------- Comment #22 from pcarlini at suse dot de 2007-03-15 19:17 ------- (In reply to comment #21) > (In reply to comment #17) > > Why? > > OK, now I know why. Reason is that os_defines.h is included after errno.h.
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. > I also now know why basic_file.cc gets the errno function: > /usr/include/sys/feature_tests.h defines _POSIX_C_SOURCE to 199506L, 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. 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? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31117