about summary refs log tree commit diff
path: root/include
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2015-06-16 06:18:00 +0000
committerRich Felker <dalias@aerifal.cx>2015-06-16 06:18:00 +0000
commitf22a9edaf8a6f2ca1d314d18b3785558279a5c03 (patch)
tree908b30e255314b2515364c80cfcca2912cb5d332 /include
parent16f18d036d9a7bf590ee6eb86785c0a9658220b6 (diff)
downloadmusl-f22a9edaf8a6f2ca1d314d18b3785558279a5c03.tar.gz
musl-f22a9edaf8a6f2ca1d314d18b3785558279a5c03.tar.xz
musl-f22a9edaf8a6f2ca1d314d18b3785558279a5c03.zip
byte-based C locale, phase 3: make MB_CUR_MAX variable to activate code
this patch activates the new byte-based C locale (high bytes treated
as abstract code unit "characters" rather than decoded as multibyte
characters) by making the value of MB_CUR_MAX depend on the active
locale. for the C locale, the LC_CTYPE category pointer is null,
yielding a value of 1. all other locales yield a value of 4.
Diffstat (limited to 'include')
-rw-r--r--include/stdlib.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/stdlib.h b/include/stdlib.h
index 97ce5a72..d2c911fc 100644
--- a/include/stdlib.h
+++ b/include/stdlib.h
@@ -76,7 +76,8 @@ size_t wcstombs (char *__restrict, const wchar_t *__restrict, size_t);
 #define EXIT_FAILURE 1
 #define EXIT_SUCCESS 0
 
-#define MB_CUR_MAX ((size_t)+4)
+size_t __ctype_get_mb_cur_max(void);
+#define MB_CUR_MAX (__ctype_get_mb_cur_max())
 
 #define RAND_MAX (0x7fffffff)