Eli Zaretskii wrote: > Those considerations seem less important to me than the functionality > of the code on various platforms. The functionality should make sense > first and foremost, whereas the test suite structure should IMO be > secondary to that.
In this case, the testsuite pointed to a problem within the code - namely functions that did not implement their description in localename.h. > Returning NULL will require > callers to handle that problematic value specially, thus imposing an > additional burden on developers and providing a window for bugs on > MS-Windows. Yes, but this is unavoidable, given the fact that GetThreadLocale cannot tell whether SetThreadLocale has been called or not. I don't want to change the structure of the function gl_locale_name: gl_locale_name_thread() || gl_locale_name_posix() || gl_locale_name_default(). to cater with a problem that - occurs in a function that is not yet used outside gnulib, - is limited to native Windows. My primary objectives - that gl_locale_name() performs well in most situations, - that the functions adhere to their specification, as far as possible, - that the test suite passes, are now fulfilled, and that was the point of my change. Bruno