From 088d86511f9e407a27a62e16af60ced1fb05944f Mon Sep 17 00:00:00 2001 From: Imre Kaloz Date: Wed, 20 Aug 2008 14:00:34 +0000 Subject: upgrade busybox to v1.11.1 and add current upstream fixes git-svn-id: svn://svn.openwrt.org/openwrt/trunk@12348 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/busybox/patches/360-awk_multi_f.patch | 72 --------------------------- 1 file changed, 72 deletions(-) (limited to 'package/busybox/patches/360-awk_multi_f.patch') diff --git a/package/busybox/patches/360-awk_multi_f.patch b/package/busybox/patches/360-awk_multi_f.patch index ab753c125a..e69de29bb2 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(); -- cgit v1.2.3