diff options
author | Dan Albert <danalbert@google.com> | 2014-07-30 10:53:48 -0700 |
---|---|---|
committer | Dan Albert <danalbert@google.com> | 2014-08-06 13:17:43 -0700 |
commit | 6035e6cc8317600c3100fdf1070890c3e42715a7 (patch) | |
tree | 01eb9ed023525e038fc809f1cba68c2a27c4a864 /libc/include | |
parent | 00a8344ae82a691209b665adae828a5abe570cfb (diff) | |
download | bionic-6035e6cc8317600c3100fdf1070890c3e42715a7.zip bionic-6035e6cc8317600c3100fdf1070890c3e42715a7.tar.gz bionic-6035e6cc8317600c3100fdf1070890c3e42715a7.tar.bz2 |
Proper MB_CUR_MAX.
Previously this was hard coded to 4. This is only the case for UTF-8
locales.
As a side effect, this properly reports C.UTF-8 as the default locale
instead of C.
Change-Id: I7c73cc8fe6ffac61d211cd5f75287e36de06f4fc
(cherry picked from commit 1aec7c1a35b2d03038b194967d5ebdc8e2c24b80)
Diffstat (limited to 'libc/include')
-rw-r--r-- | libc/include/stdlib.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libc/include/stdlib.h b/libc/include/stdlib.h index e29fdba..a5eb3d1 100644 --- a/libc/include/stdlib.h +++ b/libc/include/stdlib.h @@ -161,7 +161,8 @@ extern int mbtowc(wchar_t *, const char *, size_t); extern int wctomb(char *, wchar_t); extern size_t wcstombs(char *, const wchar_t *, size_t); -#define MB_CUR_MAX 4U +extern size_t __mb_cur_max(void); +#define MB_CUR_MAX __mb_cur_max() __END_DECLS |