From: Theodore Ts'o Date: Sun, 12 Nov 2006 15:43:31 +0000 (-0500) Subject: Set local environment variables to C so mk_cmds and compile_et always work X-Git-Tag: E2FSPROGS-1_40-WIP-1114~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=05155f9bff3935bd45a506a0fe0a277070d23094;p=thirdparty%2Fe2fsprogs.git Set local environment variables to C so mk_cmds and compile_et always work Addresses SourceForge Bug: #1532177 Signed-off-by: "Theodore Ts'o" --- diff --git a/lib/et/ChangeLog b/lib/et/ChangeLog index 71dfbdf47..a43245cf7 100644 --- a/lib/et/ChangeLog +++ b/lib/et/ChangeLog @@ -1,3 +1,9 @@ +2006-11-12 Theodore Tso + + * compile_et.sh.in: Make sure locale environment variables are set to + C so the shell script executes consistently no matter the + locale setting. (Addresses SourceForge Bug: #1532177) + 2006-10-22 Theodore Tso * compile_et.sh.in: Add datarootdir definition for compatibility diff --git a/lib/et/compile_et.sh.in b/lib/et/compile_et.sh.in index c81ea1f6b..96772c78d 100644 --- a/lib/et/compile_et.sh.in +++ b/lib/et/compile_et.sh.in @@ -17,6 +17,18 @@ if test "x$1" = x ; then exit 1 fi +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + $as_unset $as_var + fi +done + if test ! -f "$DIR/et_h.awk" || test ! -f "$DIR/et_c.awk" ; then DIR="$ET_DIR" # echo "Falling back to $DIR..." diff --git a/lib/ss/ChangeLog b/lib/ss/ChangeLog index 08b1f708f..bc72dee2f 100644 --- a/lib/ss/ChangeLog +++ b/lib/ss/ChangeLog @@ -1,3 +1,9 @@ +2006-11-12 Theodore Tso + + * mk_cmds.sh.in: Make sure locale environment variables are set to + C so the shell script executes consistently no matter the + locale setting. (Addresses SourceForge Bug: #1532177) + 2006-10-22 Theodore Tso * mk_cmds.sh.in: Add datarootdir definition for compatibility with diff --git a/lib/ss/mk_cmds.sh.in b/lib/ss/mk_cmds.sh.in index b9a441770..f2b46a686 100644 --- a/lib/ss/mk_cmds.sh.in +++ b/lib/ss/mk_cmds.sh.in @@ -8,6 +8,18 @@ SS_DIR="@SS_DIR@" AWK=@AWK@ SED=@SED@ +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + $as_unset $as_var + fi +done + if test "x$1" = x ; then echo "Usage: mk_cmds file" exit 1