summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2012-01-07 23:21:00 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2012-01-07 23:21:00 +0000
commit9934781a973248cc8d1527899db43616457a7166 (patch)
tree5b0d62ec82ee20cf0d09da0a8e8c482618aec790
parent2d47270112f9e3bf7c8ddbcdad0e537d5f34423a (diff)
downloadzsh-9934781a973248cc8d1527899db43616457a7166.tar.gz
zsh-9934781a973248cc8d1527899db43616457a7166.tar.xz
zsh-9934781a973248cc8d1527899db43616457a7166.zip
30098: Jun T.: alternative to 30079: don't setlocale() in setlang() if LC_ALL set
-rw-r--r--Src/params.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/Src/params.c b/Src/params.c
index 6d98b8ee4..59d5daf2f 100644
--- a/Src/params.c
+++ b/Src/params.c
@@ -3780,9 +3780,6 @@ static struct localename {
 #ifdef LC_TIME
     {"LC_TIME", LC_TIME},
 #endif
-#ifdef LC_ALL
-    {"LC_ALL", LC_ALL},
-#endif
     {NULL, 0}
 };
 
@@ -3791,6 +3788,10 @@ static void
 setlang(char *x)
 {
     struct localename *ln;
+    char *x2;
+
+    if ((x2 = getsparam("LC_ALL")) && *x2)
+	return;
 
     /*
      * Set the global locale to the value passed, but override