Summary: | LC_TIME keywords violate POSIX | ||
---|---|---|---|
Product: | Base System | Reporter: | AJ Jordan <alex+freebsd> |
Component: | standards | Assignee: | Yuri Pankov <yuripv> |
Status: | Closed FIXED | ||
Severity: | Affects Some People | CC: | standards, yuripv |
Priority: | --- | Keywords: | needs-patch, needs-qa, standards |
Version: | CURRENT | Flags: | yuripv:
mfc-stable12+
yuripv: mfc-stable11- |
Hardware: | Any | ||
OS: | Any |
Description
AJ Jordan
2019-05-05 00:30:34 UTC
A commit references this bug: Author: yuripv Date: Tue Sep 10 15:09:48 UTC 2019 New revision: 352138 URL: https://svnweb.freebsd.org/changeset/base/352138 Log: 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. PR: 237752 Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D21490 Changes: head/etc/mtree/BSD.tests.dist head/usr.bin/locale/Makefile head/usr.bin/locale/locale.c head/usr.bin/locale/tests/ head/usr.bin/locale/tests/Makefile head/usr.bin/locale/tests/k_flag_posix_messages.out head/usr.bin/locale/tests/k_flag_posix_monetary.out head/usr.bin/locale/tests/k_flag_posix_numeric.out head/usr.bin/locale/tests/k_flag_posix_time.out head/usr.bin/locale/tests/locale_test.sh A commit references this bug: Author: yuripv Date: Wed Sep 11 15:39:30 UTC 2019 New revision: 352214 URL: https://svnweb.freebsd.org/changeset/base/352214 Log: locale: more output fixes - 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() With these changes, output of `locale` and `locale -k` for all keywords specified by POSIX exactly matches the linux one. PR: 237752 Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D21599 Changes: head/usr.bin/locale/locale.c head/usr.bin/locale/tests/Makefile head/usr.bin/locale/tests/k_flag_posix_monetary.out head/usr.bin/locale/tests/k_flag_posix_numeric.out head/usr.bin/locale/tests/k_flag_posix_time.out head/usr.bin/locale/tests/locale_test.sh head/usr.bin/locale/tests/no_flags_posix_messages.out head/usr.bin/locale/tests/no_flags_posix_monetary.out head/usr.bin/locale/tests/no_flags_posix_numeric.out head/usr.bin/locale/tests/no_flags_posix_time.out A commit references this bug: Author: yuripv Date: Mon Sep 16 16:17:32 UTC 2019 New revision: 352416 URL: https://svnweb.freebsd.org/changeset/base/352416 Log: 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 Changes: _U stable/12/ stable/12/etc/mtree/BSD.tests.dist stable/12/usr.bin/locale/Makefile stable/12/usr.bin/locale/locale.c stable/12/usr.bin/locale/tests/ stable/12/usr.bin/locale/tests/Makefile stable/12/usr.bin/locale/tests/k_flag_posix_monetary.out stable/12/usr.bin/locale/tests/k_flag_posix_numeric.out stable/12/usr.bin/locale/tests/k_flag_posix_time.out stable/12/usr.bin/locale/tests/locale_test.sh stable/12/usr.bin/locale/tests/no_flags_posix_messages.out stable/12/usr.bin/locale/tests/no_flags_posix_monetary.out stable/12/usr.bin/locale/tests/no_flags_posix_numeric.out stable/12/usr.bin/locale/tests/no_flags_posix_time.out |