diff options
author | Rich Felker <dalias@aerifal.cx> | 2015-06-06 18:53:02 +0000 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2015-06-06 18:53:02 +0000 |
commit | 16bf466532d7328e971012b0731ad493b017ad29 (patch) | |
tree | 706444d26d8f70089aadbab6a1e6bfd1711ee00a /src/locale/locale_map.c | |
parent | 312eea2ea4f4363fb01b73660c08bfcf43dd3bb4 (diff) | |
download | musl-16bf466532d7328e971012b0731ad493b017ad29.tar.gz musl-16bf466532d7328e971012b0731ad493b017ad29.tar.xz musl-16bf466532d7328e971012b0731ad493b017ad29.zip |
make static C and C.UTF-8 locales available outside of newlocale
Diffstat (limited to 'src/locale/locale_map.c')
-rw-r--r-- | src/locale/locale_map.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/locale/locale_map.c b/src/locale/locale_map.c index 4346bb02..c3e59174 100644 --- a/src/locale/locale_map.c +++ b/src/locale/locale_map.c @@ -24,14 +24,6 @@ static const char envvars[][12] = { "LC_MESSAGES", }; -static const uint32_t empty_mo[] = { 0x950412de, 0, -1, -1, -1 }; - -const struct __locale_map __c_dot_utf8 = { - .map = empty_mo, - .map_size = sizeof empty_mo, - .name = "C.UTF-8" -}; - const struct __locale_map *__get_locale(int cat, const char *val) { static int lock[2]; @@ -107,8 +99,8 @@ const struct __locale_map *__get_locale(int cat, const char *val) * sake of being able to do message translations at the * application level. */ if (!new && (new = malloc(sizeof *new))) { - new->map = empty_mo; - new->map_size = sizeof empty_mo; + new->map = __c_dot_utf8.map; + new->map_size = __c_dot_utf8.map_size; memcpy(new->name, val, n); new->name[n] = 0; new->next = loc_head; |