This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: [PATCH] setlocale: New implementation
On Mar 2 19:32, Jeff Johnston wrote:
> Assuming you have done some Cygwin testing with the code, please check
> it in.
Yes, I tested this on Cygwin with various LANG, LC_CTYPE and LC_ALL
definitions.
>> * libc/locale/locale.c (_setlocale_r): New implementation
>> based on FreeBSD's setlocale.
>> (currentlocale): New helper function.
>> (loadlocale): Ditto.
>> (__locale_charset): New function.
>> (__locale_msgcharset): Rename from __locale_charset.
>> * libc/ctype/local.h (__lc_ctype): Remove declaration.
>> (__locale_charset): Declare.
>> * libc/ctype/iswalpha.c (iswalpha): Call __locale_charset instead
>> of using __lc_ctype directly. Only compare against the charset
>> alone.
>> * libc/ctype/iswblank.c (iswblank): Ditto.
>> * libc/ctype/iswcntrl.c (iswcntrl): Ditto.
>> * libc/ctype/iswprint.c (iswprint): Ditto.
>> * libc/ctype/iswpunct.c (iswpunct): Ditto.
>> * libc/ctype/iswspace.c (iswspace): Ditto.
>> * libc/ctype/towlower.c (towlower): Ditto.
>> * libc/ctype/towupper.c (towupper): Ditto.
>> * libc/stdlib/mbtowc_r.c (_mbtowc_r): Ditto.
>> * libc/stdlib/wctomb_r.c (_wctomb_r): Ditto.
>> * libc/sys/linux/intl/loadmsgcat.c (_nl_init_domain_conv): Call
>> __locale_msgcharset instead of __locale_charset.
Patch applied.
Thanks,
Corinna
--
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat