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
This commit is contained in:
Dan Albert
2014-07-30 10:53:48 -07:00
parent 0f7ed163cf
commit 1aec7c1a35
4 changed files with 55 additions and 16 deletions

View File

@@ -167,7 +167,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