From b98192b80ee5654aa7c5590bcc266c5eec2c67a5 Mon Sep 17 00:00:00 2001 From: Eugene Yudin Date: Mon, 24 Jul 2017 22:27:00 +0200 Subject: fix tolower and locales The function towlower doesn't work with locales different from C. Issue was introduced in commit: 8cde3a9bf2856dcb9a759dec7ecb04a68e712254 Call to setlocale is needed for correct generation of the table uplow_diff. Otherwise you receive compile time error "range assumption error" after uncommenting the call. Similar problem described here: http://lists.uclibc.org/pipermail/uclibc/2015-March/048852.html This commit fix the problem by using int32_t values. --- libc/sysdeps/linux/common/bits/uClibc_locale.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libc/sysdeps/linux/common') diff --git a/libc/sysdeps/linux/common/bits/uClibc_locale.h b/libc/sysdeps/linux/common/bits/uClibc_locale.h index 6598eafd2..43c1e510e 100644 --- a/libc/sysdeps/linux/common/bits/uClibc_locale.h +++ b/libc/sysdeps/linux/common/bits/uClibc_locale.h @@ -192,7 +192,7 @@ struct __uclibc_locale_struct { const unsigned char *tblwctype; const unsigned char *tblwuplow; /* const unsigned char *tblwcomb; */ - const int16_t *tblwuplow_diff; /* yes... signed */ + const int32_t *tblwuplow_diff; /* yes... signed */ /* width?? */ wchar_t decimal_point_wc; -- cgit v1.2.3