diff options
author | jilles <jilles@FreeBSD.org> | 2010-05-05 21:48:40 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2010-05-05 21:48:40 +0000 |
commit | f3856c6cf2fb115757967b7e32bdeb21bd27d1ee (patch) | |
tree | 01c037f5647b269e05a273c3cef3f8cb4478c6f9 /libexec | |
parent | a5718881d81033624f276036560f07f69ceac0cc (diff) | |
download | FreeBSD-src-f3856c6cf2fb115757967b7e32bdeb21bd27d1ee.zip FreeBSD-src-f3856c6cf2fb115757967b7e32bdeb21bd27d1ee.tar.gz |
sh: Apply locale vars on builtins, recognize LC_MESSAGES as a locale var.
This allows doing things like LC_ALL=C some_builtin to run a builtin under a
different locale, just like is possible with external programs. The
immediate reason is that this allows making printf(1) a builtin without
breaking things like LC_NUMERIC=C printf '%f\n' 1.2
This change also affects special builtins, as even though the assignment is
persistent, the export is only to the builtin (unless the variable was
already exported).
Note: for this to work for builtins that also exist as external programs
such as /bin/test, the setlocale() call must be under #ifndef SHELL. The
shell will do the setlocale() calls which may not agree with the environment
variables.
Diffstat (limited to 'libexec')
0 files changed, 0 insertions, 0 deletions