projects
/
oweals
/
musl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7de0714
)
add missing yes/no strings to nl_langinfo
author
Rich Felker
<dalias@aerifal.cx>
Sat, 26 Jul 2014 08:43:50 +0000
(
04:43
-0400)
committer
Rich Felker
<dalias@aerifal.cx>
Mon, 28 Jul 2014 04:28:01 +0000
(
00:28
-0400)
these were removed from the standard but still offered as an extension
in langinfo.h, so nl_langinfo should support them.
(cherry picked from commit
0206f596d5156af560e8af10e950d3cb2f29b73d
)
src/locale/langinfo.c
patch
|
blob
|
history
diff --git
a/src/locale/langinfo.c
b/src/locale/langinfo.c
index 70a957f512bf0030b583ee2ecfb3344bd3f894c1..8159033f3cbee72cdcd3220e78517c6ec0e64caf 100644
(file)
--- a/
src/locale/langinfo.c
+++ b/
src/locale/langinfo.c
@@
-23,7
+23,7
@@
static const char c_time[] =
"%a %b %e %T %Y\0"
"%H:%M:%S";
-static const char c_messages[] = "^[yY]\0" "^[nN]";
+static const char c_messages[] = "^[yY]\0" "^[nN]
\0" "yes\0" "no
";
static const char c_numeric[] = ".\0" "";
char *__nl_langinfo_l(nl_item item, locale_t loc)
@@
-48,7
+48,7
@@
char *__nl_langinfo_l(nl_item item, locale_t loc)
str = "";
break;
case LC_MESSAGES:
- if (idx >
1
) return NULL;
+ if (idx >
3
) return NULL;
str = c_messages;
break;
default: