[SECURITY] libidn - locale specific error in test suite
Fri Jan 20 08:36:00 GMT 2017
On Jan 19 15:17, Eric Blake wrote:
> On 01/19/2017 03:02 PM, Corinna Vinschen wrote:
> >>>> After stepping through a debugger, it looks like this is a bug in gnulib
> >>>> and not cygwin. Gnulib is trying to test that its own function
> >>>> gl_locale_name() can track the use of uselocale() to set a thread-local
> >>>> locale that overrides the global locale.
> >> nl_langinfo_l(NL_LOCALE_NAME(LC_MESSAGES), locale);
> >> to recover the name of the LC_MESSAGES portion of the locale object.
> >> As Cygwin lacks that macro, there is NO way to access the locale name of
> >> what went into constructing a thread-local locale without peeking into
> >> the internal guts of the opaque locale_t object.
> > Question: Why is that needed outside of testcases? If you called
> > newlocale you know how it has been constructed. The info should be
> > available. I have no problems to take glibc emulating stuff, but is
> > there a real-world example?
> Yes. Consider a library-writer that wants to do something in the correct
> locale. Here, you have a logical separation from the main app that
> calls newlocale()/uselocale() and the library code that now wants to
> reconstruct what the current locale is. So being able to reconstruct
> the names of the thread-local locale via gl_locale_name() makes the
> library less coupled to the main app's setup. In particular, at least
> gettext wants to use it.
Ok, makes sense.
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 819 bytes
Desc: not available
More information about the Cygwin-apps