[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FYI: branch-1-5: locale reset (was: back out AS_SHELL_SANITIZE: get comp
From: |
Ralf Wildenhues |
Subject: |
FYI: branch-1-5: locale reset (was: back out AS_SHELL_SANITIZE: get compile mode up to speed) |
Date: |
Thu, 18 May 2006 08:52:53 +0200 |
User-agent: |
Mutt/1.5.11 |
* Ralf Wildenhues wrote on Thu, May 18, 2006 at 07:45:42AM CEST:
> * Peter O'Gorman wrote on Thu, May 18, 2006 at 01:14:11AM CEST:
>
> > A question though, in branch-1.5 we only unset modify LC_ALL and LANG,
> > don't we? Why do we need to change the others here?
>
> Well, that is a bug in branch-1-5. I'll fix it.
I've applied the following to branch-1-5.
Cheers,
Ralf
* ltmain.in: Reset/unset not only LANG and LC_ALL, but also
LC_CTYPE, LC_COLLATE, LC_MESSAGES.
(execute mode): Restore them.
Noted by Peter O'Gorman.
Index: ltmain.in
===================================================================
RCS file: /cvsroot/libtool/libtool/Attic/ltmain.in,v
retrieving revision 1.334.2.126
diff -u -r1.334.2.126 ltmain.in
--- ltmain.in 14 May 2006 08:21:23 -0000 1.334.2.126
+++ ltmain.in 18 May 2006 06:47:13 -0000
@@ -113,12 +113,14 @@
# These must not be set unconditionally because not all systems understand
# e.g. LANG=C (notably SCO).
# We save the old values to restore during execute mode.
-if test "${LC_ALL+set}" = set; then
- save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
-fi
-if test "${LANG+set}" = set; then
- save_LANG="$LANG"; LANG=C; export LANG
-fi
+for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+do
+ eval "if test \"\${$lt_var+set}\" = set; then
+ save_$lt_var=\$$lt_var
+ $lt_var=C
+ export $lt_var
+ fi"
+done
# Make sure IFS has a sensible default
lt_nl='
@@ -6464,12 +6466,14 @@
fi
# Restore saved environment variables
- if test "${save_LC_ALL+set}" = set; then
- LC_ALL="$save_LC_ALL"; export LC_ALL
- fi
- if test "${save_LANG+set}" = set; then
- LANG="$save_LANG"; export LANG
- fi
+ for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+ do
+ eval "if test \"\${save_$lt_var+set}\" = set; then
+ $lt_var=\$save_$lt_var; export $lt_var
+ else
+ $lt_unset $lt_var
+ fi"
+ done
# Now prepare to actually exec the command.
exec_cmd="\$cmd$args"