Skip to content
Snippets Groups Projects
Commit fe393c0f authored by Fredrik Fornwall's avatar Fredrik Fornwall Committed by Herbert Xu
Browse files

builtin: Clear LC_ALL in mkbuiltins

In mkbuiltins LC_COLLATE is set, but since "The value of the LC_ALL
environment variable has precedence over any of the other environment
variables starting with LC_"
(http://pubs.opengroup.org/onlinepubs/7908799/xbd/envvar.html

), this
has no effect when LC_ALL is set.

This breaks when having e.g. LC_ALL=en_US.UTF-8 during make, which
causes the test case
    dash -c :
to fail, probably due to broken ordering in builtins.c. The patch
corrects that by clearing LC_ALL.

Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 17db43b5
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -78,7 +78,7 @@ awk '{ for (i = 2 ; i <= NF ; i++) {
if ($i ~ /^-/)
line = $(++i) "\t" line
print line
}}' $temp | LC_COLLATE=C sort -k 1,1 | tee $temp2 | awk '{
}}' $temp | LC_ALL= LC_COLLATE=C sort -k 1,1 | tee $temp2 | awk '{
opt = ""
if (NF > 2) {
opt = substr($2, 2)
Loading
Loading
@@ -97,8 +97,9 @@ cat <<\!
*/
 
!
sed 's/ -[a-z]*//' $temp2 | nl -b a -v 0 | LC_COLLATE=C sort -u -k 3,3 |
tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ |
sed 's/ -[a-z]*//' $temp2 | nl -b a -v 0 |
LC_ALL= LC_COLLATE=C sort -u -k 3,3 |
tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ |
awk '{ printf "#define %s (builtincmd + %d)\n", $3, $1}'
printf '\n#define NUMBUILTINS %d\n' $(wc -l < $temp2)
echo '
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment