diff options
author | Rob Landley <rob@landley.net> | 2012-11-26 14:14:29 -0600 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2012-11-26 14:14:29 -0600 |
commit | 6cf0a115451d6d5ead94860f0731040dc2293db0 (patch) | |
tree | f04a6b76ca8572fccf01f1dc0b8b71710bde439c /main.c | |
parent | 471ce1b29933702bdd63bf27e4470898cb37b451 (diff) | |
download | toybox-6cf0a115451d6d5ead94860f0731040dc2293db0.tar.gz |
Cleanup i18n support (#ifdefectomy, move global init to process launch). Teach make.sh to emit "#define FLAG_x 0" for options inside disabled USE macros so we can unconditionally refer to them.
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -101,9 +101,6 @@ void toy_exec(char *argv[]) which = toy_find(argv[0]); if (!which) return; toy_init(which, argv); -#ifdef CFG_TOYBOX_I18N - setlocale(LC_ALL, ""); -#endif toys.which->toy_main(); exit(toys.exitval); } @@ -145,6 +142,8 @@ void toybox_main(void) int main(int argc, char *argv[]) { + if (CFG_TOYBOX_I18N) setlocale(LC_ALL, ""); + // Artificial scope to eat less stack for things we call { char *name; |