svn commit: trunk/busybox: coreutils editors
vda at busybox.net
vda at busybox.net
Mon Jan 1 23:53:13 UTC 2007
Author: vda
Date: 2007-01-01 15:53:12 -0800 (Mon, 01 Jan 2007)
New Revision: 17126
Log:
awk: undo locale setting for numbers - or else parsing
can act quite mysteriously
date: add if(ENABLE_LOCALE_SUPPORT)
Modified:
trunk/busybox/coreutils/date.c
trunk/busybox/editors/awk.c
Changeset:
Modified: trunk/busybox/coreutils/date.c
===================================================================
--- trunk/busybox/coreutils/date.c 2007-01-01 23:51:30 UTC (rev 17125)
+++ trunk/busybox/coreutils/date.c 2007-01-01 23:53:12 UTC (rev 17126)
@@ -212,7 +212,8 @@
}
} else if (opt & DATE_OPT_RFC2822) {
/* 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 ");
i = 22;
goto format_utc;
Modified: trunk/busybox/editors/awk.c
===================================================================
--- trunk/busybox/editors/awk.c 2007-01-01 23:51:30 UTC (rev 17125)
+++ trunk/busybox/editors/awk.c 2007-01-01 23:53:12 UTC (rev 17126)
@@ -2652,6 +2652,11 @@
char *vnames = (char *)vNames; /* cheat */
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);
/* allocate global buffer */
More information about the busybox-cvs
mailing list