bug-gnulib
[Top][All Lists]
Advanced

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

Re: localename on mingw


From: Eli Zaretskii
Subject: Re: localename on mingw
Date: Fri, 04 May 2018 16:22:43 +0300

> From: Bruno Haible <address@hidden>
> Cc: Eli Zaretskii <address@hidden>
> Date: Thu, 03 May 2018 05:42:17 +0200
> 
> On a recent mingw (both 32-bit and 64-bit), I'm seeing this test failure:
> 
> FAIL: test-localename
> =====================
> 
> ../../tests/test-localename.c:158: assertion 'strcmp (name, "de_DE.UTF-8") == 
> 0' failed
> 
> Once this is worked around, there is another one here:
> 
>   /* Check that gl_locale_name_thread always returns NULL.  */
>   ASSERT (gl_locale_name_thread (LC_CTYPE, "LC_CTYPE") == NULL);
> 
> It is due to the localename.c change from 2014-07-15 [1]. While the general
> approach (to call GetThreadLocale only as a fallback, because GetThreadLocale
> does not consider changes made by 'setlocale') is reasonable, the exact
> placement of the new code is odd: Fixing the test failures in the tests
> (attached: fix-tests.diff) makes the code even stranger.
> 
> [1] https://lists.gnu.org/archive/html/bug-gnulib/2014-07/msg00003.html
> 
> The better fix is this one:

Sorry, I've read the text and and diffs several times, and I still
cannot see the light.  Can you explain the rationale for moving code
between gl_locale_name_thread and gl_locale_name_posix.  I don't think
I understand why that matters, given that both are called from
gl_locale_name.  I also don't understand why having a thread-level
code inside a function whose name ends with "_thread" makes less sense
than having non-Posix code in a function whose name ends with
"_posix".

As for the testing part, it sounds like you kept the changes I made?
And yet you call doing that "odd"?  What am I missing?

And how all that is related to the failures which are the trigger for
your proposal?

Sorry for being so dumb this afternoon, and thanks in advance for
explaining this.



reply via email to

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