summaryrefslogtreecommitdiff
path: root/src/locale
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2014-07-26 04:43:50 -0400
committerRich Felker <dalias@aerifal.cx>2014-07-28 00:28:01 -0400
commitaf7a02a1911258978e4b8bc5f7f1fe7626ddc29c (patch)
tree8152fa849c9c0e534c805721fe811f2ec989287b /src/locale
parent7de071453dc088b6e7edd1791cf0e94664893436 (diff)
downloadmusl-af7a02a1911258978e4b8bc5f7f1fe7626ddc29c.tar.gz
add missing yes/no strings to nl_langinfo
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)
Diffstat (limited to 'src/locale')
-rw-r--r--src/locale/langinfo.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/locale/langinfo.c b/src/locale/langinfo.c
index 70a957f5..8159033f 100644
--- 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: