OSDN Git Service
(root)
/
android-x86
/
external-toybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
94a4603
)
Always call setlocale if I18N is enabled, so nested toy_exec() can switch it back...
author
Rob Landley
<rob@landley.net>
Sat, 20 Sep 2014 22:51:23 +0000
(17:51 -0500)
committer
Rob Landley
<rob@landley.net>
Sat, 20 Sep 2014 22:51:23 +0000
(17:51 -0500)
main.c
patch
|
blob
|
history
diff --git
a/main.c
b/main.c
index
cfa2cc9
..
6e7d267
100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-66,7
+66,7
@@
static void toy_singleinit(struct toy_list *which, char *argv[])
toys.which = which;
toys.argv = argv;
- if (CFG_TOYBOX_I18N
&& (which->flags & TOYFLAG_LOCALE)) setlocale(LC_ALL, ""
);
+ if (CFG_TOYBOX_I18N
) setlocale(LC_ALL, "C"+!!(which->flags & TOYFLAG_LOCALE)
);
if (CFG_TOYBOX_HELP_DASHDASH && argv[1] && !strcmp(argv[1], "--help")) {
if (toys.which == toy_list && toys.argv[2])