From cbe31dace5fb24304694d399b9eb267fbe752516 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Tue, 20 Feb 2001 06:14:08 +0000 Subject: [PATCH] It turns out that DODMALLOC was broken when I reorganized busybox.h header file usage before the 0.49 release. To fix it, I had to move the '#include "busybox.h"' to the end of the list of #include files. -Erik --- applets/busybox.c | 2 +- archival/gunzip.c | 2 +- archival/gzip.c | 23 ++++++----------------- archival/tar.c | 10 +++++----- basename.c | 2 +- busybox.c | 2 +- cat.c | 2 +- chmod_chown_chgrp.c | 8 ++++---- chroot.c | 2 +- chvt.c | 2 +- clear.c | 2 +- cmdedit.c | 30 +++++++++++++++--------------- cmp.c | 2 +- console-tools/chvt.c | 2 +- console-tools/clear.c | 2 +- console-tools/deallocvt.c | 2 +- console-tools/dumpkmap.c | 2 +- console-tools/loadacm.c | 4 ++-- console-tools/loadfont.c | 2 +- console-tools/loadkmap.c | 2 +- console-tools/reset.c | 2 +- console-tools/setkeycodes.c | 2 +- coreutils/basename.c | 2 +- coreutils/cat.c | 2 +- coreutils/chroot.c | 2 +- coreutils/cmp.c | 2 +- coreutils/date.c | 10 +++++----- coreutils/dd.c | 4 ++-- coreutils/df.c | 2 +- coreutils/dirname.c | 3 ++- coreutils/dos2unix.c | 2 +- coreutils/du.c | 12 ++++++------ coreutils/echo.c | 2 +- coreutils/expr.c | 2 +- coreutils/head.c | 2 +- coreutils/hostid.c | 2 +- coreutils/length.c | 2 +- coreutils/ln.c | 10 +++++----- coreutils/logname.c | 2 +- coreutils/ls.c | 2 +- coreutils/md5sum.c | 2 +- coreutils/mkdir.c | 8 ++++---- coreutils/mkfifo.c | 2 +- coreutils/mknod.c | 4 ++-- coreutils/printf.c | 2 +- coreutils/pwd.c | 2 +- coreutils/rm.c | 2 +- coreutils/rmdir.c | 2 +- coreutils/sleep.c | 2 +- coreutils/sort.c | 2 +- coreutils/stty.c | 2 +- coreutils/sync.c | 2 +- coreutils/tail.c | 2 +- coreutils/test.c | 2 +- coreutils/touch.c | 2 +- coreutils/tr.c | 2 +- coreutils/tty.c | 2 +- coreutils/uname.c | 2 +- coreutils/uniq.c | 2 +- coreutils/usleep.c | 2 +- coreutils/uudecode.c | 2 +- coreutils/uuencode.c | 2 +- coreutils/wc.c | 2 +- coreutils/whoami.c | 2 +- coreutils/yes.c | 2 +- cp_mv.c | 14 +++++++------- date.c | 10 +++++----- dc.c | 2 +- dd.c | 4 ++-- deallocvt.c | 2 +- df.c | 2 +- dirname.c | 3 ++- dmesg.c | 2 +- dos2unix.c | 2 +- du.c | 12 ++++++------ dumpkmap.c | 2 +- dutmp.c | 8 ++++---- echo.c | 2 +- expr.c | 2 +- fbset.c | 2 +- fdflush.c | 2 +- find.c | 2 +- findutils/find.c | 2 +- findutils/which.c | 2 +- findutils/xargs.c | 2 +- free.c | 2 +- fsck_minix.c | 2 +- gunzip.c | 2 +- gzip.c | 23 ++++++----------------- head.c | 2 +- hostid.c | 2 +- ifconfig.c | 6 +++--- init.c | 8 ++++---- init/init.c | 8 ++++---- insmod.c | 6 +++--- kill.c | 2 +- length.c | 2 +- ln.c | 10 +++++----- loadacm.c | 4 ++-- loadfont.c | 2 +- loadkmap.c | 2 +- logger.c | 3 ++- logname.c | 2 +- ls.c | 2 +- lsmod.c | 2 +- makedevs.c | 2 +- md5sum.c | 2 +- miscutils/dc.c | 2 +- miscutils/dutmp.c | 8 ++++---- miscutils/makedevs.c | 2 +- miscutils/mktemp.c | 2 +- miscutils/mt.c | 2 +- miscutils/readlink.c | 2 +- miscutils/update.c | 2 +- miscutils/watchdog.c | 2 +- mkdir.c | 8 ++++---- mkfifo.c | 2 +- mkfs_minix.c | 2 +- mknod.c | 4 ++-- mkswap.c | 2 +- mktemp.c | 2 +- modutils/insmod.c | 6 +++--- modutils/lsmod.c | 2 +- modutils/rmmod.c | 2 +- more.c | 2 +- mount.c | 2 +- mt.c | 2 +- mtab.c | 2 +- nc.c | 2 +- networking/ifconfig.c | 6 +++--- networking/nc.c | 2 +- networking/nslookup.c | 4 ++-- networking/ping.c | 4 ++-- networking/route.c | 4 ++-- networking/telnet.c | 2 +- networking/wget.c | 5 +++-- nfsmount.c | 16 ++++++++-------- nslookup.c | 4 ++-- ping.c | 4 ++-- pivot_root.c | 2 +- printf.c | 2 +- procps/free.c | 2 +- procps/kill.c | 2 +- procps/ps.c | 2 +- procps/renice.c | 2 +- procps/uptime.c | 2 +- ps.c | 2 +- pwd.c | 2 +- rdate.c | 6 +++--- readlink.c | 2 +- renice.c | 2 +- reset.c | 2 +- rm.c | 2 +- rmdir.c | 2 +- rmmod.c | 2 +- route.c | 4 ++-- rpmunpack.c | 2 +- setkeycodes.c | 2 +- shell/cmdedit.c | 30 +++++++++++++++--------------- sleep.c | 2 +- sort.c | 2 +- stty.c | 2 +- swaponoff.c | 2 +- sync.c | 2 +- sysklogd/logger.c | 3 ++- sysklogd/syslogd.c | 2 +- syslogd.c | 2 +- tail.c | 2 +- tar.c | 10 +++++----- telnet.c | 2 +- test.c | 2 +- touch.c | 2 +- tr.c | 2 +- true_false.c | 2 +- tty.c | 2 +- umount.c | 2 +- uname.c | 2 +- uniq.c | 2 +- update.c | 2 +- uptime.c | 2 +- usleep.c | 2 +- util-linux/dmesg.c | 2 +- util-linux/fbset.c | 2 +- util-linux/fdflush.c | 2 +- util-linux/fsck_minix.c | 2 +- util-linux/mkfs_minix.c | 2 +- util-linux/mkswap.c | 2 +- util-linux/more.c | 2 +- util-linux/mount.c | 2 +- util-linux/nfsmount.c | 16 ++++++++-------- util-linux/pivot_root.c | 2 +- util-linux/rdate.c | 6 +++--- util-linux/swaponoff.c | 2 +- util-linux/umount.c | 2 +- utility.c | 28 ++++++++++++++-------------- uudecode.c | 2 +- uuencode.c | 2 +- watchdog.c | 2 +- wc.c | 2 +- wget.c | 5 +++-- which.c | 2 +- whoami.c | 2 +- xargs.c | 2 +- yes.c | 2 +- 204 files changed, 362 insertions(+), 378 deletions(-) diff --git a/applets/busybox.c b/applets/busybox.c index 6c1070fc8..5fec3d5ec 100644 --- a/applets/busybox.c +++ b/applets/busybox.c @@ -1,10 +1,10 @@ /* vi: set sw=4 ts=4: */ -#include "busybox.h" #include #include #include #include #include +#include "busybox.h" #undef APPLET #undef APPLET_NOUSAGE diff --git a/archival/gunzip.c b/archival/gunzip.c index bf8812dbd..8100003ec 100644 --- a/archival/gunzip.c +++ b/archival/gunzip.c @@ -57,7 +57,6 @@ static char *license_msg[] = { }; #endif -#include "busybox.h" #include #include #include @@ -71,6 +70,7 @@ static char *license_msg[] = { #include #include #include +#include "busybox.h" #define BB_DECLARE_EXTERN #define bb_need_memory_exhausted #define bb_need_name_too_long diff --git a/archival/gzip.c b/archival/gzip.c index 3cbef4ec1..6c058d2b6 100644 --- a/archival/gzip.c +++ b/archival/gzip.c @@ -29,11 +29,6 @@ * */ -#include "busybox.h" -#define BB_DECLARE_EXTERN -#define bb_need_memory_exhausted -#include "messages.c" - /* These defines are very important for BusyBox. Without these, * huge chunks of ram are pre-allocated making the BusyBox bss * size Freaking Huge(tm), which is a bad thing.*/ @@ -43,9 +38,15 @@ /* I don't like nested includes, but the string and io functions are used * too often */ +#include #include #include #include +#include "busybox.h" +#define BB_DECLARE_EXTERN +#define bb_need_memory_exhausted +#include "messages.c" + #define memzero(s, n) memset ((void *)(s), 0, (n)) #ifndef RETSIGTYPE @@ -1628,12 +1629,6 @@ ulg deflate() # include #endif -#if defined(STDC_HEADERS) || !defined(NO_STDLIB_H) -# include -#else -extern int errno; -#endif - #if defined(DIRENT) # include typedef struct dirent dir_type; @@ -3098,12 +3093,6 @@ local void set_file_type() # include #endif -#if defined(STDC_HEADERS) || !defined(NO_STDLIB_H) -# include -#else -extern int errno; -#endif - /* =========================================================================== * Copy input to output unchanged: zcat == cat with --force. * IN assertion: insize bytes have already been read in inbuf. diff --git a/archival/tar.c b/archival/tar.c index 62f1b1d35..a9363d5ad 100644 --- a/archival/tar.c +++ b/archival/tar.c @@ -36,11 +36,6 @@ */ -#include "busybox.h" -#define BB_DECLARE_EXTERN -#define bb_need_io_error -#define bb_need_name_longer_than_foo -#include "messages.c" #include #include #include @@ -55,6 +50,11 @@ #include #include #include +#include "busybox.h" +#define BB_DECLARE_EXTERN +#define bb_need_io_error +#define bb_need_name_longer_than_foo +#include "messages.c" #ifdef BB_FEATURE_TAR_GZIP extern int unzip(int in, int out); diff --git a/basename.c b/basename.c index da59a8672..da0b7ecc3 100644 --- a/basename.c +++ b/basename.c @@ -21,8 +21,8 @@ * */ -#include "busybox.h" #include +#include "busybox.h" #include extern int basename_main(int argc, char **argv) diff --git a/busybox.c b/busybox.c index 6c1070fc8..5fec3d5ec 100644 --- a/busybox.c +++ b/busybox.c @@ -1,10 +1,10 @@ /* vi: set sw=4 ts=4: */ -#include "busybox.h" #include #include #include #include #include +#include "busybox.h" #undef APPLET #undef APPLET_NOUSAGE diff --git a/cat.c b/cat.c index 134245cdc..3554008f8 100644 --- a/cat.c +++ b/cat.c @@ -21,8 +21,8 @@ * */ -#include "busybox.h" #include +#include "busybox.h" extern int cat_main(int argc, char **argv) { diff --git a/chmod_chown_chgrp.c b/chmod_chown_chgrp.c index 9363bd757..a458cf77a 100644 --- a/chmod_chown_chgrp.c +++ b/chmod_chown_chgrp.c @@ -22,16 +22,16 @@ * */ +#include +#include +#include +#include #include "busybox.h" #define BB_DECLARE_EXTERN #define bb_need_invalid_option #define bb_need_too_few_args #include "messages.c" -#include -#include -#include -#include static long uid = -1; diff --git a/chroot.c b/chroot.c index e721e1ffa..bae9cd757 100644 --- a/chroot.c +++ b/chroot.c @@ -22,11 +22,11 @@ * */ -#include "busybox.h" #include #include #include #include +#include "busybox.h" int chroot_main(int argc, char **argv) { diff --git a/chvt.c b/chvt.c index f2e6d5f17..c4b3639df 100644 --- a/chvt.c +++ b/chvt.c @@ -4,12 +4,12 @@ * * busyboxed by Erik Andersen */ -#include "busybox.h" #include #include #include #include #include +#include "busybox.h" /* From */ static const int VT_ACTIVATE = 0x5606; /* make vt active */ diff --git a/clear.c b/clear.c index dab4b05a7..503bafa16 100644 --- a/clear.c +++ b/clear.c @@ -22,9 +22,9 @@ * */ -#include "busybox.h" #include #include +#include "busybox.h" extern int clear_main(int argc, char **argv) diff --git a/cmdedit.c b/cmdedit.c index 97ba8316d..9cb53522f 100644 --- a/cmdedit.c +++ b/cmdedit.c @@ -32,6 +32,21 @@ //#define TEST +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef BB_FEATURE_SH_TAB_COMPLETION +#include +#include +#endif + #ifndef TEST @@ -62,21 +77,6 @@ #define BB_FEATURE_GETUSERNAME_AND_HOMEDIR #endif -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef BB_FEATURE_SH_TAB_COMPLETION -#include -#include -#endif - #ifdef BB_FEATURE_GETUSERNAME_AND_HOMEDIR #ifndef TEST #include "pwd_grp/pwd.h" diff --git a/cmp.c b/cmp.c index c04b6e1c9..24b6c3f92 100644 --- a/cmp.c +++ b/cmp.c @@ -22,11 +22,11 @@ * */ -#include "busybox.h" #include #include #include #include +#include "busybox.h" int cmp_main(int argc, char **argv) { diff --git a/console-tools/chvt.c b/console-tools/chvt.c index f2e6d5f17..c4b3639df 100644 --- a/console-tools/chvt.c +++ b/console-tools/chvt.c @@ -4,12 +4,12 @@ * * busyboxed by Erik Andersen */ -#include "busybox.h" #include #include #include #include #include +#include "busybox.h" /* From */ static const int VT_ACTIVATE = 0x5606; /* make vt active */ diff --git a/console-tools/clear.c b/console-tools/clear.c index dab4b05a7..503bafa16 100644 --- a/console-tools/clear.c +++ b/console-tools/clear.c @@ -22,9 +22,9 @@ * */ -#include "busybox.h" #include #include +#include "busybox.h" extern int clear_main(int argc, char **argv) diff --git a/console-tools/deallocvt.c b/console-tools/deallocvt.c index 8c390c261..15cd0c9b9 100644 --- a/console-tools/deallocvt.c +++ b/console-tools/deallocvt.c @@ -3,12 +3,12 @@ * disalloc.c - aeb - 940501 - Disallocate virtual terminal(s) * Renamed deallocvt. */ -#include "busybox.h" #include #include #include #include #include +#include "busybox.h" /* From */ static const int VT_DISALLOCATE = 0x5608; /* free memory associated to vt */ diff --git a/console-tools/dumpkmap.c b/console-tools/dumpkmap.c index b9f1bd233..0da01868b 100644 --- a/console-tools/dumpkmap.c +++ b/console-tools/dumpkmap.c @@ -20,7 +20,6 @@ * */ -#include "busybox.h" #include #include #include @@ -28,6 +27,7 @@ #include #include #include +#include "busybox.h" /* From */ struct kbentry { diff --git a/console-tools/loadacm.c b/console-tools/loadacm.c index 6422137a1..81b973b02 100644 --- a/console-tools/loadacm.c +++ b/console-tools/loadacm.c @@ -7,7 +7,6 @@ * Peter Novodvorsky */ -#include "busybox.h" #include #include #include @@ -17,9 +16,10 @@ #include #include #include +#include #include #include -#include +#include "busybox.h" typedef unsigned short unicode; diff --git a/console-tools/loadfont.c b/console-tools/loadfont.c index d7bd7e8f5..1a724ca85 100644 --- a/console-tools/loadfont.c +++ b/console-tools/loadfont.c @@ -7,7 +7,6 @@ * Loads the console font, and possibly the corresponding screen map(s). * (Adapted for busybox by Matej Vela.) */ -#include "busybox.h" #include #include #include @@ -20,6 +19,7 @@ #include #include #include +#include "busybox.h" static const int PSF_MAGIC1 = 0x36; static const int PSF_MAGIC2 = 0x04; diff --git a/console-tools/loadkmap.c b/console-tools/loadkmap.c index 5ecd819f9..dcb5c1caa 100644 --- a/console-tools/loadkmap.c +++ b/console-tools/loadkmap.c @@ -20,7 +20,6 @@ * */ -#include "busybox.h" #include #include #include @@ -28,6 +27,7 @@ #include #include #include +#include "busybox.h" #define BINARY_KEYMAP_MAGIC "bkeymap" diff --git a/console-tools/reset.c b/console-tools/reset.c index 294cab3c4..755c4c335 100644 --- a/console-tools/reset.c +++ b/console-tools/reset.c @@ -23,9 +23,9 @@ * */ -#include "busybox.h" #include #include +#include "busybox.h" extern int reset_main(int argc, char **argv) { diff --git a/console-tools/setkeycodes.c b/console-tools/setkeycodes.c index 0be4724ca..c3c7e09aa 100644 --- a/console-tools/setkeycodes.c +++ b/console-tools/setkeycodes.c @@ -22,11 +22,11 @@ * */ -#include "busybox.h" #include #include #include #include +#include "busybox.h" /* From */ diff --git a/coreutils/basename.c b/coreutils/basename.c index da59a8672..da0b7ecc3 100644 --- a/coreutils/basename.c +++ b/coreutils/basename.c @@ -21,8 +21,8 @@ * */ -#include "busybox.h" #include +#include "busybox.h" #include extern int basename_main(int argc, char **argv) diff --git a/coreutils/cat.c b/coreutils/cat.c index 134245cdc..3554008f8 100644 --- a/coreutils/cat.c +++ b/coreutils/cat.c @@ -21,8 +21,8 @@ * */ -#include "busybox.h" #include +#include "busybox.h" extern int cat_main(int argc, char **argv) { diff --git a/coreutils/chroot.c b/coreutils/chroot.c index e721e1ffa..bae9cd757 100644 --- a/coreutils/chroot.c +++ b/coreutils/chroot.c @@ -22,11 +22,11 @@ * */ -#include "busybox.h" #include #include #include #include +#include "busybox.h" int chroot_main(int argc, char **argv) { diff --git a/coreutils/cmp.c b/coreutils/cmp.c index c04b6e1c9..24b6c3f92 100644 --- a/coreutils/cmp.c +++ b/coreutils/cmp.c @@ -22,11 +22,11 @@ * */ -#include "busybox.h" #include #include #include #include +#include "busybox.h" int cmp_main(int argc, char **argv) { diff --git a/coreutils/date.c b/coreutils/date.c index 21d31bb25..878331f71 100644 --- a/coreutils/date.c +++ b/coreutils/date.c @@ -20,11 +20,6 @@ * */ -#include "busybox.h" -#define BB_DECLARE_EXTERN -#define bb_need_invalid_date -#define bb_need_memory_exhausted -#include "messages.c" #include #include #include @@ -33,6 +28,11 @@ #include #include #include +#include "busybox.h" +#define BB_DECLARE_EXTERN +#define bb_need_invalid_date +#define bb_need_memory_exhausted +#include "messages.c" /* This 'date' command supports only 2 time setting formats, diff --git a/coreutils/dd.c b/coreutils/dd.c index e445e0435..1618dd102 100644 --- a/coreutils/dd.c +++ b/coreutils/dd.c @@ -21,14 +21,14 @@ * */ -#include "busybox.h" - #include #include #include #include #include #include +#include "busybox.h" + static const struct suffix_mult dd_suffixes[] = { { "c", 1 }, diff --git a/coreutils/df.c b/coreutils/df.c index 692205a0e..ebee4d607 100644 --- a/coreutils/df.c +++ b/coreutils/df.c @@ -22,12 +22,12 @@ * */ -#include "busybox.h" #include #include #include #include #include +#include "busybox.h" extern const char mtab_file[]; /* Defined in utility.c */ #ifdef BB_FEATURE_HUMAN_READABLE diff --git a/coreutils/dirname.c b/coreutils/dirname.c index e34ecf8a9..7f191c1b9 100644 --- a/coreutils/dirname.c +++ b/coreutils/dirname.c @@ -20,10 +20,11 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ -#include "busybox.h" + #include #include #include +#include "busybox.h" extern int dirname_main(int argc, char **argv) { diff --git a/coreutils/dos2unix.c b/coreutils/dos2unix.c index 32423611c..222c8f6a4 100644 --- a/coreutils/dos2unix.c +++ b/coreutils/dos2unix.c @@ -22,9 +22,9 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "busybox.h" #include #include +#include "busybox.h" int dos2unix_main( int argc, char **argv ) { int c; diff --git a/coreutils/du.c b/coreutils/du.c index 516f4c92b..6197b0bc1 100644 --- a/coreutils/du.c +++ b/coreutils/du.c @@ -22,11 +22,6 @@ * */ -#include "busybox.h" -#define BB_DECLARE_EXTERN -#define bb_need_name_too_long -#include "messages.c" - #include #include #include @@ -34,6 +29,11 @@ #include #include #include +#include "busybox.h" +#define BB_DECLARE_EXTERN +#define bb_need_name_too_long +#include "messages.c" + #ifdef BB_FEATURE_HUMAN_READABLE unsigned long du_disp_hr = KILOBYTE; @@ -187,7 +187,7 @@ int du_main(int argc, char **argv) return status; } -/* $Id: du.c,v 1.37 2001/02/14 21:23:05 andersen Exp $ */ +/* $Id: du.c,v 1.38 2001/02/20 06:14:07 andersen Exp $ */ /* Local Variables: c-file-style: "linux" diff --git a/coreutils/echo.c b/coreutils/echo.c index b3e01afec..e9bc50a15 100644 --- a/coreutils/echo.c +++ b/coreutils/echo.c @@ -22,10 +22,10 @@ * Original copyright notice is retained at the end of this file. */ -#include "busybox.h" #include #include #include +#include "busybox.h" extern int echo_main(int argc, char** argv) diff --git a/coreutils/expr.c b/coreutils/expr.c index 8ef5293c1..3b454bd3a 100644 --- a/coreutils/expr.c +++ b/coreutils/expr.c @@ -33,12 +33,12 @@ * One function can handle multiple operators all of equal precedence, * provided they all associate ((x op x) op x). */ -#include "busybox.h" #include #include #include #include #include +#include "busybox.h" /* The kinds of value we can have. */ diff --git a/coreutils/head.c b/coreutils/head.c index a2d774437..c683ec78a 100644 --- a/coreutils/head.c +++ b/coreutils/head.c @@ -22,11 +22,11 @@ * */ -#include "busybox.h" #include #include #include #include +#include "busybox.h" int head(int len, FILE *fp) { diff --git a/coreutils/hostid.c b/coreutils/hostid.c index eed1a50ec..68a2cc659 100644 --- a/coreutils/hostid.c +++ b/coreutils/hostid.c @@ -20,10 +20,10 @@ * */ -#include "busybox.h" #include #include #include +#include "busybox.h" extern int hostid_main(int argc, char **argv) { diff --git a/coreutils/length.c b/coreutils/length.c index 9119adca8..73becd28a 100644 --- a/coreutils/length.c +++ b/coreutils/length.c @@ -1,8 +1,8 @@ /* vi: set sw=4 ts=4: */ -#include "busybox.h" #include #include #include +#include "busybox.h" extern int length_main(int argc, char **argv) { diff --git a/coreutils/ln.c b/coreutils/ln.c index e35bf7a03..6d41cce62 100644 --- a/coreutils/ln.c +++ b/coreutils/ln.c @@ -21,17 +21,17 @@ * */ -#include "busybox.h" -#define BB_DECLARE_EXTERN -#define bb_need_not_a_directory -#include "messages.c" - #include #include #include #include #include #include +#include "busybox.h" +#define BB_DECLARE_EXTERN +#define bb_need_not_a_directory +#include "messages.c" + static const int LN_SYMLINK = 1; static const int LN_FORCE = 2; diff --git a/coreutils/logname.c b/coreutils/logname.c index a1887aaf9..0924b2471 100644 --- a/coreutils/logname.c +++ b/coreutils/logname.c @@ -20,10 +20,10 @@ * */ -#include "busybox.h" #include #include #include +#include "busybox.h" extern int logname_main(int argc, char **argv) { diff --git a/coreutils/ls.c b/coreutils/ls.c index dd38dd5f3..a619bb8b2 100644 --- a/coreutils/ls.c +++ b/coreutils/ls.c @@ -50,7 +50,6 @@ enum { /************************************************************************/ -#include "busybox.h" #include #include #include @@ -67,6 +66,7 @@ enum { #include #include #include +#include "busybox.h" #ifndef MAJOR #define MAJOR(dev) (((dev)>>8)&0xff) diff --git a/coreutils/md5sum.c b/coreutils/md5sum.c index 3decafdf4..fa11ee61d 100644 --- a/coreutils/md5sum.c +++ b/coreutils/md5sum.c @@ -20,11 +20,11 @@ /* Written by Ulrich Drepper */ /* Hacked to work with BusyBox by Alfred M. Szmidt */ -#include "busybox.h" #include #include #include #include +#include "busybox.h" /* For some silly reason, this file uses backwards TRUE and FALSE conventions */ #undef TRUE diff --git a/coreutils/mkdir.c b/coreutils/mkdir.c index 285d34f12..902da7c99 100644 --- a/coreutils/mkdir.c +++ b/coreutils/mkdir.c @@ -21,15 +21,15 @@ * */ +#include +#include +#include +#include #include "busybox.h" #define bb_need_name_too_long #define BB_DECLARE_EXTERN #include "messages.c" -#include -#include -#include -#include static int parentFlag = FALSE; static mode_t mode = 0777; diff --git a/coreutils/mkfifo.c b/coreutils/mkfifo.c index 56a04f772..ca217fa23 100644 --- a/coreutils/mkfifo.c +++ b/coreutils/mkfifo.c @@ -20,11 +20,11 @@ * */ -#include "busybox.h" #include #include #include #include +#include "busybox.h" extern int mkfifo_main(int argc, char **argv) { diff --git a/coreutils/mknod.c b/coreutils/mknod.c index 73f6e06f1..b4d4b82a1 100644 --- a/coreutils/mknod.c +++ b/coreutils/mknod.c @@ -20,14 +20,14 @@ * */ -#include "busybox.h" #include #include -#include #include #include #include #include +#include +#include "busybox.h" int mknod_main(int argc, char **argv) { diff --git a/coreutils/printf.c b/coreutils/printf.c index 26a200e85..003423d56 100644 --- a/coreutils/printf.c +++ b/coreutils/printf.c @@ -47,7 +47,6 @@ // 19990508 Busy Boxed! Dave Cinege -#include "busybox.h" #include #include #include @@ -56,6 +55,7 @@ #include #include #include +#include "busybox.h" #ifndef S_IFMT diff --git a/coreutils/pwd.c b/coreutils/pwd.c index a9acbc721..a7a5f78a1 100644 --- a/coreutils/pwd.c +++ b/coreutils/pwd.c @@ -21,12 +21,12 @@ * */ -#include "busybox.h" #include #include #include #include #include +#include "busybox.h" extern int pwd_main(int argc, char **argv) { diff --git a/coreutils/rm.c b/coreutils/rm.c index 566076707..a84163272 100644 --- a/coreutils/rm.c +++ b/coreutils/rm.c @@ -22,7 +22,6 @@ * */ -#include "busybox.h" #include #include #include @@ -30,6 +29,7 @@ #include #include #include +#include "busybox.h" static int recursiveFlag = FALSE; static int forceFlag = FALSE; diff --git a/coreutils/rmdir.c b/coreutils/rmdir.c index 6266ce1ef..2c280376f 100644 --- a/coreutils/rmdir.c +++ b/coreutils/rmdir.c @@ -22,11 +22,11 @@ * */ -#include "busybox.h" #include #include #include #include +#include "busybox.h" extern int rmdir_main(int argc, char **argv) { diff --git a/coreutils/sleep.c b/coreutils/sleep.c index d21af19b3..3bcab88ee 100644 --- a/coreutils/sleep.c +++ b/coreutils/sleep.c @@ -21,10 +21,10 @@ * */ -#include "busybox.h" #include #include #include +#include "busybox.h" extern int sleep_main(int argc, char **argv) { diff --git a/coreutils/sort.c b/coreutils/sort.c index 4984f5dfe..ed6872218 100644 --- a/coreutils/sort.c +++ b/coreutils/sort.c @@ -21,9 +21,9 @@ * */ -#include "busybox.h" #include #include +#include "busybox.h" int compare_ascii(const void *x, const void *y) { diff --git a/coreutils/stty.c b/coreutils/stty.c index 4a5aecf1d..10e28254d 100644 --- a/coreutils/stty.c +++ b/coreutils/stty.c @@ -28,7 +28,6 @@ */ -#include "busybox.h" #include #include @@ -53,6 +52,7 @@ #include #include #include +#include "busybox.h" #define STREQ(a, b) (strcmp ((a), (b)) == 0) diff --git a/coreutils/sync.c b/coreutils/sync.c index 3d4686efa..ee22ae109 100644 --- a/coreutils/sync.c +++ b/coreutils/sync.c @@ -21,10 +21,10 @@ * */ -#include "busybox.h" #include #include #include +#include "busybox.h" extern int sync_main(int argc, char **argv) { diff --git a/coreutils/tail.c b/coreutils/tail.c index 778c2d18b..a85256c80 100644 --- a/coreutils/tail.c +++ b/coreutils/tail.c @@ -21,7 +21,6 @@ * */ -#include "busybox.h" #include #include @@ -29,6 +28,7 @@ #include #include #include +#include "busybox.h" static const struct suffix_mult tail_suffixes[] = { { "b", 512 }, diff --git a/coreutils/test.c b/coreutils/test.c index 6439e3a8a..ab9c23e4b 100644 --- a/coreutils/test.c +++ b/coreutils/test.c @@ -31,13 +31,13 @@ * "This program is in the Public Domain." */ -#include "busybox.h" #include #include #include #include #include #include +#include "busybox.h" #define BB_DECLARE_EXTERN #define bb_need_help #include "messages.c" diff --git a/coreutils/touch.c b/coreutils/touch.c index a3256d559..1718da71e 100644 --- a/coreutils/touch.c +++ b/coreutils/touch.c @@ -22,7 +22,6 @@ * */ -#include "busybox.h" #include #include #include @@ -30,6 +29,7 @@ #include #include #include +#include "busybox.h" extern int touch_main(int argc, char **argv) { diff --git a/coreutils/tr.c b/coreutils/tr.c index 92f399e14..b7a6009c8 100644 --- a/coreutils/tr.c +++ b/coreutils/tr.c @@ -24,12 +24,12 @@ * Original copyright notice is retained at the end of this file. */ -#include "busybox.h" #include #include #include #include #include +#include "busybox.h" #define BB_DECLARE_EXTERN #define bb_need_write_error #include "messages.c" diff --git a/coreutils/tty.c b/coreutils/tty.c index d71d8dedb..4510c2996 100644 --- a/coreutils/tty.c +++ b/coreutils/tty.c @@ -20,11 +20,11 @@ * */ -#include "busybox.h" #include #include #include #include +#include "busybox.h" extern int tty_main(int argc, char **argv) { diff --git a/coreutils/uname.c b/coreutils/uname.c index 899da7792..4931ff1d8 100644 --- a/coreutils/uname.c +++ b/coreutils/uname.c @@ -31,7 +31,6 @@ /* Busyboxed by Erik Andersen */ -#include "busybox.h" #include #include #include @@ -40,6 +39,7 @@ #if defined (HAVE_SYSINFO) && defined (HAVE_SYS_SYSTEMINFO_H) # include #endif +#include "busybox.h" static void print_element(unsigned int mask, char *element); diff --git a/coreutils/uniq.c b/coreutils/uniq.c index 84f1ed231..53e3c64f2 100644 --- a/coreutils/uniq.c +++ b/coreutils/uniq.c @@ -23,12 +23,12 @@ * */ -#include "busybox.h" #include #include #include #include #include +#include "busybox.h" static int print_count; static int print_uniq = 1; diff --git a/coreutils/usleep.c b/coreutils/usleep.c index c67c365b8..92e4437c5 100644 --- a/coreutils/usleep.c +++ b/coreutils/usleep.c @@ -21,9 +21,9 @@ * */ -#include "busybox.h" #include #include +#include "busybox.h" extern int usleep_main(int argc, char **argv) { diff --git a/coreutils/uudecode.c b/coreutils/uudecode.c index c0e8cea8c..6a3f78a42 100644 --- a/coreutils/uudecode.c +++ b/coreutils/uudecode.c @@ -22,13 +22,13 @@ */ -#include "busybox.h" #include #include #include #include #include +#include "busybox.h" #include "pwd_grp/pwd.h" #include "pwd_grp/grp.h" diff --git a/coreutils/uuencode.c b/coreutils/uuencode.c index 8d5af4a8a..41541defb 100644 --- a/coreutils/uuencode.c +++ b/coreutils/uuencode.c @@ -22,12 +22,12 @@ /* Hacked to work with BusyBox by Alfred M. Szmidt */ -#include "busybox.h" #include #include #include #include +#include "busybox.h" #define RW (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH) diff --git a/coreutils/wc.c b/coreutils/wc.c index f41687422..f2d33d6f3 100644 --- a/coreutils/wc.c +++ b/coreutils/wc.c @@ -20,10 +20,10 @@ * */ -#include "busybox.h" #include #include #include +#include "busybox.h" static int total_lines, total_words, total_chars, max_length; static int print_lines, print_words, print_chars, print_length; diff --git a/coreutils/whoami.c b/coreutils/whoami.c index 54df0bf12..0bbb54b7b 100644 --- a/coreutils/whoami.c +++ b/coreutils/whoami.c @@ -20,10 +20,10 @@ * */ -#include "busybox.h" #include #include #include +#include "busybox.h" extern int whoami_main(int argc, char **argv) { diff --git a/coreutils/yes.c b/coreutils/yes.c index 0a8ad83a7..ad7b98f84 100644 --- a/coreutils/yes.c +++ b/coreutils/yes.c @@ -20,9 +20,9 @@ * */ -#include "busybox.h" #include #include +#include "busybox.h" extern int yes_main(int argc, char **argv) { diff --git a/cp_mv.c b/cp_mv.c index 8052b41a6..fb48d3c5c 100644 --- a/cp_mv.c +++ b/cp_mv.c @@ -25,13 +25,6 @@ * */ -#include "busybox.h" -#define BB_DECLARE_EXTERN -#define bb_need_name_too_long -#define bb_need_omitting_directory -#define bb_need_not_a_directory -#include "messages.c" - #include #include #include @@ -43,6 +36,13 @@ #include #include #include +#include "busybox.h" +#define BB_DECLARE_EXTERN +#define bb_need_name_too_long +#define bb_need_omitting_directory +#define bb_need_not_a_directory +#include "messages.c" + static const int is_cp = 0; static const int is_mv = 1; diff --git a/date.c b/date.c index 21d31bb25..878331f71 100644 --- a/date.c +++ b/date.c @@ -20,11 +20,6 @@ * */ -#include "busybox.h" -#define BB_DECLARE_EXTERN -#define bb_need_invalid_date -#define bb_need_memory_exhausted -#include "messages.c" #include #include #include @@ -33,6 +28,11 @@ #include #include #include +#include "busybox.h" +#define BB_DECLARE_EXTERN +#define bb_need_invalid_date +#define bb_need_memory_exhausted +#include "messages.c" /* This 'date' command supports only 2 time setting formats, diff --git a/dc.c b/dc.c index 1e34574ed..a422139b1 100644 --- a/dc.c +++ b/dc.c @@ -1,10 +1,10 @@ /* vi: set sw=4 ts=4: */ -#include "busybox.h" #include #include #include #include #include +#include "busybox.h" /* Tiny RPN calculator, because "expr" didn't give me bitwise operations. */ diff --git a/dd.c b/dd.c index e445e0435..1618dd102 100644 --- a/dd.c +++ b/dd.c @@ -21,14 +21,14 @@ * */ -#include "busybox.h" - #include #include #include #include #include #include +#include "busybox.h" + static const struct suffix_mult dd_suffixes[] = { { "c", 1 }, diff --git a/deallocvt.c b/deallocvt.c index 8c390c261..15cd0c9b9 100644 --- a/deallocvt.c +++ b/deallocvt.c @@ -3,12 +3,12 @@ * disalloc.c - aeb - 940501 - Disallocate virtual terminal(s) * Renamed deallocvt. */ -#include "busybox.h" #include #include #include #include #include +#include "busybox.h" /* From */ static const int VT_DISALLOCATE = 0x5608; /* free memory associated to vt */ diff --git a/df.c b/df.c index 692205a0e..ebee4d607 100644 --- a/df.c +++ b/df.c @@ -22,12 +22,12 @@ * */ -#include "busybox.h" #include #include #include #include #include +#include "busybox.h" extern const char mtab_file[]; /* Defined in utility.c */ #ifdef BB_FEATURE_HUMAN_READABLE diff --git a/dirname.c b/dirname.c index e34ecf8a9..7f191c1b9 100644 --- a/dirname.c +++ b/dirname.c @@ -20,10 +20,11 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ -#include "busybox.h" + #include #include #include +#include "busybox.h" extern int dirname_main(int argc, char **argv) { diff --git a/dmesg.c b/dmesg.c index 47f9f4474..2c85ed3e9 100644 --- a/dmesg.c +++ b/dmesg.c @@ -15,7 +15,6 @@ * Support, replaced getopt, added some gotos for redundant stuff. */ -#include "busybox.h" #include #include #include @@ -33,6 +32,7 @@ static inline _syscall3(int, klogctl, int, type, char *, b, int, len); #else # include #endif +#include "busybox.h" int dmesg_main(int argc, char **argv) { diff --git a/dos2unix.c b/dos2unix.c index 32423611c..222c8f6a4 100644 --- a/dos2unix.c +++ b/dos2unix.c @@ -22,9 +22,9 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "busybox.h" #include #include +#include "busybox.h" int dos2unix_main( int argc, char **argv ) { int c; diff --git a/du.c b/du.c index 516f4c92b..6197b0bc1 100644 --- a/du.c +++ b/du.c @@ -22,11 +22,6 @@ * */ -#include "busybox.h" -#define BB_DECLARE_EXTERN -#define bb_need_name_too_long -#include "messages.c" - #include #include #include @@ -34,6 +29,11 @@ #include #include #include +#include "busybox.h" +#define BB_DECLARE_EXTERN +#define bb_need_name_too_long +#include "messages.c" + #ifdef BB_FEATURE_HUMAN_READABLE unsigned long du_disp_hr = KILOBYTE; @@ -187,7 +187,7 @@ int du_main(int argc, char **argv) return status; } -/* $Id: du.c,v 1.37 2001/02/14 21:23:05 andersen Exp $ */ +/* $Id: du.c,v 1.38 2001/02/20 06:14:07 andersen Exp $ */ /* Local Variables: c-file-style: "linux" diff --git a/dumpkmap.c b/dumpkmap.c index b9f1bd233..0da01868b 100644 --- a/dumpkmap.c +++ b/dumpkmap.c @@ -20,7 +20,6 @@ * */ -#include "busybox.h" #include #include #include @@ -28,6 +27,7 @@ #include #include #include +#include "busybox.h" /* From */ struct kbentry { diff --git a/dutmp.c b/dutmp.c index 2e6b3c056..a75a6e392 100644 --- a/dutmp.c +++ b/dutmp.c @@ -12,17 +12,17 @@ * Erik Andersen */ -#include "busybox.h" #include #include #include -#define BB_DECLARE_EXTERN -#define bb_need_io_error -#include "messages.c" #include #include #include +#include "busybox.h" +#define BB_DECLARE_EXTERN +#define bb_need_io_error +#include "messages.c" extern int dutmp_main(int argc, char **argv) { diff --git a/echo.c b/echo.c index b3e01afec..e9bc50a15 100644 --- a/echo.c +++ b/echo.c @@ -22,10 +22,10 @@ * Original copyright notice is retained at the end of this file. */ -#include "busybox.h" #include #include #include +#include "busybox.h" extern int echo_main(int argc, char** argv) diff --git a/expr.c b/expr.c index 8ef5293c1..3b454bd3a 100644 --- a/expr.c +++ b/expr.c @@ -33,12 +33,12 @@ * One function can handle multiple operators all of equal precedence, * provided they all associate ((x op x) op x). */ -#include "busybox.h" #include #include #include #include #include +#include "busybox.h" /* The kinds of value we can have. */ diff --git a/fbset.c b/fbset.c index 9acabbecb..72284a6c5 100644 --- a/fbset.c +++ b/fbset.c @@ -24,7 +24,6 @@ * Geert Uytterhoeven (Geert.Uytterhoeven@cs.kuleuven.ac.be) */ -#include "busybox.h" #include #include #include @@ -33,6 +32,7 @@ #include #include #include +#include "busybox.h" #define DEFAULTFBDEV "/dev/fb0" #define DEFAULTFBMODE "/etc/fb.modes" diff --git a/fdflush.c b/fdflush.c index f10cceae0..28f5cb68a 100644 --- a/fdflush.c +++ b/fdflush.c @@ -21,11 +21,11 @@ * */ -#include "busybox.h" #include #include #include #include +#include "busybox.h" /* From */ #define FDFLUSH _IO(2,0x4b) diff --git a/find.c b/find.c index a07dc8ecb..15e693ab9 100644 --- a/find.c +++ b/find.c @@ -24,7 +24,6 @@ * */ -#include "busybox.h" #include #include #include @@ -33,6 +32,7 @@ #include #include #include +#include "busybox.h" static char *pattern; diff --git a/findutils/find.c b/findutils/find.c index a07dc8ecb..15e693ab9 100644 --- a/findutils/find.c +++ b/findutils/find.c @@ -24,7 +24,6 @@ * */ -#include "busybox.h" #include #include #include @@ -33,6 +32,7 @@ #include #include #include +#include "busybox.h" static char *pattern; diff --git a/findutils/which.c b/findutils/which.c index 1908db30a..f9d51f2f3 100644 --- a/findutils/which.c +++ b/findutils/which.c @@ -21,10 +21,10 @@ * */ -#include "busybox.h" #include #include #include +#include "busybox.h" extern int which_main(int argc, char **argv) { diff --git a/findutils/xargs.c b/findutils/xargs.c index f05efd917..01aa5be69 100644 --- a/findutils/xargs.c +++ b/findutils/xargs.c @@ -21,10 +21,10 @@ * */ -#include "busybox.h" #include #include #include +#include "busybox.h" int xargs_main(int argc, char **argv) { diff --git a/free.c b/free.c index d287c03f5..41e872d12 100644 --- a/free.c +++ b/free.c @@ -21,10 +21,10 @@ * */ -#include "busybox.h" #include #include #include +#include "busybox.h" extern int free_main(int argc, char **argv) { diff --git a/fsck_minix.c b/fsck_minix.c index 2b4c65144..9a53a705e 100644 --- a/fsck_minix.c +++ b/fsck_minix.c @@ -86,7 +86,6 @@ * enforced (but it's not much fun on a character device :-). */ -#include "busybox.h" #include #include #include @@ -97,6 +96,7 @@ #include #include #include +#include "busybox.h" typedef unsigned char u8; diff --git a/gunzip.c b/gunzip.c index bf8812dbd..8100003ec 100644 --- a/gunzip.c +++ b/gunzip.c @@ -57,7 +57,6 @@ static char *license_msg[] = { }; #endif -#include "busybox.h" #include #include #include @@ -71,6 +70,7 @@ static char *license_msg[] = { #include #include #include +#include "busybox.h" #define BB_DECLARE_EXTERN #define bb_need_memory_exhausted #define bb_need_name_too_long diff --git a/gzip.c b/gzip.c index 3cbef4ec1..6c058d2b6 100644 --- a/gzip.c +++ b/gzip.c @@ -29,11 +29,6 @@ * */ -#include "busybox.h" -#define BB_DECLARE_EXTERN -#define bb_need_memory_exhausted -#include "messages.c" - /* These defines are very important for BusyBox. Without these, * huge chunks of ram are pre-allocated making the BusyBox bss * size Freaking Huge(tm), which is a bad thing.*/ @@ -43,9 +38,15 @@ /* I don't like nested includes, but the string and io functions are used * too often */ +#include #include #include #include +#include "busybox.h" +#define BB_DECLARE_EXTERN +#define bb_need_memory_exhausted +#include "messages.c" + #define memzero(s, n) memset ((void *)(s), 0, (n)) #ifndef RETSIGTYPE @@ -1628,12 +1629,6 @@ ulg deflate() # include #endif -#if defined(STDC_HEADERS) || !defined(NO_STDLIB_H) -# include -#else -extern int errno; -#endif - #if defined(DIRENT) # include typedef struct dirent dir_type; @@ -3098,12 +3093,6 @@ local void set_file_type() # include #endif -#if defined(STDC_HEADERS) || !defined(NO_STDLIB_H) -# include -#else -extern int errno; -#endif - /* =========================================================================== * Copy input to output unchanged: zcat == cat with --force. * IN assertion: insize bytes have already been read in inbuf. diff --git a/head.c b/head.c index a2d774437..c683ec78a 100644 --- a/head.c +++ b/head.c @@ -22,11 +22,11 @@ * */ -#include "busybox.h" #include #include #include #include +#include "busybox.h" int head(int len, FILE *fp) { diff --git a/hostid.c b/hostid.c index eed1a50ec..68a2cc659 100644 --- a/hostid.c +++ b/hostid.c @@ -20,10 +20,10 @@ * */ -#include "busybox.h" #include #include #include +#include "busybox.h" extern int hostid_main(int argc, char **argv) { diff --git a/ifconfig.c b/ifconfig.c index 66615a2fd..a3e2c0fdb 100644 --- a/ifconfig.c +++ b/ifconfig.c @@ -15,17 +15,16 @@ * Foundation; either version 2 of the License, or (at * your option) any later version. * - * $Id: ifconfig.c,v 1.2 2001/02/14 21:23:06 andersen Exp $ + * $Id: ifconfig.c,v 1.3 2001/02/20 06:14:07 andersen Exp $ * */ -#include "busybox.h" -#include #include #include #include #include // strcmp and friends #include // isdigit and friends +#include #include #include #include @@ -33,6 +32,7 @@ #include #include #include +#include "busybox.h" static int sockfd; /* socket fd we use to manipulate stuff with */ diff --git a/init.c b/init.c index 9046a14a8..1332a1064 100644 --- a/init.c +++ b/init.c @@ -27,7 +27,6 @@ #define DEBUG_INIT */ -#include "busybox.h" #include #include #include @@ -43,13 +42,14 @@ #include #include #include +#include "busybox.h" +#define bb_need_full_version +#define BB_DECLARE_EXTERN +#include "messages.c" #ifdef BB_SYSLOGD # include #endif -#define bb_need_full_version -#define BB_DECLARE_EXTERN -#include "messages.c" /* From */ struct vt_stat { diff --git a/init/init.c b/init/init.c index 9046a14a8..1332a1064 100644 --- a/init/init.c +++ b/init/init.c @@ -27,7 +27,6 @@ #define DEBUG_INIT */ -#include "busybox.h" #include #include #include @@ -43,13 +42,14 @@ #include #include #include +#include "busybox.h" +#define bb_need_full_version +#define BB_DECLARE_EXTERN +#include "messages.c" #ifdef BB_SYSLOGD # include #endif -#define bb_need_full_version -#define BB_DECLARE_EXTERN -#include "messages.c" /* From */ struct vt_stat { diff --git a/insmod.c b/insmod.c index 58273521f..166f0fc4b 100644 --- a/insmod.c +++ b/insmod.c @@ -37,7 +37,6 @@ * */ -#include "busybox.h" #include #include #include @@ -51,6 +50,7 @@ #include #include #include +#include "busybox.h" //---------------------------------------------------------------------------- //--------modutils module.h, lines 45-242 @@ -81,7 +81,7 @@ #ifndef MODUTILS_MODULE_H static const int MODUTILS_MODULE_H = 1; -#ident "$Id: insmod.c,v 1.47 2001/02/15 19:07:43 andersen Exp $" +#ident "$Id: insmod.c,v 1.48 2001/02/20 06:14:07 andersen Exp $" /* This file contains the structures used by the 2.0 and 2.1 kernels. We do not use the kernel headers directly because we do not wish @@ -287,7 +287,7 @@ int delete_module(const char *); #ifndef MODUTILS_OBJ_H static const int MODUTILS_OBJ_H = 1; -#ident "$Id: insmod.c,v 1.47 2001/02/15 19:07:43 andersen Exp $" +#ident "$Id: insmod.c,v 1.48 2001/02/20 06:14:07 andersen Exp $" /* The relocatable object is manipulated using elfin types. */ diff --git a/kill.c b/kill.c index bdd22b52d..e62503b3c 100644 --- a/kill.c +++ b/kill.c @@ -21,7 +21,6 @@ */ -#include "busybox.h" #include #include #include @@ -30,6 +29,7 @@ #include #include #include +#include "busybox.h" static const int KILL = 0; static const int KILLALL = 1; diff --git a/length.c b/length.c index 9119adca8..73becd28a 100644 --- a/length.c +++ b/length.c @@ -1,8 +1,8 @@ /* vi: set sw=4 ts=4: */ -#include "busybox.h" #include #include #include +#include "busybox.h" extern int length_main(int argc, char **argv) { diff --git a/ln.c b/ln.c index e35bf7a03..6d41cce62 100644 --- a/ln.c +++ b/ln.c @@ -21,17 +21,17 @@ * */ -#include "busybox.h" -#define BB_DECLARE_EXTERN -#define bb_need_not_a_directory -#include "messages.c" - #include #include #include #include #include #include +#include "busybox.h" +#define BB_DECLARE_EXTERN +#define bb_need_not_a_directory +#include "messages.c" + static const int LN_SYMLINK = 1; static const int LN_FORCE = 2; diff --git a/loadacm.c b/loadacm.c index 6422137a1..81b973b02 100644 --- a/loadacm.c +++ b/loadacm.c @@ -7,7 +7,6 @@ * Peter Novodvorsky */ -#include "busybox.h" #include #include #include @@ -17,9 +16,10 @@ #include #include #include +#include #include #include -#include +#include "busybox.h" typedef unsigned short unicode; diff --git a/loadfont.c b/loadfont.c index d7bd7e8f5..1a724ca85 100644 --- a/loadfont.c +++ b/loadfont.c @@ -7,7 +7,6 @@ * Loads the console font, and possibly the corresponding screen map(s). * (Adapted for busybox by Matej Vela.) */ -#include "busybox.h" #include #include #include @@ -20,6 +19,7 @@ #include #include #include +#include "busybox.h" static const int PSF_MAGIC1 = 0x36; static const int PSF_MAGIC2 = 0x04; diff --git a/loadkmap.c b/loadkmap.c index 5ecd819f9..dcb5c1caa 100644 --- a/loadkmap.c +++ b/loadkmap.c @@ -20,7 +20,6 @@ * */ -#include "busybox.h" #include #include #include @@ -28,6 +27,7 @@ #include #include #include +#include "busybox.h" #define BINARY_KEYMAP_MAGIC "bkeymap" diff --git a/logger.c b/logger.c index 352bde158..1218d8d2e 100644 --- a/logger.c +++ b/logger.c @@ -21,7 +21,6 @@ * */ -#include "busybox.h" #include #include #include @@ -30,6 +29,7 @@ #include #include +#include "busybox.h" #if !defined BB_SYSLOGD #define SYSLOG_NAMES @@ -40,6 +40,7 @@ * structures. Argh.... bad libc, bad, bad... */ #include + typedef struct _code { char *c_name; int c_val; diff --git a/logname.c b/logname.c index a1887aaf9..0924b2471 100644 --- a/logname.c +++ b/logname.c @@ -20,10 +20,10 @@ * */ -#include "busybox.h" #include #include #include +#include "busybox.h" extern int logname_main(int argc, char **argv) { diff --git a/ls.c b/ls.c index dd38dd5f3..a619bb8b2 100644 --- a/ls.c +++ b/ls.c @@ -50,7 +50,6 @@ enum { /************************************************************************/ -#include "busybox.h" #include #include #include @@ -67,6 +66,7 @@ enum { #include #include #include +#include "busybox.h" #ifndef MAJOR #define MAJOR(dev) (((dev)>>8)&0xff) diff --git a/lsmod.c b/lsmod.c index f39cbc08f..c97d199a6 100644 --- a/lsmod.c +++ b/lsmod.c @@ -25,7 +25,6 @@ * */ -#include "busybox.h" #include #include #include @@ -37,6 +36,7 @@ #include #include #include +#include "busybox.h" diff --git a/makedevs.c b/makedevs.c index eed3968c8..b8c6dd1d8 100644 --- a/makedevs.c +++ b/makedevs.c @@ -7,13 +7,13 @@ * known bugs: can't deal with alpha ranges */ -#include "busybox.h" #include #include #include #include #include #include +#include "busybox.h" int makedevs_main(int argc, char **argv) { diff --git a/md5sum.c b/md5sum.c index 3decafdf4..fa11ee61d 100644 --- a/md5sum.c +++ b/md5sum.c @@ -20,11 +20,11 @@ /* Written by Ulrich Drepper */ /* Hacked to work with BusyBox by Alfred M. Szmidt */ -#include "busybox.h" #include #include #include #include +#include "busybox.h" /* For some silly reason, this file uses backwards TRUE and FALSE conventions */ #undef TRUE diff --git a/miscutils/dc.c b/miscutils/dc.c index 1e34574ed..a422139b1 100644 --- a/miscutils/dc.c +++ b/miscutils/dc.c @@ -1,10 +1,10 @@ /* vi: set sw=4 ts=4: */ -#include "busybox.h" #include #include #include #include #include +#include "busybox.h" /* Tiny RPN calculator, because "expr" didn't give me bitwise operations. */ diff --git a/miscutils/dutmp.c b/miscutils/dutmp.c index 2e6b3c056..a75a6e392 100644 --- a/miscutils/dutmp.c +++ b/miscutils/dutmp.c @@ -12,17 +12,17 @@ * Erik Andersen */ -#include "busybox.h" #include #include #include -#define BB_DECLARE_EXTERN -#define bb_need_io_error -#include "messages.c" #include #include #include +#include "busybox.h" +#define BB_DECLARE_EXTERN +#define bb_need_io_error +#include "messages.c" extern int dutmp_main(int argc, char **argv) { diff --git a/miscutils/makedevs.c b/miscutils/makedevs.c index eed3968c8..b8c6dd1d8 100644 --- a/miscutils/makedevs.c +++ b/miscutils/makedevs.c @@ -7,13 +7,13 @@ * known bugs: can't deal with alpha ranges */ -#include "busybox.h" #include #include #include #include #include #include +#include "busybox.h" int makedevs_main(int argc, char **argv) { diff --git a/miscutils/mktemp.c b/miscutils/mktemp.c index b3522026e..31ab9e228 100644 --- a/miscutils/mktemp.c +++ b/miscutils/mktemp.c @@ -22,11 +22,11 @@ * */ -#include "busybox.h" #include #include #include #include +#include "busybox.h" extern int mktemp_main(int argc, char **argv) { diff --git a/miscutils/mt.c b/miscutils/mt.c index eb93cb234..350d3ae5a 100644 --- a/miscutils/mt.c +++ b/miscutils/mt.c @@ -1,9 +1,9 @@ /* vi: set sw=4 ts=4: */ -#include "busybox.h" #include #include #include #include +#include "busybox.h" struct mt_opcodes { char *name; diff --git a/miscutils/readlink.c b/miscutils/readlink.c index c82f64027..74196e11d 100644 --- a/miscutils/readlink.c +++ b/miscutils/readlink.c @@ -22,10 +22,10 @@ * */ -#include "busybox.h" #include #include #include +#include "busybox.h" int readlink_main(int argc, char **argv) { diff --git a/miscutils/update.c b/miscutils/update.c index 2cf4a98b2..b282b9e18 100644 --- a/miscutils/update.c +++ b/miscutils/update.c @@ -28,7 +28,6 @@ * earlier) kernel. 2.2.x and higher flush filesystem buffers automatically. */ -#include "busybox.h" #include #include #include /* for getopt() */ @@ -42,6 +41,7 @@ #include static _syscall2(int, bdflush, int, func, int, data); #endif /* __GLIBC__ */ +#include "busybox.h" static unsigned int sync_duration = 30; static unsigned int flush_duration = 5; diff --git a/miscutils/watchdog.c b/miscutils/watchdog.c index 65d0fc35f..5b5fd6953 100644 --- a/miscutils/watchdog.c +++ b/miscutils/watchdog.c @@ -20,11 +20,11 @@ * */ -#include "busybox.h" #include #include #include #include +#include "busybox.h" extern int watchdog_main(int argc, char **argv) { diff --git a/mkdir.c b/mkdir.c index 285d34f12..902da7c99 100644 --- a/mkdir.c +++ b/mkdir.c @@ -21,15 +21,15 @@ * */ +#include +#include +#include +#include #include "busybox.h" #define bb_need_name_too_long #define BB_DECLARE_EXTERN #include "messages.c" -#include -#include -#include -#include static int parentFlag = FALSE; static mode_t mode = 0777; diff --git a/mkfifo.c b/mkfifo.c index 56a04f772..ca217fa23 100644 --- a/mkfifo.c +++ b/mkfifo.c @@ -20,11 +20,11 @@ * */ -#include "busybox.h" #include #include #include #include +#include "busybox.h" extern int mkfifo_main(int argc, char **argv) { diff --git a/mkfs_minix.c b/mkfs_minix.c index 6b4a3e2d1..b666338dc 100644 --- a/mkfs_minix.c +++ b/mkfs_minix.c @@ -62,7 +62,6 @@ * removed getopt based parser and added a hand rolled one. */ -#include "busybox.h" #include #include #include @@ -75,6 +74,7 @@ #include #include #include +#include "busybox.h" typedef unsigned char u8; diff --git a/mknod.c b/mknod.c index 73f6e06f1..b4d4b82a1 100644 --- a/mknod.c +++ b/mknod.c @@ -20,14 +20,14 @@ * */ -#include "busybox.h" #include #include -#include #include #include #include #include +#include +#include "busybox.h" int mknod_main(int argc, char **argv) { diff --git a/mkswap.c b/mkswap.c index 48637e889..b5153f623 100644 --- a/mkswap.c +++ b/mkswap.c @@ -35,7 +35,6 @@ * */ -#include "busybox.h" #include #include #include @@ -45,6 +44,7 @@ #include #include /* for PAGE_SIZE and PAGE_SHIFT */ /* we also get PAGE_SIZE via getpagesize() */ +#include "busybox.h" #ifndef _IO /* pre-1.3.45 */ diff --git a/mktemp.c b/mktemp.c index b3522026e..31ab9e228 100644 --- a/mktemp.c +++ b/mktemp.c @@ -22,11 +22,11 @@ * */ -#include "busybox.h" #include #include #include #include +#include "busybox.h" extern int mktemp_main(int argc, char **argv) { diff --git a/modutils/insmod.c b/modutils/insmod.c index 58273521f..166f0fc4b 100644 --- a/modutils/insmod.c +++ b/modutils/insmod.c @@ -37,7 +37,6 @@ * */ -#include "busybox.h" #include #include #include @@ -51,6 +50,7 @@ #include #include #include +#include "busybox.h" //---------------------------------------------------------------------------- //--------modutils module.h, lines 45-242 @@ -81,7 +81,7 @@ #ifndef MODUTILS_MODULE_H static const int MODUTILS_MODULE_H = 1; -#ident "$Id: insmod.c,v 1.47 2001/02/15 19:07:43 andersen Exp $" +#ident "$Id: insmod.c,v 1.48 2001/02/20 06:14:07 andersen Exp $" /* This file contains the structures used by the 2.0 and 2.1 kernels. We do not use the kernel headers directly because we do not wish @@ -287,7 +287,7 @@ int delete_module(const char *); #ifndef MODUTILS_OBJ_H static const int MODUTILS_OBJ_H = 1; -#ident "$Id: insmod.c,v 1.47 2001/02/15 19:07:43 andersen Exp $" +#ident "$Id: insmod.c,v 1.48 2001/02/20 06:14:07 andersen Exp $" /* The relocatable object is manipulated using elfin types. */ diff --git a/modutils/lsmod.c b/modutils/lsmod.c index f39cbc08f..c97d199a6 100644 --- a/modutils/lsmod.c +++ b/modutils/lsmod.c @@ -25,7 +25,6 @@ * */ -#include "busybox.h" #include #include #include @@ -37,6 +36,7 @@ #include #include #include +#include "busybox.h" diff --git a/modutils/rmmod.c b/modutils/rmmod.c index 7d4538e6e..aab326123 100644 --- a/modutils/rmmod.c +++ b/modutils/rmmod.c @@ -21,13 +21,13 @@ * */ -#include "busybox.h" #include #include #include #include #include #include +#include "busybox.h" #define __LIBRARY__ diff --git a/more.c b/more.c index c4c74fe4a..298e1cfb1 100644 --- a/more.c +++ b/more.c @@ -25,12 +25,12 @@ * */ -#include "busybox.h" #include #include #include #include #include +#include "busybox.h" #define BB_DECLARE_EXTERN #define bb_need_help #include "messages.c" diff --git a/mount.c b/mount.c index 2f5bba59d..7b0bf3e21 100644 --- a/mount.c +++ b/mount.c @@ -43,7 +43,6 @@ * */ -#include "busybox.h" #include #include #include @@ -54,6 +53,7 @@ #if defined BB_FEATURE_USE_DEVPS_PATCH #include /* For Erik's nifty devmtab device driver */ #endif +#include "busybox.h" enum { MS_MGC_VAL = 0xc0ed0000, /* Magic number indicatng "new" flags */ diff --git a/mt.c b/mt.c index eb93cb234..350d3ae5a 100644 --- a/mt.c +++ b/mt.c @@ -1,9 +1,9 @@ /* vi: set sw=4 ts=4: */ -#include "busybox.h" #include #include #include #include +#include "busybox.h" struct mt_opcodes { char *name; diff --git a/mtab.c b/mtab.c index 33b11c83e..5fb3674a9 100644 --- a/mtab.c +++ b/mtab.c @@ -1,5 +1,4 @@ /* vi: set sw=4 ts=4: */ -#include "busybox.h" #include #include #include @@ -8,6 +7,7 @@ #include #include #include +#include "busybox.h" extern const char mtab_file[]; /* Defined in utility.c */ diff --git a/nc.c b/nc.c index 8927103e0..e40d4b459 100644 --- a/nc.c +++ b/nc.c @@ -26,7 +26,6 @@ */ -#include "busybox.h" #include #include #include @@ -38,6 +37,7 @@ #include #include #include +#include "busybox.h" int nc_main(int argc, char **argv) { diff --git a/networking/ifconfig.c b/networking/ifconfig.c index 66615a2fd..a3e2c0fdb 100644 --- a/networking/ifconfig.c +++ b/networking/ifconfig.c @@ -15,17 +15,16 @@ * Foundation; either version 2 of the License, or (at * your option) any later version. * - * $Id: ifconfig.c,v 1.2 2001/02/14 21:23:06 andersen Exp $ + * $Id: ifconfig.c,v 1.3 2001/02/20 06:14:07 andersen Exp $ * */ -#include "busybox.h" -#include #include #include #include #include // strcmp and friends #include // isdigit and friends +#include #include #include #include @@ -33,6 +32,7 @@ #include #include #include +#include "busybox.h" static int sockfd; /* socket fd we use to manipulate stuff with */ diff --git a/networking/nc.c b/networking/nc.c index 8927103e0..e40d4b459 100644 --- a/networking/nc.c +++ b/networking/nc.c @@ -26,7 +26,6 @@ */ -#include "busybox.h" #include #include #include @@ -38,6 +37,7 @@ #include #include #include +#include "busybox.h" int nc_main(int argc, char **argv) { diff --git a/networking/nslookup.c b/networking/nslookup.c index 33732de68..8791b5efe 100644 --- a/networking/nslookup.c +++ b/networking/nslookup.c @@ -21,7 +21,6 @@ * */ -#include "busybox.h" #include #include #include @@ -32,6 +31,7 @@ #include #include #include +#include "busybox.h" /* | I'm only implementing non-interactive mode; @@ -170,4 +170,4 @@ int nslookup_main(int argc, char **argv) return EXIT_SUCCESS; } -/* $Id: nslookup.c,v 1.21 2001/02/14 21:23:06 andersen Exp $ */ +/* $Id: nslookup.c,v 1.22 2001/02/20 06:14:08 andersen Exp $ */ diff --git a/networking/ping.c b/networking/ping.c index c114fb0b3..50c7ce6e6 100644 --- a/networking/ping.c +++ b/networking/ping.c @@ -1,6 +1,6 @@ /* vi: set sw=4 ts=4: */ /* - * $Id: ping.c,v 1.37 2001/02/14 21:23:06 andersen Exp $ + * $Id: ping.c,v 1.38 2001/02/20 06:14:08 andersen Exp $ * Mini ping implementation for busybox * * Copyright (C) 1999 by Randolph Chung @@ -31,7 +31,6 @@ * Original copyright notice is retained at the end of this file. */ -#include "busybox.h" #include #include #include @@ -50,6 +49,7 @@ #include #include #include +#include "busybox.h" /* It turns out that libc5 doesn't have proper icmp support diff --git a/networking/route.c b/networking/route.c index d98d9a0b6..9be002792 100644 --- a/networking/route.c +++ b/networking/route.c @@ -15,14 +15,13 @@ * Foundation; either version 2 of the License, or (at * your option) any later version. * - * $Id: route.c,v 1.6 2001/02/18 20:12:25 andersen Exp $ + * $Id: route.c,v 1.7 2001/02/20 06:14:08 andersen Exp $ * * displayroute() code added by Vladimir N. Oleynik * busybox style adjustments by Larry Doolittle * displayroute() format now matches net-tools-1.57/lib/inet_gr.c line 173. */ -#include "busybox.h" #include #include #include @@ -38,6 +37,7 @@ #include #include #include +#include "busybox.h" #define _(x) x diff --git a/networking/telnet.c b/networking/telnet.c index ed92a8403..fd1ace41d 100644 --- a/networking/telnet.c +++ b/networking/telnet.c @@ -30,7 +30,6 @@ * */ -#include "busybox.h" #include #include #include @@ -43,6 +42,7 @@ #include #include #include +#include "busybox.h" #if 0 static const int DOTRACE = 1; diff --git a/networking/wget.c b/networking/wget.c index d1aacefa6..4b8392ba5 100644 --- a/networking/wget.c +++ b/networking/wget.c @@ -14,7 +14,6 @@ * */ -#include "busybox.h" #include #include #include @@ -33,6 +32,8 @@ #include #include +#include "busybox.h" + /* Stupid libc5 doesn't define this... */ #ifndef timersub #define timersub(a, b, result) \ @@ -533,7 +534,7 @@ progressmeter(int flag) * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: wget.c,v 1.27 2001/02/14 21:23:06 andersen Exp $ + * $Id: wget.c,v 1.28 2001/02/20 06:14:08 andersen Exp $ */ diff --git a/nfsmount.c b/nfsmount.c index ae44f3207..aee496980 100644 --- a/nfsmount.c +++ b/nfsmount.c @@ -33,25 +33,25 @@ * nfsmount.c,v 1.1.1.1 1993/11/18 08:40:51 jrs Exp */ -#include "busybox.h" -#undef FALSE -#undef TRUE #include #include #include #include #include -#include -#include -#include #include #include #include #include #include - -#include "nfsmount.h" +#include +#include "busybox.h" +#undef TRUE +#undef FALSE +#include +#include +#include #include /* For the kernels nfs stuff */ +#include "nfsmount.h" #ifndef NFS_FHSIZE static const int NFS_FHSIZE = 32; diff --git a/nslookup.c b/nslookup.c index 33732de68..8791b5efe 100644 --- a/nslookup.c +++ b/nslookup.c @@ -21,7 +21,6 @@ * */ -#include "busybox.h" #include #include #include @@ -32,6 +31,7 @@ #include #include #include +#include "busybox.h" /* | I'm only implementing non-interactive mode; @@ -170,4 +170,4 @@ int nslookup_main(int argc, char **argv) return EXIT_SUCCESS; } -/* $Id: nslookup.c,v 1.21 2001/02/14 21:23:06 andersen Exp $ */ +/* $Id: nslookup.c,v 1.22 2001/02/20 06:14:08 andersen Exp $ */ diff --git a/ping.c b/ping.c index c114fb0b3..50c7ce6e6 100644 --- a/ping.c +++ b/ping.c @@ -1,6 +1,6 @@ /* vi: set sw=4 ts=4: */ /* - * $Id: ping.c,v 1.37 2001/02/14 21:23:06 andersen Exp $ + * $Id: ping.c,v 1.38 2001/02/20 06:14:08 andersen Exp $ * Mini ping implementation for busybox * * Copyright (C) 1999 by Randolph Chung @@ -31,7 +31,6 @@ * Original copyright notice is retained at the end of this file. */ -#include "busybox.h" #include #include #include @@ -50,6 +49,7 @@ #include #include #include +#include "busybox.h" /* It turns out that libc5 doesn't have proper icmp support diff --git a/pivot_root.c b/pivot_root.c index e00710148..d7b80d749 100644 --- a/pivot_root.c +++ b/pivot_root.c @@ -4,11 +4,11 @@ * * busyboxed by Evin Robertson */ -#include "busybox.h" #include #include #include #include +#include "busybox.h" #ifndef __NR_pivot_root #error Sorry, but this kernel does not support the pivot_root syscall diff --git a/printf.c b/printf.c index 26a200e85..003423d56 100644 --- a/printf.c +++ b/printf.c @@ -47,7 +47,6 @@ // 19990508 Busy Boxed! Dave Cinege -#include "busybox.h" #include #include #include @@ -56,6 +55,7 @@ #include #include #include +#include "busybox.h" #ifndef S_IFMT diff --git a/procps/free.c b/procps/free.c index d287c03f5..41e872d12 100644 --- a/procps/free.c +++ b/procps/free.c @@ -21,10 +21,10 @@ * */ -#include "busybox.h" #include #include #include +#include "busybox.h" extern int free_main(int argc, char **argv) { diff --git a/procps/kill.c b/procps/kill.c index bdd22b52d..e62503b3c 100644 --- a/procps/kill.c +++ b/procps/kill.c @@ -21,7 +21,6 @@ */ -#include "busybox.h" #include #include #include @@ -30,6 +29,7 @@ #include #include #include +#include "busybox.h" static const int KILL = 0; static const int KILLALL = 1; diff --git a/procps/ps.c b/procps/ps.c index dd154af9d..4ce43c47f 100644 --- a/procps/ps.c +++ b/procps/ps.c @@ -28,7 +28,6 @@ * */ -#include "busybox.h" #include #include #include @@ -38,6 +37,7 @@ #include #include #include +#include "busybox.h" #define BB_DECLARE_EXTERN #define bb_need_help #include "messages.c" diff --git a/procps/renice.c b/procps/renice.c index 9180ebf81..ec35bdcde 100644 --- a/procps/renice.c +++ b/procps/renice.c @@ -20,12 +20,12 @@ * */ -#include "busybox.h" #include #include #include #include #include +#include "busybox.h" extern int renice_main(int argc, char **argv) diff --git a/procps/uptime.c b/procps/uptime.c index 213a39851..64df194f4 100644 --- a/procps/uptime.c +++ b/procps/uptime.c @@ -28,11 +28,11 @@ */ -#include "busybox.h" #include #include #include #include +#include "busybox.h" static const int FSHIFT = 16; /* nr of bits of precision */ #define FIXED_1 (1< #include #include @@ -38,6 +37,7 @@ #include #include #include +#include "busybox.h" #define BB_DECLARE_EXTERN #define bb_need_help #include "messages.c" diff --git a/pwd.c b/pwd.c index a9acbc721..a7a5f78a1 100644 --- a/pwd.c +++ b/pwd.c @@ -21,12 +21,12 @@ * */ -#include "busybox.h" #include #include #include #include #include +#include "busybox.h" extern int pwd_main(int argc, char **argv) { diff --git a/rdate.c b/rdate.c index 38a7689e9..a3ea3a85b 100644 --- a/rdate.c +++ b/rdate.c @@ -21,9 +21,6 @@ * */ -#include "busybox.h" -#define BB_DECLARE_EXTERN -#include "messages.c" #include #include #include @@ -33,6 +30,9 @@ #include #include #include +#include "busybox.h" +#define BB_DECLARE_EXTERN +#include "messages.c" static const int RFC_868_BIAS = 2208988800UL; diff --git a/readlink.c b/readlink.c index c82f64027..74196e11d 100644 --- a/readlink.c +++ b/readlink.c @@ -22,10 +22,10 @@ * */ -#include "busybox.h" #include #include #include +#include "busybox.h" int readlink_main(int argc, char **argv) { diff --git a/renice.c b/renice.c index 9180ebf81..ec35bdcde 100644 --- a/renice.c +++ b/renice.c @@ -20,12 +20,12 @@ * */ -#include "busybox.h" #include #include #include #include #include +#include "busybox.h" extern int renice_main(int argc, char **argv) diff --git a/reset.c b/reset.c index 294cab3c4..755c4c335 100644 --- a/reset.c +++ b/reset.c @@ -23,9 +23,9 @@ * */ -#include "busybox.h" #include #include +#include "busybox.h" extern int reset_main(int argc, char **argv) { diff --git a/rm.c b/rm.c index 566076707..a84163272 100644 --- a/rm.c +++ b/rm.c @@ -22,7 +22,6 @@ * */ -#include "busybox.h" #include #include #include @@ -30,6 +29,7 @@ #include #include #include +#include "busybox.h" static int recursiveFlag = FALSE; static int forceFlag = FALSE; diff --git a/rmdir.c b/rmdir.c index 6266ce1ef..2c280376f 100644 --- a/rmdir.c +++ b/rmdir.c @@ -22,11 +22,11 @@ * */ -#include "busybox.h" #include #include #include #include +#include "busybox.h" extern int rmdir_main(int argc, char **argv) { diff --git a/rmmod.c b/rmmod.c index 7d4538e6e..aab326123 100644 --- a/rmmod.c +++ b/rmmod.c @@ -21,13 +21,13 @@ * */ -#include "busybox.h" #include #include #include #include #include #include +#include "busybox.h" #define __LIBRARY__ diff --git a/route.c b/route.c index d98d9a0b6..9be002792 100644 --- a/route.c +++ b/route.c @@ -15,14 +15,13 @@ * Foundation; either version 2 of the License, or (at * your option) any later version. * - * $Id: route.c,v 1.6 2001/02/18 20:12:25 andersen Exp $ + * $Id: route.c,v 1.7 2001/02/20 06:14:08 andersen Exp $ * * displayroute() code added by Vladimir N. Oleynik * busybox style adjustments by Larry Doolittle * displayroute() format now matches net-tools-1.57/lib/inet_gr.c line 173. */ -#include "busybox.h" #include #include #include @@ -38,6 +37,7 @@ #include #include #include +#include "busybox.h" #define _(x) x diff --git a/rpmunpack.c b/rpmunpack.c index 79971faf3..12e9c71de 100644 --- a/rpmunpack.c +++ b/rpmunpack.c @@ -13,11 +13,11 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. */ -#include "busybox.h" #include #include #include #include +#include "busybox.h" /* * Some general definitions diff --git a/setkeycodes.c b/setkeycodes.c index 0be4724ca..c3c7e09aa 100644 --- a/setkeycodes.c +++ b/setkeycodes.c @@ -22,11 +22,11 @@ * */ -#include "busybox.h" #include #include #include #include +#include "busybox.h" /* From */ diff --git a/shell/cmdedit.c b/shell/cmdedit.c index 97ba8316d..9cb53522f 100644 --- a/shell/cmdedit.c +++ b/shell/cmdedit.c @@ -32,6 +32,21 @@ //#define TEST +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef BB_FEATURE_SH_TAB_COMPLETION +#include +#include +#endif + #ifndef TEST @@ -62,21 +77,6 @@ #define BB_FEATURE_GETUSERNAME_AND_HOMEDIR #endif -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef BB_FEATURE_SH_TAB_COMPLETION -#include -#include -#endif - #ifdef BB_FEATURE_GETUSERNAME_AND_HOMEDIR #ifndef TEST #include "pwd_grp/pwd.h" diff --git a/sleep.c b/sleep.c index d21af19b3..3bcab88ee 100644 --- a/sleep.c +++ b/sleep.c @@ -21,10 +21,10 @@ * */ -#include "busybox.h" #include #include #include +#include "busybox.h" extern int sleep_main(int argc, char **argv) { diff --git a/sort.c b/sort.c index 4984f5dfe..ed6872218 100644 --- a/sort.c +++ b/sort.c @@ -21,9 +21,9 @@ * */ -#include "busybox.h" #include #include +#include "busybox.h" int compare_ascii(const void *x, const void *y) { diff --git a/stty.c b/stty.c index 4a5aecf1d..10e28254d 100644 --- a/stty.c +++ b/stty.c @@ -28,7 +28,6 @@ */ -#include "busybox.h" #include #include @@ -53,6 +52,7 @@ #include #include #include +#include "busybox.h" #define STREQ(a, b) (strcmp ((a), (b)) == 0) diff --git a/swaponoff.c b/swaponoff.c index 8dda0972a..0613fa1e9 100644 --- a/swaponoff.c +++ b/swaponoff.c @@ -22,7 +22,6 @@ * */ -#include "busybox.h" #include #include #include @@ -31,6 +30,7 @@ #include #include #include +#include "busybox.h" _syscall2(int, swapon, const char *, path, int, flags); _syscall1(int, swapoff, const char *, path); diff --git a/sync.c b/sync.c index 3d4686efa..ee22ae109 100644 --- a/sync.c +++ b/sync.c @@ -21,10 +21,10 @@ * */ -#include "busybox.h" #include #include #include +#include "busybox.h" extern int sync_main(int argc, char **argv) { diff --git a/sysklogd/logger.c b/sysklogd/logger.c index 352bde158..1218d8d2e 100644 --- a/sysklogd/logger.c +++ b/sysklogd/logger.c @@ -21,7 +21,6 @@ * */ -#include "busybox.h" #include #include #include @@ -30,6 +29,7 @@ #include #include +#include "busybox.h" #if !defined BB_SYSLOGD #define SYSLOG_NAMES @@ -40,6 +40,7 @@ * structures. Argh.... bad libc, bad, bad... */ #include + typedef struct _code { char *c_name; int c_val; diff --git a/sysklogd/syslogd.c b/sysklogd/syslogd.c index 872728b5b..8049fc5d1 100644 --- a/sysklogd/syslogd.c +++ b/sysklogd/syslogd.c @@ -23,7 +23,6 @@ * */ -#include "busybox.h" #include #include #include @@ -56,6 +55,7 @@ static inline _syscall3(int, klogctl, int, type, char *, b, int, len); #else # include #endif +#include "busybox.h" diff --git a/syslogd.c b/syslogd.c index 872728b5b..8049fc5d1 100644 --- a/syslogd.c +++ b/syslogd.c @@ -23,7 +23,6 @@ * */ -#include "busybox.h" #include #include #include @@ -56,6 +55,7 @@ static inline _syscall3(int, klogctl, int, type, char *, b, int, len); #else # include #endif +#include "busybox.h" diff --git a/tail.c b/tail.c index 778c2d18b..a85256c80 100644 --- a/tail.c +++ b/tail.c @@ -21,7 +21,6 @@ * */ -#include "busybox.h" #include #include @@ -29,6 +28,7 @@ #include #include #include +#include "busybox.h" static const struct suffix_mult tail_suffixes[] = { { "b", 512 }, diff --git a/tar.c b/tar.c index 62f1b1d35..a9363d5ad 100644 --- a/tar.c +++ b/tar.c @@ -36,11 +36,6 @@ */ -#include "busybox.h" -#define BB_DECLARE_EXTERN -#define bb_need_io_error -#define bb_need_name_longer_than_foo -#include "messages.c" #include #include #include @@ -55,6 +50,11 @@ #include #include #include +#include "busybox.h" +#define BB_DECLARE_EXTERN +#define bb_need_io_error +#define bb_need_name_longer_than_foo +#include "messages.c" #ifdef BB_FEATURE_TAR_GZIP extern int unzip(int in, int out); diff --git a/telnet.c b/telnet.c index ed92a8403..fd1ace41d 100644 --- a/telnet.c +++ b/telnet.c @@ -30,7 +30,6 @@ * */ -#include "busybox.h" #include #include #include @@ -43,6 +42,7 @@ #include #include #include +#include "busybox.h" #if 0 static const int DOTRACE = 1; diff --git a/test.c b/test.c index 6439e3a8a..ab9c23e4b 100644 --- a/test.c +++ b/test.c @@ -31,13 +31,13 @@ * "This program is in the Public Domain." */ -#include "busybox.h" #include #include #include #include #include #include +#include "busybox.h" #define BB_DECLARE_EXTERN #define bb_need_help #include "messages.c" diff --git a/touch.c b/touch.c index a3256d559..1718da71e 100644 --- a/touch.c +++ b/touch.c @@ -22,7 +22,6 @@ * */ -#include "busybox.h" #include #include #include @@ -30,6 +29,7 @@ #include #include #include +#include "busybox.h" extern int touch_main(int argc, char **argv) { diff --git a/tr.c b/tr.c index 92f399e14..b7a6009c8 100644 --- a/tr.c +++ b/tr.c @@ -24,12 +24,12 @@ * Original copyright notice is retained at the end of this file. */ -#include "busybox.h" #include #include #include #include #include +#include "busybox.h" #define BB_DECLARE_EXTERN #define bb_need_write_error #include "messages.c" diff --git a/true_false.c b/true_false.c index 187f68072..47d3bb1e4 100644 --- a/true_false.c +++ b/true_false.c @@ -22,8 +22,8 @@ * */ -#include "busybox.h" #include +#include "busybox.h" extern int true_main(int argc, char **argv) diff --git a/tty.c b/tty.c index d71d8dedb..4510c2996 100644 --- a/tty.c +++ b/tty.c @@ -20,11 +20,11 @@ * */ -#include "busybox.h" #include #include #include #include +#include "busybox.h" extern int tty_main(int argc, char **argv) { diff --git a/umount.c b/umount.c index c160ec284..2868a1bc3 100644 --- a/umount.c +++ b/umount.c @@ -22,12 +22,12 @@ * */ -#include "busybox.h" #include #include #include #include #include +#include "busybox.h" static const int MNT_FORCE = 1; diff --git a/uname.c b/uname.c index 899da7792..4931ff1d8 100644 --- a/uname.c +++ b/uname.c @@ -31,7 +31,6 @@ /* Busyboxed by Erik Andersen */ -#include "busybox.h" #include #include #include @@ -40,6 +39,7 @@ #if defined (HAVE_SYSINFO) && defined (HAVE_SYS_SYSTEMINFO_H) # include #endif +#include "busybox.h" static void print_element(unsigned int mask, char *element); diff --git a/uniq.c b/uniq.c index 84f1ed231..53e3c64f2 100644 --- a/uniq.c +++ b/uniq.c @@ -23,12 +23,12 @@ * */ -#include "busybox.h" #include #include #include #include #include +#include "busybox.h" static int print_count; static int print_uniq = 1; diff --git a/update.c b/update.c index 2cf4a98b2..b282b9e18 100644 --- a/update.c +++ b/update.c @@ -28,7 +28,6 @@ * earlier) kernel. 2.2.x and higher flush filesystem buffers automatically. */ -#include "busybox.h" #include #include #include /* for getopt() */ @@ -42,6 +41,7 @@ #include static _syscall2(int, bdflush, int, func, int, data); #endif /* __GLIBC__ */ +#include "busybox.h" static unsigned int sync_duration = 30; static unsigned int flush_duration = 5; diff --git a/uptime.c b/uptime.c index 213a39851..64df194f4 100644 --- a/uptime.c +++ b/uptime.c @@ -28,11 +28,11 @@ */ -#include "busybox.h" #include #include #include #include +#include "busybox.h" static const int FSHIFT = 16; /* nr of bits of precision */ #define FIXED_1 (1< #include +#include "busybox.h" extern int usleep_main(int argc, char **argv) { diff --git a/util-linux/dmesg.c b/util-linux/dmesg.c index 47f9f4474..2c85ed3e9 100644 --- a/util-linux/dmesg.c +++ b/util-linux/dmesg.c @@ -15,7 +15,6 @@ * Support, replaced getopt, added some gotos for redundant stuff. */ -#include "busybox.h" #include #include #include @@ -33,6 +32,7 @@ static inline _syscall3(int, klogctl, int, type, char *, b, int, len); #else # include #endif +#include "busybox.h" int dmesg_main(int argc, char **argv) { diff --git a/util-linux/fbset.c b/util-linux/fbset.c index 9acabbecb..72284a6c5 100644 --- a/util-linux/fbset.c +++ b/util-linux/fbset.c @@ -24,7 +24,6 @@ * Geert Uytterhoeven (Geert.Uytterhoeven@cs.kuleuven.ac.be) */ -#include "busybox.h" #include #include #include @@ -33,6 +32,7 @@ #include #include #include +#include "busybox.h" #define DEFAULTFBDEV "/dev/fb0" #define DEFAULTFBMODE "/etc/fb.modes" diff --git a/util-linux/fdflush.c b/util-linux/fdflush.c index f10cceae0..28f5cb68a 100644 --- a/util-linux/fdflush.c +++ b/util-linux/fdflush.c @@ -21,11 +21,11 @@ * */ -#include "busybox.h" #include #include #include #include +#include "busybox.h" /* From */ #define FDFLUSH _IO(2,0x4b) diff --git a/util-linux/fsck_minix.c b/util-linux/fsck_minix.c index 2b4c65144..9a53a705e 100644 --- a/util-linux/fsck_minix.c +++ b/util-linux/fsck_minix.c @@ -86,7 +86,6 @@ * enforced (but it's not much fun on a character device :-). */ -#include "busybox.h" #include #include #include @@ -97,6 +96,7 @@ #include #include #include +#include "busybox.h" typedef unsigned char u8; diff --git a/util-linux/mkfs_minix.c b/util-linux/mkfs_minix.c index 6b4a3e2d1..b666338dc 100644 --- a/util-linux/mkfs_minix.c +++ b/util-linux/mkfs_minix.c @@ -62,7 +62,6 @@ * removed getopt based parser and added a hand rolled one. */ -#include "busybox.h" #include #include #include @@ -75,6 +74,7 @@ #include #include #include +#include "busybox.h" typedef unsigned char u8; diff --git a/util-linux/mkswap.c b/util-linux/mkswap.c index 48637e889..b5153f623 100644 --- a/util-linux/mkswap.c +++ b/util-linux/mkswap.c @@ -35,7 +35,6 @@ * */ -#include "busybox.h" #include #include #include @@ -45,6 +44,7 @@ #include #include /* for PAGE_SIZE and PAGE_SHIFT */ /* we also get PAGE_SIZE via getpagesize() */ +#include "busybox.h" #ifndef _IO /* pre-1.3.45 */ diff --git a/util-linux/more.c b/util-linux/more.c index c4c74fe4a..298e1cfb1 100644 --- a/util-linux/more.c +++ b/util-linux/more.c @@ -25,12 +25,12 @@ * */ -#include "busybox.h" #include #include #include #include #include +#include "busybox.h" #define BB_DECLARE_EXTERN #define bb_need_help #include "messages.c" diff --git a/util-linux/mount.c b/util-linux/mount.c index 2f5bba59d..7b0bf3e21 100644 --- a/util-linux/mount.c +++ b/util-linux/mount.c @@ -43,7 +43,6 @@ * */ -#include "busybox.h" #include #include #include @@ -54,6 +53,7 @@ #if defined BB_FEATURE_USE_DEVPS_PATCH #include /* For Erik's nifty devmtab device driver */ #endif +#include "busybox.h" enum { MS_MGC_VAL = 0xc0ed0000, /* Magic number indicatng "new" flags */ diff --git a/util-linux/nfsmount.c b/util-linux/nfsmount.c index ae44f3207..aee496980 100644 --- a/util-linux/nfsmount.c +++ b/util-linux/nfsmount.c @@ -33,25 +33,25 @@ * nfsmount.c,v 1.1.1.1 1993/11/18 08:40:51 jrs Exp */ -#include "busybox.h" -#undef FALSE -#undef TRUE #include #include #include #include #include -#include -#include -#include #include #include #include #include #include - -#include "nfsmount.h" +#include +#include "busybox.h" +#undef TRUE +#undef FALSE +#include +#include +#include #include /* For the kernels nfs stuff */ +#include "nfsmount.h" #ifndef NFS_FHSIZE static const int NFS_FHSIZE = 32; diff --git a/util-linux/pivot_root.c b/util-linux/pivot_root.c index e00710148..d7b80d749 100644 --- a/util-linux/pivot_root.c +++ b/util-linux/pivot_root.c @@ -4,11 +4,11 @@ * * busyboxed by Evin Robertson */ -#include "busybox.h" #include #include #include #include +#include "busybox.h" #ifndef __NR_pivot_root #error Sorry, but this kernel does not support the pivot_root syscall diff --git a/util-linux/rdate.c b/util-linux/rdate.c index 38a7689e9..a3ea3a85b 100644 --- a/util-linux/rdate.c +++ b/util-linux/rdate.c @@ -21,9 +21,6 @@ * */ -#include "busybox.h" -#define BB_DECLARE_EXTERN -#include "messages.c" #include #include #include @@ -33,6 +30,9 @@ #include #include #include +#include "busybox.h" +#define BB_DECLARE_EXTERN +#include "messages.c" static const int RFC_868_BIAS = 2208988800UL; diff --git a/util-linux/swaponoff.c b/util-linux/swaponoff.c index 8dda0972a..0613fa1e9 100644 --- a/util-linux/swaponoff.c +++ b/util-linux/swaponoff.c @@ -22,7 +22,6 @@ * */ -#include "busybox.h" #include #include #include @@ -31,6 +30,7 @@ #include #include #include +#include "busybox.h" _syscall2(int, swapon, const char *, path, int, flags); _syscall1(int, swapoff, const char *, path); diff --git a/util-linux/umount.c b/util-linux/umount.c index c160ec284..2868a1bc3 100644 --- a/util-linux/umount.c +++ b/util-linux/umount.c @@ -22,12 +22,12 @@ * */ -#include "busybox.h" #include #include #include #include #include +#include "busybox.h" static const int MNT_FORCE = 1; diff --git a/utility.c b/utility.c index 65496b9f7..cf0aecc80 100644 --- a/utility.c +++ b/utility.c @@ -25,6 +25,20 @@ * */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include /* for uname(2) */ + #include "busybox.h" #if defined (BB_CHMOD_CHOWN_CHGRP) \ || defined (BB_CP_MV) \ @@ -42,20 +56,6 @@ #include "messages.c" #include "usage.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include /* for uname(2) */ - #include "pwd_grp/pwd.h" #include "pwd_grp/grp.h" diff --git a/uudecode.c b/uudecode.c index c0e8cea8c..6a3f78a42 100644 --- a/uudecode.c +++ b/uudecode.c @@ -22,13 +22,13 @@ */ -#include "busybox.h" #include #include #include #include #include +#include "busybox.h" #include "pwd_grp/pwd.h" #include "pwd_grp/grp.h" diff --git a/uuencode.c b/uuencode.c index 8d5af4a8a..41541defb 100644 --- a/uuencode.c +++ b/uuencode.c @@ -22,12 +22,12 @@ /* Hacked to work with BusyBox by Alfred M. Szmidt */ -#include "busybox.h" #include #include #include #include +#include "busybox.h" #define RW (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH) diff --git a/watchdog.c b/watchdog.c index 65d0fc35f..5b5fd6953 100644 --- a/watchdog.c +++ b/watchdog.c @@ -20,11 +20,11 @@ * */ -#include "busybox.h" #include #include #include #include +#include "busybox.h" extern int watchdog_main(int argc, char **argv) { diff --git a/wc.c b/wc.c index f41687422..f2d33d6f3 100644 --- a/wc.c +++ b/wc.c @@ -20,10 +20,10 @@ * */ -#include "busybox.h" #include #include #include +#include "busybox.h" static int total_lines, total_words, total_chars, max_length; static int print_lines, print_words, print_chars, print_length; diff --git a/wget.c b/wget.c index d1aacefa6..4b8392ba5 100644 --- a/wget.c +++ b/wget.c @@ -14,7 +14,6 @@ * */ -#include "busybox.h" #include #include #include @@ -33,6 +32,8 @@ #include #include +#include "busybox.h" + /* Stupid libc5 doesn't define this... */ #ifndef timersub #define timersub(a, b, result) \ @@ -533,7 +534,7 @@ progressmeter(int flag) * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: wget.c,v 1.27 2001/02/14 21:23:06 andersen Exp $ + * $Id: wget.c,v 1.28 2001/02/20 06:14:08 andersen Exp $ */ diff --git a/which.c b/which.c index 1908db30a..f9d51f2f3 100644 --- a/which.c +++ b/which.c @@ -21,10 +21,10 @@ * */ -#include "busybox.h" #include #include #include +#include "busybox.h" extern int which_main(int argc, char **argv) { diff --git a/whoami.c b/whoami.c index 54df0bf12..0bbb54b7b 100644 --- a/whoami.c +++ b/whoami.c @@ -20,10 +20,10 @@ * */ -#include "busybox.h" #include #include #include +#include "busybox.h" extern int whoami_main(int argc, char **argv) { diff --git a/xargs.c b/xargs.c index f05efd917..01aa5be69 100644 --- a/xargs.c +++ b/xargs.c @@ -21,10 +21,10 @@ * */ -#include "busybox.h" #include #include #include +#include "busybox.h" int xargs_main(int argc, char **argv) { diff --git a/yes.c b/yes.c index 0a8ad83a7..ad7b98f84 100644 --- a/yes.c +++ b/yes.c @@ -20,9 +20,9 @@ * */ -#include "busybox.h" #include #include +#include "busybox.h" extern int yes_main(int argc, char **argv) { -- 2.25.1