[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: new module 'duplocale'
From: |
Eric Blake |
Subject: |
Re: new module 'duplocale' |
Date: |
Mon, 23 Nov 2009 20:23:07 -0700 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Ludovic Courtès on 11/23/2009 4:01 PM:
>> const char *base_name = nl_langinfo (_NL_LOCALE_NAME (LC_CTYPE));
>
> This is not thread-safe but I guess there’s no other choice.
As is the case with a number of gnulib modules. But I have been trying to
document that in the various files; for example, note how
doc/posix-functions/openat.texi mentions that the replacement is not
thread-safe.
> On a related note, nl_langinfo_l(3) is broken in current glibc:
>
> http://sourceware.org/bugzilla/show_bug.cgi?id=11009
For once, I'm tending to agree with Uli - the use of the global locale is
important for duplocale to create a one-off variant locale, but when it
comes to all the *_l interfaces, if you want the global locale, then use
what got returned by duplocale, rather than teaching all the _l interfaces
to special case the placeholder constant for the global locale.
- --
Don't work too hard, make some time for fun as well!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAksLUZsACgkQ84KuGfSFAYBsnACaA8Z2znPI2z8RiYn70mnIMrtG
D1gAoJwIbDyRcYPJzL1mVpUKPZvTY5in
=Np1G
-----END PGP SIGNATURE-----