From: Eric Andersen Date: Sun, 13 May 2001 00:33:16 +0000 (-0000) Subject: Make the locale stuff only do the getpid==1 check if BB_INIT is defined X-Git-Tag: 0_52~198 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=4819c3d477e83b846649220fc96534c9bb93d642;p=oweals%2Fbusybox.git Make the locale stuff only do the getpid==1 check if BB_INIT is defined --- diff --git a/applets/busybox.c b/applets/busybox.c index 41b6069ed..9cc884854 100644 --- a/applets/busybox.c +++ b/applets/busybox.c @@ -82,9 +82,13 @@ int main(int argc, char **argv) } #endif -#ifdef BB_LOCALE_SUPPORT +#ifdef BB_LOCALE_SUPPORT +#ifdef BB_INIT if(getpid()!=1) /* Do not set locale for `init' */ +#endif + { setlocale(LC_ALL, ""); + } #endif run_applet_by_name(applet_name, argc, argv); diff --git a/busybox.c b/busybox.c index 41b6069ed..9cc884854 100644 --- a/busybox.c +++ b/busybox.c @@ -82,9 +82,13 @@ int main(int argc, char **argv) } #endif -#ifdef BB_LOCALE_SUPPORT +#ifdef BB_LOCALE_SUPPORT +#ifdef BB_INIT if(getpid()!=1) /* Do not set locale for `init' */ +#endif + { setlocale(LC_ALL, ""); + } #endif run_applet_by_name(applet_name, argc, argv);