From bafee43161b9e38ca6c941eb3646df20ec6da759 Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Thu, 14 Aug 2014 13:56:51 -0700 Subject: [PATCH] Change name of MB_CUR_MAX implementation function. Glibc calls theirs __ctype_get_mb_cur_max. Make ours match to cut down on differences between bionic and glibc. Bug: 11156955 Change-Id: Ib7231f01aa9676dff30aea0af25d597bfe07bc73 --- libc/bionic/locale.cpp | 2 +- libc/include/stdlib.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libc/bionic/locale.cpp b/libc/bionic/locale.cpp index 4c3fd7f31..ddb49ce6f 100644 --- a/libc/bionic/locale.cpp +++ b/libc/bionic/locale.cpp @@ -92,7 +92,7 @@ static void __locale_init() { g_locale.int_n_sign_posn = CHAR_MAX; } -size_t __mb_cur_max() { +size_t __ctype_get_mb_cur_max() { locale_t l = reinterpret_cast(pthread_getspecific(g_uselocale_key)); if (l == nullptr || l == LC_GLOBAL_LOCALE) { return __bionic_current_locale_is_utf8 ? 4 : 1; diff --git a/libc/include/stdlib.h b/libc/include/stdlib.h index a5eb3d15b..52f71dd47 100644 --- a/libc/include/stdlib.h +++ b/libc/include/stdlib.h @@ -161,8 +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); -extern size_t __mb_cur_max(void); -#define MB_CUR_MAX __mb_cur_max() +extern size_t __ctype_get_mb_cur_max(void); +#define MB_CUR_MAX __ctype_get_mb_cur_max() __END_DECLS