bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: localename on mingw


From: Bruno Haible
Subject: Re: localename on mingw
Date: Sat, 05 May 2018 12:55:27 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-119-generic; KDE/5.18.0; x86_64; ; )

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]