As reported in PR237752, our locale utility doesn't handle the day, abday, mon, abmon keywords, and that seems to violate POSIX.
Also handle am_pm, which is missing as well.
Differential D21490 Authored by yuripv on Sep 2 2019, 3:13 PM.
Details
Summary As reported in PR237752, our locale utility doesn't handle the day, abday, mon, abmon keywords, and that seems to violate POSIX. Also handle am_pm, which is missing as well. Test Plan Simply running locale -k, locale -k day abday mon abmon for the moment. If this implementation looks sane enough, I'll add the test cases for locale(1). $ LC_ALL=en_US.UTF-8 locale -k day abday mon abmon day="Sunday";"Monday";"Tuesday";"Wednesday";"Thursday";"Friday";"Saturday" abday="Sun";"Mon";"Tue";"Wed";"Thu";"Fri";"Sat" mon="January";"February";"March";"April";"May";"June";"July";"August";"September";"October";"November";"December" abmon="Jan";"Feb";"Mar";"Apr";"May";"Jun";"Jul";"Aug";"Sep";"Oct";"Nov";"Dec" $ LC_ALL=ru_RU.UTF-8 locale -k day abday mon abmon day="воскресенье";"понедельник";"вторник";"среда";"четверг";"пятница";"суббота" abday="вс";"пн";"вт";"ср";"чт";"пт";"сб" mon="января";"февраля";"марта";"апреля";"мая";"июня";"июля";"августа";"сентября";"октября";"ноября";"декабря" abmon="янв.";"февр.";"марта";"апр.";"мая";"июня";"июля";"авг.";"сент.";"окт.";"нояб.";"дек."
Diff Detail
Event TimelineHerald added a subscriber: imp. · View Herald TranscriptSep 2 2019, 3:13 PM2019-09-02 15:13:25 (UTC+0) Comment Actions This looks sane to me!
This revision is now accepted and ready to land.Sep 3 2019, 8:41 AM2019-09-03 08:41:12 (UTC+0) yuripv retitled this revision from locale: handle day, abday, mon, abmon keywords to locale: handle day, abday, mon, abmon, am_pm keywords. Comment Actions
This revision now requires review to proceed.Sep 10 2019, 10:45 AM2019-09-10 10:45:31 (UTC+0) This revision is now accepted and ready to land.Sep 10 2019, 1:13 PM2019-09-10 13:13:18 (UTC+0) Closed by commit rS352138: locale: handle day, abday, mon, abmon, am_pm keywords (authored by yuripv). · Explain WhySep 10 2019, 3:10 PM2019-09-10 15:10:07 (UTC+0) This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 61552 usr.bin/locale/locale.c
|
that if is useless, free deals properly with NULL