------- Comment #6 from craig dot lawson at centrify dot com 2007-03-12 19:23 ------- > Anyway, what happens in the GNU systems is that errno is a per-thread variable > and the __convert_to_v code has to do nothing special, just safely use it.
I agree. The problem is that this is not happening. __convert_to_v is not safely using the per-thread errno. Instead, it is using the global errno. The cause is not the __convert_to_v code but something in an include file or a gcc option which causes the code to be compiled incorrectly. Yet another file in the same library compiled with the same gcc options does access the thread-safe errno correctly. That a discrepancy exists indicates a problem somewhere. The intent of this bug is to call attention to this misuse of errno and the indication of an underlying problem. Thank you for explaining the issues with setlocale. Worse than I thought. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31117