mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
Add LC_TIME to the supported locale variables (#257)
The current version of 93u+m does not have proper support for the
LC_TIME variable. Setting LC_TIME has no effect on printf %T, and
if the locale is invalid no error message is shown:
$ LC_TIME=ja_JP.UTF-8
$ printf '%T\n' now
Wed Apr 7 15:18:13 PDT 2021
$ LC_TIME=invalid.locale
$ # No error message
src/cmd/ksh93/data/variables.c,
src/cmd/ksh93/include/variables.h,
src/cmd/ksh93/sh/init.c:
- Add support for the $LC_TIME variable. ksh93v- attempted to add
support for LC_TIME, but the patch from that version was extended
because the variable still didn't function correctly.
src/cmd/ksh93/tests/variables.sh:
- Add LC_TIME to the regression tests for LC_* variables.
This commit is contained in:
parent
3667aa4f71
commit
b2a7ec032f
6 changed files with 43 additions and 29 deletions
|
|
@ -746,7 +746,7 @@ Errors=$? # ensure error count survives subshell
|
|||
exit $Errors
|
||||
fi
|
||||
|
||||
for v in LC_ALL LC_CTYPE LC_MESSAGES LC_COLLATE LC_NUMERIC
|
||||
for v in LC_ALL LC_CTYPE LC_MESSAGES LC_COLLATE LC_NUMERIC LC_TIME
|
||||
do nameref r=$v
|
||||
unset $v
|
||||
[[ $r ]] && err_exit "unset $v failed -- expected '', got '$r'"
|
||||
|
|
@ -921,6 +921,7 @@ set -- \
|
|||
"LC_CTYPE" \
|
||||
"LC_MESSAGES" \
|
||||
"LC_NUMERIC" \
|
||||
"LC_TIME" \
|
||||
"FIGNORE" \
|
||||
"KSH_VERSION" \
|
||||
"JOBMAX" \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue