[vlc-devel] [PATCH] Use character classes instead of ranges in check_headers.

jpd at videolan.org jpd at videolan.org
Mon Jun 29 14:24:12 CEST 2009


On Mon, Jun 29, 2009 at 01:01:44PM +0200, R??mi Denis-Courmont wrote:
> No. First I see no reason to disable locale support on a systematic basis.

Any time we depend on anything that is locale influencable we should, in
fact we must, specify that we depend on it and what flavour we want. Of
course, when we don't depend on it, we shouldn't force the issue.


> Second, this would fail to override more specific locale variables. In this
> particular case, we should just set character type and collation to POSIX.

<quote from="setlocale(3)">
       If locale is "", each part of the locale that should be modified is set
       according  to  the  environment variables.  The details are implementa-
       tion-dependent.  For glibc, first (regardless of category),  the  envi-
       ronment  variable  LC_ALL  is  inspected, next the environment variable
       with the same name as the category (LC_COLLATE, LC_CTYPE,  LC_MESSAGES,
       LC_MONETARY,  LC_NUMERIC, LC_TIME) and finally the environment variable
       LANG.
</quote>

That's from this fc10 system. Neither FreeBSD's nor the SUSv2[1]
setlocale(3) actually specify which overrides which.

"POSIX" and "C" are equivalent, per specification.


[1] http://opengroup.org/onlinepubs/007908799/xsh/setlocale.html




More information about the vlc-devel mailing list