aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lash.c6
-rw-r--r--sh.c6
-rw-r--r--shell/lash.c6
3 files changed, 18 insertions, 0 deletions
diff --git a/lash.c b/lash.c
index e33fd369c..ca0d4bb43 100644
--- a/lash.c
+++ b/lash.c
@@ -64,6 +64,7 @@
64#include <sys/wait.h> 64#include <sys/wait.h>
65#include <unistd.h> 65#include <unistd.h>
66#include <getopt.h> 66#include <getopt.h>
67#include <locale.h>
67 68
68//#define BB_FEATURE_SH_WORDEXP 69//#define BB_FEATURE_SH_WORDEXP
69 70
@@ -446,6 +447,11 @@ static int builtin_export(struct child_prog *child)
446 else if (strncmp(v, "PS2=", 4)==0) 447 else if (strncmp(v, "PS2=", 4)==0)
447 PS2 = getenv("PS2"); 448 PS2 = getenv("PS2");
448#endif 449#endif
450 if(strncmp(v, "LC_ALL=", 7)==0)
451 setlocale(LC_ALL, getenv("LC_ALL"));
452 if(strncmp(v, "LC_CTYPE=", 7)==0)
453 setlocale(LC_CTYPE, getenv("LC_CTYPE"));
454
449 return (res); 455 return (res);
450} 456}
451 457
diff --git a/sh.c b/sh.c
index e33fd369c..ca0d4bb43 100644
--- a/sh.c
+++ b/sh.c
@@ -64,6 +64,7 @@
64#include <sys/wait.h> 64#include <sys/wait.h>
65#include <unistd.h> 65#include <unistd.h>
66#include <getopt.h> 66#include <getopt.h>
67#include <locale.h>
67 68
68//#define BB_FEATURE_SH_WORDEXP 69//#define BB_FEATURE_SH_WORDEXP
69 70
@@ -446,6 +447,11 @@ static int builtin_export(struct child_prog *child)
446 else if (strncmp(v, "PS2=", 4)==0) 447 else if (strncmp(v, "PS2=", 4)==0)
447 PS2 = getenv("PS2"); 448 PS2 = getenv("PS2");
448#endif 449#endif
450 if(strncmp(v, "LC_ALL=", 7)==0)
451 setlocale(LC_ALL, getenv("LC_ALL"));
452 if(strncmp(v, "LC_CTYPE=", 7)==0)
453 setlocale(LC_CTYPE, getenv("LC_CTYPE"));
454
449 return (res); 455 return (res);
450} 456}
451 457
diff --git a/shell/lash.c b/shell/lash.c
index e33fd369c..ca0d4bb43 100644
--- a/shell/lash.c
+++ b/shell/lash.c
@@ -64,6 +64,7 @@
64#include <sys/wait.h> 64#include <sys/wait.h>
65#include <unistd.h> 65#include <unistd.h>
66#include <getopt.h> 66#include <getopt.h>
67#include <locale.h>
67 68
68//#define BB_FEATURE_SH_WORDEXP 69//#define BB_FEATURE_SH_WORDEXP
69 70
@@ -446,6 +447,11 @@ static int builtin_export(struct child_prog *child)
446 else if (strncmp(v, "PS2=", 4)==0) 447 else if (strncmp(v, "PS2=", 4)==0)
447 PS2 = getenv("PS2"); 448 PS2 = getenv("PS2");
448#endif 449#endif
450 if(strncmp(v, "LC_ALL=", 7)==0)
451 setlocale(LC_ALL, getenv("LC_ALL"));
452 if(strncmp(v, "LC_CTYPE=", 7)==0)
453 setlocale(LC_CTYPE, getenv("LC_CTYPE"));
454
449 return (res); 455 return (res);
450} 456}
451 457