Eli Zaretskii <e...@gnu.org> writes: >> By the way, isn't there a minor race in gl_locale_name_thread, since it >> depends on a global variable found_lcid? > > Yes. (It is not a problem for Guile, since Guile built with threads > on Windows is severely broken, so the only way of having a useful > Guile on Windows is to build it without threads.) Suggestions for > fixing that are welcome. Maybe just use the '__thread' qualifier for > that variable?
I'm not familiar with Windows TLS support, but '__thread' seems to be compiler specific. Gnulib has glthread/tls but I'm not sure if it is worth adding another dependency to localename.c (which is also shared with libintl...) for this specific issue. Maybe just lock around the use? Regards, -- Daiki Ueno