aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog1
-rw-r--r--Makefile2
-rw-r--r--applets/busybox.c4
-rw-r--r--applets/usage.c2
-rw-r--r--ar.c2
-rw-r--r--archival/ar.c2
-rw-r--r--archival/gunzip.c2
-rw-r--r--archival/gzip.c2
-rw-r--r--archival/tar.c2
-rw-r--r--basename.c2
-rw-r--r--busybox.c4
-rw-r--r--cat.c2
-rw-r--r--chmod_chown_chgrp.c2
-rw-r--r--chroot.c2
-rw-r--r--chvt.c2
-rw-r--r--clear.c2
-rw-r--r--cmdedit.c2
-rw-r--r--console-tools/chvt.c2
-rw-r--r--console-tools/clear.c2
-rw-r--r--console-tools/deallocvt.c2
-rw-r--r--console-tools/dumpkmap.c2
-rw-r--r--console-tools/loadacm.c2
-rw-r--r--console-tools/loadfont.c2
-rw-r--r--console-tools/loadkmap.c2
-rw-r--r--console-tools/reset.c2
-rw-r--r--console-tools/setkeycodes.c2
-rw-r--r--coreutils/basename.c2
-rw-r--r--coreutils/cat.c2
-rw-r--r--coreutils/chroot.c2
-rw-r--r--coreutils/cut.c2
-rw-r--r--coreutils/date.c2
-rw-r--r--coreutils/dd.c2
-rw-r--r--coreutils/df.c2
-rw-r--r--coreutils/dirname.c2
-rw-r--r--coreutils/dos2unix.c2
-rw-r--r--coreutils/du.c4
-rw-r--r--coreutils/echo.c2
-rw-r--r--coreutils/expr.c2
-rw-r--r--coreutils/head.c4
-rw-r--r--coreutils/hostid.c2
-rw-r--r--coreutils/id.c2
-rw-r--r--coreutils/length.c2
-rw-r--r--coreutils/ln.c2
-rw-r--r--coreutils/logname.c2
-rw-r--r--coreutils/ls.c2
-rw-r--r--coreutils/md5sum.c4
-rw-r--r--coreutils/mkdir.c2
-rw-r--r--coreutils/mkfifo.c2
-rw-r--r--coreutils/mknod.c2
-rw-r--r--coreutils/printf.c2
-rw-r--r--coreutils/pwd.c2
-rw-r--r--coreutils/rm.c2
-rw-r--r--coreutils/rmdir.c2
-rw-r--r--coreutils/sleep.c2
-rw-r--r--coreutils/sort.c4
-rw-r--r--coreutils/sync.c2
-rw-r--r--coreutils/tail.c2
-rw-r--r--coreutils/tee.c2
-rw-r--r--coreutils/test.c2
-rw-r--r--coreutils/touch.c2
-rw-r--r--coreutils/tr.c2
-rw-r--r--coreutils/tty.c2
-rw-r--r--coreutils/uname.c2
-rw-r--r--coreutils/uniq.c4
-rw-r--r--coreutils/usleep.c2
-rw-r--r--coreutils/uudecode.c2
-rw-r--r--coreutils/uuencode.c2
-rw-r--r--coreutils/wc.c2
-rw-r--r--coreutils/whoami.c2
-rw-r--r--coreutils/yes.c2
-rw-r--r--cp_mv.c2
-rw-r--r--cut.c2
-rw-r--r--date.c2
-rw-r--r--dc.c2
-rw-r--r--dd.c2
-rw-r--r--deallocvt.c2
-rw-r--r--df.c2
-rw-r--r--dirname.c2
-rw-r--r--dmesg.c2
-rw-r--r--dos2unix.c2
-rw-r--r--du.c4
-rw-r--r--dumpkmap.c2
-rw-r--r--dutmp.c2
-rw-r--r--echo.c2
-rw-r--r--editors/sed.c2
-rw-r--r--expr.c2
-rw-r--r--fbset.c2
-rw-r--r--fdflush.c2
-rw-r--r--find.c2
-rw-r--r--findutils/find.c2
-rw-r--r--findutils/grep.c2
-rw-r--r--findutils/which.c2
-rw-r--r--findutils/xargs.c2
-rw-r--r--free.c2
-rw-r--r--freeramdisk.c2
-rw-r--r--fsck_minix.c2
-rw-r--r--getopt.c2
-rw-r--r--grep.c2
-rw-r--r--gunzip.c2
-rw-r--r--gzip.c2
-rw-r--r--halt.c2
-rw-r--r--head.c4
-rw-r--r--hostid.c2
-rw-r--r--hostname.c4
-rw-r--r--id.c2
-rw-r--r--init.c2
-rw-r--r--init/halt.c2
-rw-r--r--init/init.c2
-rw-r--r--init/poweroff.c2
-rw-r--r--init/reboot.c2
-rw-r--r--insmod.c6
-rw-r--r--internal.h468
-rw-r--r--kill.c2
-rw-r--r--lash.c2
-rw-r--r--length.c2
-rw-r--r--ln.c2
-rw-r--r--loadacm.c2
-rw-r--r--loadfont.c2
-rw-r--r--loadkmap.c2
-rw-r--r--logger.c2
-rw-r--r--logname.c2
-rw-r--r--ls.c2
-rw-r--r--lsmod.c2
-rw-r--r--makedevs.c2
-rw-r--r--md5sum.c4
-rw-r--r--messages.c2
-rw-r--r--miscutils/dc.c2
-rw-r--r--miscutils/dutmp.c2
-rw-r--r--miscutils/makedevs.c2
-rw-r--r--miscutils/mktemp.c2
-rw-r--r--miscutils/mt.c2
-rw-r--r--miscutils/update.c2
-rw-r--r--mkdir.c2
-rw-r--r--mkfifo.c2
-rw-r--r--mkfs_minix.c2
-rw-r--r--mknod.c2
-rw-r--r--mkswap.c2
-rw-r--r--mktemp.c2
-rw-r--r--modutils/insmod.c6
-rw-r--r--modutils/lsmod.c2
-rw-r--r--modutils/rmmod.c2
-rw-r--r--more.c2
-rw-r--r--mount.c2
-rw-r--r--mt.c2
-rw-r--r--mtab.c2
-rw-r--r--nc.c2
-rw-r--r--networking/hostname.c4
-rw-r--r--networking/nc.c2
-rw-r--r--networking/nslookup.c4
-rw-r--r--networking/ping.c4
-rw-r--r--networking/telnet.c2
-rw-r--r--networking/wget.c2
-rw-r--r--nfsmount.c2
-rw-r--r--nslookup.c4
-rw-r--r--ping.c4
-rw-r--r--poweroff.c2
-rw-r--r--printf.c2
-rw-r--r--procps/free.c2
-rw-r--r--procps/kill.c2
-rw-r--r--procps/ps.c2
-rw-r--r--procps/renice.c2
-rw-r--r--procps/uptime.c2
-rw-r--r--ps.c2
-rw-r--r--pwd.c2
-rw-r--r--rdate.c2
-rw-r--r--reboot.c2
-rw-r--r--renice.c2
-rw-r--r--reset.c2
-rw-r--r--rm.c2
-rw-r--r--rmdir.c2
-rw-r--r--rmmod.c2
-rw-r--r--sed.c2
-rw-r--r--setkeycodes.c2
-rw-r--r--sh.c2
-rw-r--r--shell/cmdedit.c2
-rw-r--r--shell/lash.c2
-rw-r--r--sleep.c2
-rw-r--r--sort.c4
-rw-r--r--swaponoff.c2
-rw-r--r--sync.c2
-rw-r--r--sysklogd/logger.c2
-rw-r--r--sysklogd/syslogd.c2
-rw-r--r--syslogd.c2
-rw-r--r--tail.c2
-rw-r--r--tar.c2
-rw-r--r--tee.c2
-rw-r--r--telnet.c2
-rw-r--r--test.c2
-rw-r--r--touch.c2
-rw-r--r--tr.c2
-rw-r--r--true_false.c2
-rw-r--r--tty.c2
-rw-r--r--umount.c2
-rw-r--r--uname.c2
-rw-r--r--uniq.c4
-rw-r--r--unix2dos.c2
-rw-r--r--unrpm.c2
-rw-r--r--update.c2
-rw-r--r--uptime.c2
-rw-r--r--usage.c2
-rw-r--r--usleep.c2
-rw-r--r--util-linux/dmesg.c2
-rw-r--r--util-linux/fbset.c2
-rw-r--r--util-linux/fdflush.c2
-rw-r--r--util-linux/freeramdisk.c2
-rw-r--r--util-linux/fsck_minix.c2
-rw-r--r--util-linux/getopt.c2
-rw-r--r--util-linux/mkfs_minix.c2
-rw-r--r--util-linux/mkswap.c2
-rw-r--r--util-linux/more.c2
-rw-r--r--util-linux/mount.c2
-rw-r--r--util-linux/nfsmount.c2
-rw-r--r--util-linux/rdate.c2
-rw-r--r--util-linux/swaponoff.c2
-rw-r--r--util-linux/umount.c2
-rw-r--r--utility.c2
-rw-r--r--uudecode.c2
-rw-r--r--uuencode.c2
-rw-r--r--wc.c2
-rw-r--r--wget.c2
-rw-r--r--which.c2
-rw-r--r--whoami.c2
-rw-r--r--xargs.c2
-rw-r--r--yes.c2
224 files changed, 245 insertions, 712 deletions
diff --git a/Changelog b/Changelog
index b374845ed..930a7dfb1 100644
--- a/Changelog
+++ b/Changelog
@@ -32,6 +32,7 @@
32 * Fixed chmod option parsing so things like 'chmod -r /tmp/file' 32 * Fixed chmod option parsing so things like 'chmod -r /tmp/file'
33 now work (previously it thought -r was an option). Doh! 33 now work (previously it thought -r was an option). Doh!
34 * Fixed tar handling of stdin and stdout 34 * Fixed tar handling of stdin and stdout
35 * Renamed "internal.h" to the more sensible "busybox.h"
35 * Preliminary support for GNU HURD. 36 * Preliminary support for GNU HURD.
36 * Tons of other bugfixes. 37 * Tons of other bugfixes.
37 38
diff --git a/Makefile b/Makefile
index 469539095..5cb888689 100644
--- a/Makefile
+++ b/Makefile
@@ -177,7 +177,7 @@ busybox.links: Config.h
177 - ./busybox.mkll | sort >$@ 177 - ./busybox.mkll | sort >$@
178 178
179nfsmount.o cmdedit.o: %.o: %.h 179nfsmount.o cmdedit.o: %.o: %.h
180$(OBJECTS): %.o: Config.h internal.h %.c Makefile 180$(OBJECTS): %.o: Config.h busybox.h %.c Makefile
181 181
182utility.o: loop.h 182utility.o: loop.h
183 183
diff --git a/applets/busybox.c b/applets/busybox.c
index 17a4c447a..825f40e7c 100644
--- a/applets/busybox.c
+++ b/applets/busybox.c
@@ -1,5 +1,5 @@
1/* vi: set sw=4 ts=4: */ 1/* vi: set sw=4 ts=4: */
2#include "internal.h" 2#include "busybox.h"
3#include <stdio.h> 3#include <stdio.h>
4#include <string.h> 4#include <string.h>
5#include <errno.h> 5#include <errno.h>
@@ -369,7 +369,7 @@ const char *applet_name;
369#ifdef BB_FEATURE_INSTALLER 369#ifdef BB_FEATURE_INSTALLER
370/* 370/*
371 * directory table 371 * directory table
372 * this should be consistent w/ the enum, internal.h::Location, 372 * this should be consistent w/ the enum, busybox.h::Location,
373 * or else... 373 * or else...
374 */ 374 */
375static char* install_dir[] = { 375static char* install_dir[] = {
diff --git a/applets/usage.c b/applets/usage.c
index c4da08ad7..ae6cbaa7c 100644
--- a/applets/usage.c
+++ b/applets/usage.c
@@ -1,4 +1,4 @@
1#include "internal.h" 1#include "busybox.h"
2 2
3#if defined BB_AR 3#if defined BB_AR
4const char ar_usage[] = 4const char ar_usage[] =
diff --git a/ar.c b/ar.c
index 59c3a7754..f3ba59b6a 100644
--- a/ar.c
+++ b/ar.c
@@ -35,7 +35,7 @@
35#include <sys/types.h> 35#include <sys/types.h>
36#include <sys/stat.h> 36#include <sys/stat.h>
37#include <malloc.h> 37#include <malloc.h>
38#include "internal.h" 38#include "busybox.h"
39 39
40#define BLOCK_SIZE 60 40#define BLOCK_SIZE 60
41#define PRESERVE_DATE 1 /* preserve original dates */ 41#define PRESERVE_DATE 1 /* preserve original dates */
diff --git a/archival/ar.c b/archival/ar.c
index 59c3a7754..f3ba59b6a 100644
--- a/archival/ar.c
+++ b/archival/ar.c
@@ -35,7 +35,7 @@
35#include <sys/types.h> 35#include <sys/types.h>
36#include <sys/stat.h> 36#include <sys/stat.h>
37#include <malloc.h> 37#include <malloc.h>
38#include "internal.h" 38#include "busybox.h"
39 39
40#define BLOCK_SIZE 60 40#define BLOCK_SIZE 60
41#define PRESERVE_DATE 1 /* preserve original dates */ 41#define PRESERVE_DATE 1 /* preserve original dates */
diff --git a/archival/gunzip.c b/archival/gunzip.c
index b27ebeda8..ee8693013 100644
--- a/archival/gunzip.c
+++ b/archival/gunzip.c
@@ -27,7 +27,7 @@
27 * 27 *
28 */ 28 */
29 29
30#include "internal.h" 30#include "busybox.h"
31#include <getopt.h> 31#include <getopt.h>
32 32
33/* These defines are very important for BusyBox. Without these, 33/* These defines are very important for BusyBox. Without these,
diff --git a/archival/gzip.c b/archival/gzip.c
index c0832680f..e518ffd16 100644
--- a/archival/gzip.c
+++ b/archival/gzip.c
@@ -29,7 +29,7 @@
29 * 29 *
30 */ 30 */
31 31
32#include "internal.h" 32#include "busybox.h"
33#define BB_DECLARE_EXTERN 33#define BB_DECLARE_EXTERN
34#define bb_need_memory_exhausted 34#define bb_need_memory_exhausted
35#include "messages.c" 35#include "messages.c"
diff --git a/archival/tar.c b/archival/tar.c
index e4bdd0a6c..c14a6194d 100644
--- a/archival/tar.c
+++ b/archival/tar.c
@@ -36,7 +36,7 @@
36 */ 36 */
37 37
38 38
39#include "internal.h" 39#include "busybox.h"
40#define BB_DECLARE_EXTERN 40#define BB_DECLARE_EXTERN
41#define bb_need_io_error 41#define bb_need_io_error
42#define bb_need_name_longer_then_foo 42#define bb_need_name_longer_then_foo
diff --git a/basename.c b/basename.c
index 5b83eef49..4d9fc4ec0 100644
--- a/basename.c
+++ b/basename.c
@@ -21,7 +21,7 @@
21 * 21 *
22 */ 22 */
23 23
24#include "internal.h" 24#include "busybox.h"
25#include <stdio.h> 25#include <stdio.h>
26 26
27extern int basename_main(int argc, char **argv) 27extern int basename_main(int argc, char **argv)
diff --git a/busybox.c b/busybox.c
index 17a4c447a..825f40e7c 100644
--- a/busybox.c
+++ b/busybox.c
@@ -1,5 +1,5 @@
1/* vi: set sw=4 ts=4: */ 1/* vi: set sw=4 ts=4: */
2#include "internal.h" 2#include "busybox.h"
3#include <stdio.h> 3#include <stdio.h>
4#include <string.h> 4#include <string.h>
5#include <errno.h> 5#include <errno.h>
@@ -369,7 +369,7 @@ const char *applet_name;
369#ifdef BB_FEATURE_INSTALLER 369#ifdef BB_FEATURE_INSTALLER
370/* 370/*
371 * directory table 371 * directory table
372 * this should be consistent w/ the enum, internal.h::Location, 372 * this should be consistent w/ the enum, busybox.h::Location,
373 * or else... 373 * or else...
374 */ 374 */
375static char* install_dir[] = { 375static char* install_dir[] = {
diff --git a/cat.c b/cat.c
index d47f814cf..51f1d27a6 100644
--- a/cat.c
+++ b/cat.c
@@ -21,7 +21,7 @@
21 * 21 *
22 */ 22 */
23 23
24#include "internal.h" 24#include "busybox.h"
25#include <stdio.h> 25#include <stdio.h>
26 26
27extern int cat_main(int argc, char **argv) 27extern int cat_main(int argc, char **argv)
diff --git a/chmod_chown_chgrp.c b/chmod_chown_chgrp.c
index b347707ee..1ec7eec6c 100644
--- a/chmod_chown_chgrp.c
+++ b/chmod_chown_chgrp.c
@@ -22,7 +22,7 @@
22 * 22 *
23 */ 23 */
24 24
25#include "internal.h" 25#include "busybox.h"
26#define BB_DECLARE_EXTERN 26#define BB_DECLARE_EXTERN
27#define bb_need_invalid_option 27#define bb_need_invalid_option
28#define bb_need_too_few_args 28#define bb_need_too_few_args
diff --git a/chroot.c b/chroot.c
index e8ce53973..f0a298104 100644
--- a/chroot.c
+++ b/chroot.c
@@ -22,7 +22,7 @@
22 * 22 *
23 */ 23 */
24 24
25#include "internal.h" 25#include "busybox.h"
26#include <stdlib.h> 26#include <stdlib.h>
27#include <stdio.h> 27#include <stdio.h>
28#include <errno.h> 28#include <errno.h>
diff --git a/chvt.c b/chvt.c
index 87a1248fd..d4b16a05d 100644
--- a/chvt.c
+++ b/chvt.c
@@ -4,7 +4,7 @@
4 * 4 *
5 * busyboxed by Erik Andersen 5 * busyboxed by Erik Andersen
6 */ 6 */
7#include "internal.h" 7#include "busybox.h"
8#include <stdio.h> 8#include <stdio.h>
9#include <stdlib.h> 9#include <stdlib.h>
10#include <fcntl.h> 10#include <fcntl.h>
diff --git a/clear.c b/clear.c
index dba105691..4a8e0450f 100644
--- a/clear.c
+++ b/clear.c
@@ -22,7 +22,7 @@
22 * 22 *
23 */ 23 */
24 24
25#include "internal.h" 25#include "busybox.h"
26#include <stdio.h> 26#include <stdio.h>
27 27
28 28
diff --git a/cmdedit.c b/cmdedit.c
index 04abc938c..af29b059a 100644
--- a/cmdedit.c
+++ b/cmdedit.c
@@ -31,7 +31,7 @@
31 terminal width. (more then one line.) However, history will. 31 terminal width. (more then one line.) However, history will.
32 */ 32 */
33 33
34#include "internal.h" 34#include "busybox.h"
35#ifdef BB_FEATURE_SH_COMMAND_EDITING 35#ifdef BB_FEATURE_SH_COMMAND_EDITING
36 36
37#include <stdio.h> 37#include <stdio.h>
diff --git a/console-tools/chvt.c b/console-tools/chvt.c
index 87a1248fd..d4b16a05d 100644
--- a/console-tools/chvt.c
+++ b/console-tools/chvt.c
@@ -4,7 +4,7 @@
4 * 4 *
5 * busyboxed by Erik Andersen 5 * busyboxed by Erik Andersen
6 */ 6 */
7#include "internal.h" 7#include "busybox.h"
8#include <stdio.h> 8#include <stdio.h>
9#include <stdlib.h> 9#include <stdlib.h>
10#include <fcntl.h> 10#include <fcntl.h>
diff --git a/console-tools/clear.c b/console-tools/clear.c
index dba105691..4a8e0450f 100644
--- a/console-tools/clear.c
+++ b/console-tools/clear.c
@@ -22,7 +22,7 @@
22 * 22 *
23 */ 23 */
24 24
25#include "internal.h" 25#include "busybox.h"
26#include <stdio.h> 26#include <stdio.h>
27 27
28 28
diff --git a/console-tools/deallocvt.c b/console-tools/deallocvt.c
index bb9632fde..65af79b77 100644
--- a/console-tools/deallocvt.c
+++ b/console-tools/deallocvt.c
@@ -3,7 +3,7 @@
3 * disalloc.c - aeb - 940501 - Disallocate virtual terminal(s) 3 * disalloc.c - aeb - 940501 - Disallocate virtual terminal(s)
4 * Renamed deallocvt. 4 * Renamed deallocvt.
5 */ 5 */
6#include "internal.h" 6#include "busybox.h"
7#include <stdlib.h> 7#include <stdlib.h>
8#include <stdio.h> 8#include <stdio.h>
9#include <fcntl.h> 9#include <fcntl.h>
diff --git a/console-tools/dumpkmap.c b/console-tools/dumpkmap.c
index 13b7d8937..2d989dfc4 100644
--- a/console-tools/dumpkmap.c
+++ b/console-tools/dumpkmap.c
@@ -20,7 +20,7 @@
20 * 20 *
21 */ 21 */
22 22
23#include "internal.h" 23#include "busybox.h"
24#include <errno.h> 24#include <errno.h>
25#include <fcntl.h> 25#include <fcntl.h>
26#include <stdio.h> 26#include <stdio.h>
diff --git a/console-tools/loadacm.c b/console-tools/loadacm.c
index 7f669bf08..826c2a33f 100644
--- a/console-tools/loadacm.c
+++ b/console-tools/loadacm.c
@@ -7,7 +7,7 @@
7 * Peter Novodvorsky <petya@logic.ru> 7 * Peter Novodvorsky <petya@logic.ru>
8 */ 8 */
9 9
10#include "internal.h" 10#include "busybox.h"
11#include <stdio.h> 11#include <stdio.h>
12#include <stdlib.h> 12#include <stdlib.h>
13#include <memory.h> 13#include <memory.h>
diff --git a/console-tools/loadfont.c b/console-tools/loadfont.c
index e93ca3186..d6eadc353 100644
--- a/console-tools/loadfont.c
+++ b/console-tools/loadfont.c
@@ -7,7 +7,7 @@
7 * Loads the console font, and possibly the corresponding screen map(s). 7 * Loads the console font, and possibly the corresponding screen map(s).
8 * (Adapted for busybox by Matej Vela.) 8 * (Adapted for busybox by Matej Vela.)
9 */ 9 */
10#include "internal.h" 10#include "busybox.h"
11#include <stdio.h> 11#include <stdio.h>
12#include <string.h> 12#include <string.h>
13#include <fcntl.h> 13#include <fcntl.h>
diff --git a/console-tools/loadkmap.c b/console-tools/loadkmap.c
index 2321a1ede..3f8d726e0 100644
--- a/console-tools/loadkmap.c
+++ b/console-tools/loadkmap.c
@@ -20,7 +20,7 @@
20 * 20 *
21 */ 21 */
22 22
23#include "internal.h" 23#include "busybox.h"
24#include <errno.h> 24#include <errno.h>
25#include <fcntl.h> 25#include <fcntl.h>
26#include <stdio.h> 26#include <stdio.h>
diff --git a/console-tools/reset.c b/console-tools/reset.c
index 6c4ae35ae..8e2c491e2 100644
--- a/console-tools/reset.c
+++ b/console-tools/reset.c
@@ -23,7 +23,7 @@
23 * 23 *
24 */ 24 */
25 25
26#include "internal.h" 26#include "busybox.h"
27#include <stdio.h> 27#include <stdio.h>
28 28
29extern int reset_main(int argc, char **argv) 29extern int reset_main(int argc, char **argv)
diff --git a/console-tools/setkeycodes.c b/console-tools/setkeycodes.c
index 284ffa194..63c106333 100644
--- a/console-tools/setkeycodes.c
+++ b/console-tools/setkeycodes.c
@@ -22,7 +22,7 @@
22 * 22 *
23 */ 23 */
24 24
25#include "internal.h" 25#include "busybox.h"
26#include <stdio.h> 26#include <stdio.h>
27#include <stdlib.h> 27#include <stdlib.h>
28#include <fcntl.h> 28#include <fcntl.h>
diff --git a/coreutils/basename.c b/coreutils/basename.c
index 5b83eef49..4d9fc4ec0 100644
--- a/coreutils/basename.c
+++ b/coreutils/basename.c
@@ -21,7 +21,7 @@
21 * 21 *
22 */ 22 */
23 23
24#include "internal.h" 24#include "busybox.h"
25#include <stdio.h> 25#include <stdio.h>
26 26
27extern int basename_main(int argc, char **argv) 27extern int basename_main(int argc, char **argv)
diff --git a/coreutils/cat.c b/coreutils/cat.c
index d47f814cf..51f1d27a6 100644
--- a/coreutils/cat.c
+++ b/coreutils/cat.c
@@ -21,7 +21,7 @@
21 * 21 *
22 */ 22 */
23 23
24#include "internal.h" 24#include "busybox.h"
25#include <stdio.h> 25#include <stdio.h>
26 26
27extern int cat_main(int argc, char **argv) 27extern int cat_main(int argc, char **argv)
diff --git a/coreutils/chroot.c b/coreutils/chroot.c
index e8ce53973..f0a298104 100644
--- a/coreutils/chroot.c
+++ b/coreutils/chroot.c
@@ -22,7 +22,7 @@
22 * 22 *
23 */ 23 */
24 24
25#include "internal.h" 25#include "busybox.h"
26#include <stdlib.h> 26#include <stdlib.h>
27#include <stdio.h> 27#include <stdio.h>
28#include <errno.h> 28#include <errno.h>
diff --git a/coreutils/cut.c b/coreutils/cut.c
index fec52d3d4..1d36a4e88 100644
--- a/coreutils/cut.c
+++ b/coreutils/cut.c
@@ -26,7 +26,7 @@
26#include <string.h> 26#include <string.h>
27#include <ctype.h> 27#include <ctype.h>
28#include <errno.h> 28#include <errno.h>
29#include "internal.h" 29#include "busybox.h"
30 30
31 31
32/* globals from other files */ 32/* globals from other files */
diff --git a/coreutils/date.c b/coreutils/date.c
index 571a55625..2e99aea19 100644
--- a/coreutils/date.c
+++ b/coreutils/date.c
@@ -20,7 +20,7 @@
20 * 20 *
21*/ 21*/
22 22
23#include "internal.h" 23#include "busybox.h"
24#define BB_DECLARE_EXTERN 24#define BB_DECLARE_EXTERN
25#define bb_need_invalid_date 25#define bb_need_invalid_date
26#define bb_need_memory_exhausted 26#define bb_need_memory_exhausted
diff --git a/coreutils/dd.c b/coreutils/dd.c
index 697cb7e58..01441c314 100644
--- a/coreutils/dd.c
+++ b/coreutils/dd.c
@@ -29,7 +29,7 @@
29 */ 29 */
30 30
31 31
32#include "internal.h" 32#include "busybox.h"
33#include <features.h> 33#include <features.h>
34#include <stdio.h> 34#include <stdio.h>
35#include <fcntl.h> 35#include <fcntl.h>
diff --git a/coreutils/df.c b/coreutils/df.c
index d8f8b7739..8d6242c56 100644
--- a/coreutils/df.c
+++ b/coreutils/df.c
@@ -22,7 +22,7 @@
22 * 22 *
23 */ 23 */
24 24
25#include "internal.h" 25#include "busybox.h"
26#include <stdio.h> 26#include <stdio.h>
27#include <mntent.h> 27#include <mntent.h>
28#include <sys/vfs.h> 28#include <sys/vfs.h>
diff --git a/coreutils/dirname.c b/coreutils/dirname.c
index e63fef30b..23f46be40 100644
--- a/coreutils/dirname.c
+++ b/coreutils/dirname.c
@@ -20,7 +20,7 @@
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 * 21 *
22 */ 22 */
23#include "internal.h" 23#include "busybox.h"
24#include <stdio.h> 24#include <stdio.h>
25 25
26extern int dirname_main(int argc, char **argv) 26extern int dirname_main(int argc, char **argv)
diff --git a/coreutils/dos2unix.c b/coreutils/dos2unix.c
index 9634687eb..c9f783f1a 100644
--- a/coreutils/dos2unix.c
+++ b/coreutils/dos2unix.c
@@ -22,7 +22,7 @@
22 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/ 23*/
24 24
25#include "internal.h" 25#include "busybox.h"
26#include <stdio.h> 26#include <stdio.h>
27 27
28int dos2unix_main( int argc, char **argv ) { 28int dos2unix_main( int argc, char **argv ) {
diff --git a/coreutils/du.c b/coreutils/du.c
index 5a08abb78..408ad994c 100644
--- a/coreutils/du.c
+++ b/coreutils/du.c
@@ -22,7 +22,7 @@
22 * 22 *
23 */ 23 */
24 24
25#include "internal.h" 25#include "busybox.h"
26#define BB_DECLARE_EXTERN 26#define BB_DECLARE_EXTERN
27#define bb_need_name_too_long 27#define bb_need_name_too_long
28#include "messages.c" 28#include "messages.c"
@@ -163,7 +163,7 @@ int du_main(int argc, char **argv)
163 return(0); 163 return(0);
164} 164}
165 165
166/* $Id: du.c,v 1.24 2000/07/17 16:17:19 proski Exp $ */ 166/* $Id: du.c,v 1.25 2000/09/25 21:45:57 andersen Exp $ */
167/* 167/*
168Local Variables: 168Local Variables:
169c-file-style: "linux" 169c-file-style: "linux"
diff --git a/coreutils/echo.c b/coreutils/echo.c
index 924cdd40c..6890d95e0 100644
--- a/coreutils/echo.c
+++ b/coreutils/echo.c
@@ -22,7 +22,7 @@
22 * Original copyright notice is retained at the end of this file. 22 * Original copyright notice is retained at the end of this file.
23 */ 23 */
24 24
25#include "internal.h" 25#include "busybox.h"
26#include <stdio.h> 26#include <stdio.h>
27 27
28extern int 28extern int
diff --git a/coreutils/expr.c b/coreutils/expr.c
index 9e3c04a11..670352eb6 100644
--- a/coreutils/expr.c
+++ b/coreutils/expr.c
@@ -33,7 +33,7 @@
33 * One function can handle multiple operators all of equal precedence, 33 * One function can handle multiple operators all of equal precedence,
34 * provided they all associate ((x op x) op x). */ 34 * provided they all associate ((x op x) op x). */
35 35
36#include "internal.h" 36#include "busybox.h"
37#include <stdio.h> 37#include <stdio.h>
38#include <sys/types.h> 38#include <sys/types.h>
39 39
diff --git a/coreutils/head.c b/coreutils/head.c
index 58b3cae68..c232e1153 100644
--- a/coreutils/head.c
+++ b/coreutils/head.c
@@ -22,7 +22,7 @@
22 * 22 *
23 */ 23 */
24 24
25#include "internal.h" 25#include "busybox.h"
26#include <errno.h> 26#include <errno.h>
27#include <stdio.h> 27#include <stdio.h>
28 28
@@ -100,4 +100,4 @@ int head_main(int argc, char **argv)
100 return(0); 100 return(0);
101} 101}
102 102
103/* $Id: head.c,v 1.13 2000/07/16 20:57:15 kraai Exp $ */ 103/* $Id: head.c,v 1.14 2000/09/25 21:45:57 andersen Exp $ */
diff --git a/coreutils/hostid.c b/coreutils/hostid.c
index f1010a65d..47bd8d724 100644
--- a/coreutils/hostid.c
+++ b/coreutils/hostid.c
@@ -20,7 +20,7 @@
20 * 20 *
21 */ 21 */
22 22
23#include "internal.h" 23#include "busybox.h"
24#include <stdio.h> 24#include <stdio.h>
25 25
26extern int hostid_main(int argc, char **argv) 26extern int hostid_main(int argc, char **argv)
diff --git a/coreutils/id.c b/coreutils/id.c
index a1a17924c..fdfc33cdc 100644
--- a/coreutils/id.c
+++ b/coreutils/id.c
@@ -20,7 +20,7 @@
20 * 20 *
21 */ 21 */
22 22
23#include "internal.h" 23#include "busybox.h"
24#include <stdio.h> 24#include <stdio.h>
25#include <unistd.h> 25#include <unistd.h>
26#include <pwd.h> 26#include <pwd.h>
diff --git a/coreutils/length.c b/coreutils/length.c
index cf4fb1c07..14d15c81c 100644
--- a/coreutils/length.c
+++ b/coreutils/length.c
@@ -1,5 +1,5 @@
1/* vi: set sw=4 ts=4: */ 1/* vi: set sw=4 ts=4: */
2#include "internal.h" 2#include "busybox.h"
3#include <stdlib.h> 3#include <stdlib.h>
4#include <string.h> 4#include <string.h>
5#include <stdio.h> 5#include <stdio.h>
diff --git a/coreutils/ln.c b/coreutils/ln.c
index d5f44ea4c..8ef8d05de 100644
--- a/coreutils/ln.c
+++ b/coreutils/ln.c
@@ -21,7 +21,7 @@
21 * 21 *
22 */ 22 */
23 23
24#include "internal.h" 24#include "busybox.h"
25#define BB_DECLARE_EXTERN 25#define BB_DECLARE_EXTERN
26#define bb_need_not_a_directory 26#define bb_need_not_a_directory
27#include "messages.c" 27#include "messages.c"
diff --git a/coreutils/logname.c b/coreutils/logname.c
index a0aff42d6..09ee24928 100644
--- a/coreutils/logname.c
+++ b/coreutils/logname.c
@@ -20,7 +20,7 @@
20 * 20 *
21 */ 21 */
22 22
23#include "internal.h" 23#include "busybox.h"
24#include <stdio.h> 24#include <stdio.h>
25 25
26extern int logname_main(int argc, char **argv) 26extern int logname_main(int argc, char **argv)
diff --git a/coreutils/ls.c b/coreutils/ls.c
index 0e08f7683..385d6b2de 100644
--- a/coreutils/ls.c
+++ b/coreutils/ls.c
@@ -47,7 +47,7 @@
47 47
48/************************************************************************/ 48/************************************************************************/
49 49
50#include "internal.h" 50#include "busybox.h"
51#include <sys/types.h> 51#include <sys/types.h>
52#include <sys/stat.h> 52#include <sys/stat.h>
53#include <stdio.h> 53#include <stdio.h>
diff --git a/coreutils/md5sum.c b/coreutils/md5sum.c
index a791a41b0..c7e540223 100644
--- a/coreutils/md5sum.c
+++ b/coreutils/md5sum.c
@@ -20,7 +20,7 @@
20/* Written by Ulrich Drepper <drepper@gnu.ai.mit.edu> */ 20/* Written by Ulrich Drepper <drepper@gnu.ai.mit.edu> */
21/* Hacked to work with BusyBox by Alfred M. Szmidt <ams@trillian.itslinux.org> */ 21/* Hacked to work with BusyBox by Alfred M. Szmidt <ams@trillian.itslinux.org> */
22 22
23#include "internal.h" 23#include "busybox.h"
24#include <stdio.h> 24#include <stdio.h>
25#include <errno.h> 25#include <errno.h>
26#include <ctype.h> 26#include <ctype.h>
@@ -66,7 +66,7 @@ extern _IO_ssize_t getline __P ((char **, size_t *, FILE *));
66#include <string.h> 66#include <string.h>
67#include <endian.h> 67#include <endian.h>
68 68
69#include "internal.h" 69#include "busybox.h"
70//---------------------------------------------------------------------------- 70//----------------------------------------------------------------------------
71//--------md5.h 71//--------md5.h
72//---------------------------------------------------------------------------- 72//----------------------------------------------------------------------------
diff --git a/coreutils/mkdir.c b/coreutils/mkdir.c
index f824cdcb6..04310e4c7 100644
--- a/coreutils/mkdir.c
+++ b/coreutils/mkdir.c
@@ -21,7 +21,7 @@
21 * 21 *
22 */ 22 */
23 23
24#include "internal.h" 24#include "busybox.h"
25#define bb_need_name_too_long 25#define bb_need_name_too_long
26#define BB_DECLARE_EXTERN 26#define BB_DECLARE_EXTERN
27#include "messages.c" 27#include "messages.c"
diff --git a/coreutils/mkfifo.c b/coreutils/mkfifo.c
index 5d4126ac0..5e1bc1a78 100644
--- a/coreutils/mkfifo.c
+++ b/coreutils/mkfifo.c
@@ -20,7 +20,7 @@
20 * 20 *
21 */ 21 */
22 22
23#include "internal.h" 23#include "busybox.h"
24#include <stdio.h> 24#include <stdio.h>
25#include <sys/types.h> 25#include <sys/types.h>
26#include <errno.h> 26#include <errno.h>
diff --git a/coreutils/mknod.c b/coreutils/mknod.c
index b815aa198..ecb0e4780 100644
--- a/coreutils/mknod.c
+++ b/coreutils/mknod.c
@@ -20,7 +20,7 @@
20 * 20 *
21 */ 21 */
22 22
23#include "internal.h" 23#include "busybox.h"
24#include <stdio.h> 24#include <stdio.h>
25#include <errno.h> 25#include <errno.h>
26#include <sys/types.h> 26#include <sys/types.h>
diff --git a/coreutils/printf.c b/coreutils/printf.c
index 94b809348..832ca13d6 100644
--- a/coreutils/printf.c
+++ b/coreutils/printf.c
@@ -47,7 +47,7 @@
47 47
48// 19990508 Busy Boxed! Dave Cinege 48// 19990508 Busy Boxed! Dave Cinege
49 49
50#include "internal.h" 50#include "busybox.h"
51#include <unistd.h> 51#include <unistd.h>
52#include <stdio.h> 52#include <stdio.h>
53#include <sys/types.h> 53#include <sys/types.h>
diff --git a/coreutils/pwd.c b/coreutils/pwd.c
index f0c923b7b..c9de7778e 100644
--- a/coreutils/pwd.c
+++ b/coreutils/pwd.c
@@ -21,7 +21,7 @@
21 * 21 *
22 */ 22 */
23 23
24#include "internal.h" 24#include "busybox.h"
25#include <stdio.h> 25#include <stdio.h>
26#include <dirent.h> 26#include <dirent.h>
27#include <errno.h> 27#include <errno.h>
diff --git a/coreutils/rm.c b/coreutils/rm.c
index c93a94ce1..4f97cad23 100644
--- a/coreutils/rm.c
+++ b/coreutils/rm.c
@@ -22,7 +22,7 @@
22 * 22 *
23 */ 23 */
24 24
25#include "internal.h" 25#include "busybox.h"
26#include <stdio.h> 26#include <stdio.h>
27#include <time.h> 27#include <time.h>
28#include <utime.h> 28#include <utime.h>
diff --git a/coreutils/rmdir.c b/coreutils/rmdir.c
index 500890e40..14ebf92c5 100644
--- a/coreutils/rmdir.c
+++ b/coreutils/rmdir.c
@@ -22,7 +22,7 @@
22 * 22 *
23 */ 23 */
24 24
25#include "internal.h" 25#include "busybox.h"
26#include <stdio.h> 26#include <stdio.h>
27#include <errno.h> 27#include <errno.h>
28 28
diff --git a/coreutils/sleep.c b/coreutils/sleep.c
index d6705c4c3..709e3de34 100644
--- a/coreutils/sleep.c
+++ b/coreutils/sleep.c
@@ -21,7 +21,7 @@
21 * 21 *
22 */ 22 */
23 23
24#include "internal.h" 24#include "busybox.h"
25#include <stdio.h> 25#include <stdio.h>
26 26
27extern int sleep_main(int argc, char **argv) 27extern int sleep_main(int argc, char **argv)
diff --git a/coreutils/sort.c b/coreutils/sort.c
index a74f96ad0..3fe4c7756 100644
--- a/coreutils/sort.c
+++ b/coreutils/sort.c
@@ -22,7 +22,7 @@
22 * 22 *
23 */ 23 */
24 24
25#include "internal.h" 25#include "busybox.h"
26#include <sys/types.h> 26#include <sys/types.h>
27#include <fcntl.h> 27#include <fcntl.h>
28#include <dirent.h> 28#include <dirent.h>
@@ -288,4 +288,4 @@ int sort_main(int argc, char **argv)
288 return(0); 288 return(0);
289} 289}
290 290
291/* $Id: sort.c,v 1.21 2000/09/13 02:46:13 kraai Exp $ */ 291/* $Id: sort.c,v 1.22 2000/09/25 21:45:58 andersen Exp $ */
diff --git a/coreutils/sync.c b/coreutils/sync.c
index 3737cb1f1..8f101cf17 100644
--- a/coreutils/sync.c
+++ b/coreutils/sync.c
@@ -21,7 +21,7 @@
21 * 21 *
22 */ 22 */
23 23
24#include "internal.h" 24#include "busybox.h"
25#include <stdio.h> 25#include <stdio.h>
26 26
27extern int sync_main(int argc, char **argv) 27extern int sync_main(int argc, char **argv)
diff --git a/coreutils/tail.c b/coreutils/tail.c
index dcb4f6742..1091d28ed 100644
--- a/coreutils/tail.c
+++ b/coreutils/tail.c
@@ -38,7 +38,7 @@
38#include <unistd.h> 38#include <unistd.h>
39#include <string.h> 39#include <string.h>
40#include <getopt.h> 40#include <getopt.h>
41#include "internal.h" 41#include "busybox.h"
42 42
43#define STDIN "standard input" 43#define STDIN "standard input"
44#define LINES 0 44#define LINES 0
diff --git a/coreutils/tee.c b/coreutils/tee.c
index dc9876020..621801336 100644
--- a/coreutils/tee.c
+++ b/coreutils/tee.c
@@ -21,7 +21,7 @@
21 * 21 *
22 */ 22 */
23 23
24#include "internal.h" 24#include "busybox.h"
25#include <getopt.h> 25#include <getopt.h>
26#include <stdio.h> 26#include <stdio.h>
27 27
diff --git a/coreutils/test.c b/coreutils/test.c
index a2bec4492..acd6947d9 100644
--- a/coreutils/test.c
+++ b/coreutils/test.c
@@ -31,7 +31,7 @@
31 * "This program is in the Public Domain." 31 * "This program is in the Public Domain."
32 */ 32 */
33 33
34#include "internal.h" 34#include "busybox.h"
35#include <sys/types.h> 35#include <sys/types.h>
36#include <unistd.h> 36#include <unistd.h>
37#include <ctype.h> 37#include <ctype.h>
diff --git a/coreutils/touch.c b/coreutils/touch.c
index 464aedb55..7db6c6e33 100644
--- a/coreutils/touch.c
+++ b/coreutils/touch.c
@@ -22,7 +22,7 @@
22 * 22 *
23 */ 23 */
24 24
25#include "internal.h" 25#include "busybox.h"
26#include <stdio.h> 26#include <stdio.h>
27#include <sys/types.h> 27#include <sys/types.h>
28#include <fcntl.h> 28#include <fcntl.h>
diff --git a/coreutils/tr.c b/coreutils/tr.c
index 004092477..54b6abc8c 100644
--- a/coreutils/tr.c
+++ b/coreutils/tr.c
@@ -24,7 +24,7 @@
24 * Original copyright notice is retained at the end of this file. 24 * Original copyright notice is retained at the end of this file.
25 */ 25 */
26 26
27#include "internal.h" 27#include "busybox.h"
28#include <stdio.h> 28#include <stdio.h>
29#include <string.h> 29#include <string.h>
30#include <stdlib.h> 30#include <stdlib.h>
diff --git a/coreutils/tty.c b/coreutils/tty.c
index bbc051f6b..6eebed9fb 100644
--- a/coreutils/tty.c
+++ b/coreutils/tty.c
@@ -20,7 +20,7 @@
20 * 20 *
21 */ 21 */
22 22
23#include "internal.h" 23#include "busybox.h"
24#include <stdio.h> 24#include <stdio.h>
25#include <sys/types.h> 25#include <sys/types.h>
26 26
diff --git a/coreutils/uname.c b/coreutils/uname.c
index 55616dd19..8d9427c86 100644
--- a/coreutils/uname.c
+++ b/coreutils/uname.c
@@ -31,7 +31,7 @@
31 31
32/* Busyboxed by Erik Andersen */ 32/* Busyboxed by Erik Andersen */
33 33
34#include "internal.h" 34#include "busybox.h"
35#include <stdio.h> 35#include <stdio.h>
36#include <sys/types.h> 36#include <sys/types.h>
37#include <sys/utsname.h> 37#include <sys/utsname.h>
diff --git a/coreutils/uniq.c b/coreutils/uniq.c
index 016fc7780..ef38587bd 100644
--- a/coreutils/uniq.c
+++ b/coreutils/uniq.c
@@ -22,7 +22,7 @@
22 * 22 *
23 */ 23 */
24 24
25#include "internal.h" 25#include "busybox.h"
26#include <stdio.h> 26#include <stdio.h>
27#include <string.h> 27#include <string.h>
28#include <errno.h> 28#include <errno.h>
@@ -179,4 +179,4 @@ int uniq_main(int argc, char **argv)
179 return(0); 179 return(0);
180} 180}
181 181
182/* $Id: uniq.c,v 1.13 2000/07/16 20:57:15 kraai Exp $ */ 182/* $Id: uniq.c,v 1.14 2000/09/25 21:45:58 andersen Exp $ */
diff --git a/coreutils/usleep.c b/coreutils/usleep.c
index fcdf3bbf6..69790ef09 100644
--- a/coreutils/usleep.c
+++ b/coreutils/usleep.c
@@ -21,7 +21,7 @@
21 * 21 *
22 */ 22 */
23 23
24#include "internal.h" 24#include "busybox.h"
25#include <stdlib.h> 25#include <stdlib.h>
26#include <unistd.h> 26#include <unistd.h>
27 27
diff --git a/coreutils/uudecode.c b/coreutils/uudecode.c
index 90bef9238..965ded5b5 100644
--- a/coreutils/uudecode.c
+++ b/coreutils/uudecode.c
@@ -51,7 +51,7 @@
51 51
52/* Reworked to GNU style by Ian Lance Taylor, ian@airs.com, August 93. */ 52/* Reworked to GNU style by Ian Lance Taylor, ian@airs.com, August 93. */
53 53
54#include "internal.h" 54#include "busybox.h"
55 55
56#include <stdio.h> 56#include <stdio.h>
57#include <errno.h> 57#include <errno.h>
diff --git a/coreutils/uuencode.c b/coreutils/uuencode.c
index 1433c7f3b..5835bd22a 100644
--- a/coreutils/uuencode.c
+++ b/coreutils/uuencode.c
@@ -52,7 +52,7 @@
52/* Reworked to GNU style by Ian Lance Taylor, ian@airs.com, August 93. */ 52/* Reworked to GNU style by Ian Lance Taylor, ian@airs.com, August 93. */
53/* Hacked to work with BusyBox by Alfred M. Szmidt */ 53/* Hacked to work with BusyBox by Alfred M. Szmidt */
54 54
55#include "internal.h" 55#include "busybox.h"
56 56
57#include <stdio.h> 57#include <stdio.h>
58#include <errno.h> 58#include <errno.h>
diff --git a/coreutils/wc.c b/coreutils/wc.c
index ca5b3680a..b1c9a51cd 100644
--- a/coreutils/wc.c
+++ b/coreutils/wc.c
@@ -20,7 +20,7 @@
20 * 20 *
21 */ 21 */
22 22
23#include "internal.h" 23#include "busybox.h"
24#include <stdio.h> 24#include <stdio.h>
25#include <getopt.h> 25#include <getopt.h>
26 26
diff --git a/coreutils/whoami.c b/coreutils/whoami.c
index 84b27fe58..f3c21b3f5 100644
--- a/coreutils/whoami.c
+++ b/coreutils/whoami.c
@@ -20,7 +20,7 @@
20 * 20 *
21 */ 21 */
22 22
23#include "internal.h" 23#include "busybox.h"
24#include <stdio.h> 24#include <stdio.h>
25#include <pwd.h> 25#include <pwd.h>
26 26
diff --git a/coreutils/yes.c b/coreutils/yes.c
index 11fa537a0..46873f3f9 100644
--- a/coreutils/yes.c
+++ b/coreutils/yes.c
@@ -20,7 +20,7 @@
20 * 20 *
21 */ 21 */
22 22
23#include "internal.h" 23#include "busybox.h"
24#include <stdio.h> 24#include <stdio.h>
25 25
26extern int yes_main(int argc, char **argv) 26extern int yes_main(int argc, char **argv)
diff --git a/cp_mv.c b/cp_mv.c
index f56c6dd49..2257f4422 100644
--- a/cp_mv.c
+++ b/cp_mv.c
@@ -25,7 +25,7 @@
25 * 25 *
26 */ 26 */
27 27
28#include "internal.h" 28#include "busybox.h"
29#define BB_DECLARE_EXTERN 29#define BB_DECLARE_EXTERN
30#define bb_need_name_too_long 30#define bb_need_name_too_long
31#define bb_need_omitting_directory 31#define bb_need_omitting_directory
diff --git a/cut.c b/cut.c
index fec52d3d4..1d36a4e88 100644
--- a/cut.c
+++ b/cut.c
@@ -26,7 +26,7 @@
26#include <string.h> 26#include <string.h>
27#include <ctype.h> 27#include <ctype.h>
28#include <errno.h> 28#include <errno.h>
29#include "internal.h" 29#include "busybox.h"
30 30
31 31
32/* globals from other files */ 32/* globals from other files */
diff --git a/date.c b/date.c
index 571a55625..2e99aea19 100644
--- a/date.c
+++ b/date.c
@@ -20,7 +20,7 @@
20 * 20 *
21*/ 21*/
22 22
23#include "internal.h" 23#include "busybox.h"
24#define BB_DECLARE_EXTERN 24#define BB_DECLARE_EXTERN
25#define bb_need_invalid_date 25#define bb_need_invalid_date
26#define bb_need_memory_exhausted 26#define bb_need_memory_exhausted
diff --git a/dc.c b/dc.c
index fac48e895..48aa830d6 100644
--- a/dc.c
+++ b/dc.c
@@ -1,5 +1,5 @@
1/* vi: set sw=4 ts=4: */ 1/* vi: set sw=4 ts=4: */
2#include "internal.h" 2#include "busybox.h"
3#include <ctype.h> 3#include <ctype.h>
4#include <stdio.h> 4#include <stdio.h>
5#include <stdlib.h> 5#include <stdlib.h>
diff --git a/dd.c b/dd.c
index 697cb7e58..01441c314 100644
--- a/dd.c
+++ b/dd.c
@@ -29,7 +29,7 @@
29 */ 29 */
30 30
31 31
32#include "internal.h" 32#include "busybox.h"
33#include <features.h> 33#include <features.h>
34#include <stdio.h> 34#include <stdio.h>
35#include <fcntl.h> 35#include <fcntl.h>
diff --git a/deallocvt.c b/deallocvt.c
index bb9632fde..65af79b77 100644
--- a/deallocvt.c
+++ b/deallocvt.c
@@ -3,7 +3,7 @@
3 * disalloc.c - aeb - 940501 - Disallocate virtual terminal(s) 3 * disalloc.c - aeb - 940501 - Disallocate virtual terminal(s)
4 * Renamed deallocvt. 4 * Renamed deallocvt.
5 */ 5 */
6#include "internal.h" 6#include "busybox.h"
7#include <stdlib.h> 7#include <stdlib.h>
8#include <stdio.h> 8#include <stdio.h>
9#include <fcntl.h> 9#include <fcntl.h>
diff --git a/df.c b/df.c
index d8f8b7739..8d6242c56 100644
--- a/df.c
+++ b/df.c
@@ -22,7 +22,7 @@
22 * 22 *
23 */ 23 */
24 24
25#include "internal.h" 25#include "busybox.h"
26#include <stdio.h> 26#include <stdio.h>
27#include <mntent.h> 27#include <mntent.h>
28#include <sys/vfs.h> 28#include <sys/vfs.h>
diff --git a/dirname.c b/dirname.c
index e63fef30b..23f46be40 100644
--- a/dirname.c
+++ b/dirname.c
@@ -20,7 +20,7 @@
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 * 21 *
22 */ 22 */
23#include "internal.h" 23#include "busybox.h"
24#include <stdio.h> 24#include <stdio.h>
25 25
26extern int dirname_main(int argc, char **argv) 26extern int dirname_main(int argc, char **argv)
diff --git a/dmesg.c b/dmesg.c
index 99d053a72..88b5d1393 100644
--- a/dmesg.c
+++ b/dmesg.c
@@ -15,7 +15,7 @@
15 * Support, replaced getopt, added some gotos for redundant stuff. 15 * Support, replaced getopt, added some gotos for redundant stuff.
16 */ 16 */
17 17
18#include "internal.h" 18#include "busybox.h"
19#include <stdio.h> 19#include <stdio.h>
20#include <stdlib.h> 20#include <stdlib.h>
21 21
diff --git a/dos2unix.c b/dos2unix.c
index 9634687eb..c9f783f1a 100644
--- a/dos2unix.c
+++ b/dos2unix.c
@@ -22,7 +22,7 @@
22 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/ 23*/
24 24
25#include "internal.h" 25#include "busybox.h"
26#include <stdio.h> 26#include <stdio.h>
27 27
28int dos2unix_main( int argc, char **argv ) { 28int dos2unix_main( int argc, char **argv ) {
diff --git a/du.c b/du.c
index 5a08abb78..408ad994c 100644
--- a/du.c
+++ b/du.c
@@ -22,7 +22,7 @@
22 * 22 *
23 */ 23 */
24 24
25#include "internal.h" 25#include "busybox.h"
26#define BB_DECLARE_EXTERN 26#define BB_DECLARE_EXTERN
27#define bb_need_name_too_long 27#define bb_need_name_too_long
28#include "messages.c" 28#include "messages.c"
@@ -163,7 +163,7 @@ int du_main(int argc, char **argv)
163 return(0); 163 return(0);
164} 164}
165 165
166/* $Id: du.c,v 1.24 2000/07/17 16:17:19 proski Exp $ */ 166/* $Id: du.c,v 1.25 2000/09/25 21:45:57 andersen Exp $ */
167/* 167/*
168Local Variables: 168Local Variables:
169c-file-style: "linux" 169c-file-style: "linux"
diff --git a/dumpkmap.c b/dumpkmap.c
index 13b7d8937..2d989dfc4 100644
--- a/dumpkmap.c
+++ b/dumpkmap.c
@@ -20,7 +20,7 @@
20 * 20 *
21 */ 21 */
22 22
23#include "internal.h" 23#include "busybox.h"
24#include <errno.h> 24#include <errno.h>
25#include <fcntl.h> 25#include <fcntl.h>
26#include <stdio.h> 26#include <stdio.h>
diff --git a/dutmp.c b/dutmp.c
index ec10941d0..cf5f1cff8 100644
--- a/dutmp.c
+++ b/dutmp.c
@@ -12,7 +12,7 @@
12 * Erik Andersen <andersen@lineo.com> 12 * Erik Andersen <andersen@lineo.com>
13 */ 13 */
14 14
15#include "internal.h" 15#include "busybox.h"
16#include <sys/types.h> 16#include <sys/types.h>
17#include <fcntl.h> 17#include <fcntl.h>
18 18
diff --git a/echo.c b/echo.c
index 924cdd40c..6890d95e0 100644
--- a/echo.c
+++ b/echo.c
@@ -22,7 +22,7 @@
22 * Original copyright notice is retained at the end of this file. 22 * Original copyright notice is retained at the end of this file.
23 */ 23 */
24 24
25#include "internal.h" 25#include "busybox.h"
26#include <stdio.h> 26#include <stdio.h>
27 27
28extern int 28extern int
diff --git a/editors/sed.c b/editors/sed.c
index 0e0d7f58c..cb3f1bbf1 100644
--- a/editors/sed.c
+++ b/editors/sed.c
@@ -49,7 +49,7 @@
49#include <string.h> /* for strdup() */ 49#include <string.h> /* for strdup() */
50#include <errno.h> 50#include <errno.h>
51#include <ctype.h> /* for isspace() */ 51#include <ctype.h> /* for isspace() */
52#include "internal.h" 52#include "busybox.h"
53 53
54#define bb_need_full_version 54#define bb_need_full_version
55#define BB_DECLARE_EXTERN 55#define BB_DECLARE_EXTERN
diff --git a/expr.c b/expr.c
index 9e3c04a11..670352eb6 100644
--- a/expr.c
+++ b/expr.c
@@ -33,7 +33,7 @@
33 * One function can handle multiple operators all of equal precedence, 33 * One function can handle multiple operators all of equal precedence,
34 * provided they all associate ((x op x) op x). */ 34 * provided they all associate ((x op x) op x). */
35 35
36#include "internal.h" 36#include "busybox.h"
37#include <stdio.h> 37#include <stdio.h>
38#include <sys/types.h> 38#include <sys/types.h>
39 39
diff --git a/fbset.c b/fbset.c
index 235338c55..32325a7cf 100644
--- a/fbset.c
+++ b/fbset.c
@@ -24,7 +24,7 @@
24 * Geert Uytterhoeven (Geert.Uytterhoeven@cs.kuleuven.ac.be) 24 * Geert Uytterhoeven (Geert.Uytterhoeven@cs.kuleuven.ac.be)
25 */ 25 */
26 26
27#include "internal.h" 27#include "busybox.h"
28#include <stdio.h> 28#include <stdio.h>
29#include <stdlib.h> 29#include <stdlib.h>
30#include <unistd.h> 30#include <unistd.h>
diff --git a/fdflush.c b/fdflush.c
index 6bc3e7d66..6633e1212 100644
--- a/fdflush.c
+++ b/fdflush.c
@@ -21,7 +21,7 @@
21 * 21 *
22 */ 22 */
23 23
24#include "internal.h" 24#include "busybox.h"
25#include <stdio.h> 25#include <stdio.h>
26#include <sys/ioctl.h> 26#include <sys/ioctl.h>
27#include <fcntl.h> 27#include <fcntl.h>
diff --git a/find.c b/find.c
index 1c209aea1..48faf2c30 100644
--- a/find.c
+++ b/find.c
@@ -22,7 +22,7 @@
22 * 22 *
23 */ 23 */
24 24
25#include "internal.h" 25#include "busybox.h"
26#include <stdio.h> 26#include <stdio.h>
27#include <unistd.h> 27#include <unistd.h>
28#include <dirent.h> 28#include <dirent.h>
diff --git a/findutils/find.c b/findutils/find.c
index 1c209aea1..48faf2c30 100644
--- a/findutils/find.c
+++ b/findutils/find.c
@@ -22,7 +22,7 @@
22 * 22 *
23 */ 23 */
24 24
25#include "internal.h" 25#include "busybox.h"
26#include <stdio.h> 26#include <stdio.h>
27#include <unistd.h> 27#include <unistd.h>
28#include <dirent.h> 28#include <dirent.h>
diff --git a/findutils/grep.c b/findutils/grep.c
index 3ee409c64..003dae98e 100644
--- a/findutils/grep.c
+++ b/findutils/grep.c
@@ -26,7 +26,7 @@
26#include <regex.h> 26#include <regex.h>
27#include <string.h> /* for strerror() */ 27#include <string.h> /* for strerror() */
28#include <errno.h> 28#include <errno.h>
29#include "internal.h" 29#include "busybox.h"
30 30
31extern int optind; /* in unistd.h */ 31extern int optind; /* in unistd.h */
32extern int errno; /* for use with strerror() */ 32extern int errno; /* for use with strerror() */
diff --git a/findutils/which.c b/findutils/which.c
index 7df2557a3..da8801fab 100644
--- a/findutils/which.c
+++ b/findutils/which.c
@@ -21,7 +21,7 @@
21 * 21 *
22 */ 22 */
23 23
24#include "internal.h" 24#include "busybox.h"
25#include <stdio.h> 25#include <stdio.h>
26 26
27extern int which_main(int argc, char **argv) 27extern int which_main(int argc, char **argv)
diff --git a/findutils/xargs.c b/findutils/xargs.c
index b8ac31aa0..4a3fe3c60 100644
--- a/findutils/xargs.c
+++ b/findutils/xargs.c
@@ -21,7 +21,7 @@
21 * 21 *
22 */ 22 */
23 23
24#include "internal.h" 24#include "busybox.h"
25#include <stdlib.h> 25#include <stdlib.h>
26#include <stdio.h> 26#include <stdio.h>
27#include <string.h> 27#include <string.h>
diff --git a/free.c b/free.c
index d8c3f0b91..a33fa9a59 100644
--- a/free.c
+++ b/free.c
@@ -21,7 +21,7 @@
21 * 21 *
22 */ 22 */
23 23
24#include "internal.h" 24#include "busybox.h"
25#include <stdio.h> 25#include <stdio.h>
26#include <errno.h> 26#include <errno.h>
27 27
diff --git a/freeramdisk.c b/freeramdisk.c
index 64915b313..22fc3e643 100644
--- a/freeramdisk.c
+++ b/freeramdisk.c
@@ -27,7 +27,7 @@
27#include <fcntl.h> 27#include <fcntl.h>
28#include <sys/ioctl.h> 28#include <sys/ioctl.h>
29#include <errno.h> 29#include <errno.h>
30#include "internal.h" 30#include "busybox.h"
31 31
32 32
33/* From linux/fs.h */ 33/* From linux/fs.h */
diff --git a/fsck_minix.c b/fsck_minix.c
index 04c2b3317..ef65e3073 100644
--- a/fsck_minix.c
+++ b/fsck_minix.c
@@ -86,7 +86,7 @@
86 * enforced (but it's not much fun on a character device :-). 86 * enforced (but it's not much fun on a character device :-).
87 */ 87 */
88 88
89#include "internal.h" 89#include "busybox.h"
90#include <stdio.h> 90#include <stdio.h>
91#include <errno.h> 91#include <errno.h>
92#include <unistd.h> 92#include <unistd.h>
diff --git a/getopt.c b/getopt.c
index fb75790d9..919ae6c68 100644
--- a/getopt.c
+++ b/getopt.c
@@ -49,7 +49,7 @@
49#include <ctype.h> 49#include <ctype.h>
50#include <getopt.h> 50#include <getopt.h>
51 51
52#include "internal.h" 52#include "busybox.h"
53 53
54/* NON_OPT is the code that is returned when a non-option is found in '+' 54/* NON_OPT is the code that is returned when a non-option is found in '+'
55 mode */ 55 mode */
diff --git a/grep.c b/grep.c
index 3ee409c64..003dae98e 100644
--- a/grep.c
+++ b/grep.c
@@ -26,7 +26,7 @@
26#include <regex.h> 26#include <regex.h>
27#include <string.h> /* for strerror() */ 27#include <string.h> /* for strerror() */
28#include <errno.h> 28#include <errno.h>
29#include "internal.h" 29#include "busybox.h"
30 30
31extern int optind; /* in unistd.h */ 31extern int optind; /* in unistd.h */
32extern int errno; /* for use with strerror() */ 32extern int errno; /* for use with strerror() */
diff --git a/gunzip.c b/gunzip.c
index b27ebeda8..ee8693013 100644
--- a/gunzip.c
+++ b/gunzip.c
@@ -27,7 +27,7 @@
27 * 27 *
28 */ 28 */
29 29
30#include "internal.h" 30#include "busybox.h"
31#include <getopt.h> 31#include <getopt.h>
32 32
33/* These defines are very important for BusyBox. Without these, 33/* These defines are very important for BusyBox. Without these,
diff --git a/gzip.c b/gzip.c
index c0832680f..e518ffd16 100644
--- a/gzip.c
+++ b/gzip.c
@@ -29,7 +29,7 @@
29 * 29 *
30 */ 30 */
31 31
32#include "internal.h" 32#include "busybox.h"
33#define BB_DECLARE_EXTERN 33#define BB_DECLARE_EXTERN
34#define bb_need_memory_exhausted 34#define bb_need_memory_exhausted
35#include "messages.c" 35#include "messages.c"
diff --git a/halt.c b/halt.c
index 2ca36d038..c3e2523c0 100644
--- a/halt.c
+++ b/halt.c
@@ -21,7 +21,7 @@
21 * 21 *
22 */ 22 */
23 23
24#include "internal.h" 24#include "busybox.h"
25#include <signal.h> 25#include <signal.h>
26 26
27extern int halt_main(int argc, char **argv) 27extern int halt_main(int argc, char **argv)
diff --git a/head.c b/head.c
index 58b3cae68..c232e1153 100644
--- a/head.c
+++ b/head.c
@@ -22,7 +22,7 @@
22 * 22 *
23 */ 23 */
24 24
25#include "internal.h" 25#include "busybox.h"
26#include <errno.h> 26#include <errno.h>
27#include <stdio.h> 27#include <stdio.h>
28 28
@@ -100,4 +100,4 @@ int head_main(int argc, char **argv)
100 return(0); 100 return(0);
101} 101}
102 102
103/* $Id: head.c,v 1.13 2000/07/16 20:57:15 kraai Exp $ */ 103/* $Id: head.c,v 1.14 2000/09/25 21:45:57 andersen Exp $ */
diff --git a/hostid.c b/hostid.c
index f1010a65d..47bd8d724 100644
--- a/hostid.c
+++ b/hostid.c
@@ -20,7 +20,7 @@
20 * 20 *
21 */ 21 */
22 22
23#include "internal.h" 23#include "busybox.h"
24#include <stdio.h> 24#include <stdio.h>
25 25
26extern int hostid_main(int argc, char **argv) 26extern int hostid_main(int argc, char **argv)
diff --git a/hostname.c b/hostname.c
index 77b545ded..4320a968c 100644
--- a/hostname.c
+++ b/hostname.c
@@ -1,6 +1,6 @@
1/* vi: set sw=4 ts=4: */ 1/* vi: set sw=4 ts=4: */
2/* 2/*
3 * $Id: hostname.c,v 1.12 2000/07/16 20:57:15 kraai Exp $ 3 * $Id: hostname.c,v 1.13 2000/09/25 21:45:57 andersen Exp $
4 * Mini hostname implementation for busybox 4 * Mini hostname implementation for busybox
5 * 5 *
6 * Copyright (C) 1999 by Randolph Chung <tausq@debian.org> 6 * Copyright (C) 1999 by Randolph Chung <tausq@debian.org>
@@ -23,7 +23,7 @@
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 */ 24 */
25 25
26#include "internal.h" 26#include "busybox.h"
27#include <errno.h> 27#include <errno.h>
28#include <arpa/inet.h> 28#include <arpa/inet.h>
29#include <netdb.h> 29#include <netdb.h>
diff --git a/id.c b/id.c
index a1a17924c..fdfc33cdc 100644
--- a/id.c
+++ b/id.c
@@ -20,7 +20,7 @@
20 * 20 *
21 */ 21 */
22 22
23#include "internal.h" 23#include "busybox.h"
24#include <stdio.h> 24#include <stdio.h>
25#include <unistd.h> 25#include <unistd.h>
26#include <pwd.h> 26#include <pwd.h>
diff --git a/init.c b/init.c
index 2c23e60b7..17e605ba0 100644
--- a/init.c
+++ b/init.c
@@ -27,7 +27,7 @@
27#define DEBUG_INIT 27#define DEBUG_INIT
28*/ 28*/
29 29
30#include "internal.h" 30#include "busybox.h"
31#include <stdio.h> 31#include <stdio.h>
32#include <stdlib.h> 32#include <stdlib.h>
33#include <errno.h> 33#include <errno.h>
diff --git a/init/halt.c b/init/halt.c
index 2ca36d038..c3e2523c0 100644
--- a/init/halt.c
+++ b/init/halt.c
@@ -21,7 +21,7 @@
21 * 21 *
22 */ 22 */
23 23
24#include "internal.h" 24#include "busybox.h"
25#include <signal.h> 25#include <signal.h>
26 26
27extern int halt_main(int argc, char **argv) 27extern int halt_main(int argc, char **argv)
diff --git a/init/init.c b/init/init.c
index 2c23e60b7..17e605ba0 100644
--- a/init/init.c
+++ b/init/init.c
@@ -27,7 +27,7 @@
27#define DEBUG_INIT 27#define DEBUG_INIT
28*/ 28*/
29 29
30#include "internal.h" 30#include "busybox.h"
31#include <stdio.h> 31#include <stdio.h>
32#include <stdlib.h> 32#include <stdlib.h>
33#include <errno.h> 33#include <errno.h>
diff --git a/init/poweroff.c b/init/poweroff.c
index 126a0fb94..3101a20dc 100644
--- a/init/poweroff.c
+++ b/init/poweroff.c
@@ -21,7 +21,7 @@
21 * 21 *
22 */ 22 */
23 23
24#include "internal.h" 24#include "busybox.h"
25#include <signal.h> 25#include <signal.h>
26 26
27extern int poweroff_main(int argc, char **argv) 27extern int poweroff_main(int argc, char **argv)
diff --git a/init/reboot.c b/init/reboot.c
index bde8dbd77..354286d47 100644
--- a/init/reboot.c
+++ b/init/reboot.c
@@ -21,7 +21,7 @@
21 * 21 *
22 */ 22 */
23 23
24#include "internal.h" 24#include "busybox.h"
25#include <signal.h> 25#include <signal.h>
26 26
27extern int reboot_main(int argc, char **argv) 27extern int reboot_main(int argc, char **argv)
diff --git a/insmod.c b/insmod.c
index 136f9f062..0c81af6f0 100644
--- a/insmod.c
+++ b/insmod.c
@@ -36,7 +36,7 @@
36 * 36 *
37 */ 37 */
38 38
39#include "internal.h" 39#include "busybox.h"
40#include <stdlib.h> 40#include <stdlib.h>
41#include <stdio.h> 41#include <stdio.h>
42#include <stddef.h> 42#include <stddef.h>
@@ -77,7 +77,7 @@
77#ifndef MODUTILS_MODULE_H 77#ifndef MODUTILS_MODULE_H
78#define MODUTILS_MODULE_H 1 78#define MODUTILS_MODULE_H 1
79 79
80#ident "$Id: insmod.c,v 1.24 2000/09/24 03:44:29 andersen Exp $" 80#ident "$Id: insmod.c,v 1.25 2000/09/25 21:45:58 andersen Exp $"
81 81
82/* This file contains the structures used by the 2.0 and 2.1 kernels. 82/* This file contains the structures used by the 2.0 and 2.1 kernels.
83 We do not use the kernel headers directly because we do not wish 83 We do not use the kernel headers directly because we do not wish
@@ -283,7 +283,7 @@ int delete_module(const char *);
283#ifndef MODUTILS_OBJ_H 283#ifndef MODUTILS_OBJ_H
284#define MODUTILS_OBJ_H 1 284#define MODUTILS_OBJ_H 1
285 285
286#ident "$Id: insmod.c,v 1.24 2000/09/24 03:44:29 andersen Exp $" 286#ident "$Id: insmod.c,v 1.25 2000/09/25 21:45:58 andersen Exp $"
287 287
288/* The relocatable object is manipulated using elfin types. */ 288/* The relocatable object is manipulated using elfin types. */
289 289
diff --git a/internal.h b/internal.h
deleted file mode 100644
index 69f455435..000000000
--- a/internal.h
+++ /dev/null
@@ -1,468 +0,0 @@
1/* vi: set sw=4 ts=4: */
2/*
3 * Busybox main internal header file
4 *
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 *
20 * Based in part on code from sash, Copyright (c) 1999 by David I. Bell
21 * Permission has been granted to redistribute this code under the GPL.
22 *
23 */
24#ifndef _BB_INTERNAL_H_
25#define _BB_INTERNAL_H_ 1
26
27#include "Config.h"
28
29#ifdef DMALLOC
30#include "dmalloc.h"
31#endif
32
33#include <stdlib.h>
34#include <stdarg.h>
35#include <string.h>
36#include <unistd.h>
37#include <errno.h>
38#include <sys/stat.h>
39#include <sys/param.h>
40#include <mntent.h>
41#include <regex.h>
42/* for the _syscall() macros */
43#include <sys/syscall.h>
44#include <linux/unistd.h>
45
46
47/* Some useful definitions */
48#define FALSE ((int) 1)
49#define TRUE ((int) 0)
50
51/* for mtab.c */
52#define MTAB_GETMOUNTPT '1'
53#define MTAB_GETDEVICE '2'
54
55#define BUF_SIZE 8192
56#define EXPAND_ALLOC 1024
57
58
59#define isBlank(ch) (((ch) == ' ') || ((ch) == '\t'))
60#define isDecimal(ch) (((ch) >= '0') && ((ch) <= '9'))
61#define isOctal(ch) (((ch) >= '0') && ((ch) <= '7'))
62#define isWildCard(ch) (((ch) == '*') || ((ch) == '?') || ((ch) == '['))
63
64/* Macros for min/max. */
65#ifndef MIN
66#define MIN(a,b) (((a)<(b))?(a):(b))
67#endif
68
69#ifndef MAX
70#define MAX(a,b) (((a)>(b))?(a):(b))
71#endif
72
73
74/* I don't like nested includes, but the string and io functions are used
75 * too often
76 */
77#include <stdio.h>
78#if !defined(NO_STRING_H) || defined(STDC_HEADERS)
79# include <string.h>
80# if !defined(STDC_HEADERS) && !defined(NO_MEMORY_H) && !defined(__GNUC__)
81# include <memory.h>
82# endif
83# define memzero(s, n) memset ((void *)(s), 0, (n))
84#else
85# include <strings.h>
86# define strchr index
87# define strrchr rindex
88# define memcpy(d, s, n) bcopy((s), (d), (n))
89# define memcmp(s1, s2, n) bcmp((s1), (s2), (n))
90# define memzero(s, n) bzero((s), (n))
91#endif
92
93
94enum Location {
95 _BB_DIR_ROOT = 0,
96 _BB_DIR_BIN,
97 _BB_DIR_SBIN,
98 _BB_DIR_USR_BIN,
99 _BB_DIR_USR_SBIN
100};
101
102struct BB_applet {
103 const char* name;
104 int (*main)(int argc, char** argv);
105 enum Location location;
106 const char* usage;
107};
108/* From busybox.c */
109extern const struct BB_applet applets[];
110
111extern int ar_main(int argc, char **argv);
112extern int basename_main(int argc, char **argv);
113extern int bogomips_main(int argc, char **argv);
114extern int busybox_main(int argc, char** argv);
115extern int cat_main(int argc, char** argv);
116extern int chmod_chown_chgrp_main(int argc, char** argv);
117extern int chroot_main(int argc, char** argv);
118extern int chvt_main(int argc, char** argv);
119extern int clear_main(int argc, char** argv);
120extern int cp_mv_main(int argc, char** argv);
121extern int cut_main(int argc, char** argv);
122extern int date_main(int argc, char** argv);
123extern int dc_main(int argc, char** argv);
124extern int dd_main(int argc, char** argv);
125extern int dirname_main(int argc, char** argv);
126extern int deallocvt_main(int argc, char** argv);
127extern int df_main(int argc, char** argv);
128extern int dmesg_main(int argc, char** argv);
129extern int dos2unix_main(int argc, char** argv);
130extern int du_main(int argc, char** argv);
131extern int dumpkmap_main(int argc, char** argv);
132extern int dutmp_main(int argc, char** argv);
133extern int echo_main(int argc, char** argv);
134extern int expr_main(int argc, char** argv);
135extern int false_main(int argc, char** argv);
136extern int fbset_main(int argc, char** argv);
137extern int fdisk_main(int argc, char** argv);
138extern int fdflush_main(int argc, char **argv);
139extern int fsck_minix_main(int argc, char **argv);
140extern int find_main(int argc, char** argv);
141extern int free_main(int argc, char** argv);
142extern int freeramdisk_main(int argc, char** argv);
143extern int getopt_main(int argc, char** argv);
144extern int grep_main(int argc, char** argv);
145extern int gunzip_main (int argc, char** argv);
146extern int gzip_main(int argc, char** argv);
147extern int halt_main(int argc, char** argv);
148extern int head_main(int argc, char** argv);
149extern int hostid_main(int argc, char** argv);
150extern int hostname_main(int argc, char** argv);
151extern int id_main(int argc, char** argv);
152extern int init_main(int argc, char** argv);
153extern int insmod_main(int argc, char** argv);
154extern int kill_main(int argc, char** argv);
155extern int length_main(int argc, char** argv);
156extern int ln_main(int argc, char** argv);
157extern int loadacm_main(int argc, char** argv);
158extern int loadfont_main(int argc, char** argv);
159extern int loadkmap_main(int argc, char** argv);
160extern int losetup_main(int argc, char** argv);
161extern int logger_main(int argc, char **argv);
162extern int logname_main(int argc, char **argv);
163extern int ls_main(int argc, char** argv);
164extern int lsmod_main(int argc, char** argv);
165extern int makedevs_main(int argc, char** argv);
166extern int md5sum_main(int argc, char** argv);
167extern int mkdir_main(int argc, char** argv);
168extern int mkfifo_main(int argc, char **argv);
169extern int mkfs_minix_main(int argc, char **argv);
170extern int mknod_main(int argc, char** argv);
171extern int mkswap_main(int argc, char** argv);
172extern int mktemp_main(int argc, char **argv);
173extern int nc_main(int argc, char** argv);
174extern int more_main(int argc, char** argv);
175extern int mount_main(int argc, char** argv);
176extern int mt_main(int argc, char** argv);
177extern int nslookup_main(int argc, char **argv);
178extern int ping_main(int argc, char **argv);
179extern int poweroff_main(int argc, char **argv);
180extern int printf_main(int argc, char** argv);
181extern int ps_main(int argc, char** argv);
182extern int pwd_main(int argc, char** argv);
183extern int rdate_main(int argc, char** argv);
184extern int reboot_main(int argc, char** argv);
185extern int renice_main(int argc, char** argv);
186extern int reset_main(int argc, char** argv);
187extern int rm_main(int argc, char** argv);
188extern int rmdir_main(int argc, char **argv);
189extern int rmmod_main(int argc, char** argv);
190extern int sed_main(int argc, char** argv);
191extern int sfdisk_main(int argc, char** argv);
192extern int setkeycodes_main(int argc, char** argv);
193extern int shell_main(int argc, char** argv);
194extern int sleep_main(int argc, char** argv);
195extern int sort_main(int argc, char** argv);
196extern int swap_on_off_main(int argc, char** argv);
197extern int sync_main(int argc, char** argv);
198extern int syslogd_main(int argc, char **argv);
199extern int tail_main(int argc, char** argv);
200extern int tar_main(int argc, char** argv);
201extern int tee_main(int argc, char** argv);
202extern int test_main(int argc, char** argv);
203extern int telnet_main(int argc, char** argv);
204extern int touch_main(int argc, char** argv);
205extern int tr_main(int argc, char** argv);
206extern int true_main(int argc, char** argv);
207extern int tput_main(int argc, char** argv);
208extern int tryopen_main(int argc, char** argv);
209extern int tty_main(int argc, char** argv);
210extern int umount_main(int argc, char** argv);
211extern int uname_main(int argc, char** argv);
212extern int uniq_main(int argc, char** argv);
213extern int unix2dos_main(int argc, char** argv);
214extern int unrpm_main(int argc, char** argv);
215extern int update_main(int argc, char** argv);
216extern int uptime_main(int argc, char** argv);
217extern int usleep_main(int argc, char** argv);
218extern int uuencode_main(int argc, char** argv);
219extern int uudecode_main(int argc, char** argv);
220extern int wc_main(int argc, char** argv);
221extern int wget_main(int argc, char** argv);
222extern int which_main(int argc, char** argv);
223extern int whoami_main(int argc, char** argv);
224extern int xargs_main(int argc, char** argv);
225extern int yes_main(int argc, char** argv);
226
227extern const char ar_usage[];
228extern const char basename_usage[];
229extern const char cat_usage[];
230extern const char chgrp_usage[];
231extern const char chmod_usage[];
232extern const char chown_usage[];
233extern const char chroot_usage[];
234extern const char chvt_usage[];
235extern const char clear_usage[];
236extern const char cp_usage[];
237extern const char cut_usage[];
238extern const char date_usage[];
239extern const char dc_usage[];
240extern const char dd_usage[];
241extern const char deallocvt_usage[];
242extern const char df_usage[];
243extern const char dirname_usage[];
244extern const char dmesg_usage[];
245extern const char dos2unix_usage[];
246extern const char du_usage[];
247extern const char dumpkmap_usage[];
248extern const char dutmp_usage[];
249extern const char echo_usage[];
250extern const char expr_usage[];
251extern const char false_usage[];
252extern const char fdflush_usage[];
253extern const char find_usage[];
254extern const char free_usage[];
255extern const char freeramdisk_usage[];
256extern const char fsck_minix_usage[];
257extern const char grep_usage[];
258extern const char gunzip_usage[];
259extern const char gzip_usage[];
260extern const char halt_usage[];
261extern const char head_usage[];
262extern const char hostid_usage[];
263extern const char hostname_usage[];
264extern const char id_usage[];
265extern const char insmod_usage[];
266extern const char kill_usage[];
267extern const char killall_usage[];
268extern const char length_usage[];
269extern const char ln_usage[];
270extern const char loadacm_usage[];
271extern const char loadfont_usage[];
272extern const char loadkmap_usage[];
273extern const char logger_usage[];
274extern const char logname_usage[];
275extern const char ls_usage[];
276extern const char lsmod_usage[];
277extern const char makedevs_usage[];
278extern const char md5sum_usage[];
279extern const char mkdir_usage[];
280extern const char mkfifo_usage[];
281extern const char mkfs_minix_usage[];
282extern const char mknod_usage[];
283extern const char mkswap_usage[];
284extern const char mktemp_usage[];
285extern const char more_usage[];
286extern const char mount_usage[];
287extern const char mt_usage[];
288extern const char mv_usage[];
289extern const char nc_usage[];
290extern const char nslookup_usage[];
291extern const char ping_usage[];
292extern const char poweroff_usage[];
293extern const char printf_usage[];
294extern const char ps_usage[];
295extern const char pwd_usage[];
296extern const char rdate_usage[];
297extern const char reboot_usage[];
298extern const char renice_usage[];
299extern const char reset_usage[];
300extern const char rm_usage[];
301extern const char rmdir_usage[];
302extern const char rmmod_usage[];
303extern const char sed_usage[];
304extern const char setkeycodes_usage[];
305extern const char shell_usage[];
306extern const char sleep_usage[];
307extern const char sort_usage[];
308extern const char swapoff_usage[];
309extern const char swapon_usage[];
310extern const char sync_usage[];
311extern const char syslogd_usage[];
312extern const char tail_usage[];
313extern const char tar_usage[];
314extern const char tee_usage[];
315extern const char telnet_usage[];
316extern const char test_usage[];
317extern const char touch_usage[];
318extern const char tr_usage[];
319extern const char true_usage[];
320extern const char tty_usage[];
321extern const char umount_usage[];
322extern const char uname_usage[];
323extern const char uniq_usage[];
324extern const char unix2dos_usage[];
325extern const char unrpm_usage[];
326extern const char update_usage[];
327extern const char uptime_usage[];
328extern const char usleep_usage[];
329extern const char uudecode_usage[];
330extern const char uuencode_usage[];
331extern const char wc_usage[];
332extern const char wget_usage[];
333extern const char which_usage[];
334extern const char whoami_usage[];
335extern const char xargs_usage[];
336extern const char yes_usage[];
337
338extern const char *applet_name;
339
340extern void usage(const char *usage) __attribute__ ((noreturn));
341extern void errorMsg(const char *s, ...) __attribute__ ((format (printf, 1, 2)));
342extern void fatalError(const char *s, ...) __attribute__ ((noreturn, format (printf, 1, 2)));
343
344const char *modeString(int mode);
345const char *timeString(time_t timeVal);
346int isDirectory(const char *name, const int followLinks, struct stat *statBuf);
347int isDevice(const char *name);
348
349typedef struct ino_dev_hash_bucket_struct {
350 struct ino_dev_hash_bucket_struct *next;
351 ino_t ino;
352 dev_t dev;
353 char name[1];
354} ino_dev_hashtable_bucket_t;
355int is_in_ino_dev_hashtable(const struct stat *statbuf, char **name);
356void add_to_ino_dev_hashtable(const struct stat *statbuf, const char *name);
357void reset_ino_dev_hashtable(void);
358
359int copyFile(const char *srcName, const char *destName,
360 int setModes, int followLinks, int forceFlag);
361int copySubFile(int srcFd, int dstFd, size_t remaining);
362char *buildName(const char *dirName, const char *fileName);
363int makeString(int argc, const char **argv, char *buf, int bufLen);
364char *getChunk(int size);
365char *chunkstrdup(const char *str);
366void freeChunks(void);
367int fullWrite(int fd, const char *buf, int len);
368int fullRead(int fd, char *buf, int len);
369int recursiveAction(const char *fileName, int recurse, int followLinks, int depthFirst,
370 int (*fileAction) (const char *fileName, struct stat* statbuf, void* userData),
371 int (*dirAction) (const char *fileName, struct stat* statbuf, void* userData),
372 void* userData);
373
374extern int createPath (const char *name, int mode);
375extern int parse_mode( const char* s, mode_t* theMode);
376
377extern int get_kernel_revision(void);
378
379extern int get_console_fd(char* tty_name);
380extern struct mntent *findMountPoint(const char *name, const char *table);
381extern void write_mtab(char* blockDevice, char* directory,
382 char* filesystemType, long flags, char* string_flags);
383extern void erase_mtab(const char * name);
384extern void mtab_read(void);
385extern char *mtab_first(void **iter);
386extern char *mtab_next(void **iter);
387extern char *mtab_getinfo(const char *match, const char which);
388extern int check_wildcard_match(const char* text, const char* pattern);
389extern long getNum (const char *cp);
390extern pid_t* findPidByName( char* pidName);
391extern int find_real_root_device_name(char* name);
392extern char *get_line_from_file(FILE *file);
393extern void print_file(FILE *file);
394extern int print_file_by_name(char *filename);
395extern char process_escape_sequence(char **ptr);
396extern char *get_last_path_component(char *path);
397extern void xregcomp(regex_t *preg, const char *regex, int cflags);
398
399#ifndef DMALLOC
400extern void *xmalloc (size_t size);
401extern void *xrealloc(void *old, size_t size);
402extern void *xcalloc(size_t nmemb, size_t size);
403extern char *xstrdup (const char *s);
404#endif
405extern char *xstrndup (const char *s, int n);
406
407
408/* These parse entries in /etc/passwd and /etc/group. This is desirable
409 * for BusyBox since we want to avoid using the glibc NSS stuff, which
410 * increases target size and is often not needed embedded systems. */
411extern long my_getpwnam(char *name);
412extern long my_getgrnam(char *name);
413extern void my_getpwuid(char *name, long uid);
414extern void my_getgrgid(char *group, long gid);
415extern long my_getpwnamegid(char *name);
416
417extern int device_open(char *device, int mode);
418
419#if defined BB_FEATURE_MOUNT_LOOP
420extern int del_loop(const char *device);
421extern int set_loop(const char *device, const char *file, int offset, int *loopro);
422extern char *find_unused_loop_device (void);
423#endif
424
425
426#if (__GLIBC__ < 2) && (defined BB_SYSLOGD || defined BB_INIT)
427extern int vdprintf(int d, const char *format, va_list ap);
428#endif
429
430#if defined BB_NFSMOUNT
431int nfsmount(const char *spec, const char *node, int *flags,
432 char **extra_opts, char **mount_opts, int running_bg);
433#endif
434
435#ifndef RB_POWER_OFF
436/* Stop system and switch power off if possible. */
437#define RB_POWER_OFF 0x4321fedc
438#endif
439
440/* Include our own copy of struct sysinfo to avoid binary compatability
441 * problems with Linux 2.4, which changed things. Grumble, grumble. */
442struct sysinfo {
443 long uptime; /* Seconds since boot */
444 unsigned long loads[3]; /* 1, 5, and 15 minute load averages */
445 unsigned long totalram; /* Total usable main memory size */
446 unsigned long freeram; /* Available memory size */
447 unsigned long sharedram; /* Amount of shared memory */
448 unsigned long bufferram; /* Memory used by buffers */
449 unsigned long totalswap; /* Total swap space size */
450 unsigned long freeswap; /* swap space still available */
451 unsigned short procs; /* Number of current processes */
452 unsigned long totalhigh; /* Total high memory size */
453 unsigned long freehigh; /* Available high memory size */
454 unsigned int mem_unit; /* Memory unit size in bytes */
455 char _f[20-2*sizeof(long)-sizeof(int)]; /* Padding: libc5 uses this.. */
456};
457extern int sysinfo (struct sysinfo* info);
458
459/* Bit map related macros -- libc5 doens't provide these... sigh. */
460#ifndef setbit
461#define NBBY CHAR_BIT
462#define setbit(a,i) ((a)[(i)/NBBY] |= 1<<((i)%NBBY))
463#define clrbit(a,i) ((a)[(i)/NBBY] &= ~(1<<((i)%NBBY)))
464#define isset(a,i) ((a)[(i)/NBBY] & (1<<((i)%NBBY)))
465#define isclr(a,i) (((a)[(i)/NBBY] & (1<<((i)%NBBY))) == 0)
466#endif
467
468#endif /* _BB_INTERNAL_H_ */
diff --git a/kill.c b/kill.c
index 8f48ba026..7ade8228c 100644
--- a/kill.c
+++ b/kill.c
@@ -21,7 +21,7 @@
21 */ 21 */
22 22
23 23
24#include "internal.h" 24#include "busybox.h"
25#include <stdio.h> 25#include <stdio.h>
26#include <stdlib.h> 26#include <stdlib.h>
27#include <errno.h> 27#include <errno.h>
diff --git a/lash.c b/lash.c
index b8f407202..77efc6aac 100644
--- a/lash.c
+++ b/lash.c
@@ -32,7 +32,7 @@
32//#define DEBUG_SHELL 32//#define DEBUG_SHELL
33 33
34 34
35#include "internal.h" 35#include "busybox.h"
36#include <stdio.h> 36#include <stdio.h>
37#include <stdlib.h> 37#include <stdlib.h>
38#include <ctype.h> 38#include <ctype.h>
diff --git a/length.c b/length.c
index cf4fb1c07..14d15c81c 100644
--- a/length.c
+++ b/length.c
@@ -1,5 +1,5 @@
1/* vi: set sw=4 ts=4: */ 1/* vi: set sw=4 ts=4: */
2#include "internal.h" 2#include "busybox.h"
3#include <stdlib.h> 3#include <stdlib.h>
4#include <string.h> 4#include <string.h>
5#include <stdio.h> 5#include <stdio.h>
diff --git a/ln.c b/ln.c
index d5f44ea4c..8ef8d05de 100644
--- a/ln.c
+++ b/ln.c
@@ -21,7 +21,7 @@
21 * 21 *
22 */ 22 */
23 23
24#include "internal.h" 24#include "busybox.h"
25#define BB_DECLARE_EXTERN 25#define BB_DECLARE_EXTERN
26#define bb_need_not_a_directory 26#define bb_need_not_a_directory
27#include "messages.c" 27#include "messages.c"
diff --git a/loadacm.c b/loadacm.c
index 7f669bf08..826c2a33f 100644
--- a/loadacm.c
+++ b/loadacm.c
@@ -7,7 +7,7 @@
7 * Peter Novodvorsky <petya@logic.ru> 7 * Peter Novodvorsky <petya@logic.ru>
8 */ 8 */
9 9
10#include "internal.h" 10#include "busybox.h"
11#include <stdio.h> 11#include <stdio.h>
12#include <stdlib.h> 12#include <stdlib.h>
13#include <memory.h> 13#include <memory.h>
diff --git a/loadfont.c b/loadfont.c
index e93ca3186..d6eadc353 100644
--- a/loadfont.c
+++ b/loadfont.c
@@ -7,7 +7,7 @@
7 * Loads the console font, and possibly the corresponding screen map(s). 7 * Loads the console font, and possibly the corresponding screen map(s).
8 * (Adapted for busybox by Matej Vela.) 8 * (Adapted for busybox by Matej Vela.)
9 */ 9 */
10#include "internal.h" 10#include "busybox.h"
11#include <stdio.h> 11#include <stdio.h>
12#include <string.h> 12#include <string.h>
13#include <fcntl.h> 13#include <fcntl.h>
diff --git a/loadkmap.c b/loadkmap.c
index 2321a1ede..3f8d726e0 100644
--- a/loadkmap.c
+++ b/loadkmap.c
@@ -20,7 +20,7 @@
20 * 20 *
21 */ 21 */
22 22
23#include "internal.h" 23#include "busybox.h"
24#include <errno.h> 24#include <errno.h>
25#include <fcntl.h> 25#include <fcntl.h>
26#include <stdio.h> 26#include <stdio.h>
diff --git a/logger.c b/logger.c
index f4a0f82fb..fa1cf6d15 100644
--- a/logger.c
+++ b/logger.c
@@ -21,7 +21,7 @@
21 * 21 *
22 */ 22 */
23 23
24#include "internal.h" 24#include "busybox.h"
25#include <stdio.h> 25#include <stdio.h>
26#include <unistd.h> 26#include <unistd.h>
27#include <sys/types.h> 27#include <sys/types.h>
diff --git a/logname.c b/logname.c
index a0aff42d6..09ee24928 100644
--- a/logname.c
+++ b/logname.c
@@ -20,7 +20,7 @@
20 * 20 *
21 */ 21 */
22 22
23#include "internal.h" 23#include "busybox.h"
24#include <stdio.h> 24#include <stdio.h>
25 25
26extern int logname_main(int argc, char **argv) 26extern int logname_main(int argc, char **argv)
diff --git a/ls.c b/ls.c
index 0e08f7683..385d6b2de 100644
--- a/ls.c
+++ b/ls.c
@@ -47,7 +47,7 @@
47 47
48/************************************************************************/ 48/************************************************************************/
49 49
50#include "internal.h" 50#include "busybox.h"
51#include <sys/types.h> 51#include <sys/types.h>
52#include <sys/stat.h> 52#include <sys/stat.h>
53#include <stdio.h> 53#include <stdio.h>
diff --git a/lsmod.c b/lsmod.c
index a4a0ece0e..ab4726b9e 100644
--- a/lsmod.c
+++ b/lsmod.c
@@ -21,7 +21,7 @@
21 * 21 *
22 */ 22 */
23 23
24#include "internal.h" 24#include "busybox.h"
25#include <stdlib.h> 25#include <stdlib.h>
26#include <stdio.h> 26#include <stdio.h>
27#include <stddef.h> 27#include <stddef.h>
diff --git a/makedevs.c b/makedevs.c
index c9802cca7..f979871bd 100644
--- a/makedevs.c
+++ b/makedevs.c
@@ -7,7 +7,7 @@
7 * known bugs: can't deal with alpha ranges 7 * known bugs: can't deal with alpha ranges
8 */ 8 */
9 9
10#include "internal.h" 10#include "busybox.h"
11#include <stdio.h> 11#include <stdio.h>
12#include <stdlib.h> 12#include <stdlib.h>
13#include <string.h> 13#include <string.h>
diff --git a/md5sum.c b/md5sum.c
index a791a41b0..c7e540223 100644
--- a/md5sum.c
+++ b/md5sum.c
@@ -20,7 +20,7 @@
20/* Written by Ulrich Drepper <drepper@gnu.ai.mit.edu> */ 20/* Written by Ulrich Drepper <drepper@gnu.ai.mit.edu> */
21/* Hacked to work with BusyBox by Alfred M. Szmidt <ams@trillian.itslinux.org> */ 21/* Hacked to work with BusyBox by Alfred M. Szmidt <ams@trillian.itslinux.org> */
22 22
23#include "internal.h" 23#include "busybox.h"
24#include <stdio.h> 24#include <stdio.h>
25#include <errno.h> 25#include <errno.h>
26#include <ctype.h> 26#include <ctype.h>
@@ -66,7 +66,7 @@ extern _IO_ssize_t getline __P ((char **, size_t *, FILE *));
66#include <string.h> 66#include <string.h>
67#include <endian.h> 67#include <endian.h>
68 68
69#include "internal.h" 69#include "busybox.h"
70//---------------------------------------------------------------------------- 70//----------------------------------------------------------------------------
71//--------md5.h 71//--------md5.h
72//---------------------------------------------------------------------------- 72//----------------------------------------------------------------------------
diff --git a/messages.c b/messages.c
index f7a772cbd..81fd9c75c 100644
--- a/messages.c
+++ b/messages.c
@@ -36,7 +36,7 @@
36//Then just use the string memory_exhausted when it is needed. 36//Then just use the string memory_exhausted when it is needed.
37// 37//
38 38
39#include "internal.h" 39#include "busybox.h"
40#ifndef _BB_MESSAGES_C 40#ifndef _BB_MESSAGES_C
41#define _BB_MESSAGES_C 41#define _BB_MESSAGES_C
42 42
diff --git a/miscutils/dc.c b/miscutils/dc.c
index fac48e895..48aa830d6 100644
--- a/miscutils/dc.c
+++ b/miscutils/dc.c
@@ -1,5 +1,5 @@
1/* vi: set sw=4 ts=4: */ 1/* vi: set sw=4 ts=4: */
2#include "internal.h" 2#include "busybox.h"
3#include <ctype.h> 3#include <ctype.h>
4#include <stdio.h> 4#include <stdio.h>
5#include <stdlib.h> 5#include <stdlib.h>
diff --git a/miscutils/dutmp.c b/miscutils/dutmp.c
index ec10941d0..cf5f1cff8 100644
--- a/miscutils/dutmp.c
+++ b/miscutils/dutmp.c
@@ -12,7 +12,7 @@
12 * Erik Andersen <andersen@lineo.com> 12 * Erik Andersen <andersen@lineo.com>
13 */ 13 */
14 14
15#include "internal.h" 15#include "busybox.h"
16#include <sys/types.h> 16#include <sys/types.h>
17#include <fcntl.h> 17#include <fcntl.h>
18 18
diff --git a/miscutils/makedevs.c b/miscutils/makedevs.c
index c9802cca7..f979871bd 100644
--- a/miscutils/makedevs.c
+++ b/miscutils/makedevs.c
@@ -7,7 +7,7 @@
7 * known bugs: can't deal with alpha ranges 7 * known bugs: can't deal with alpha ranges
8 */ 8 */
9 9
10#include "internal.h" 10#include "busybox.h"
11#include <stdio.h> 11#include <stdio.h>
12#include <stdlib.h> 12#include <stdlib.h>
13#include <string.h> 13#include <string.h>
diff --git a/miscutils/mktemp.c b/miscutils/mktemp.c
index 2ec078503..62ca870c5 100644
--- a/miscutils/mktemp.c
+++ b/miscutils/mktemp.c
@@ -22,7 +22,7 @@
22 * 22 *
23 */ 23 */
24 24
25#include "internal.h" 25#include "busybox.h"
26#include <stdio.h> 26#include <stdio.h>
27#include <errno.h> 27#include <errno.h>
28 28
diff --git a/miscutils/mt.c b/miscutils/mt.c
index e77f58a6a..6acae4ea1 100644
--- a/miscutils/mt.c
+++ b/miscutils/mt.c
@@ -1,5 +1,5 @@
1/* vi: set sw=4 ts=4: */ 1/* vi: set sw=4 ts=4: */
2#include "internal.h" 2#include "busybox.h"
3#include <stdio.h> 3#include <stdio.h>
4#include <sys/mtio.h> 4#include <sys/mtio.h>
5#include <sys/fcntl.h> 5#include <sys/fcntl.h>
diff --git a/miscutils/update.c b/miscutils/update.c
index 3f3d68b87..e9f496913 100644
--- a/miscutils/update.c
+++ b/miscutils/update.c
@@ -28,7 +28,7 @@
28 * earlier) kernel. 2.2.x and higher flush filesystem buffers automatically. 28 * earlier) kernel. 2.2.x and higher flush filesystem buffers automatically.
29 */ 29 */
30 30
31#include "internal.h" 31#include "busybox.h"
32#include <sys/param.h> 32#include <sys/param.h>
33#include <sys/syslog.h> 33#include <sys/syslog.h>
34#include <unistd.h> /* for getopt() */ 34#include <unistd.h> /* for getopt() */
diff --git a/mkdir.c b/mkdir.c
index f824cdcb6..04310e4c7 100644
--- a/mkdir.c
+++ b/mkdir.c
@@ -21,7 +21,7 @@
21 * 21 *
22 */ 22 */
23 23
24#include "internal.h" 24#include "busybox.h"
25#define bb_need_name_too_long 25#define bb_need_name_too_long
26#define BB_DECLARE_EXTERN 26#define BB_DECLARE_EXTERN
27#include "messages.c" 27#include "messages.c"
diff --git a/mkfifo.c b/mkfifo.c
index 5d4126ac0..5e1bc1a78 100644
--- a/mkfifo.c
+++ b/mkfifo.c
@@ -20,7 +20,7 @@
20 * 20 *
21 */ 21 */
22 22
23#include "internal.h" 23#include "busybox.h"
24#include <stdio.h> 24#include <stdio.h>
25#include <sys/types.h> 25#include <sys/types.h>
26#include <errno.h> 26#include <errno.h>
diff --git a/mkfs_minix.c b/mkfs_minix.c
index fafcc230e..15cf531f0 100644
--- a/mkfs_minix.c
+++ b/mkfs_minix.c
@@ -62,7 +62,7 @@
62 * removed getopt based parser and added a hand rolled one. 62 * removed getopt based parser and added a hand rolled one.
63 */ 63 */
64 64
65#include "internal.h" 65#include "busybox.h"
66#include <stdio.h> 66#include <stdio.h>
67#include <time.h> 67#include <time.h>
68#include <unistd.h> 68#include <unistd.h>
diff --git a/mknod.c b/mknod.c
index b815aa198..ecb0e4780 100644
--- a/mknod.c
+++ b/mknod.c
@@ -20,7 +20,7 @@
20 * 20 *
21 */ 21 */
22 22
23#include "internal.h" 23#include "busybox.h"
24#include <stdio.h> 24#include <stdio.h>
25#include <errno.h> 25#include <errno.h>
26#include <sys/types.h> 26#include <sys/types.h>
diff --git a/mkswap.c b/mkswap.c
index 70028dc2e..8a9767cca 100644
--- a/mkswap.c
+++ b/mkswap.c
@@ -35,7 +35,7 @@
35 * 35 *
36 */ 36 */
37 37
38#include "internal.h" 38#include "busybox.h"
39#include <stdio.h> 39#include <stdio.h>
40#include <unistd.h> 40#include <unistd.h>
41#include <string.h> 41#include <string.h>
diff --git a/mktemp.c b/mktemp.c
index 2ec078503..62ca870c5 100644
--- a/mktemp.c
+++ b/mktemp.c
@@ -22,7 +22,7 @@
22 * 22 *
23 */ 23 */
24 24
25#include "internal.h" 25#include "busybox.h"
26#include <stdio.h> 26#include <stdio.h>
27#include <errno.h> 27#include <errno.h>
28 28
diff --git a/modutils/insmod.c b/modutils/insmod.c
index 136f9f062..0c81af6f0 100644
--- a/modutils/insmod.c
+++ b/modutils/insmod.c
@@ -36,7 +36,7 @@
36 * 36 *
37 */ 37 */
38 38
39#include "internal.h" 39#include "busybox.h"
40#include <stdlib.h> 40#include <stdlib.h>
41#include <stdio.h> 41#include <stdio.h>
42#include <stddef.h> 42#include <stddef.h>
@@ -77,7 +77,7 @@
77#ifndef MODUTILS_MODULE_H 77#ifndef MODUTILS_MODULE_H
78#define MODUTILS_MODULE_H 1 78#define MODUTILS_MODULE_H 1
79 79
80#ident "$Id: insmod.c,v 1.24 2000/09/24 03:44:29 andersen Exp $" 80#ident "$Id: insmod.c,v 1.25 2000/09/25 21:45:58 andersen Exp $"
81 81
82/* This file contains the structures used by the 2.0 and 2.1 kernels. 82/* This file contains the structures used by the 2.0 and 2.1 kernels.
83 We do not use the kernel headers directly because we do not wish 83 We do not use the kernel headers directly because we do not wish
@@ -283,7 +283,7 @@ int delete_module(const char *);
283#ifndef MODUTILS_OBJ_H 283#ifndef MODUTILS_OBJ_H
284#define MODUTILS_OBJ_H 1 284#define MODUTILS_OBJ_H 1
285 285
286#ident "$Id: insmod.c,v 1.24 2000/09/24 03:44:29 andersen Exp $" 286#ident "$Id: insmod.c,v 1.25 2000/09/25 21:45:58 andersen Exp $"
287 287
288/* The relocatable object is manipulated using elfin types. */ 288/* The relocatable object is manipulated using elfin types. */
289 289
diff --git a/modutils/lsmod.c b/modutils/lsmod.c
index a4a0ece0e..ab4726b9e 100644
--- a/modutils/lsmod.c
+++ b/modutils/lsmod.c
@@ -21,7 +21,7 @@
21 * 21 *
22 */ 22 */
23 23
24#include "internal.h" 24#include "busybox.h"
25#include <stdlib.h> 25#include <stdlib.h>
26#include <stdio.h> 26#include <stdio.h>
27#include <stddef.h> 27#include <stddef.h>
diff --git a/modutils/rmmod.c b/modutils/rmmod.c
index 67b1084fb..dd293523d 100644
--- a/modutils/rmmod.c
+++ b/modutils/rmmod.c
@@ -21,7 +21,7 @@
21 * 21 *
22 */ 22 */
23 23
24#include "internal.h" 24#include "busybox.h"
25#include <stdio.h> 25#include <stdio.h>
26#include <errno.h> 26#include <errno.h>
27#include <unistd.h> 27#include <unistd.h>
diff --git a/more.c b/more.c
index 45b7c1274..caabc44e2 100644
--- a/more.c
+++ b/more.c
@@ -25,7 +25,7 @@
25 * 25 *
26 */ 26 */
27 27
28#include "internal.h" 28#include "busybox.h"
29#include <stdio.h> 29#include <stdio.h>
30#include <fcntl.h> 30#include <fcntl.h>
31#include <signal.h> 31#include <signal.h>
diff --git a/mount.c b/mount.c
index 598b650f9..8b115c9f5 100644
--- a/mount.c
+++ b/mount.c
@@ -43,7 +43,7 @@
43 * 43 *
44 */ 44 */
45 45
46#include "internal.h" 46#include "busybox.h"
47#include <stdlib.h> 47#include <stdlib.h>
48#include <unistd.h> 48#include <unistd.h>
49#include <errno.h> 49#include <errno.h>
diff --git a/mt.c b/mt.c
index e77f58a6a..6acae4ea1 100644
--- a/mt.c
+++ b/mt.c
@@ -1,5 +1,5 @@
1/* vi: set sw=4 ts=4: */ 1/* vi: set sw=4 ts=4: */
2#include "internal.h" 2#include "busybox.h"
3#include <stdio.h> 3#include <stdio.h>
4#include <sys/mtio.h> 4#include <sys/mtio.h>
5#include <sys/fcntl.h> 5#include <sys/fcntl.h>
diff --git a/mtab.c b/mtab.c
index 27489cfd4..8984d8822 100644
--- a/mtab.c
+++ b/mtab.c
@@ -1,5 +1,5 @@
1/* vi: set sw=4 ts=4: */ 1/* vi: set sw=4 ts=4: */
2#include "internal.h" 2#include "busybox.h"
3#include <stdlib.h> 3#include <stdlib.h>
4#include <unistd.h> 4#include <unistd.h>
5#include <errno.h> 5#include <errno.h>
diff --git a/nc.c b/nc.c
index a544f32fc..fcacb0c45 100644
--- a/nc.c
+++ b/nc.c
@@ -25,7 +25,7 @@
25 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 25 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26 26
27*/ 27*/
28#include "internal.h" 28#include "busybox.h"
29#include <stdio.h> 29#include <stdio.h>
30#include <stdlib.h> 30#include <stdlib.h>
31#include <unistd.h> 31#include <unistd.h>
diff --git a/networking/hostname.c b/networking/hostname.c
index 77b545ded..4320a968c 100644
--- a/networking/hostname.c
+++ b/networking/hostname.c
@@ -1,6 +1,6 @@
1/* vi: set sw=4 ts=4: */ 1/* vi: set sw=4 ts=4: */
2/* 2/*
3 * $Id: hostname.c,v 1.12 2000/07/16 20:57:15 kraai Exp $ 3 * $Id: hostname.c,v 1.13 2000/09/25 21:45:57 andersen Exp $
4 * Mini hostname implementation for busybox 4 * Mini hostname implementation for busybox
5 * 5 *
6 * Copyright (C) 1999 by Randolph Chung <tausq@debian.org> 6 * Copyright (C) 1999 by Randolph Chung <tausq@debian.org>
@@ -23,7 +23,7 @@
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 */ 24 */
25 25
26#include "internal.h" 26#include "busybox.h"
27#include <errno.h> 27#include <errno.h>
28#include <arpa/inet.h> 28#include <arpa/inet.h>
29#include <netdb.h> 29#include <netdb.h>
diff --git a/networking/nc.c b/networking/nc.c
index a544f32fc..fcacb0c45 100644
--- a/networking/nc.c
+++ b/networking/nc.c
@@ -25,7 +25,7 @@
25 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 25 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26 26
27*/ 27*/
28#include "internal.h" 28#include "busybox.h"
29#include <stdio.h> 29#include <stdio.h>
30#include <stdlib.h> 30#include <stdlib.h>
31#include <unistd.h> 31#include <unistd.h>
diff --git a/networking/nslookup.c b/networking/nslookup.c
index 10d36b2d1..acb3e3bb2 100644
--- a/networking/nslookup.c
+++ b/networking/nslookup.c
@@ -21,7 +21,7 @@
21 * 21 *
22 */ 22 */
23 23
24#include "internal.h" 24#include "busybox.h"
25#include <ctype.h> 25#include <ctype.h>
26#include <errno.h> 26#include <errno.h>
27#include <stdio.h> 27#include <stdio.h>
@@ -170,4 +170,4 @@ int nslookup_main(int argc, char **argv)
170 return( TRUE); 170 return( TRUE);
171} 171}
172 172
173/* $Id: nslookup.c,v 1.11 2000/07/16 20:57:15 kraai Exp $ */ 173/* $Id: nslookup.c,v 1.12 2000/09/25 21:45:58 andersen Exp $ */
diff --git a/networking/ping.c b/networking/ping.c
index f3ce6fb80..70ea0f196 100644
--- a/networking/ping.c
+++ b/networking/ping.c
@@ -1,6 +1,6 @@
1/* vi: set sw=4 ts=4: */ 1/* vi: set sw=4 ts=4: */
2/* 2/*
3 * $Id: ping.c,v 1.24 2000/09/20 04:33:30 kraai Exp $ 3 * $Id: ping.c,v 1.25 2000/09/25 21:45:58 andersen Exp $
4 * Mini ping implementation for busybox 4 * Mini ping implementation for busybox
5 * 5 *
6 * Copyright (C) 1999 by Randolph Chung <tausq@debian.org> 6 * Copyright (C) 1999 by Randolph Chung <tausq@debian.org>
@@ -31,7 +31,7 @@
31 * Original copyright notice is retained at the end of this file. 31 * Original copyright notice is retained at the end of this file.
32 */ 32 */
33 33
34#include "internal.h" 34#include "busybox.h"
35#include <sys/param.h> 35#include <sys/param.h>
36#include <sys/socket.h> 36#include <sys/socket.h>
37#include <sys/file.h> 37#include <sys/file.h>
diff --git a/networking/telnet.c b/networking/telnet.c
index cf55de6af..bfa964460 100644
--- a/networking/telnet.c
+++ b/networking/telnet.c
@@ -31,7 +31,7 @@
31 */ 31 */
32 32
33 33
34#include "internal.h" 34#include "busybox.h"
35#include <termios.h> 35#include <termios.h>
36#include <unistd.h> 36#include <unistd.h>
37#include <errno.h> 37#include <errno.h>
diff --git a/networking/wget.c b/networking/wget.c
index c06e76d90..58801ee47 100644
--- a/networking/wget.c
+++ b/networking/wget.c
@@ -7,7 +7,7 @@
7 * <chip@laserlink.net> 7 * <chip@laserlink.net>
8 */ 8 */
9 9
10#include "internal.h" 10#include "busybox.h"
11#include <stdio.h> 11#include <stdio.h>
12#include <stdlib.h> 12#include <stdlib.h>
13#include <unistd.h> 13#include <unistd.h>
diff --git a/nfsmount.c b/nfsmount.c
index 628772b1b..abae19afe 100644
--- a/nfsmount.c
+++ b/nfsmount.c
@@ -33,7 +33,7 @@
33 * nfsmount.c,v 1.1.1.1 1993/11/18 08:40:51 jrs Exp 33 * nfsmount.c,v 1.1.1.1 1993/11/18 08:40:51 jrs Exp
34 */ 34 */
35 35
36#include "internal.h" 36#include "busybox.h"
37#undef FALSE 37#undef FALSE
38#undef TRUE 38#undef TRUE
39#include <unistd.h> 39#include <unistd.h>
diff --git a/nslookup.c b/nslookup.c
index 10d36b2d1..acb3e3bb2 100644
--- a/nslookup.c
+++ b/nslookup.c
@@ -21,7 +21,7 @@
21 * 21 *
22 */ 22 */
23 23
24#include "internal.h" 24#include "busybox.h"
25#include <ctype.h> 25#include <ctype.h>
26#include <errno.h> 26#include <errno.h>
27#include <stdio.h> 27#include <stdio.h>
@@ -170,4 +170,4 @@ int nslookup_main(int argc, char **argv)
170 return( TRUE); 170 return( TRUE);
171} 171}
172 172
173/* $Id: nslookup.c,v 1.11 2000/07/16 20:57:15 kraai Exp $ */ 173/* $Id: nslookup.c,v 1.12 2000/09/25 21:45:58 andersen Exp $ */
diff --git a/ping.c b/ping.c
index f3ce6fb80..70ea0f196 100644
--- a/ping.c
+++ b/ping.c
@@ -1,6 +1,6 @@
1/* vi: set sw=4 ts=4: */ 1/* vi: set sw=4 ts=4: */
2/* 2/*
3 * $Id: ping.c,v 1.24 2000/09/20 04:33:30 kraai Exp $ 3 * $Id: ping.c,v 1.25 2000/09/25 21:45:58 andersen Exp $
4 * Mini ping implementation for busybox 4 * Mini ping implementation for busybox
5 * 5 *
6 * Copyright (C) 1999 by Randolph Chung <tausq@debian.org> 6 * Copyright (C) 1999 by Randolph Chung <tausq@debian.org>
@@ -31,7 +31,7 @@
31 * Original copyright notice is retained at the end of this file. 31 * Original copyright notice is retained at the end of this file.
32 */ 32 */
33 33
34#include "internal.h" 34#include "busybox.h"
35#include <sys/param.h> 35#include <sys/param.h>
36#include <sys/socket.h> 36#include <sys/socket.h>
37#include <sys/file.h> 37#include <sys/file.h>
diff --git a/poweroff.c b/poweroff.c
index 126a0fb94..3101a20dc 100644
--- a/poweroff.c
+++ b/poweroff.c
@@ -21,7 +21,7 @@
21 * 21 *
22 */ 22 */
23 23
24#include "internal.h" 24#include "busybox.h"
25#include <signal.h> 25#include <signal.h>
26 26
27extern int poweroff_main(int argc, char **argv) 27extern int poweroff_main(int argc, char **argv)
diff --git a/printf.c b/printf.c
index 94b809348..832ca13d6 100644
--- a/printf.c
+++ b/printf.c
@@ -47,7 +47,7 @@
47 47
48// 19990508 Busy Boxed! Dave Cinege 48// 19990508 Busy Boxed! Dave Cinege
49 49
50#include "internal.h" 50#include "busybox.h"
51#include <unistd.h> 51#include <unistd.h>
52#include <stdio.h> 52#include <stdio.h>
53#include <sys/types.h> 53#include <sys/types.h>
diff --git a/procps/free.c b/procps/free.c
index d8c3f0b91..a33fa9a59 100644
--- a/procps/free.c
+++ b/procps/free.c
@@ -21,7 +21,7 @@
21 * 21 *
22 */ 22 */
23 23
24#include "internal.h" 24#include "busybox.h"
25#include <stdio.h> 25#include <stdio.h>
26#include <errno.h> 26#include <errno.h>
27 27
diff --git a/procps/kill.c b/procps/kill.c
index 8f48ba026..7ade8228c 100644
--- a/procps/kill.c
+++ b/procps/kill.c
@@ -21,7 +21,7 @@
21 */ 21 */
22 22
23 23
24#include "internal.h" 24#include "busybox.h"
25#include <stdio.h> 25#include <stdio.h>
26#include <stdlib.h> 26#include <stdlib.h>
27#include <errno.h> 27#include <errno.h>
diff --git a/procps/ps.c b/procps/ps.c
index a326bc546..df321612a 100644
--- a/procps/ps.c
+++ b/procps/ps.c
@@ -28,7 +28,7 @@
28 * 28 *
29 */ 29 */
30 30
31#include "internal.h" 31#include "busybox.h"
32#include <stdio.h> 32#include <stdio.h>
33#include <unistd.h> 33#include <unistd.h>
34#include <dirent.h> 34#include <dirent.h>
diff --git a/procps/renice.c b/procps/renice.c
index af7ce94ca..d79a64d1a 100644
--- a/procps/renice.c
+++ b/procps/renice.c
@@ -20,7 +20,7 @@
20 * 20 *
21 */ 21 */
22 22
23#include "internal.h" 23#include "busybox.h"
24#include <stdio.h> 24#include <stdio.h>
25#include <errno.h> 25#include <errno.h>
26#include <sys/time.h> 26#include <sys/time.h>
diff --git a/procps/uptime.c b/procps/uptime.c
index efdbccf00..fe4e48cd6 100644
--- a/procps/uptime.c
+++ b/procps/uptime.c
@@ -28,7 +28,7 @@
28 */ 28 */
29 29
30 30
31#include "internal.h" 31#include "busybox.h"
32#include <stdio.h> 32#include <stdio.h>
33#include <time.h> 33#include <time.h>
34#include <errno.h> 34#include <errno.h>
diff --git a/ps.c b/ps.c
index a326bc546..df321612a 100644
--- a/ps.c
+++ b/ps.c
@@ -28,7 +28,7 @@
28 * 28 *
29 */ 29 */
30 30
31#include "internal.h" 31#include "busybox.h"
32#include <stdio.h> 32#include <stdio.h>
33#include <unistd.h> 33#include <unistd.h>
34#include <dirent.h> 34#include <dirent.h>
diff --git a/pwd.c b/pwd.c
index f0c923b7b..c9de7778e 100644
--- a/pwd.c
+++ b/pwd.c
@@ -21,7 +21,7 @@
21 * 21 *
22 */ 22 */
23 23
24#include "internal.h" 24#include "busybox.h"
25#include <stdio.h> 25#include <stdio.h>
26#include <dirent.h> 26#include <dirent.h>
27#include <errno.h> 27#include <errno.h>
diff --git a/rdate.c b/rdate.c
index 20536d24b..915c4bdd4 100644
--- a/rdate.c
+++ b/rdate.c
@@ -21,7 +21,7 @@
21 * 21 *
22*/ 22*/
23 23
24#include "internal.h" 24#include "busybox.h"
25#define BB_DECLARE_EXTERN 25#define BB_DECLARE_EXTERN
26#include "messages.c" 26#include "messages.c"
27#include <sys/time.h> 27#include <sys/time.h>
diff --git a/reboot.c b/reboot.c
index bde8dbd77..354286d47 100644
--- a/reboot.c
+++ b/reboot.c
@@ -21,7 +21,7 @@
21 * 21 *
22 */ 22 */
23 23
24#include "internal.h" 24#include "busybox.h"
25#include <signal.h> 25#include <signal.h>
26 26
27extern int reboot_main(int argc, char **argv) 27extern int reboot_main(int argc, char **argv)
diff --git a/renice.c b/renice.c
index af7ce94ca..d79a64d1a 100644
--- a/renice.c
+++ b/renice.c
@@ -20,7 +20,7 @@
20 * 20 *
21 */ 21 */
22 22
23#include "internal.h" 23#include "busybox.h"
24#include <stdio.h> 24#include <stdio.h>
25#include <errno.h> 25#include <errno.h>
26#include <sys/time.h> 26#include <sys/time.h>
diff --git a/reset.c b/reset.c
index 6c4ae35ae..8e2c491e2 100644
--- a/reset.c
+++ b/reset.c
@@ -23,7 +23,7 @@
23 * 23 *
24 */ 24 */
25 25
26#include "internal.h" 26#include "busybox.h"
27#include <stdio.h> 27#include <stdio.h>
28 28
29extern int reset_main(int argc, char **argv) 29extern int reset_main(int argc, char **argv)
diff --git a/rm.c b/rm.c
index c93a94ce1..4f97cad23 100644
--- a/rm.c
+++ b/rm.c
@@ -22,7 +22,7 @@
22 * 22 *
23 */ 23 */
24 24
25#include "internal.h" 25#include "busybox.h"
26#include <stdio.h> 26#include <stdio.h>
27#include <time.h> 27#include <time.h>
28#include <utime.h> 28#include <utime.h>
diff --git a/rmdir.c b/rmdir.c
index 500890e40..14ebf92c5 100644
--- a/rmdir.c
+++ b/rmdir.c
@@ -22,7 +22,7 @@
22 * 22 *
23 */ 23 */
24 24
25#include "internal.h" 25#include "busybox.h"
26#include <stdio.h> 26#include <stdio.h>
27#include <errno.h> 27#include <errno.h>
28 28
diff --git a/rmmod.c b/rmmod.c
index 67b1084fb..dd293523d 100644
--- a/rmmod.c
+++ b/rmmod.c
@@ -21,7 +21,7 @@
21 * 21 *
22 */ 22 */
23 23
24#include "internal.h" 24#include "busybox.h"
25#include <stdio.h> 25#include <stdio.h>
26#include <errno.h> 26#include <errno.h>
27#include <unistd.h> 27#include <unistd.h>
diff --git a/sed.c b/sed.c
index 0e0d7f58c..cb3f1bbf1 100644
--- a/sed.c
+++ b/sed.c
@@ -49,7 +49,7 @@
49#include <string.h> /* for strdup() */ 49#include <string.h> /* for strdup() */
50#include <errno.h> 50#include <errno.h>
51#include <ctype.h> /* for isspace() */ 51#include <ctype.h> /* for isspace() */
52#include "internal.h" 52#include "busybox.h"
53 53
54#define bb_need_full_version 54#define bb_need_full_version
55#define BB_DECLARE_EXTERN 55#define BB_DECLARE_EXTERN
diff --git a/setkeycodes.c b/setkeycodes.c
index 284ffa194..63c106333 100644
--- a/setkeycodes.c
+++ b/setkeycodes.c
@@ -22,7 +22,7 @@
22 * 22 *
23 */ 23 */
24 24
25#include "internal.h" 25#include "busybox.h"
26#include <stdio.h> 26#include <stdio.h>
27#include <stdlib.h> 27#include <stdlib.h>
28#include <fcntl.h> 28#include <fcntl.h>
diff --git a/sh.c b/sh.c
index b8f407202..77efc6aac 100644
--- a/sh.c
+++ b/sh.c
@@ -32,7 +32,7 @@
32//#define DEBUG_SHELL 32//#define DEBUG_SHELL
33 33
34 34
35#include "internal.h" 35#include "busybox.h"
36#include <stdio.h> 36#include <stdio.h>
37#include <stdlib.h> 37#include <stdlib.h>
38#include <ctype.h> 38#include <ctype.h>
diff --git a/shell/cmdedit.c b/shell/cmdedit.c
index 04abc938c..af29b059a 100644
--- a/shell/cmdedit.c
+++ b/shell/cmdedit.c
@@ -31,7 +31,7 @@
31 terminal width. (more then one line.) However, history will. 31 terminal width. (more then one line.) However, history will.
32 */ 32 */
33 33
34#include "internal.h" 34#include "busybox.h"
35#ifdef BB_FEATURE_SH_COMMAND_EDITING 35#ifdef BB_FEATURE_SH_COMMAND_EDITING
36 36
37#include <stdio.h> 37#include <stdio.h>
diff --git a/shell/lash.c b/shell/lash.c
index b8f407202..77efc6aac 100644
--- a/shell/lash.c
+++ b/shell/lash.c
@@ -32,7 +32,7 @@
32//#define DEBUG_SHELL 32//#define DEBUG_SHELL
33 33
34 34
35#include "internal.h" 35#include "busybox.h"
36#include <stdio.h> 36#include <stdio.h>
37#include <stdlib.h> 37#include <stdlib.h>
38#include <ctype.h> 38#include <ctype.h>
diff --git a/sleep.c b/sleep.c
index d6705c4c3..709e3de34 100644
--- a/sleep.c
+++ b/sleep.c
@@ -21,7 +21,7 @@
21 * 21 *
22 */ 22 */
23 23
24#include "internal.h" 24#include "busybox.h"
25#include <stdio.h> 25#include <stdio.h>
26 26
27extern int sleep_main(int argc, char **argv) 27extern int sleep_main(int argc, char **argv)
diff --git a/sort.c b/sort.c
index a74f96ad0..3fe4c7756 100644
--- a/sort.c
+++ b/sort.c
@@ -22,7 +22,7 @@
22 * 22 *
23 */ 23 */
24 24
25#include "internal.h" 25#include "busybox.h"
26#include <sys/types.h> 26#include <sys/types.h>
27#include <fcntl.h> 27#include <fcntl.h>
28#include <dirent.h> 28#include <dirent.h>
@@ -288,4 +288,4 @@ int sort_main(int argc, char **argv)
288 return(0); 288 return(0);
289} 289}
290 290
291/* $Id: sort.c,v 1.21 2000/09/13 02:46:13 kraai Exp $ */ 291/* $Id: sort.c,v 1.22 2000/09/25 21:45:58 andersen Exp $ */
diff --git a/swaponoff.c b/swaponoff.c
index 6aafe51a2..4a1c8f93f 100644
--- a/swaponoff.c
+++ b/swaponoff.c
@@ -22,7 +22,7 @@
22 * 22 *
23 */ 23 */
24 24
25#include "internal.h" 25#include "busybox.h"
26#include <stdio.h> 26#include <stdio.h>
27#include <sys/mount.h> 27#include <sys/mount.h>
28#include <mntent.h> 28#include <mntent.h>
diff --git a/sync.c b/sync.c
index 3737cb1f1..8f101cf17 100644
--- a/sync.c
+++ b/sync.c
@@ -21,7 +21,7 @@
21 * 21 *
22 */ 22 */
23 23
24#include "internal.h" 24#include "busybox.h"
25#include <stdio.h> 25#include <stdio.h>
26 26
27extern int sync_main(int argc, char **argv) 27extern int sync_main(int argc, char **argv)
diff --git a/sysklogd/logger.c b/sysklogd/logger.c
index f4a0f82fb..fa1cf6d15 100644
--- a/sysklogd/logger.c
+++ b/sysklogd/logger.c
@@ -21,7 +21,7 @@
21 * 21 *
22 */ 22 */
23 23
24#include "internal.h" 24#include "busybox.h"
25#include <stdio.h> 25#include <stdio.h>
26#include <unistd.h> 26#include <unistd.h>
27#include <sys/types.h> 27#include <sys/types.h>
diff --git a/sysklogd/syslogd.c b/sysklogd/syslogd.c
index d647866cb..9bedc84f2 100644
--- a/sysklogd/syslogd.c
+++ b/sysklogd/syslogd.c
@@ -23,7 +23,7 @@
23 * 23 *
24 */ 24 */
25 25
26#include "internal.h" 26#include "busybox.h"
27#include <stdio.h> 27#include <stdio.h>
28#include <stdlib.h> 28#include <stdlib.h>
29#include <ctype.h> 29#include <ctype.h>
diff --git a/syslogd.c b/syslogd.c
index d647866cb..9bedc84f2 100644
--- a/syslogd.c
+++ b/syslogd.c
@@ -23,7 +23,7 @@
23 * 23 *
24 */ 24 */
25 25
26#include "internal.h" 26#include "busybox.h"
27#include <stdio.h> 27#include <stdio.h>
28#include <stdlib.h> 28#include <stdlib.h>
29#include <ctype.h> 29#include <ctype.h>
diff --git a/tail.c b/tail.c
index dcb4f6742..1091d28ed 100644
--- a/tail.c
+++ b/tail.c
@@ -38,7 +38,7 @@
38#include <unistd.h> 38#include <unistd.h>
39#include <string.h> 39#include <string.h>
40#include <getopt.h> 40#include <getopt.h>
41#include "internal.h" 41#include "busybox.h"
42 42
43#define STDIN "standard input" 43#define STDIN "standard input"
44#define LINES 0 44#define LINES 0
diff --git a/tar.c b/tar.c
index e4bdd0a6c..c14a6194d 100644
--- a/tar.c
+++ b/tar.c
@@ -36,7 +36,7 @@
36 */ 36 */
37 37
38 38
39#include "internal.h" 39#include "busybox.h"
40#define BB_DECLARE_EXTERN 40#define BB_DECLARE_EXTERN
41#define bb_need_io_error 41#define bb_need_io_error
42#define bb_need_name_longer_then_foo 42#define bb_need_name_longer_then_foo
diff --git a/tee.c b/tee.c
index dc9876020..621801336 100644
--- a/tee.c
+++ b/tee.c
@@ -21,7 +21,7 @@
21 * 21 *
22 */ 22 */
23 23
24#include "internal.h" 24#include "busybox.h"
25#include <getopt.h> 25#include <getopt.h>
26#include <stdio.h> 26#include <stdio.h>
27 27
diff --git a/telnet.c b/telnet.c
index cf55de6af..bfa964460 100644
--- a/telnet.c
+++ b/telnet.c
@@ -31,7 +31,7 @@
31 */ 31 */
32 32
33 33
34#include "internal.h" 34#include "busybox.h"
35#include <termios.h> 35#include <termios.h>
36#include <unistd.h> 36#include <unistd.h>
37#include <errno.h> 37#include <errno.h>
diff --git a/test.c b/test.c
index a2bec4492..acd6947d9 100644
--- a/test.c
+++ b/test.c
@@ -31,7 +31,7 @@
31 * "This program is in the Public Domain." 31 * "This program is in the Public Domain."
32 */ 32 */
33 33
34#include "internal.h" 34#include "busybox.h"
35#include <sys/types.h> 35#include <sys/types.h>
36#include <unistd.h> 36#include <unistd.h>
37#include <ctype.h> 37#include <ctype.h>
diff --git a/touch.c b/touch.c
index 464aedb55..7db6c6e33 100644
--- a/touch.c
+++ b/touch.c
@@ -22,7 +22,7 @@
22 * 22 *
23 */ 23 */
24 24
25#include "internal.h" 25#include "busybox.h"
26#include <stdio.h> 26#include <stdio.h>
27#include <sys/types.h> 27#include <sys/types.h>
28#include <fcntl.h> 28#include <fcntl.h>
diff --git a/tr.c b/tr.c
index 004092477..54b6abc8c 100644
--- a/tr.c
+++ b/tr.c
@@ -24,7 +24,7 @@
24 * Original copyright notice is retained at the end of this file. 24 * Original copyright notice is retained at the end of this file.
25 */ 25 */
26 26
27#include "internal.h" 27#include "busybox.h"
28#include <stdio.h> 28#include <stdio.h>
29#include <string.h> 29#include <string.h>
30#include <stdlib.h> 30#include <stdlib.h>
diff --git a/true_false.c b/true_false.c
index c56f5e7af..b3b221e1f 100644
--- a/true_false.c
+++ b/true_false.c
@@ -22,7 +22,7 @@
22 * 22 *
23 */ 23 */
24 24
25#include "internal.h" 25#include "busybox.h"
26 26
27 27
28extern int true_main(int argc, char **argv) 28extern int true_main(int argc, char **argv)
diff --git a/tty.c b/tty.c
index bbc051f6b..6eebed9fb 100644
--- a/tty.c
+++ b/tty.c
@@ -20,7 +20,7 @@
20 * 20 *
21 */ 21 */
22 22
23#include "internal.h" 23#include "busybox.h"
24#include <stdio.h> 24#include <stdio.h>
25#include <sys/types.h> 25#include <sys/types.h>
26 26
diff --git a/umount.c b/umount.c
index 6a5e4cad8..1d9c6bb32 100644
--- a/umount.c
+++ b/umount.c
@@ -22,7 +22,7 @@
22 * 22 *
23 */ 23 */
24 24
25#include "internal.h" 25#include "busybox.h"
26#include <stdio.h> 26#include <stdio.h>
27#include <mntent.h> 27#include <mntent.h>
28#include <errno.h> 28#include <errno.h>
diff --git a/uname.c b/uname.c
index 55616dd19..8d9427c86 100644
--- a/uname.c
+++ b/uname.c
@@ -31,7 +31,7 @@
31 31
32/* Busyboxed by Erik Andersen */ 32/* Busyboxed by Erik Andersen */
33 33
34#include "internal.h" 34#include "busybox.h"
35#include <stdio.h> 35#include <stdio.h>
36#include <sys/types.h> 36#include <sys/types.h>
37#include <sys/utsname.h> 37#include <sys/utsname.h>
diff --git a/uniq.c b/uniq.c
index 016fc7780..ef38587bd 100644
--- a/uniq.c
+++ b/uniq.c
@@ -22,7 +22,7 @@
22 * 22 *
23 */ 23 */
24 24
25#include "internal.h" 25#include "busybox.h"
26#include <stdio.h> 26#include <stdio.h>
27#include <string.h> 27#include <string.h>
28#include <errno.h> 28#include <errno.h>
@@ -179,4 +179,4 @@ int uniq_main(int argc, char **argv)
179 return(0); 179 return(0);
180} 180}
181 181
182/* $Id: uniq.c,v 1.13 2000/07/16 20:57:15 kraai Exp $ */ 182/* $Id: uniq.c,v 1.14 2000/09/25 21:45:58 andersen Exp $ */
diff --git a/unix2dos.c b/unix2dos.c
index c6cf81bb0..553ad0c34 100644
--- a/unix2dos.c
+++ b/unix2dos.c
@@ -22,7 +22,7 @@
22 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/ 23*/
24 24
25#include "internal.h" 25#include "busybox.h"
26#include <stdio.h> 26#include <stdio.h>
27 27
28int unix2dos_main( int argc, char **argv ) { 28int unix2dos_main( int argc, char **argv ) {
diff --git a/unrpm.c b/unrpm.c
index cfcc0d1ee..26989e8b6 100644
--- a/unrpm.c
+++ b/unrpm.c
@@ -13,7 +13,7 @@
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14 */ 14 */
15 15
16#include "internal.h" 16#include "busybox.h"
17#include <unistd.h> 17#include <unistd.h>
18#include <stdio.h> 18#include <stdio.h>
19#include <stdlib.h> 19#include <stdlib.h>
diff --git a/update.c b/update.c
index 3f3d68b87..e9f496913 100644
--- a/update.c
+++ b/update.c
@@ -28,7 +28,7 @@
28 * earlier) kernel. 2.2.x and higher flush filesystem buffers automatically. 28 * earlier) kernel. 2.2.x and higher flush filesystem buffers automatically.
29 */ 29 */
30 30
31#include "internal.h" 31#include "busybox.h"
32#include <sys/param.h> 32#include <sys/param.h>
33#include <sys/syslog.h> 33#include <sys/syslog.h>
34#include <unistd.h> /* for getopt() */ 34#include <unistd.h> /* for getopt() */
diff --git a/uptime.c b/uptime.c
index efdbccf00..fe4e48cd6 100644
--- a/uptime.c
+++ b/uptime.c
@@ -28,7 +28,7 @@
28 */ 28 */
29 29
30 30
31#include "internal.h" 31#include "busybox.h"
32#include <stdio.h> 32#include <stdio.h>
33#include <time.h> 33#include <time.h>
34#include <errno.h> 34#include <errno.h>
diff --git a/usage.c b/usage.c
index c4da08ad7..ae6cbaa7c 100644
--- a/usage.c
+++ b/usage.c
@@ -1,4 +1,4 @@
1#include "internal.h" 1#include "busybox.h"
2 2
3#if defined BB_AR 3#if defined BB_AR
4const char ar_usage[] = 4const char ar_usage[] =
diff --git a/usleep.c b/usleep.c
index fcdf3bbf6..69790ef09 100644
--- a/usleep.c
+++ b/usleep.c
@@ -21,7 +21,7 @@
21 * 21 *
22 */ 22 */
23 23
24#include "internal.h" 24#include "busybox.h"
25#include <stdlib.h> 25#include <stdlib.h>
26#include <unistd.h> 26#include <unistd.h>
27 27
diff --git a/util-linux/dmesg.c b/util-linux/dmesg.c
index 99d053a72..88b5d1393 100644
--- a/util-linux/dmesg.c
+++ b/util-linux/dmesg.c
@@ -15,7 +15,7 @@
15 * Support, replaced getopt, added some gotos for redundant stuff. 15 * Support, replaced getopt, added some gotos for redundant stuff.
16 */ 16 */
17 17
18#include "internal.h" 18#include "busybox.h"
19#include <stdio.h> 19#include <stdio.h>
20#include <stdlib.h> 20#include <stdlib.h>
21 21
diff --git a/util-linux/fbset.c b/util-linux/fbset.c
index 235338c55..32325a7cf 100644
--- a/util-linux/fbset.c
+++ b/util-linux/fbset.c
@@ -24,7 +24,7 @@
24 * Geert Uytterhoeven (Geert.Uytterhoeven@cs.kuleuven.ac.be) 24 * Geert Uytterhoeven (Geert.Uytterhoeven@cs.kuleuven.ac.be)
25 */ 25 */
26 26
27#include "internal.h" 27#include "busybox.h"
28#include <stdio.h> 28#include <stdio.h>
29#include <stdlib.h> 29#include <stdlib.h>
30#include <unistd.h> 30#include <unistd.h>
diff --git a/util-linux/fdflush.c b/util-linux/fdflush.c
index 6bc3e7d66..6633e1212 100644
--- a/util-linux/fdflush.c
+++ b/util-linux/fdflush.c
@@ -21,7 +21,7 @@
21 * 21 *
22 */ 22 */
23 23
24#include "internal.h" 24#include "busybox.h"
25#include <stdio.h> 25#include <stdio.h>
26#include <sys/ioctl.h> 26#include <sys/ioctl.h>
27#include <fcntl.h> 27#include <fcntl.h>
diff --git a/util-linux/freeramdisk.c b/util-linux/freeramdisk.c
index 64915b313..22fc3e643 100644
--- a/util-linux/freeramdisk.c
+++ b/util-linux/freeramdisk.c
@@ -27,7 +27,7 @@
27#include <fcntl.h> 27#include <fcntl.h>
28#include <sys/ioctl.h> 28#include <sys/ioctl.h>
29#include <errno.h> 29#include <errno.h>
30#include "internal.h" 30#include "busybox.h"
31 31
32 32
33/* From linux/fs.h */ 33/* From linux/fs.h */
diff --git a/util-linux/fsck_minix.c b/util-linux/fsck_minix.c
index 04c2b3317..ef65e3073 100644
--- a/util-linux/fsck_minix.c
+++ b/util-linux/fsck_minix.c
@@ -86,7 +86,7 @@
86 * enforced (but it's not much fun on a character device :-). 86 * enforced (but it's not much fun on a character device :-).
87 */ 87 */
88 88
89#include "internal.h" 89#include "busybox.h"
90#include <stdio.h> 90#include <stdio.h>
91#include <errno.h> 91#include <errno.h>
92#include <unistd.h> 92#include <unistd.h>
diff --git a/util-linux/getopt.c b/util-linux/getopt.c
index fb75790d9..919ae6c68 100644
--- a/util-linux/getopt.c
+++ b/util-linux/getopt.c
@@ -49,7 +49,7 @@
49#include <ctype.h> 49#include <ctype.h>
50#include <getopt.h> 50#include <getopt.h>
51 51
52#include "internal.h" 52#include "busybox.h"
53 53
54/* NON_OPT is the code that is returned when a non-option is found in '+' 54/* NON_OPT is the code that is returned when a non-option is found in '+'
55 mode */ 55 mode */
diff --git a/util-linux/mkfs_minix.c b/util-linux/mkfs_minix.c
index fafcc230e..15cf531f0 100644
--- a/util-linux/mkfs_minix.c
+++ b/util-linux/mkfs_minix.c
@@ -62,7 +62,7 @@
62 * removed getopt based parser and added a hand rolled one. 62 * removed getopt based parser and added a hand rolled one.
63 */ 63 */
64 64
65#include "internal.h" 65#include "busybox.h"
66#include <stdio.h> 66#include <stdio.h>
67#include <time.h> 67#include <time.h>
68#include <unistd.h> 68#include <unistd.h>
diff --git a/util-linux/mkswap.c b/util-linux/mkswap.c
index 70028dc2e..8a9767cca 100644
--- a/util-linux/mkswap.c
+++ b/util-linux/mkswap.c
@@ -35,7 +35,7 @@
35 * 35 *
36 */ 36 */
37 37
38#include "internal.h" 38#include "busybox.h"
39#include <stdio.h> 39#include <stdio.h>
40#include <unistd.h> 40#include <unistd.h>
41#include <string.h> 41#include <string.h>
diff --git a/util-linux/more.c b/util-linux/more.c
index 45b7c1274..caabc44e2 100644
--- a/util-linux/more.c
+++ b/util-linux/more.c
@@ -25,7 +25,7 @@
25 * 25 *
26 */ 26 */
27 27
28#include "internal.h" 28#include "busybox.h"
29#include <stdio.h> 29#include <stdio.h>
30#include <fcntl.h> 30#include <fcntl.h>
31#include <signal.h> 31#include <signal.h>
diff --git a/util-linux/mount.c b/util-linux/mount.c
index 598b650f9..8b115c9f5 100644
--- a/util-linux/mount.c
+++ b/util-linux/mount.c
@@ -43,7 +43,7 @@
43 * 43 *
44 */ 44 */
45 45
46#include "internal.h" 46#include "busybox.h"
47#include <stdlib.h> 47#include <stdlib.h>
48#include <unistd.h> 48#include <unistd.h>
49#include <errno.h> 49#include <errno.h>
diff --git a/util-linux/nfsmount.c b/util-linux/nfsmount.c
index 628772b1b..abae19afe 100644
--- a/util-linux/nfsmount.c
+++ b/util-linux/nfsmount.c
@@ -33,7 +33,7 @@
33 * nfsmount.c,v 1.1.1.1 1993/11/18 08:40:51 jrs Exp 33 * nfsmount.c,v 1.1.1.1 1993/11/18 08:40:51 jrs Exp
34 */ 34 */
35 35
36#include "internal.h" 36#include "busybox.h"
37#undef FALSE 37#undef FALSE
38#undef TRUE 38#undef TRUE
39#include <unistd.h> 39#include <unistd.h>
diff --git a/util-linux/rdate.c b/util-linux/rdate.c
index 20536d24b..915c4bdd4 100644
--- a/util-linux/rdate.c
+++ b/util-linux/rdate.c
@@ -21,7 +21,7 @@
21 * 21 *
22*/ 22*/
23 23
24#include "internal.h" 24#include "busybox.h"
25#define BB_DECLARE_EXTERN 25#define BB_DECLARE_EXTERN
26#include "messages.c" 26#include "messages.c"
27#include <sys/time.h> 27#include <sys/time.h>
diff --git a/util-linux/swaponoff.c b/util-linux/swaponoff.c
index 6aafe51a2..4a1c8f93f 100644
--- a/util-linux/swaponoff.c
+++ b/util-linux/swaponoff.c
@@ -22,7 +22,7 @@
22 * 22 *
23 */ 23 */
24 24
25#include "internal.h" 25#include "busybox.h"
26#include <stdio.h> 26#include <stdio.h>
27#include <sys/mount.h> 27#include <sys/mount.h>
28#include <mntent.h> 28#include <mntent.h>
diff --git a/util-linux/umount.c b/util-linux/umount.c
index 6a5e4cad8..1d9c6bb32 100644
--- a/util-linux/umount.c
+++ b/util-linux/umount.c
@@ -22,7 +22,7 @@
22 * 22 *
23 */ 23 */
24 24
25#include "internal.h" 25#include "busybox.h"
26#include <stdio.h> 26#include <stdio.h>
27#include <mntent.h> 27#include <mntent.h>
28#include <errno.h> 28#include <errno.h>
diff --git a/utility.c b/utility.c
index b014f2a59..f7dda7917 100644
--- a/utility.c
+++ b/utility.c
@@ -25,7 +25,7 @@
25 * 25 *
26 */ 26 */
27 27
28#include "internal.h" 28#include "busybox.h"
29#if defined (BB_CHMOD_CHOWN_CHGRP) \ 29#if defined (BB_CHMOD_CHOWN_CHGRP) \
30 || defined (BB_CP_MV) \ 30 || defined (BB_CP_MV) \
31 || defined (BB_FIND) \ 31 || defined (BB_FIND) \
diff --git a/uudecode.c b/uudecode.c
index 90bef9238..965ded5b5 100644
--- a/uudecode.c
+++ b/uudecode.c
@@ -51,7 +51,7 @@
51 51
52/* Reworked to GNU style by Ian Lance Taylor, ian@airs.com, August 93. */ 52/* Reworked to GNU style by Ian Lance Taylor, ian@airs.com, August 93. */
53 53
54#include "internal.h" 54#include "busybox.h"
55 55
56#include <stdio.h> 56#include <stdio.h>
57#include <errno.h> 57#include <errno.h>
diff --git a/uuencode.c b/uuencode.c
index 1433c7f3b..5835bd22a 100644
--- a/uuencode.c
+++ b/uuencode.c
@@ -52,7 +52,7 @@
52/* Reworked to GNU style by Ian Lance Taylor, ian@airs.com, August 93. */ 52/* Reworked to GNU style by Ian Lance Taylor, ian@airs.com, August 93. */
53/* Hacked to work with BusyBox by Alfred M. Szmidt */ 53/* Hacked to work with BusyBox by Alfred M. Szmidt */
54 54
55#include "internal.h" 55#include "busybox.h"
56 56
57#include <stdio.h> 57#include <stdio.h>
58#include <errno.h> 58#include <errno.h>
diff --git a/wc.c b/wc.c
index ca5b3680a..b1c9a51cd 100644
--- a/wc.c
+++ b/wc.c
@@ -20,7 +20,7 @@
20 * 20 *
21 */ 21 */
22 22
23#include "internal.h" 23#include "busybox.h"
24#include <stdio.h> 24#include <stdio.h>
25#include <getopt.h> 25#include <getopt.h>
26 26
diff --git a/wget.c b/wget.c
index c06e76d90..58801ee47 100644
--- a/wget.c
+++ b/wget.c
@@ -7,7 +7,7 @@
7 * <chip@laserlink.net> 7 * <chip@laserlink.net>
8 */ 8 */
9 9
10#include "internal.h" 10#include "busybox.h"
11#include <stdio.h> 11#include <stdio.h>
12#include <stdlib.h> 12#include <stdlib.h>
13#include <unistd.h> 13#include <unistd.h>
diff --git a/which.c b/which.c
index 7df2557a3..da8801fab 100644
--- a/which.c
+++ b/which.c
@@ -21,7 +21,7 @@
21 * 21 *
22 */ 22 */
23 23
24#include "internal.h" 24#include "busybox.h"
25#include <stdio.h> 25#include <stdio.h>
26 26
27extern int which_main(int argc, char **argv) 27extern int which_main(int argc, char **argv)
diff --git a/whoami.c b/whoami.c
index 84b27fe58..f3c21b3f5 100644
--- a/whoami.c
+++ b/whoami.c
@@ -20,7 +20,7 @@
20 * 20 *
21 */ 21 */
22 22
23#include "internal.h" 23#include "busybox.h"
24#include <stdio.h> 24#include <stdio.h>
25#include <pwd.h> 25#include <pwd.h>
26 26
diff --git a/xargs.c b/xargs.c
index b8ac31aa0..4a3fe3c60 100644
--- a/xargs.c
+++ b/xargs.c
@@ -21,7 +21,7 @@
21 * 21 *
22 */ 22 */
23 23
24#include "internal.h" 24#include "busybox.h"
25#include <stdlib.h> 25#include <stdlib.h>
26#include <stdio.h> 26#include <stdio.h>
27#include <string.h> 27#include <string.h>
diff --git a/yes.c b/yes.c
index 11fa537a0..46873f3f9 100644
--- a/yes.c
+++ b/yes.c
@@ -20,7 +20,7 @@
20 * 20 *
21 */ 21 */
22 22
23#include "internal.h" 23#include "busybox.h"
24#include <stdio.h> 24#include <stdio.h>
25 25
26extern int yes_main(int argc, char **argv) 26extern int yes_main(int argc, char **argv)