projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix x32 unistd macros to report as ILP32 not LP64
[musl]
/
src
/
locale
/
langinfo.c
diff --git
a/src/locale/langinfo.c
b/src/locale/langinfo.c
index
b2c8569
..
b16caf4
100644
(file)
--- a/
src/locale/langinfo.c
+++ b/
src/locale/langinfo.c
@@
-34,6
+34,10
@@
char *__nl_langinfo_l(nl_item item, locale_t loc)
const char *str;
if (item == CODESET) return MB_CUR_MAX==1 ? "ASCII" : "UTF-8";
const char *str;
if (item == CODESET) return MB_CUR_MAX==1 ? "ASCII" : "UTF-8";
+
+ /* _NL_LOCALE_NAME extension */
+ if (idx == 65535 && cat < LC_ALL)
+ return loc->cat[cat] ? (char *)loc->cat[cat]->name : "C";
switch (cat) {
case LC_NUMERIC:
switch (cat) {
case LC_NUMERIC: