awk: undo locale setting for numbers - or else parsing
can act quite mysteriously date: add if(ENABLE_LOCALE_SUPPORT)
This commit is contained in:
parent
f782f52c8c
commit
6dc6ebbf44
@ -212,7 +212,8 @@ format_utc:
|
|||||||
}
|
}
|
||||||
} else if (opt & DATE_OPT_RFC2822) {
|
} else if (opt & DATE_OPT_RFC2822) {
|
||||||
/* Undo busybox.c for date -R */
|
/* Undo busybox.c for date -R */
|
||||||
setlocale(LC_TIME, "C");
|
if (ENABLE_LOCALE_SUPPORT)
|
||||||
|
setlocale(LC_TIME, "C");
|
||||||
strcpy(date_fmt, "%a, %d %b %Y %H:%M:%S ");
|
strcpy(date_fmt, "%a, %d %b %Y %H:%M:%S ");
|
||||||
i = 22;
|
i = 22;
|
||||||
goto format_utc;
|
goto format_utc;
|
||||||
|
@ -2652,6 +2652,11 @@ int awk_main(int argc, char **argv)
|
|||||||
char *vnames = (char *)vNames; /* cheat */
|
char *vnames = (char *)vNames; /* cheat */
|
||||||
char *vvalues = (char *)vValues;
|
char *vvalues = (char *)vValues;
|
||||||
|
|
||||||
|
/* Undo busybox.c, or else strtod may eat ','! This breaks parsing:
|
||||||
|
* $1,$2 == '$1,' '$2', NOT '$1' ',' '$2' */
|
||||||
|
if (ENABLE_LOCALE_SUPPORT)
|
||||||
|
setlocale(LC_NUMERIC, "C");
|
||||||
|
|
||||||
zero_out_var(&tv);
|
zero_out_var(&tv);
|
||||||
|
|
||||||
/* allocate global buffer */
|
/* allocate global buffer */
|
||||||
|
Loading…
Reference in New Issue
Block a user