From 05155f9bff3935bd45a506a0fe0a277070d23094 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Sun, 12 Nov 2006 10:43:31 -0500 Subject: [PATCH] Set local environment variables to C so mk_cmds and compile_et always work Addresses SourceForge Bug: #1532177 Signed-off-by: "Theodore Ts'o" --- lib/et/ChangeLog | 6 ++++++ lib/et/compile_et.sh.in | 12 ++++++++++++ lib/ss/ChangeLog | 6 ++++++ lib/ss/mk_cmds.sh.in | 12 ++++++++++++ 4 files changed, 36 insertions(+) diff --git a/lib/et/ChangeLog b/lib/et/ChangeLog index 71dfbdf..a43245c 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 c81ea1f..96772c7 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 08b1f70..bc72dee 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 b9a4417..f2b46a6 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 -- 1.8.3.1