summaryrefslogtreecommitdiff
path: root/package/busybox/patches/360-awk_multi_f.patch
diff options
context:
space:
mode:
authorImre Kaloz <kaloz@openwrt.org>2008-08-20 14:00:34 +0000
committerImre Kaloz <kaloz@openwrt.org>2008-08-20 14:00:34 +0000
commit1e82faaa5e835b00676421b1c63bef541f8ca0d3 (patch)
treeabda8ea9d70f7d10c897cf214028b9037b17f784 /package/busybox/patches/360-awk_multi_f.patch
parente3d9bc5779a012df82e2c48af3bef81bb011257a (diff)
downloadmtk-20170518-1e82faaa5e835b00676421b1c63bef541f8ca0d3.zip
mtk-20170518-1e82faaa5e835b00676421b1c63bef541f8ca0d3.tar.gz
mtk-20170518-1e82faaa5e835b00676421b1c63bef541f8ca0d3.tar.bz2
upgrade busybox to v1.11.1 and add current upstream fixes
SVN-Revision: 12348
Diffstat (limited to 'package/busybox/patches/360-awk_multi_f.patch')
-rw-r--r--package/busybox/patches/360-awk_multi_f.patch72
1 files changed, 0 insertions, 72 deletions
diff --git a/package/busybox/patches/360-awk_multi_f.patch b/package/busybox/patches/360-awk_multi_f.patch
index ab753c1..e69de29 100644
--- a/package/busybox/patches/360-awk_multi_f.patch
+++ b/package/busybox/patches/360-awk_multi_f.patch
@@ -1,72 +0,0 @@
-Index: busybox-1.7.2/editors/awk.c
-===================================================================
---- busybox-1.7.2.orig/editors/awk.c 2007-10-30 15:34:59.000000000 -0500
-+++ busybox-1.7.2/editors/awk.c 2007-10-30 15:35:03.000000000 -0500
-@@ -2757,6 +2757,7 @@
- {
- unsigned opt;
- char *opt_F, *opt_W;
-+ llist_t *opt_f = NULL;
- llist_t *opt_v = NULL;
- int i, j, flen;
- var *v;
-@@ -2816,8 +2817,8 @@
- *s1 = '=';
- }
- }
-- opt_complementary = "v::";
-- opt = getopt32(argv, "F:v:f:W:", &opt_F, &opt_v, &g_progname, &opt_W);
-+ opt_complementary = "v::f::";
-+ opt = getopt32(argv, "F:v:f:W:", &opt_F, &opt_v, &opt_f, &opt_W);
- argv += optind;
- argc -= optind;
- if (opt & 0x1)
-@@ -2826,25 +2827,31 @@
- if (!is_assignment(llist_pop(&opt_v)))
- bb_show_usage();
- }
-- if (opt & 0x4) { // -f
-- char *s = s; /* die, gcc, die */
-- FILE *from_file = afopen(g_progname, "r");
-- /* one byte is reserved for some trick in next_token */
-- if (fseek(from_file, 0, SEEK_END) == 0) {
-- flen = ftell(from_file);
-- s = xmalloc(flen + 4);
-- fseek(from_file, 0, SEEK_SET);
-- i = 1 + fread(s + 1, 1, flen, from_file);
-- } else {
-- for (i = j = 1; j > 0; i += j) {
-- s = xrealloc(s, i + 4096);
-- j = fread(s + i, 1, 4094, from_file);
-+ if (opt_f != NULL) { // -f
-+ while (opt_f != NULL) {
-+ char *s = NULL;
-+ FILE *from_file;
-+
-+ g_progname = opt_f->data;
-+ from_file = afopen(g_progname, "r");
-+ /* one byte is reserved for some trick in next_token */
-+ if (fseek(from_file, 0, SEEK_END) == 0) {
-+ flen = ftell(from_file);
-+ s = xmalloc(flen + 4);
-+ fseek(from_file, 0, SEEK_SET);
-+ i = 1 + fread(s + 1, 1, flen, from_file);
-+ } else {
-+ for (i = j = 1; j > 0; i += j) {
-+ s = xrealloc(s, i + 4096);
-+ j = fread(s + i, 1, 4094, from_file);
-+ }
- }
-+ s[i] = '\0';
-+ fclose(from_file);
-+ parse_program(s + 1);
-+ free(s);
-+ opt_f = opt_f->link;
- }
-- s[i] = '\0';
-- fclose(from_file);
-- parse_program(s + 1);
-- free(s);
- } else { // no -f: take program from 1st parameter
- if (!argc)
- bb_show_usage();