mirror of
git://git.musl-libc.org/musl
synced 2024-11-27 03:53:58 +08:00
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 0206f596d5
)
This commit is contained in:
parent
7de071453d
commit
af7a02a191
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user