]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r352138, r352214, r352216:
authorYuri Pankov <yuripv@FreeBSD.org>
Mon, 16 Sep 2019 16:17:29 +0000 (16:17 +0000)
committerYuri Pankov <yuripv@FreeBSD.org>
Mon, 16 Sep 2019 16:17:29 +0000 (16:17 +0000)
commitd26539313b36e902472608919a7cf0578564d614
tree0c46c6ba7643d536cb51dd2ab4662b040c5c1cfa
parentf69775b5912fbc7d89c07402012261604d83137f
MFC r352138, r352214, r352216:

locale: handle day, abday, mon, abmon, am_pm keywords

All of these are defined as mandatory by POSIX.

While here, mark all non-standard ones as FreeBSD-only as
other systems (at least, GNU/Linux and illumos) do not handle
them, so we should not encourage their use.

- make abday, day, abmon, mon, am_pm output quoting match linux
- workaround localeconv() issue for mon_grouping and grouping (PR172215)
- for other values not available in default locale, output -1 instead of
  127 (CHAR_MAX) as returned by localeconv()

PR: 237752
13 files changed:
etc/mtree/BSD.tests.dist
usr.bin/locale/Makefile
usr.bin/locale/locale.c
usr.bin/locale/tests/Makefile [new file with mode: 0644]
usr.bin/locale/tests/k_flag_posix_messages.out [new file with mode: 0644]
usr.bin/locale/tests/k_flag_posix_monetary.out [new file with mode: 0644]
usr.bin/locale/tests/k_flag_posix_numeric.out [new file with mode: 0644]
usr.bin/locale/tests/k_flag_posix_time.out [new file with mode: 0644]
usr.bin/locale/tests/locale_test.sh [new file with mode: 0755]
usr.bin/locale/tests/no_flags_posix_messages.out [new file with mode: 0644]
usr.bin/locale/tests/no_flags_posix_monetary.out [new file with mode: 0644]
usr.bin/locale/tests/no_flags_posix_numeric.out [new file with mode: 0644]
usr.bin/locale/tests/no_flags_posix_time.out [new file with mode: 0644]