1 diff -Bubr ../busybox-1.00+/archival/libunarchive/decompress_bunzip2.c ./archival/libunarchive/decompress_bunzip2.c
2 --- ../busybox-1.00+/archival/libunarchive/decompress_bunzip2.c 2004-08-27 17:43:05.000000000 -0700
3 +++ ./archival/libunarchive/decompress_bunzip2.c 2009-06-07 15:10:37.000000000 -0700
6 /* Note: Ignore the warning about hufGroup, base and limit being used uninitialized.
7 * They will be initialized on the fist pass of the loop. */
8 - struct group_data *hufGroup;
9 + struct group_data *hufGroup=NULL;
10 int dbufCount,nextSym,dbufSize,groupCount,*base,*limit,selector,
11 i,j,k,t,runPos,symCount,symTotal,nSelectors,byteCount[256];
12 unsigned char uc, symToByte[256], mtfSymbol[256], *selectors;
13 Only in ./archival/libunarchive: decompress_bunzip2.c.orig
14 diff -Bubr ../busybox-1.00+/archival/tar.c ./archival/tar.c
15 --- ../busybox-1.00+/archival/tar.c 2004-08-26 15:18:56.000000000 -0700
16 +++ ./archival/tar.c 2009-06-07 15:19:14.000000000 -0700
22 #include <sys/socket.h>
23 #include <sys/sysmacros.h> /* major() and minor() */
25 #include "unarchive.h"
28 Only in ./archival: tar.c.orig
29 Only in .: busybox-1.00-pre9
31 Only in .: .config.cmd
32 Only in .: .config.old
33 diff -Bubr ../busybox-1.00+/coreutils/cal.c ./coreutils/cal.c
34 --- ../busybox-1.00+/coreutils/cal.c 2004-04-14 10:51:09.000000000 -0700
35 +++ ./coreutils/cal.c 2009-06-07 15:08:50.000000000 -0700
38 #include <sys/types.h>
46 diff -Bubr ../busybox-1.00+/coreutils/date.c ./coreutils/date.c
47 --- ../busybox-1.00+/coreutils/date.c 2004-10-11 13:52:16.000000000 -0700
48 +++ ./coreutils/date.c 2009-06-07 15:08:50.000000000 -0700
52 /* if setting time, set it */
54 if (set_time && (stime(&tm) < 0)) {
58 bb_perror_msg("cannot set date");
61 Only in ./coreutils: date.c.orig
62 diff -Bubr ../busybox-1.00+/coreutils/df.c ./coreutils/df.c
63 --- ../busybox-1.00+/coreutils/df.c 2004-08-02 17:14:01.000000000 -0700
64 +++ ./coreutils/df.c 2009-06-07 15:20:57.000000000 -0700
75 #ifndef CONFIG_FEATURE_HUMAN_READABLE
81 extern int df_main(int argc, char **argv)
86 bb_fflush_stdout_and_exit(status);
92 diff -Bubr ../busybox-1.00+/coreutils/dos2unix.c ./coreutils/dos2unix.c
93 --- ../busybox-1.00+/coreutils/dos2unix.c 2004-05-05 12:39:21.000000000 -0700
94 +++ ./coreutils/dos2unix.c 2009-06-07 15:08:50.000000000 -0700
103 #include <sys/time.h>
105 diff -Bubr ../busybox-1.00+/coreutils/env.c ./coreutils/env.c
106 --- ../busybox-1.00+/coreutils/env.c 2004-04-16 08:02:10.000000000 -0700
107 +++ ./coreutils/env.c 2009-06-07 15:08:50.000000000 -0700
114 static const struct option env_long_options[] = {
115 { "ignore-environment", 0, NULL, 'i' },
116 { "unset", 1, NULL, 'u' },
121 extern int env_main(int argc, char** argv)
123 diff -Bubr ../busybox-1.00+/coreutils/expr.c ./coreutils/expr.c
124 --- ../busybox-1.00+/coreutils/expr.c 2004-04-14 10:51:09.000000000 -0700
125 +++ ./coreutils/expr.c 2009-06-07 15:22:16.000000000 -0700
128 static VALUE *docolon (VALUE *sv, VALUE *pv)
133 struct re_pattern_buffer re_buffer;
136 free (re_buffer.buffer);
143 /* Handle bare operands and ( expr ) syntax. */
144 diff -Bubr ../busybox-1.00+/coreutils/ls.c ./coreutils/ls.c
145 --- ../busybox-1.00+/coreutils/ls.c 2004-09-23 19:04:13.000000000 -0700
146 +++ ./coreutils/ls.c 2009-06-07 15:22:37.000000000 -0700
153 #include <sys/ioctl.h>
154 #include <sys/sysmacros.h> /* major() and minor() */
157 #ifdef CONFIG_SELINUX
158 #include <fs_secure.h>
162 #ifdef CONFIG_FEATURE_LS_COLOR
163 - if (isatty(STDOUT_FILENO))
165 + char *term = getenv("TERM");
166 + if (isatty(STDOUT_FILENO) && term && *term)
171 /* process options */
172 Only in ./coreutils: ls.c.orig
173 diff -Bubr ../busybox-1.00+/coreutils/md5_sha1_sum.c ./coreutils/md5_sha1_sum.c
174 --- ../busybox-1.00+/coreutils/md5_sha1_sum.c 2004-04-14 10:51:09.000000000 -0700
175 +++ ./coreutils/md5_sha1_sum.c 2009-06-07 15:08:50.000000000 -0700
186 diff -Bubr ../busybox-1.00+/coreutils/rmdir.c ./coreutils/rmdir.c
187 --- ../busybox-1.00+/coreutils/rmdir.c 2004-03-15 00:28:21.000000000 -0800
188 +++ ./coreutils/rmdir.c 2009-06-07 15:08:50.000000000 -0700
198 extern int rmdir_main(int argc, char **argv)
199 diff -Bubr ../busybox-1.00+/editors/vi.c ./editors/vi.c
200 --- ../busybox-1.00+/editors/vi.c 2004-08-19 12:15:06.000000000 -0700
201 +++ ./editors/vi.c 2009-06-07 15:24:23.000000000 -0700
210 #include <sys/ioctl.h>
211 #include <sys/time.h>
213 static Byte *screenbegin; // index into text[], of top line on the screen
214 static Byte *dot; // where all the action takes place
217 static struct termios term_orig, term_vi; // remember what the cooked mode was
219 static Byte erase_char; // the users erase character
220 static Byte last_input_char; // last char read from user
221 static Byte last_forward_char; // last char searched for with 'f'
222 @@ -2113,6 +2117,7 @@
223 //----- Set terminal attributes --------------------------------
224 static void rawmode(void)
227 tcgetattr(0, &term_orig);
229 term_vi.c_lflag &= (~ICANON & ~ECHO); // leave ISIG ON- allow intr's
230 @@ -2122,12 +2127,15 @@
231 term_vi.c_cc[VTIME] = 0;
232 erase_char = term_vi.c_cc[VERASE];
233 tcsetattr(0, TCSANOW, &term_vi);
237 static void cookmode(void)
241 tcsetattr(0, TCSANOW, &term_orig);
245 //----- Come here when we get a window resize signal ---------
246 diff -Bubr ../busybox-1.00+/include/busybox.h ./include/busybox.h
247 --- ../busybox-1.00+/include/busybox.h 2004-03-15 00:28:38.000000000 -0800
248 +++ ./include/busybox.h 2009-06-07 15:08:50.000000000 -0700
250 #include <sys/types.h>
252 #if __GNU_LIBRARY__ < 5
253 -#ifndef __dietlibc__
254 +#if !defined(__dietlibc__) && !defined(NESTEDVM)
255 #error "Sorry, libc5 is not supported"
263 #include <features.h>
266 /* Pull in the utility routines from libbb */
268 diff -Bubr ../busybox-1.00+/include/grp_.h ./include/grp_.h
269 --- ../busybox-1.00+/include/grp_.h 2004-07-15 05:53:49.000000000 -0700
270 +++ ./include/grp_.h 2009-06-07 15:08:50.000000000 -0700
274 #include <sys/types.h>
276 #include <features.h>
281 Only in ./include: grp_.h.orig
282 diff -Bubr ../busybox-1.00+/include/libbb.h ./include/libbb.h
283 --- ../busybox-1.00+/include/libbb.h 2004-09-14 20:04:07.000000000 -0700
284 +++ ./include/libbb.h 2009-06-07 15:08:50.000000000 -0700
286 #ifndef __LIBCONFIG_H__
287 #define __LIBCONFIG_H__ 1
291 +#include <sys/cdefs.h>
292 +#include <sys/fcntl.h>
297 +#define WCOREDUMP(x) 0
299 +typedef char int8_t;
300 +typedef unsigned char uint8_t;
301 +typedef short int16_t;
302 +typedef unsigned short uint16_t;
303 +typedef int int32_t;
304 +typedef unsigned int uint32_t;
305 +typedef long long int64_t;
306 +typedef unsigned long long uint64_t;
317 +static char *strchrnul(const char *s, int c) {
320 + return ret ? ret : (char*)s + strlen(s);
323 +static char *stpcpy(char *dest, const char *src) {
324 + while((*dest = *src) != '\0') { dest++; src++; }
333 #include <sys/stat.h>
334 #include <sys/types.h>
342 +#include <netinet/in.h>
349 #include <features.h>
353 #ifdef CONFIG_SELINUX
355 extern int bb_parse_mode( const char* s, mode_t* theMode);
356 extern long bb_xgetlarg(const char *arg, int base, long lower, long upper);
359 extern unsigned long bb_baud_to_value(speed_t speed);
360 extern speed_t bb_value_to_baud(unsigned long value);
363 extern int get_kernel_revision(void);
365 diff -Bubr ../busybox-1.00+/include/pwd_.h ./include/pwd_.h
366 --- ../busybox-1.00+/include/pwd_.h 2004-07-15 05:53:49.000000000 -0700
367 +++ ./include/pwd_.h 2009-06-07 15:08:50.000000000 -0700
371 #include <sys/types.h>
373 #include <features.h>
377 /* The passwd structure. */
378 Only in ./include: pwd_.h.orig
379 diff -Bubr ../busybox-1.00+/init/halt.c ./init/halt.c
380 --- ../busybox-1.00+/init/halt.c 2004-03-15 00:28:40.000000000 -0800
381 +++ ./init/halt.c 2009-06-07 15:24:41.000000000 -0700
387 #include <sys/reboot.h>
390 #include "init_shared.h"
392 Only in ./init: .#init.c
393 diff -Bubr ../busybox-1.00+/init/init.c ./init/init.c
394 --- ../busybox-1.00+/init/init.c 2004-10-08 01:21:54.000000000 -0700
395 +++ ./init/init.c 2009-06-07 15:26:03.000000000 -0700
405 #include <sys/fcntl.h>
406 #include <sys/ioctl.h>
408 #include <sys/mount.h>
410 #include <sys/types.h>
411 #include <sys/wait.h>
413 #include <sys/reboot.h>
417 #include "init_shared.h"
421 #ifdef CONFIG_SYSLOGD
422 # include <sys/syslog.h>
427 #define INIT_BUFFS_SIZE 256
429 * linux/kernel/sys.c, which can cause the machine to panic when
430 * the init process is killed.... */
431 if ((pid = fork()) == 0) {
437 waitpid (pid, NULL, 0);
438 diff -Bubr ../busybox-1.00+/libbb/getopt_ulflags.c ./libbb/getopt_ulflags.c
439 --- ../busybox-1.00+/libbb/getopt_ulflags.c 2004-02-05 05:49:29.000000000 -0800
440 +++ ./libbb/getopt_ulflags.c 2009-06-07 15:08:50.000000000 -0700
445 - while ((c = getopt_long (argc, argv, applet_opts,
446 - bb_applet_long_options, NULL)) > 0) {
450 + getopt(argc,argv,applet_opts)
452 + getopt_long (argc, argv, applet_opts,bb_applet_long_options, NULL)
455 for (on_off = complementaly; on_off->opt != c; on_off++) {
458 diff -Bubr ../busybox-1.00+/libbb/get_terminal_width_height.c ./libbb/get_terminal_width_height.c
459 --- ../busybox-1.00+/libbb/get_terminal_width_height.c 2004-03-23 15:15:35.000000000 -0800
460 +++ ./libbb/get_terminal_width_height.c 2009-06-07 15:08:50.000000000 -0700
467 #include <sys/ioctl.h>
471 /* It is perfectly ok to pass in a NULL for either width or for
473 * which case you will always get 80x24 */
474 void get_terminal_width_height(int fd, int *width, int *height)
477 + struct { int ws_row; int ws_col; } win = { 0, 0};
479 struct winsize win = { 0, 0, 0, 0 };
481 #ifdef CONFIG_FEATURE_AUTOWIDTH
482 if (ioctl(fd, TIOCGWINSZ, &win) != 0) {
484 diff -Bubr ../busybox-1.00+/libbb/hash_fd.c ./libbb/hash_fd.c
485 --- ../busybox-1.00+/libbb/hash_fd.c 2004-03-15 00:28:42.000000000 -0800
486 +++ ./libbb/hash_fd.c 2009-06-07 15:08:50.000000000 -0700
488 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
492 #include <byteswap.h>
508 +#define __BYTE_ORDER BYTE_ORDER
509 +#define __LITTLE_ENDIAN LITTLE_ENDIAN
510 +#define __BIG_ENDIAN BIG_ENDIAN
513 #ifdef CONFIG_SHA1SUM
515 Only in ./libbb: Makefile.in.orig
516 diff -Bubr ../busybox-1.00+/libbb/procps.c ./libbb/procps.c
517 --- ../busybox-1.00+/libbb/procps.c 2004-08-26 15:18:58.000000000 -0700
518 +++ ./libbb/procps.c 2009-06-07 15:08:50.000000000 -0700
524 #include <asm/page.h>
529 diff -Bubr ../busybox-1.00+/libbb/run_shell.c ./libbb/run_shell.c
530 --- ../busybox-1.00+/libbb/run_shell.c 2004-03-15 00:28:43.000000000 -0800
531 +++ ./libbb/run_shell.c 2009-06-07 15:08:50.000000000 -0700
541 #ifdef CONFIG_SELINUX
542 diff -Bubr ../busybox-1.00+/libbb/u_signal_names.c ./libbb/u_signal_names.c
543 --- ../busybox-1.00+/libbb/u_signal_names.c 2004-03-15 00:28:43.000000000 -0800
544 +++ ./libbb/u_signal_names.c 2009-06-07 15:08:50.000000000 -0700
549 +#include <sys/types.h>
553 diff -Bubr ../busybox-1.00+/libbb/vdprintf.c ./libbb/vdprintf.c
554 --- ../busybox-1.00+/libbb/vdprintf.c 2004-03-15 00:28:43.000000000 -0800
555 +++ ./libbb/vdprintf.c 2009-06-07 15:08:50.000000000 -0700
560 -extern int vdprintf(int d, const char *format, va_list ap)
561 +int dprintf(int d, const char *fmt, ...) {
565 + va_start (ap, fmt);
566 + ret = vdprintf (d, fmt, ap);
571 +int vdprintf(int d, const char *format, va_list ap)
575 diff -Bubr ../busybox-1.00+/libbb/xconnect.c ./libbb/xconnect.c
576 --- ../busybox-1.00+/libbb/xconnect.c 2004-04-14 10:51:16.000000000 -0700
577 +++ ./libbb/xconnect.c 2009-06-07 15:08:50.000000000 -0700
579 int xconnect(struct sockaddr_in *s_addr)
581 int s = socket(AF_INET, SOCK_STREAM, 0);
582 - if (connect(s, (struct sockaddr_in *)s_addr, sizeof(struct sockaddr_in)) < 0)
583 + if (connect(s, (struct sockaddr *)s_addr, sizeof(struct sockaddr_in)) < 0)
585 bb_perror_msg_and_die("Unable to connect to remote host (%s)",
586 inet_ntoa(s_addr->sin_addr));
587 diff -Bubr ../busybox-1.00+/libbb/xgetcwd.c ./libbb/xgetcwd.c
588 --- ../busybox-1.00+/libbb/xgetcwd.c 2003-05-26 07:06:00.000000000 -0700
589 +++ ./libbb/xgetcwd.c 2009-06-07 15:08:50.000000000 -0700
593 #include <sys/param.h>
594 +#include <sys/syslimits.h>
597 /* Amount to increase buffer size by in each try. */
598 diff -Bubr ../busybox-1.00+/networking/httpd.c ./networking/httpd.c
599 --- ../busybox-1.00+/networking/httpd.c 2004-10-08 01:03:29.000000000 -0700
600 +++ ./networking/httpd.c 2009-06-07 15:11:28.000000000 -0700
601 @@ -1789,11 +1789,15 @@
603 FD_SET (a_c_w, &s_fd) ;
606 + //while(read(a_c_w, buf, sizeof(config->buf) > 0));
611 retval = select (a_c_w + 1, &s_fd, NULL, NULL, &tv);
612 } while (retval > 0 && (read (a_c_w, buf, sizeof (config->buf)) > 0));
615 shutdown(a_c_r, SHUT_RD);
616 close(config->accepted_socket);
617 @@ -1818,18 +1822,22 @@
618 #ifndef CONFIG_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY
619 static int miniHttpd(int server)
622 fd_set readfd, portfd;
625 FD_SET(server, &portfd);
628 /* copy the ports we are watching to the readfd set */
633 /* Now wait INDEFINITELY on the set of sockets! */
634 if (select(server + 1, &readfd, 0, 0, 0) > 0) {
635 if (FD_ISSET(server, &readfd)) {
638 struct sockaddr_in fromAddr;
640 @@ -1838,7 +1846,7 @@
641 (struct sockaddr *)&fromAddr, &fromAddrLen);
647 config->accepted_socket = s;
648 config->rmt_ip = ntohl(fromAddr.sin_addr.s_addr);
649 @@ -1872,8 +1880,10 @@
660 Only in ./networking: httpd.c.orig
661 diff -Bubr ../busybox-1.00+/networking/tftp.c ./networking/tftp.c
662 --- ../busybox-1.00+/networking/tftp.c 2004-09-14 10:24:58.000000000 -0700
663 +++ ./networking/tftp.c 2009-06-07 15:09:40.000000000 -0700
666 FD_SET(socketfd, &rfds);
671 switch (select(FD_SETSIZE, &rfds, NULL, NULL, &tv)) {
674 len = recvfrom(socketfd, buf, tftp_bufsize, 0,
675 (struct sockaddr *) &from, &fromlen);
676 diff -Bubr ../busybox-1.00+/procps/ps.c ./procps/ps.c
677 --- ../busybox-1.00+/procps/ps.c 2004-03-15 00:29:03.000000000 -0800
678 +++ ./procps/ps.c 2009-06-07 15:08:54.000000000 -0700
685 #include <sys/ioctl.h>
688 #ifdef CONFIG_SELINUX
689 #include <fs_secure.h>
690 diff -Bubr ../busybox-1.00+/Rules.mak ./Rules.mak
691 --- ../busybox-1.00+/Rules.mak 2004-10-08 03:52:33.000000000 -0700
692 +++ ./Rules.mak 2009-06-07 15:08:50.000000000 -0700
694 STRIPCMD:=/bin/true -Not_stripping_since_we_are_debugging
696 CFLAGS+=$(WARNINGS) $(OPTIMIZATIONS) -D_GNU_SOURCE -DNDEBUG
697 - LDFLAGS += -s -Wl,-warn-common
698 - STRIPCMD:=$(STRIP) --remove-section=.note --remove-section=.comment
699 + LDFLAGS += -Wl,-warn-common
702 ifeq ($(strip $(CONFIG_STATIC)),y)
704 Only in .: Rules.mak.orig
705 diff -Bubr ../busybox-1.00+/shell/ash.c ./shell/ash.c
706 --- ../busybox-1.00+/shell/ash.c 2004-10-08 02:43:34.000000000 -0700
707 +++ ./shell/ash.c 2009-06-07 15:08:54.000000000 -0700
710 #include <sys/types.h>
711 #include <sys/cdefs.h>
713 #include <sys/ioctl.h>
715 #include <sys/param.h>
716 #include <sys/resource.h>
717 #include <sys/stat.h>
724 #include <sysexits.h>
729 @@ -1403,7 +1407,9 @@
730 { BUILTIN_SPEC_REG "trap", trapcmd },
731 { BUILTIN_REGULAR "true", truecmd },
732 { BUILTIN_NOSPEC "type", typecmd },
734 { BUILTIN_NOSPEC "ulimit", ulimitcmd },
736 { BUILTIN_REGULAR "umask", umaskcmd },
737 #ifdef CONFIG_ASH_ALIAS
738 { BUILTIN_REGULAR "unalias", unaliascmd },
739 @@ -2563,7 +2569,9 @@
747 if (gotsig[SIGINT - 1] && !trap[SIGINT]) {
748 if (!(rootshell && iflag)) {
749 @@ -6716,7 +6724,11 @@
754 + col = fmtstr(s, 32, "signal %d",st);
756 col = fmtstr(s, 32, strsignal(st));
758 if (WCOREDUMP(status)) {
759 col += fmtstr(s + col, 16, " (core dumped)");
761 @@ -7323,7 +7335,7 @@
765 - return wait3(status, flags, (struct rusage *)NULL);
766 + return waitpid((pid_t)-1,status,flags);
770 @@ -12717,6 +12729,8 @@
779 @@ -12898,7 +12912,7 @@
784 +#endif /* NESTEDVM */
786 #ifdef CONFIG_ASH_MATH_SUPPORT
788 Only in ./shell: ash.c.orig
789 diff -Bubr ../busybox-1.00+/util-linux/more.c ./util-linux/more.c
790 --- ../busybox-1.00+/util-linux/more.c 2004-03-27 02:02:48.000000000 -0800
791 +++ ./util-linux/more.c 2009-06-07 15:08:54.000000000 -0700
797 #include <sys/ioctl.h>