From 9934781a973248cc8d1527899db43616457a7166 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Sat, 7 Jan 2012 23:21:00 +0000 Subject: 30098: Jun T.: alternative to 30079: don't setlocale() in setlang() if LC_ALL set --- Src/params.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Src/params.c') diff --git a/Src/params.c b/Src/params.c index 6d98b8ee4..59d5daf2f 100644 --- a/Src/params.c +++ b/Src/params.c @@ -3779,9 +3779,6 @@ static struct localename { #endif #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 -- cgit 1.4.1