OSDN Git Service

It turns out that DODMALLOC was broken when I reorganized busybox.h
authorEric Andersen <andersen@codepoet.org>
Tue, 20 Feb 2001 06:14:08 +0000 (06:14 -0000)
committerEric Andersen <andersen@codepoet.org>
Tue, 20 Feb 2001 06:14:08 +0000 (06:14 -0000)
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

204 files changed:
applets/busybox.c
archival/gunzip.c
archival/gzip.c
archival/tar.c
basename.c
busybox.c
cat.c
chmod_chown_chgrp.c
chroot.c
chvt.c
clear.c
cmdedit.c
cmp.c
console-tools/chvt.c
console-tools/clear.c
console-tools/deallocvt.c
console-tools/dumpkmap.c
console-tools/loadacm.c
console-tools/loadfont.c
console-tools/loadkmap.c
console-tools/reset.c
console-tools/setkeycodes.c
coreutils/basename.c
coreutils/cat.c
coreutils/chroot.c
coreutils/cmp.c
coreutils/date.c
coreutils/dd.c
coreutils/df.c
coreutils/dirname.c
coreutils/dos2unix.c
coreutils/du.c
coreutils/echo.c
coreutils/expr.c
coreutils/head.c
coreutils/hostid.c
coreutils/length.c
coreutils/ln.c
coreutils/logname.c
coreutils/ls.c
coreutils/md5sum.c
coreutils/mkdir.c
coreutils/mkfifo.c
coreutils/mknod.c
coreutils/printf.c
coreutils/pwd.c
coreutils/rm.c
coreutils/rmdir.c
coreutils/sleep.c
coreutils/sort.c
coreutils/stty.c
coreutils/sync.c
coreutils/tail.c
coreutils/test.c
coreutils/touch.c
coreutils/tr.c
coreutils/tty.c
coreutils/uname.c
coreutils/uniq.c
coreutils/usleep.c
coreutils/uudecode.c
coreutils/uuencode.c
coreutils/wc.c
coreutils/whoami.c
coreutils/yes.c
cp_mv.c
date.c
dc.c
dd.c
deallocvt.c
df.c
dirname.c
dmesg.c
dos2unix.c
du.c
dumpkmap.c
dutmp.c
echo.c
expr.c
fbset.c
fdflush.c
find.c
findutils/find.c
findutils/which.c
findutils/xargs.c
free.c
fsck_minix.c
gunzip.c
gzip.c
head.c
hostid.c
ifconfig.c
init.c
init/init.c
insmod.c
kill.c
length.c
ln.c
loadacm.c
loadfont.c
loadkmap.c
logger.c
logname.c
ls.c
lsmod.c
makedevs.c
md5sum.c
miscutils/dc.c
miscutils/dutmp.c
miscutils/makedevs.c
miscutils/mktemp.c
miscutils/mt.c
miscutils/readlink.c
miscutils/update.c
miscutils/watchdog.c
mkdir.c
mkfifo.c
mkfs_minix.c
mknod.c
mkswap.c
mktemp.c
modutils/insmod.c
modutils/lsmod.c
modutils/rmmod.c
more.c
mount.c
mt.c
mtab.c
nc.c
networking/ifconfig.c
networking/nc.c
networking/nslookup.c
networking/ping.c
networking/route.c
networking/telnet.c
networking/wget.c
nfsmount.c
nslookup.c
ping.c
pivot_root.c
printf.c
procps/free.c
procps/kill.c
procps/ps.c
procps/renice.c
procps/uptime.c
ps.c
pwd.c
rdate.c
readlink.c
renice.c
reset.c
rm.c
rmdir.c
rmmod.c
route.c
rpmunpack.c
setkeycodes.c
shell/cmdedit.c
sleep.c
sort.c
stty.c
swaponoff.c
sync.c
sysklogd/logger.c
sysklogd/syslogd.c
syslogd.c
tail.c
tar.c
telnet.c
test.c
touch.c
tr.c
true_false.c
tty.c
umount.c
uname.c
uniq.c
update.c
uptime.c
usleep.c
util-linux/dmesg.c
util-linux/fbset.c
util-linux/fdflush.c
util-linux/fsck_minix.c
util-linux/mkfs_minix.c
util-linux/mkswap.c
util-linux/more.c
util-linux/mount.c
util-linux/nfsmount.c
util-linux/pivot_root.c
util-linux/rdate.c
util-linux/swaponoff.c
util-linux/umount.c
utility.c
uudecode.c
uuencode.c
watchdog.c
wc.c
wget.c
which.c
whoami.c
xargs.c
yes.c

index 6c1070f..5fec3d5 100644 (file)
@@ -1,10 +1,10 @@
 /* vi: set sw=4 ts=4: */
-#include "busybox.h"
 #include <stdio.h>
 #include <string.h>
 #include <unistd.h>
 #include <errno.h>
 #include <stdlib.h>
+#include "busybox.h"
 
 #undef APPLET
 #undef APPLET_NOUSAGE
index bf8812d..8100003 100644 (file)
@@ -57,7 +57,6 @@ static char *license_msg[] = {
 };
 #endif
 
-#include "busybox.h"
 #include <getopt.h>
 #include <ctype.h>
 #include <sys/types.h>
@@ -71,6 +70,7 @@ static char *license_msg[] = {
 #include <stdlib.h>
 #include <time.h>
 #include <dirent.h>
+#include "busybox.h"
 #define BB_DECLARE_EXTERN
 #define bb_need_memory_exhausted
 #define bb_need_name_too_long
index 3cbef4e..6c058d2 100644 (file)
  *
  */
 
-#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.*/
 /* I don't like nested includes, but the string and io functions are used
  * too often
  */
+#include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
 #include <unistd.h>
+#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 <unistd.h>
 #endif
 
-#if defined(STDC_HEADERS) || !defined(NO_STDLIB_H)
-#  include <stdlib.h>
-#else
-extern int errno;
-#endif
-
 #if defined(DIRENT)
 #  include <dirent.h>
 typedef struct dirent dir_type;
@@ -3098,12 +3093,6 @@ local void set_file_type()
 #  include <fcntl.h>
 #endif
 
-#if defined(STDC_HEADERS) || !defined(NO_STDLIB_H)
-#  include <stdlib.h>
-#else
-extern int errno;
-#endif
-
 /* ===========================================================================
  * Copy input to output unchanged: zcat == cat with --force.
  * IN assertion: insize bytes have already been read in inbuf.
index 62f1b1d..a9363d5 100644 (file)
  */
 
 
-#include "busybox.h"
-#define BB_DECLARE_EXTERN
-#define bb_need_io_error
-#define bb_need_name_longer_than_foo
-#include "messages.c"
 #include <stdio.h>
 #include <dirent.h>
 #include <errno.h>
 #include <string.h>
 #include <stdlib.h>
 #include <unistd.h>
+#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);
index da59a86..da0b7ec 100644 (file)
@@ -21,8 +21,8 @@
  *
  */
 
-#include "busybox.h"
 #include <stdlib.h>
+#include "busybox.h"
 #include <string.h>
 
 extern int basename_main(int argc, char **argv)
index 6c1070f..5fec3d5 100644 (file)
--- a/busybox.c
+++ b/busybox.c
@@ -1,10 +1,10 @@
 /* vi: set sw=4 ts=4: */
-#include "busybox.h"
 #include <stdio.h>
 #include <string.h>
 #include <unistd.h>
 #include <errno.h>
 #include <stdlib.h>
+#include "busybox.h"
 
 #undef APPLET
 #undef APPLET_NOUSAGE
diff --git a/cat.c b/cat.c
index 134245c..3554008 100644 (file)
--- a/cat.c
+++ b/cat.c
@@ -21,8 +21,8 @@
  *
  */
 
-#include "busybox.h"
 #include <stdlib.h>
+#include "busybox.h"
 
 extern int cat_main(int argc, char **argv)
 {
index 9363bd7..a458cf7 100644 (file)
  *
  */
 
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
 #include "busybox.h"
 #define BB_DECLARE_EXTERN
 #define bb_need_invalid_option
 #define bb_need_too_few_args
 #include "messages.c"
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
 
 
 static long uid = -1;
index e721e1f..bae9cd7 100644 (file)
--- a/chroot.c
+++ b/chroot.c
  *
  */
 
-#include "busybox.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <unistd.h>
 #include <errno.h>
+#include "busybox.h"
 
 int chroot_main(int argc, char **argv)
 {
diff --git a/chvt.c b/chvt.c
index f2e6d5f..c4b3639 100644 (file)
--- a/chvt.c
+++ b/chvt.c
@@ -4,12 +4,12 @@
  *
  * busyboxed by Erik Andersen
  */
-#include "busybox.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <fcntl.h>
 #include <sys/types.h>
 #include <sys/ioctl.h>
+#include "busybox.h"
 
 /* From <linux/vt.h> */
 static const int VT_ACTIVATE = 0x5606;  /* make vt active */
diff --git a/clear.c b/clear.c
index dab4b05..503bafa 100644 (file)
--- a/clear.c
+++ b/clear.c
@@ -22,9 +22,9 @@
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <stdlib.h>
+#include "busybox.h"
 
 
 extern int clear_main(int argc, char **argv)
index 97ba831..9cb5352 100644 (file)
--- a/cmdedit.c
+++ b/cmdedit.c
 
 //#define TEST
 
+#include <stdio.h>
+#include <errno.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/ioctl.h>
+#include <ctype.h>
+#include <signal.h>
+#include <limits.h>
+
+#ifdef BB_FEATURE_SH_TAB_COMPLETION
+#include <dirent.h>
+#include <sys/stat.h>
+#endif
+
 
 #ifndef TEST
 
 #define BB_FEATURE_GETUSERNAME_AND_HOMEDIR
 #endif
 
-#include <stdio.h>
-#include <errno.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/ioctl.h>
-#include <ctype.h>
-#include <signal.h>
-#include <limits.h>
-
-#ifdef BB_FEATURE_SH_TAB_COMPLETION
-#include <dirent.h>
-#include <sys/stat.h>
-#endif
-
 #ifdef BB_FEATURE_GETUSERNAME_AND_HOMEDIR
 #ifndef TEST
 #include "pwd_grp/pwd.h"
diff --git a/cmp.c b/cmp.c
index c04b6e1..24b6c3f 100644 (file)
--- a/cmp.c
+++ b/cmp.c
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <string.h>
 #include <errno.h>
 #include <stdlib.h>
+#include "busybox.h"
 
 int cmp_main(int argc, char **argv)
 {
index f2e6d5f..c4b3639 100644 (file)
@@ -4,12 +4,12 @@
  *
  * busyboxed by Erik Andersen
  */
-#include "busybox.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <fcntl.h>
 #include <sys/types.h>
 #include <sys/ioctl.h>
+#include "busybox.h"
 
 /* From <linux/vt.h> */
 static const int VT_ACTIVATE = 0x5606;  /* make vt active */
index dab4b05..503bafa 100644 (file)
@@ -22,9 +22,9 @@
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <stdlib.h>
+#include "busybox.h"
 
 
 extern int clear_main(int argc, char **argv)
index 8c390c2..15cd0c9 100644 (file)
@@ -3,12 +3,12 @@
  * disalloc.c - aeb - 940501 - Disallocate virtual terminal(s)
  * Renamed deallocvt.
  */
-#include "busybox.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <fcntl.h>
 #include <sys/types.h>
 #include <sys/ioctl.h>
+#include "busybox.h"
 
 /* From <linux/vt.h> */
 static const int VT_DISALLOCATE = 0x5608;  /* free memory associated to vt */
index b9f1bd2..0da0186 100644 (file)
@@ -20,7 +20,6 @@
  *
  */
 
-#include "busybox.h"
 #include <errno.h>
 #include <fcntl.h>
 #include <stdio.h>
@@ -28,6 +27,7 @@
 #include <string.h>
 #include <stdlib.h>
 #include <sys/ioctl.h>
+#include "busybox.h"
 
 /* From <linux/kd.h> */
 struct kbentry {
index 6422137..81b973b 100644 (file)
@@ -7,7 +7,6 @@
  * Peter Novodvorsky <petya@logic.ru>
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <memory.h>
 #include <assert.h>
 #include <errno.h>
 #include <signal.h>
+#include <sys/kd.h>
 #include <sys/types.h>
 #include <sys/ioctl.h>
-#include <sys/kd.h>
+#include "busybox.h"
 
 typedef unsigned short unicode;
 
index d7bd7e8..1a724ca 100644 (file)
@@ -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 <stdio.h>
 #include <string.h>
 #include <fcntl.h>
@@ -20,6 +19,7 @@
 #include <sys/ioctl.h>
 #include <sys/kd.h>
 #include <endian.h>
+#include "busybox.h"
 
 static const int PSF_MAGIC1 = 0x36;
 static const int PSF_MAGIC2 = 0x04;
index 5ecd819..dcb5c1c 100644 (file)
@@ -20,7 +20,6 @@
  *
  */
 
-#include "busybox.h"
 #include <errno.h>
 #include <fcntl.h>
 #include <stdio.h>
@@ -28,6 +27,7 @@
 #include <stdlib.h>
 #include <unistd.h>
 #include <sys/ioctl.h>
+#include "busybox.h"
 
 #define BINARY_KEYMAP_MAGIC "bkeymap"
 
index 294cab3..755c4c3 100644 (file)
@@ -23,9 +23,9 @@
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <stdlib.h>
+#include "busybox.h"
 
 extern int reset_main(int argc, char **argv)
 {
index 0be4724..c3c7e09 100644 (file)
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <fcntl.h>
 #include <sys/ioctl.h>
+#include "busybox.h"
 
 
 /* From <linux/kd.h> */
index da59a86..da0b7ec 100644 (file)
@@ -21,8 +21,8 @@
  *
  */
 
-#include "busybox.h"
 #include <stdlib.h>
+#include "busybox.h"
 #include <string.h>
 
 extern int basename_main(int argc, char **argv)
index 134245c..3554008 100644 (file)
@@ -21,8 +21,8 @@
  *
  */
 
-#include "busybox.h"
 #include <stdlib.h>
+#include "busybox.h"
 
 extern int cat_main(int argc, char **argv)
 {
index e721e1f..bae9cd7 100644 (file)
  *
  */
 
-#include "busybox.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <unistd.h>
 #include <errno.h>
+#include "busybox.h"
 
 int chroot_main(int argc, char **argv)
 {
index c04b6e1..24b6c3f 100644 (file)
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <string.h>
 #include <errno.h>
 #include <stdlib.h>
+#include "busybox.h"
 
 int cmp_main(int argc, char **argv)
 {
index 21d31bb..878331f 100644 (file)
  *
 */
 
-#include "busybox.h"
-#define BB_DECLARE_EXTERN
-#define bb_need_invalid_date
-#define bb_need_memory_exhausted
-#include "messages.c"
 #include <stdlib.h>
 #include <errno.h>
 #include <sys/time.h>
 #include <stdio.h>
 #include <string.h>
 #include <getopt.h>
+#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, 
index e445e04..1618dd1 100644 (file)
  *
  */
 
-#include "busybox.h"
-
 #include <sys/types.h>
 #include <stdlib.h>
 #include <stdio.h>
 #include <unistd.h>
 #include <string.h>
 #include <fcntl.h>
+#include "busybox.h"
+
 
 static const struct suffix_mult dd_suffixes[] = {
        { "c", 1 },
index 692205a..ebee4d6 100644 (file)
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <mntent.h>
 #include <sys/vfs.h>
 #include <getopt.h>
+#include "busybox.h"
 
 extern const char mtab_file[]; /* Defined in utility.c */
 #ifdef BB_FEATURE_HUMAN_READABLE
index e34ecf8..7f191c1 100644 (file)
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  *
  */
-#include "busybox.h"
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include "busybox.h"
 
 extern int dirname_main(int argc, char **argv)
 {
index 3242361..222c8f6 100644 (file)
@@ -22,9 +22,9 @@
   ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <stdlib.h>
+#include "busybox.h"
 
 int dos2unix_main( int argc, char **argv ) {
        int c;
index 516f4c9..6197b0b 100644 (file)
  *
  */
 
-#include "busybox.h"
-#define BB_DECLARE_EXTERN
-#define bb_need_name_too_long
-#include "messages.c"
-
 #include <sys/types.h>
 #include <fcntl.h>
 #include <dirent.h>
 #include <stdlib.h>
 #include <getopt.h>
 #include <errno.h>
+#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"
index b3e01af..e9bc50a 100644 (file)
  * Original copyright notice is retained at the end of this file.
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
+#include "busybox.h"
 
 extern int 
 echo_main(int argc, char** argv)
index 8ef5293..3b454bd 100644 (file)
  * One function can handle multiple operators all of equal precedence,
  * provided they all associate ((x op x) op x). */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
 #include <regex.h>
 #include <sys/types.h>
+#include "busybox.h"
 
 
 /* The kinds of value we can have.  */
index a2d7744..c683ec7 100644 (file)
  *
  */
 
-#include "busybox.h"
 #include <errno.h>
 #include <stdio.h>
 #include <getopt.h>
 #include <stdlib.h>
+#include "busybox.h"
 
 int head(int len, FILE *fp)
 {
index eed1a50..68a2cc6 100644 (file)
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
+#include "busybox.h"
 
 extern int hostid_main(int argc, char **argv)
 {
index 9119adc..73becd2 100644 (file)
@@ -1,8 +1,8 @@
 /* vi: set sw=4 ts=4: */
-#include "busybox.h"
 #include <stdlib.h>
 #include <string.h>
 #include <stdio.h>
+#include "busybox.h"
 
 extern int length_main(int argc, char **argv)
 {
index e35bf7a..6d41cce 100644 (file)
  *
  */
 
-#include "busybox.h"
-#define BB_DECLARE_EXTERN
-#define bb_need_not_a_directory
-#include "messages.c"
-
 #include <stdio.h>
 #include <dirent.h>
 #include <string.h>
 #include <stdlib.h>
 #include <errno.h>
 #include <unistd.h>
+#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;
index a1887aa..0924b24 100644 (file)
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
+#include "busybox.h"
 
 extern int logname_main(int argc, char **argv)
 {
index dd38dd5..a619bb8 100644 (file)
@@ -50,7 +50,6 @@ enum {
 
 /************************************************************************/
 
-#include "busybox.h"
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <stdio.h>
@@ -67,6 +66,7 @@ enum {
 #include <fcntl.h>
 #include <signal.h>
 #include <sys/ioctl.h>
+#include "busybox.h"
 
 #ifndef MAJOR
 #define MAJOR(dev) (((dev)>>8)&0xff)
index 3decafd..fa11ee6 100644 (file)
 /* Written by Ulrich Drepper <drepper@gnu.ai.mit.edu> */
 /* Hacked to work with BusyBox by Alfred M. Szmidt <ams@trillian.itslinux.org> */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <errno.h>
 #include <ctype.h>
 #include <getopt.h>
+#include "busybox.h"
 
 /* For some silly reason, this file uses backwards TRUE and FALSE conventions */
 #undef TRUE
index 285d34f..902da7c 100644 (file)
  *
  */
 
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <stdlib.h>
 #include "busybox.h"
 #define bb_need_name_too_long
 #define BB_DECLARE_EXTERN
 #include "messages.c"
 
-#include <stdio.h>
-#include <errno.h>
-#include <string.h>
-#include <stdlib.h>
 
 static int parentFlag = FALSE;
 static mode_t mode = 0777;
index 56a04f7..ca217fa 100644 (file)
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <sys/types.h>
 #include <errno.h>
 #include <stdlib.h>
+#include "busybox.h"
 
 extern int mkfifo_main(int argc, char **argv)
 {
index 73f6e06..b4d4b82 100644 (file)
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <errno.h>
-#include <sys/types.h>
 #include <fcntl.h>
 #include <unistd.h>
 #include <string.h>
 #include <stdlib.h>
+#include <sys/types.h>
+#include "busybox.h"
 
 int mknod_main(int argc, char **argv)
 {
index 26a200e..003423d 100644 (file)
@@ -47,7 +47,6 @@
 
 //   19990508 Busy Boxed! Dave Cinege
 
-#include "busybox.h"
 #include <unistd.h>
 #include <stdio.h>
 #include <sys/types.h>
@@ -56,6 +55,7 @@
 #include <stdlib.h>
 #include <fcntl.h>
 #include <ctype.h>
+#include "busybox.h"
 
 
 #ifndef S_IFMT
index a9acbc7..a7a5f78 100644 (file)
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <dirent.h>
 #include <errno.h>
 #include <unistd.h>
 #include <stdlib.h>
+#include "busybox.h"
 
 extern int pwd_main(int argc, char **argv)
 {
index 5660767..a841632 100644 (file)
@@ -22,7 +22,6 @@
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <time.h>
 #include <utime.h>
@@ -30,6 +29,7 @@
 #include <errno.h>
 #include <unistd.h>
 #include <stdlib.h>
+#include "busybox.h"
 
 static int recursiveFlag = FALSE;
 static int forceFlag = FALSE;
index 6266ce1..2c28037 100644 (file)
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <errno.h>
 #include <unistd.h>
 #include <stdlib.h>
+#include "busybox.h"
 
 extern int rmdir_main(int argc, char **argv)
 {
index d21af19..3bcab88 100644 (file)
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <unistd.h>
 #include <stdlib.h>
+#include "busybox.h"
 
 extern int sleep_main(int argc, char **argv)
 {
index 4984f5d..ed68722 100644 (file)
@@ -21,9 +21,9 @@
  *
  */
 
-#include "busybox.h"
 #include <getopt.h>
 #include <stdlib.h>
+#include "busybox.h"
 
 int compare_ascii(const void *x, const void *y)
 {
index 4a5aecf..10e2825 100644 (file)
@@ -28,7 +28,6 @@
 
    */
 
-#include "busybox.h"
 
 #include <termios.h>
 #include <sys/ioctl.h>
@@ -53,6 +52,7 @@
 #include <limits.h>
 #include <memory.h>
 #include <fcntl.h>
+#include "busybox.h"
 
 #define STREQ(a, b) (strcmp ((a), (b)) == 0)
 
index 3d4686e..ee22ae1 100644 (file)
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
+#include "busybox.h"
 
 extern int sync_main(int argc, char **argv)
 {
index 778c2d1..a85256c 100644 (file)
@@ -21,7 +21,6 @@
  *
  */
 
-#include "busybox.h"
 
 #include <fcntl.h>
 #include <getopt.h>
@@ -29,6 +28,7 @@
 #include <stdlib.h>
 #include <unistd.h>
 #include <sys/types.h>
+#include "busybox.h"
 
 static const struct suffix_mult tail_suffixes[] = {
        { "b", 512 },
index 6439e3a..ab9c23e 100644 (file)
  *     "This program is in the Public Domain."
  */
 
-#include "busybox.h"
 #include <sys/types.h>
 #include <unistd.h>
 #include <ctype.h>
 #include <errno.h>
 #include <stdlib.h>
 #include <string.h>
+#include "busybox.h"
 #define BB_DECLARE_EXTERN
 #define bb_need_help
 #include "messages.c"
index a3256d5..1718da7 100644 (file)
@@ -22,7 +22,6 @@
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <sys/types.h>
 #include <fcntl.h>
@@ -30,6 +29,7 @@
 #include <errno.h>
 #include <unistd.h>
 #include <stdlib.h>
+#include "busybox.h"
 
 extern int touch_main(int argc, char **argv)
 {
index 92f399e..b7a6009 100644 (file)
  * Original copyright notice is retained at the end of this file.
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
 #include <unistd.h>
 #include <sys/types.h>
+#include "busybox.h"
 #define BB_DECLARE_EXTERN
 #define bb_need_write_error
 #include "messages.c"
index d71d8de..4510c29 100644 (file)
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
 #include <sys/types.h>
+#include "busybox.h"
 
 extern int tty_main(int argc, char **argv)
 {
index 899da77..4931ff1 100644 (file)
@@ -31,7 +31,6 @@
 
 /* Busyboxed by Erik Andersen */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <sys/types.h>
@@ -40,6 +39,7 @@
 #if defined (HAVE_SYSINFO) && defined (HAVE_SYS_SYSTEMINFO_H)
 # include <sys/systeminfo.h>
 #endif
+#include "busybox.h"
 
 static void print_element(unsigned int mask, char *element);
 
index 84f1ed2..53e3c64 100644 (file)
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <string.h>
 #include <getopt.h>
 #include <errno.h>
 #include <stdlib.h>
+#include "busybox.h"
 
 static int print_count;
 static int print_uniq = 1;
index c67c365..92e4437 100644 (file)
@@ -21,9 +21,9 @@
  *
  */
 
-#include "busybox.h"
 #include <stdlib.h>
 #include <unistd.h>
+#include "busybox.h"
 
 extern int usleep_main(int argc, char **argv)
 {
index c0e8cea..6a3f78a 100644 (file)
  */
 
 
-#include "busybox.h"
 
 #include <stdio.h>
 #include <errno.h>
 #include <getopt.h>
 #include <string.h>
 #include <stdlib.h>
+#include "busybox.h"
 #include "pwd_grp/pwd.h"
 #include "pwd_grp/grp.h"
 
index 8d5af4a..41541de 100644 (file)
 /* Hacked to work with BusyBox by Alfred M. Szmidt */
 
 
-#include "busybox.h"
 
 #include <stdio.h>
 #include <errno.h>
 #include <getopt.h>
 #include <stdlib.h>
+#include "busybox.h"
 
 #define        RW (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH)
 
index f416874..f2d33d6 100644 (file)
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <getopt.h>
 #include <stdlib.h>
+#include "busybox.h"
 
 static int total_lines, total_words, total_chars, max_length;
 static int print_lines, print_words, print_chars, print_length;
index 54df0bf..0bbb54b 100644 (file)
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
+#include "busybox.h"
 
 extern int whoami_main(int argc, char **argv)
 {
index 0a8ad83..ad7b98f 100644 (file)
@@ -20,9 +20,9 @@
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <stdlib.h>
+#include "busybox.h"
 
 extern int yes_main(int argc, char **argv)
 {
diff --git a/cp_mv.c b/cp_mv.c
index 8052b41..fb48d3c 100644 (file)
--- a/cp_mv.c
+++ b/cp_mv.c
  *
  */
 
-#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 <stdio.h>
 #include <time.h>
 #include <utime.h>
 #include <errno.h>
 #include <getopt.h>
 #include <stdlib.h>
+#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 21d31bb..878331f 100644 (file)
--- a/date.c
+++ b/date.c
  *
 */
 
-#include "busybox.h"
-#define BB_DECLARE_EXTERN
-#define bb_need_invalid_date
-#define bb_need_memory_exhausted
-#include "messages.c"
 #include <stdlib.h>
 #include <errno.h>
 #include <sys/time.h>
 #include <stdio.h>
 #include <string.h>
 #include <getopt.h>
+#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 1e34574..a422139 100644 (file)
--- a/dc.c
+++ b/dc.c
@@ -1,10 +1,10 @@
 /* vi: set sw=4 ts=4: */
-#include "busybox.h"
 #include <ctype.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
 #include <math.h>
+#include "busybox.h"
 
 /* Tiny RPN calculator, because "expr" didn't give me bitwise operations. */
 
diff --git a/dd.c b/dd.c
index e445e04..1618dd1 100644 (file)
--- a/dd.c
+++ b/dd.c
  *
  */
 
-#include "busybox.h"
-
 #include <sys/types.h>
 #include <stdlib.h>
 #include <stdio.h>
 #include <unistd.h>
 #include <string.h>
 #include <fcntl.h>
+#include "busybox.h"
+
 
 static const struct suffix_mult dd_suffixes[] = {
        { "c", 1 },
index 8c390c2..15cd0c9 100644 (file)
@@ -3,12 +3,12 @@
  * disalloc.c - aeb - 940501 - Disallocate virtual terminal(s)
  * Renamed deallocvt.
  */
-#include "busybox.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <fcntl.h>
 #include <sys/types.h>
 #include <sys/ioctl.h>
+#include "busybox.h"
 
 /* From <linux/vt.h> */
 static const int VT_DISALLOCATE = 0x5608;  /* free memory associated to vt */
diff --git a/df.c b/df.c
index 692205a..ebee4d6 100644 (file)
--- a/df.c
+++ b/df.c
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <mntent.h>
 #include <sys/vfs.h>
 #include <getopt.h>
+#include "busybox.h"
 
 extern const char mtab_file[]; /* Defined in utility.c */
 #ifdef BB_FEATURE_HUMAN_READABLE
index e34ecf8..7f191c1 100644 (file)
--- a/dirname.c
+++ b/dirname.c
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  *
  */
-#include "busybox.h"
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include "busybox.h"
 
 extern int dirname_main(int argc, char **argv)
 {
diff --git a/dmesg.c b/dmesg.c
index 47f9f44..2c85ed3 100644 (file)
--- a/dmesg.c
+++ b/dmesg.c
@@ -15,7 +15,6 @@
  * Support, replaced getopt, added some gotos for redundant stuff.
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <getopt.h>
@@ -33,6 +32,7 @@ static inline _syscall3(int, klogctl, int, type, char *, b, int, len);
 #else
 # include <sys/klog.h>
 #endif
+#include "busybox.h"
 
 int dmesg_main(int argc, char **argv)
 {
index 3242361..222c8f6 100644 (file)
@@ -22,9 +22,9 @@
   ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <stdlib.h>
+#include "busybox.h"
 
 int dos2unix_main( int argc, char **argv ) {
        int c;
diff --git a/du.c b/du.c
index 516f4c9..6197b0b 100644 (file)
--- a/du.c
+++ b/du.c
  *
  */
 
-#include "busybox.h"
-#define BB_DECLARE_EXTERN
-#define bb_need_name_too_long
-#include "messages.c"
-
 #include <sys/types.h>
 #include <fcntl.h>
 #include <dirent.h>
 #include <stdlib.h>
 #include <getopt.h>
 #include <errno.h>
+#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"
index b9f1bd2..0da0186 100644 (file)
@@ -20,7 +20,6 @@
  *
  */
 
-#include "busybox.h"
 #include <errno.h>
 #include <fcntl.h>
 #include <stdio.h>
@@ -28,6 +27,7 @@
 #include <string.h>
 #include <stdlib.h>
 #include <sys/ioctl.h>
+#include "busybox.h"
 
 /* From <linux/kd.h> */
 struct kbentry {
diff --git a/dutmp.c b/dutmp.c
index 2e6b3c0..a75a6e3 100644 (file)
--- a/dutmp.c
+++ b/dutmp.c
  * Erik Andersen <andersen@lineo.com>
  */
 
-#include "busybox.h"
 #include <sys/types.h>
 #include <fcntl.h>
 
 #include <errno.h>
-#define BB_DECLARE_EXTERN
-#define bb_need_io_error
-#include "messages.c"
 #include <utmp.h>
 #include <stdlib.h>
 #include <unistd.h>
+#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 b3e01af..e9bc50a 100644 (file)
--- a/echo.c
+++ b/echo.c
  * Original copyright notice is retained at the end of this file.
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
+#include "busybox.h"
 
 extern int 
 echo_main(int argc, char** argv)
diff --git a/expr.c b/expr.c
index 8ef5293..3b454bd 100644 (file)
--- a/expr.c
+++ b/expr.c
  * One function can handle multiple operators all of equal precedence,
  * provided they all associate ((x op x) op x). */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
 #include <regex.h>
 #include <sys/types.h>
+#include "busybox.h"
 
 
 /* The kinds of value we can have.  */
diff --git a/fbset.c b/fbset.c
index 9acabbe..72284a6 100644 (file)
--- a/fbset.c
+++ b/fbset.c
@@ -24,7 +24,6 @@
  *     Geert Uytterhoeven (Geert.Uytterhoeven@cs.kuleuven.ac.be)
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
@@ -33,6 +32,7 @@
 #include <ctype.h>
 #include <string.h>
 #include <sys/ioctl.h>
+#include "busybox.h"
 
 #define DEFAULTFBDEV  "/dev/fb0"
 #define DEFAULTFBMODE "/etc/fb.modes"
index f10ccea..28f5cb6 100644 (file)
--- a/fdflush.c
+++ b/fdflush.c
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <sys/ioctl.h>
 #include <fcntl.h>
 #include <stdlib.h>
+#include "busybox.h"
 
 /* From <linux/fd.h> */
 #define FDFLUSH  _IO(2,0x4b)
diff --git a/find.c b/find.c
index a07dc8e..15e693a 100644 (file)
--- a/find.c
+++ b/find.c
@@ -24,7 +24,6 @@
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <unistd.h>
 #include <dirent.h>
@@ -33,6 +32,7 @@
 #include <fnmatch.h>
 #include <time.h>
 #include <ctype.h>
+#include "busybox.h"
 
 
 static char *pattern;
index a07dc8e..15e693a 100644 (file)
@@ -24,7 +24,6 @@
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <unistd.h>
 #include <dirent.h>
@@ -33,6 +32,7 @@
 #include <fnmatch.h>
 #include <time.h>
 #include <ctype.h>
+#include "busybox.h"
 
 
 static char *pattern;
index 1908db3..f9d51f2 100644 (file)
  *
  */
 
-#include "busybox.h"
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include "busybox.h"
 
 extern int which_main(int argc, char **argv)
 {
index f05efd9..01aa5be 100644 (file)
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include "busybox.h"
 
 int xargs_main(int argc, char **argv)
 {
diff --git a/free.c b/free.c
index d287c03..41e872d 100644 (file)
--- a/free.c
+++ b/free.c
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <errno.h>
 #include <stdlib.h>
+#include "busybox.h"
 
 extern int free_main(int argc, char **argv)
 {
index 2b4c651..9a53a70 100644 (file)
@@ -86,7 +86,6 @@
  * enforced (but it's not much fun on a character device :-). 
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <errno.h>
 #include <unistd.h>
@@ -97,6 +96,7 @@
 #include <termios.h>
 #include <mntent.h>
 #include <sys/param.h>
+#include "busybox.h"
 
  
  typedef unsigned char u8;
index bf8812d..8100003 100644 (file)
--- a/gunzip.c
+++ b/gunzip.c
@@ -57,7 +57,6 @@ static char *license_msg[] = {
 };
 #endif
 
-#include "busybox.h"
 #include <getopt.h>
 #include <ctype.h>
 #include <sys/types.h>
@@ -71,6 +70,7 @@ static char *license_msg[] = {
 #include <stdlib.h>
 #include <time.h>
 #include <dirent.h>
+#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 3cbef4e..6c058d2 100644 (file)
--- a/gzip.c
+++ b/gzip.c
  *
  */
 
-#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.*/
 /* I don't like nested includes, but the string and io functions are used
  * too often
  */
+#include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
 #include <unistd.h>
+#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 <unistd.h>
 #endif
 
-#if defined(STDC_HEADERS) || !defined(NO_STDLIB_H)
-#  include <stdlib.h>
-#else
-extern int errno;
-#endif
-
 #if defined(DIRENT)
 #  include <dirent.h>
 typedef struct dirent dir_type;
@@ -3098,12 +3093,6 @@ local void set_file_type()
 #  include <fcntl.h>
 #endif
 
-#if defined(STDC_HEADERS) || !defined(NO_STDLIB_H)
-#  include <stdlib.h>
-#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 a2d7744..c683ec7 100644 (file)
--- a/head.c
+++ b/head.c
  *
  */
 
-#include "busybox.h"
 #include <errno.h>
 #include <stdio.h>
 #include <getopt.h>
 #include <stdlib.h>
+#include "busybox.h"
 
 int head(int len, FILE *fp)
 {
index eed1a50..68a2cc6 100644 (file)
--- a/hostid.c
+++ b/hostid.c
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
+#include "busybox.h"
 
 extern int hostid_main(int argc, char **argv)
 {
index 66615a2..a3e2c0f 100644 (file)
  * 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 <sys/types.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <errno.h>
 #include <string.h>   // strcmp and friends
 #include <ctype.h>    // isdigit and friends
+#include <sys/types.h>
 #include <sys/socket.h>
 #include <sys/ioctl.h>
 #include <netinet/in.h>
@@ -33,6 +32,7 @@
 #include <net/if.h>
 #include <net/if_arp.h>
 #include <linux/if_ether.h>
+#include "busybox.h"
 
 static int sockfd;  /* socket fd we use to manipulate stuff with */
 
diff --git a/init.c b/init.c
index 9046a14..1332a10 100644 (file)
--- a/init.c
+++ b/init.c
@@ -27,7 +27,6 @@
 #define DEBUG_INIT
 */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <errno.h>
 #include <sys/mount.h>
 #include <sys/types.h>
 #include <sys/wait.h>
+#include "busybox.h"
+#define bb_need_full_version
+#define BB_DECLARE_EXTERN
+#include "messages.c"
 #ifdef BB_SYSLOGD
 # include <sys/syslog.h>
 #endif
 
-#define bb_need_full_version
-#define BB_DECLARE_EXTERN
-#include "messages.c"
 
 /* From <linux/vt.h> */
 struct vt_stat {
index 9046a14..1332a10 100644 (file)
@@ -27,7 +27,6 @@
 #define DEBUG_INIT
 */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <errno.h>
 #include <sys/mount.h>
 #include <sys/types.h>
 #include <sys/wait.h>
+#include "busybox.h"
+#define bb_need_full_version
+#define BB_DECLARE_EXTERN
+#include "messages.c"
 #ifdef BB_SYSLOGD
 # include <sys/syslog.h>
 #endif
 
-#define bb_need_full_version
-#define BB_DECLARE_EXTERN
-#include "messages.c"
 
 /* From <linux/vt.h> */
 struct vt_stat {
index 5827352..166f0fc 100644 (file)
--- a/insmod.c
+++ b/insmod.c
@@ -37,7 +37,6 @@
  *
  */
 
-#include "busybox.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <stddef.h>
@@ -51,6 +50,7 @@
 #include <sys/utsname.h>
 #include <sys/syscall.h>
 #include <linux/unistd.h>
+#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 bdd22b5..e62503b 100644 (file)
--- a/kill.c
+++ b/kill.c
@@ -21,7 +21,6 @@
  */
 
 
-#include "busybox.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <errno.h>
@@ -30,6 +29,7 @@
 #include <ctype.h>
 #include <string.h>
 #include <unistd.h>
+#include "busybox.h"
 
 static const int KILL = 0;
 static const int KILLALL = 1;
index 9119adc..73becd2 100644 (file)
--- a/length.c
+++ b/length.c
@@ -1,8 +1,8 @@
 /* vi: set sw=4 ts=4: */
-#include "busybox.h"
 #include <stdlib.h>
 #include <string.h>
 #include <stdio.h>
+#include "busybox.h"
 
 extern int length_main(int argc, char **argv)
 {
diff --git a/ln.c b/ln.c
index e35bf7a..6d41cce 100644 (file)
--- a/ln.c
+++ b/ln.c
  *
  */
 
-#include "busybox.h"
-#define BB_DECLARE_EXTERN
-#define bb_need_not_a_directory
-#include "messages.c"
-
 #include <stdio.h>
 #include <dirent.h>
 #include <string.h>
 #include <stdlib.h>
 #include <errno.h>
 #include <unistd.h>
+#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;
index 6422137..81b973b 100644 (file)
--- a/loadacm.c
+++ b/loadacm.c
@@ -7,7 +7,6 @@
  * Peter Novodvorsky <petya@logic.ru>
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <memory.h>
 #include <assert.h>
 #include <errno.h>
 #include <signal.h>
+#include <sys/kd.h>
 #include <sys/types.h>
 #include <sys/ioctl.h>
-#include <sys/kd.h>
+#include "busybox.h"
 
 typedef unsigned short unicode;
 
index d7bd7e8..1a724ca 100644 (file)
@@ -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 <stdio.h>
 #include <string.h>
 #include <fcntl.h>
@@ -20,6 +19,7 @@
 #include <sys/ioctl.h>
 #include <sys/kd.h>
 #include <endian.h>
+#include "busybox.h"
 
 static const int PSF_MAGIC1 = 0x36;
 static const int PSF_MAGIC2 = 0x04;
index 5ecd819..dcb5c1c 100644 (file)
@@ -20,7 +20,6 @@
  *
  */
 
-#include "busybox.h"
 #include <errno.h>
 #include <fcntl.h>
 #include <stdio.h>
@@ -28,6 +27,7 @@
 #include <stdlib.h>
 #include <unistd.h>
 #include <sys/ioctl.h>
+#include "busybox.h"
 
 #define BINARY_KEYMAP_MAGIC "bkeymap"
 
index 352bde1..1218d8d 100644 (file)
--- a/logger.c
+++ b/logger.c
@@ -21,7 +21,6 @@
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <unistd.h>
 #include <sys/types.h>
@@ -30,6 +29,7 @@
 #include <string.h>
 #include <stdlib.h>
 
+#include "busybox.h"
 #if !defined BB_SYSLOGD
 
 #define SYSLOG_NAMES
@@ -40,6 +40,7 @@
  * structures.  Argh.... bad libc, bad, bad...
  */
 #include <sys/syslog.h>
+
 typedef struct _code {
        char *c_name;
        int c_val;
index a1887aa..0924b24 100644 (file)
--- a/logname.c
+++ b/logname.c
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
+#include "busybox.h"
 
 extern int logname_main(int argc, char **argv)
 {
diff --git a/ls.c b/ls.c
index dd38dd5..a619bb8 100644 (file)
--- a/ls.c
+++ b/ls.c
@@ -50,7 +50,6 @@ enum {
 
 /************************************************************************/
 
-#include "busybox.h"
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <stdio.h>
@@ -67,6 +66,7 @@ enum {
 #include <fcntl.h>
 #include <signal.h>
 #include <sys/ioctl.h>
+#include "busybox.h"
 
 #ifndef MAJOR
 #define MAJOR(dev) (((dev)>>8)&0xff)
diff --git a/lsmod.c b/lsmod.c
index f39cbc0..c97d199 100644 (file)
--- a/lsmod.c
+++ b/lsmod.c
@@ -25,7 +25,6 @@
  *
  */
 
-#include "busybox.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <stddef.h>
@@ -37,6 +36,7 @@
 #include <getopt.h>
 #include <sys/utsname.h>
 #include <sys/file.h>
+#include "busybox.h"
 
 
 
index eed3968..b8c6dd1 100644 (file)
@@ -7,13 +7,13 @@
  * known bugs: can't deal with alpha ranges
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <fcntl.h>
 #include <unistd.h>
 #include <sys/types.h>
+#include "busybox.h"
 
 int makedevs_main(int argc, char **argv)
 {
index 3decafd..fa11ee6 100644 (file)
--- a/md5sum.c
+++ b/md5sum.c
 /* Written by Ulrich Drepper <drepper@gnu.ai.mit.edu> */
 /* Hacked to work with BusyBox by Alfred M. Szmidt <ams@trillian.itslinux.org> */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <errno.h>
 #include <ctype.h>
 #include <getopt.h>
+#include "busybox.h"
 
 /* For some silly reason, this file uses backwards TRUE and FALSE conventions */
 #undef TRUE
index 1e34574..a422139 100644 (file)
@@ -1,10 +1,10 @@
 /* vi: set sw=4 ts=4: */
-#include "busybox.h"
 #include <ctype.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
 #include <math.h>
+#include "busybox.h"
 
 /* Tiny RPN calculator, because "expr" didn't give me bitwise operations. */
 
index 2e6b3c0..a75a6e3 100644 (file)
  * Erik Andersen <andersen@lineo.com>
  */
 
-#include "busybox.h"
 #include <sys/types.h>
 #include <fcntl.h>
 
 #include <errno.h>
-#define BB_DECLARE_EXTERN
-#define bb_need_io_error
-#include "messages.c"
 #include <utmp.h>
 #include <stdlib.h>
 #include <unistd.h>
+#include "busybox.h"
+#define BB_DECLARE_EXTERN
+#define bb_need_io_error
+#include "messages.c"
 
 extern int dutmp_main(int argc, char **argv)
 {
index eed3968..b8c6dd1 100644 (file)
@@ -7,13 +7,13 @@
  * known bugs: can't deal with alpha ranges
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <fcntl.h>
 #include <unistd.h>
 #include <sys/types.h>
+#include "busybox.h"
 
 int makedevs_main(int argc, char **argv)
 {
index b352202..31ab9e2 100644 (file)
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <errno.h>
 #include <unistd.h>
 #include <stdlib.h>
+#include "busybox.h"
 
 extern int mktemp_main(int argc, char **argv)
 {
index eb93cb2..350d3ae 100644 (file)
@@ -1,9 +1,9 @@
 /* vi: set sw=4 ts=4: */
-#include "busybox.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <sys/mtio.h>
 #include <sys/fcntl.h>
+#include "busybox.h"
 
 struct mt_opcodes {
        char *name;
index c82f640..74196e1 100644 (file)
  *
  */
 
-#include "busybox.h"
 #include <errno.h>
 #include <unistd.h>
 #include <stdlib.h>
+#include "busybox.h"
 
 int readlink_main(int argc, char **argv)
 {
index 2cf4a98..b282b9e 100644 (file)
@@ -28,7 +28,6 @@
  * earlier) kernel. 2.2.x and higher flush filesystem buffers automatically.
  */
 
-#include "busybox.h"
 #include <sys/param.h>
 #include <sys/syslog.h>
 #include <unistd.h> /* for getopt() */
@@ -42,6 +41,7 @@
 #include <linux/unistd.h>
 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;
index 65d0fc3..5b5fd69 100644 (file)
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <fcntl.h>
 #include <unistd.h>
 #include <stdlib.h>
+#include "busybox.h"
 
 extern int watchdog_main(int argc, char **argv)
 {
diff --git a/mkdir.c b/mkdir.c
index 285d34f..902da7c 100644 (file)
--- a/mkdir.c
+++ b/mkdir.c
  *
  */
 
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <stdlib.h>
 #include "busybox.h"
 #define bb_need_name_too_long
 #define BB_DECLARE_EXTERN
 #include "messages.c"
 
-#include <stdio.h>
-#include <errno.h>
-#include <string.h>
-#include <stdlib.h>
 
 static int parentFlag = FALSE;
 static mode_t mode = 0777;
index 56a04f7..ca217fa 100644 (file)
--- a/mkfifo.c
+++ b/mkfifo.c
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <sys/types.h>
 #include <errno.h>
 #include <stdlib.h>
+#include "busybox.h"
 
 extern int mkfifo_main(int argc, char **argv)
 {
index 6b4a3e2..b666338 100644 (file)
@@ -62,7 +62,6 @@
  *     removed getopt based parser and added a hand rolled one.
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <time.h>
 #include <unistd.h>
@@ -75,6 +74,7 @@
 #include <sys/ioctl.h>
 #include <sys/param.h>
 #include <mntent.h>
+#include "busybox.h"
 
 
 typedef unsigned char u8;
diff --git a/mknod.c b/mknod.c
index 73f6e06..b4d4b82 100644 (file)
--- a/mknod.c
+++ b/mknod.c
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <errno.h>
-#include <sys/types.h>
 #include <fcntl.h>
 #include <unistd.h>
 #include <string.h>
 #include <stdlib.h>
+#include <sys/types.h>
+#include "busybox.h"
 
 int mknod_main(int argc, char **argv)
 {
index 48637e8..b5153f6 100644 (file)
--- a/mkswap.c
+++ b/mkswap.c
@@ -35,7 +35,6 @@
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <unistd.h>
 #include <string.h>
@@ -45,6 +44,7 @@
 #include <sys/utsname.h>
 #include <asm/page.h>                  /* for PAGE_SIZE and PAGE_SHIFT */
                                /* we also get PAGE_SIZE via getpagesize() */
+#include "busybox.h"
 
 #ifndef _IO
 /* pre-1.3.45 */
index b352202..31ab9e2 100644 (file)
--- a/mktemp.c
+++ b/mktemp.c
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <errno.h>
 #include <unistd.h>
 #include <stdlib.h>
+#include "busybox.h"
 
 extern int mktemp_main(int argc, char **argv)
 {
index 5827352..166f0fc 100644 (file)
@@ -37,7 +37,6 @@
  *
  */
 
-#include "busybox.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <stddef.h>
@@ -51,6 +50,7 @@
 #include <sys/utsname.h>
 #include <sys/syscall.h>
 #include <linux/unistd.h>
+#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.  */
 
index f39cbc0..c97d199 100644 (file)
@@ -25,7 +25,6 @@
  *
  */
 
-#include "busybox.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <stddef.h>
@@ -37,6 +36,7 @@
 #include <getopt.h>
 #include <sys/utsname.h>
 #include <sys/file.h>
+#include "busybox.h"
 
 
 
index 7d4538e..aab3261 100644 (file)
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <errno.h>
 #include <unistd.h>
 #include <stdlib.h>
 #include <sys/syscall.h>
 #include <linux/unistd.h>
+#include "busybox.h"
 #define __LIBRARY__
 
 
diff --git a/more.c b/more.c
index c4c74fe..298e1cf 100644 (file)
--- a/more.c
+++ b/more.c
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <fcntl.h>
 #include <signal.h>
 #include <stdlib.h>
 #include <sys/ioctl.h>
+#include "busybox.h"
 #define BB_DECLARE_EXTERN
 #define bb_need_help
 #include "messages.c"
diff --git a/mount.c b/mount.c
index 2f5bba5..7b0bf3e 100644 (file)
--- a/mount.c
+++ b/mount.c
@@ -43,7 +43,6 @@
  *     
  */
 
-#include "busybox.h"
 #include <stdlib.h>
 #include <unistd.h>
 #include <errno.h>
@@ -54,6 +53,7 @@
 #if defined BB_FEATURE_USE_DEVPS_PATCH
 #include <linux/devmtab.h> /* 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 eb93cb2..350d3ae 100644 (file)
--- a/mt.c
+++ b/mt.c
@@ -1,9 +1,9 @@
 /* vi: set sw=4 ts=4: */
-#include "busybox.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <sys/mtio.h>
 #include <sys/fcntl.h>
+#include "busybox.h"
 
 struct mt_opcodes {
        char *name;
diff --git a/mtab.c b/mtab.c
index 33b11c8..5fb3674 100644 (file)
--- a/mtab.c
+++ b/mtab.c
@@ -1,5 +1,4 @@
 /* vi: set sw=4 ts=4: */
-#include "busybox.h"
 #include <stdlib.h>
 #include <unistd.h>
 #include <errno.h>
@@ -8,6 +7,7 @@
 #include <mntent.h>
 #include <fstab.h>
 #include <sys/mount.h>
+#include "busybox.h"
 
 extern const char mtab_file[]; /* Defined in utility.c */
 
diff --git a/nc.c b/nc.c
index 8927103..e40d4b4 100644 (file)
--- a/nc.c
+++ b/nc.c
@@ -26,7 +26,6 @@
 
 */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
@@ -38,6 +37,7 @@
 #include <netdb.h>
 #include <sys/time.h>
 #include <sys/ioctl.h>
+#include "busybox.h"
 
 int nc_main(int argc, char **argv)
 {
index 66615a2..a3e2c0f 100644 (file)
  * 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 <sys/types.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <errno.h>
 #include <string.h>   // strcmp and friends
 #include <ctype.h>    // isdigit and friends
+#include <sys/types.h>
 #include <sys/socket.h>
 #include <sys/ioctl.h>
 #include <netinet/in.h>
@@ -33,6 +32,7 @@
 #include <net/if.h>
 #include <net/if_arp.h>
 #include <linux/if_ether.h>
+#include "busybox.h"
 
 static int sockfd;  /* socket fd we use to manipulate stuff with */
 
index 8927103..e40d4b4 100644 (file)
@@ -26,7 +26,6 @@
 
 */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
@@ -38,6 +37,7 @@
 #include <netdb.h>
 #include <sys/time.h>
 #include <sys/ioctl.h>
+#include "busybox.h"
 
 int nc_main(int argc, char **argv)
 {
index 33732de..8791b5e 100644 (file)
@@ -21,7 +21,6 @@
  *
  */
 
-#include "busybox.h"
 #include <ctype.h>
 #include <errno.h>
 #include <stdio.h>
@@ -32,6 +31,7 @@
 #include <sys/socket.h>
 #include <sys/types.h>
 #include <netinet/in.h>
+#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 $ */
index c114fb0..50c7ce6 100644 (file)
@@ -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 <tausq@debian.org>
@@ -31,7 +31,6 @@
  * Original copyright notice is retained at the end of this file.
  */
 
-#include "busybox.h"
 #include <sys/param.h>
 #include <sys/socket.h>
 #include <sys/file.h>
@@ -50,6 +49,7 @@
 #include <unistd.h>
 #include <string.h>
 #include <stdlib.h>
+#include "busybox.h"
 
 
 /* It turns out that libc5 doesn't have proper icmp support
index d98d9a0..9be0027 100644 (file)
  * 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 <dzo@simtreas.ru>
  * busybox style adjustments by Larry Doolittle  <LRDoolittle@lbl.gov>
  * displayroute() format now matches net-tools-1.57/lib/inet_gr.c line 173.
  */
 
-#include "busybox.h"
 #include <sys/types.h>
 #include <sys/ioctl.h>
 #include <sys/socket.h>
@@ -38,6 +37,7 @@
 #include <getopt.h>
 #include <unistd.h>
 #include <ctype.h>
+#include "busybox.h"
 
 #define _(x) x
 
index ed92a84..fd1ace4 100644 (file)
@@ -30,7 +30,6 @@
  *
  */
 
-#include "busybox.h"
 #include <termios.h>
 #include <unistd.h>
 #include <errno.h>
@@ -43,6 +42,7 @@
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <netdb.h>
+#include "busybox.h"
 
 #if 0
 static const int DOTRACE = 1;
index d1aacef..4b8392b 100644 (file)
@@ -14,7 +14,6 @@
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <errno.h>
 #include <stdlib.h>
@@ -33,6 +32,8 @@
 #include <arpa/inet.h>
 #include <netdb.h>
 
+#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 $
  */
 
 
index ae44f32..aee4969 100644 (file)
  * nfsmount.c,v 1.1.1.1 1993/11/18 08:40:51 jrs Exp
  */
 
-#include "busybox.h"
-#undef FALSE
-#undef TRUE
 #include <unistd.h>
 #include <stdio.h>
 #include <string.h>
 #include <errno.h>
 #include <netdb.h>
-#include <rpc/rpc.h>
-#include <rpc/pmap_prot.h>
-#include <rpc/pmap_clnt.h>
 #include <sys/socket.h>
 #include <time.h>
 #include <sys/utsname.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
-
-#include "nfsmount.h"
+#include <stdlib.h>
+#include "busybox.h"
+#undef TRUE
+#undef FALSE
+#include <rpc/rpc.h>
+#include <rpc/pmap_prot.h>
+#include <rpc/pmap_clnt.h>
 #include <linux/nfs.h>  /* For the kernels nfs stuff */
+#include "nfsmount.h"
 
 #ifndef NFS_FHSIZE
 static const int NFS_FHSIZE = 32;
index 33732de..8791b5e 100644 (file)
@@ -21,7 +21,6 @@
  *
  */
 
-#include "busybox.h"
 #include <ctype.h>
 #include <errno.h>
 #include <stdio.h>
@@ -32,6 +31,7 @@
 #include <sys/socket.h>
 #include <sys/types.h>
 #include <netinet/in.h>
+#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 c114fb0..50c7ce6 100644 (file)
--- 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 <tausq@debian.org>
@@ -31,7 +31,6 @@
  * Original copyright notice is retained at the end of this file.
  */
 
-#include "busybox.h"
 #include <sys/param.h>
 #include <sys/socket.h>
 #include <sys/file.h>
@@ -50,6 +49,7 @@
 #include <unistd.h>
 #include <string.h>
 #include <stdlib.h>
+#include "busybox.h"
 
 
 /* It turns out that libc5 doesn't have proper icmp support
index e007101..d7b80d7 100644 (file)
@@ -4,11 +4,11 @@
  *
  * busyboxed by Evin Robertson
  */
-#include "busybox.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <sys/syscall.h>
 #include <linux/unistd.h>
+#include "busybox.h"
 
 #ifndef __NR_pivot_root
 #error Sorry, but this kernel does not support the pivot_root syscall
index 26a200e..003423d 100644 (file)
--- a/printf.c
+++ b/printf.c
@@ -47,7 +47,6 @@
 
 //   19990508 Busy Boxed! Dave Cinege
 
-#include "busybox.h"
 #include <unistd.h>
 #include <stdio.h>
 #include <sys/types.h>
@@ -56,6 +55,7 @@
 #include <stdlib.h>
 #include <fcntl.h>
 #include <ctype.h>
+#include "busybox.h"
 
 
 #ifndef S_IFMT
index d287c03..41e872d 100644 (file)
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <errno.h>
 #include <stdlib.h>
+#include "busybox.h"
 
 extern int free_main(int argc, char **argv)
 {
index bdd22b5..e62503b 100644 (file)
@@ -21,7 +21,6 @@
  */
 
 
-#include "busybox.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <errno.h>
@@ -30,6 +29,7 @@
 #include <ctype.h>
 #include <string.h>
 #include <unistd.h>
+#include "busybox.h"
 
 static const int KILL = 0;
 static const int KILLALL = 1;
index dd154af..4ce43c4 100644 (file)
@@ -28,7 +28,6 @@
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
@@ -38,6 +37,7 @@
 #include <ctype.h>
 #include <string.h>
 #include <sys/ioctl.h>
+#include "busybox.h"
 #define BB_DECLARE_EXTERN
 #define bb_need_help
 #include "messages.c"
index 9180ebf..ec35bdc 100644 (file)
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <errno.h>
 #include <stdlib.h>
 #include <sys/time.h>
 #include <sys/resource.h>
+#include "busybox.h"
 
 
 extern int renice_main(int argc, char **argv)
index 213a398..64df194 100644 (file)
  */
 
 
-#include "busybox.h"
 #include <stdio.h>
 #include <time.h>
 #include <errno.h>
 #include <stdlib.h>
+#include "busybox.h"
 
 static const int FSHIFT = 16;              /* nr of bits of precision */
 #define FIXED_1         (1<<FSHIFT)     /* 1.0 as fixed-point */
diff --git a/ps.c b/ps.c
index dd154af..4ce43c4 100644 (file)
--- a/ps.c
+++ b/ps.c
@@ -28,7 +28,6 @@
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
@@ -38,6 +37,7 @@
 #include <ctype.h>
 #include <string.h>
 #include <sys/ioctl.h>
+#include "busybox.h"
 #define BB_DECLARE_EXTERN
 #define bb_need_help
 #include "messages.c"
diff --git a/pwd.c b/pwd.c
index a9acbc7..a7a5f78 100644 (file)
--- a/pwd.c
+++ b/pwd.c
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <dirent.h>
 #include <errno.h>
 #include <unistd.h>
 #include <stdlib.h>
+#include "busybox.h"
 
 extern int pwd_main(int argc, char **argv)
 {
diff --git a/rdate.c b/rdate.c
index 38a7689..a3ea3a8 100644 (file)
--- a/rdate.c
+++ b/rdate.c
@@ -21,9 +21,6 @@
  *
 */
 
-#include "busybox.h"
-#define BB_DECLARE_EXTERN
-#include "messages.c"
 #include <sys/time.h>
 #include <sys/types.h>
 #include <sys/socket.h>
@@ -33,6 +30,9 @@
 #include <getopt.h>
 #include <stdlib.h>
 #include <unistd.h>
+#include "busybox.h"
+#define BB_DECLARE_EXTERN
+#include "messages.c"
 
 
 static const int RFC_868_BIAS = 2208988800UL;
index c82f640..74196e1 100644 (file)
  *
  */
 
-#include "busybox.h"
 #include <errno.h>
 #include <unistd.h>
 #include <stdlib.h>
+#include "busybox.h"
 
 int readlink_main(int argc, char **argv)
 {
index 9180ebf..ec35bdc 100644 (file)
--- a/renice.c
+++ b/renice.c
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <errno.h>
 #include <stdlib.h>
 #include <sys/time.h>
 #include <sys/resource.h>
+#include "busybox.h"
 
 
 extern int renice_main(int argc, char **argv)
diff --git a/reset.c b/reset.c
index 294cab3..755c4c3 100644 (file)
--- a/reset.c
+++ b/reset.c
@@ -23,9 +23,9 @@
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <stdlib.h>
+#include "busybox.h"
 
 extern int reset_main(int argc, char **argv)
 {
diff --git a/rm.c b/rm.c
index 5660767..a841632 100644 (file)
--- a/rm.c
+++ b/rm.c
@@ -22,7 +22,6 @@
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <time.h>
 #include <utime.h>
@@ -30,6 +29,7 @@
 #include <errno.h>
 #include <unistd.h>
 #include <stdlib.h>
+#include "busybox.h"
 
 static int recursiveFlag = FALSE;
 static int forceFlag = FALSE;
diff --git a/rmdir.c b/rmdir.c
index 6266ce1..2c28037 100644 (file)
--- a/rmdir.c
+++ b/rmdir.c
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <errno.h>
 #include <unistd.h>
 #include <stdlib.h>
+#include "busybox.h"
 
 extern int rmdir_main(int argc, char **argv)
 {
diff --git a/rmmod.c b/rmmod.c
index 7d4538e..aab3261 100644 (file)
--- a/rmmod.c
+++ b/rmmod.c
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <errno.h>
 #include <unistd.h>
 #include <stdlib.h>
 #include <sys/syscall.h>
 #include <linux/unistd.h>
+#include "busybox.h"
 #define __LIBRARY__
 
 
diff --git a/route.c b/route.c
index d98d9a0..9be0027 100644 (file)
--- a/route.c
+++ b/route.c
  * 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 <dzo@simtreas.ru>
  * busybox style adjustments by Larry Doolittle  <LRDoolittle@lbl.gov>
  * displayroute() format now matches net-tools-1.57/lib/inet_gr.c line 173.
  */
 
-#include "busybox.h"
 #include <sys/types.h>
 #include <sys/ioctl.h>
 #include <sys/socket.h>
@@ -38,6 +37,7 @@
 #include <getopt.h>
 #include <unistd.h>
 #include <ctype.h>
+#include "busybox.h"
 
 #define _(x) x
 
index 79971fa..12e9c71 100644 (file)
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  */
  
-#include "busybox.h" 
 #include <fcntl.h>
 #include <unistd.h>
 #include <string.h>
 #include <stdlib.h>
+#include "busybox.h" 
 
 /*
  * Some general definitions
index 0be4724..c3c7e09 100644 (file)
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <fcntl.h>
 #include <sys/ioctl.h>
+#include "busybox.h"
 
 
 /* From <linux/kd.h> */
index 97ba831..9cb5352 100644 (file)
 
 //#define TEST
 
+#include <stdio.h>
+#include <errno.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/ioctl.h>
+#include <ctype.h>
+#include <signal.h>
+#include <limits.h>
+
+#ifdef BB_FEATURE_SH_TAB_COMPLETION
+#include <dirent.h>
+#include <sys/stat.h>
+#endif
+
 
 #ifndef TEST
 
 #define BB_FEATURE_GETUSERNAME_AND_HOMEDIR
 #endif
 
-#include <stdio.h>
-#include <errno.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/ioctl.h>
-#include <ctype.h>
-#include <signal.h>
-#include <limits.h>
-
-#ifdef BB_FEATURE_SH_TAB_COMPLETION
-#include <dirent.h>
-#include <sys/stat.h>
-#endif
-
 #ifdef BB_FEATURE_GETUSERNAME_AND_HOMEDIR
 #ifndef TEST
 #include "pwd_grp/pwd.h"
diff --git a/sleep.c b/sleep.c
index d21af19..3bcab88 100644 (file)
--- a/sleep.c
+++ b/sleep.c
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <unistd.h>
 #include <stdlib.h>
+#include "busybox.h"
 
 extern int sleep_main(int argc, char **argv)
 {
diff --git a/sort.c b/sort.c
index 4984f5d..ed68722 100644 (file)
--- a/sort.c
+++ b/sort.c
@@ -21,9 +21,9 @@
  *
  */
 
-#include "busybox.h"
 #include <getopt.h>
 #include <stdlib.h>
+#include "busybox.h"
 
 int compare_ascii(const void *x, const void *y)
 {
diff --git a/stty.c b/stty.c
index 4a5aecf..10e2825 100644 (file)
--- a/stty.c
+++ b/stty.c
@@ -28,7 +28,6 @@
 
    */
 
-#include "busybox.h"
 
 #include <termios.h>
 #include <sys/ioctl.h>
@@ -53,6 +52,7 @@
 #include <limits.h>
 #include <memory.h>
 #include <fcntl.h>
+#include "busybox.h"
 
 #define STREQ(a, b) (strcmp ((a), (b)) == 0)
 
index 8dda097..0613fa1 100644 (file)
@@ -22,7 +22,6 @@
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <mntent.h>
 #include <dirent.h>
@@ -31,6 +30,7 @@
 #include <sys/mount.h>
 #include <sys/syscall.h>
 #include <linux/unistd.h>
+#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 3d4686e..ee22ae1 100644 (file)
--- a/sync.c
+++ b/sync.c
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
+#include "busybox.h"
 
 extern int sync_main(int argc, char **argv)
 {
index 352bde1..1218d8d 100644 (file)
@@ -21,7 +21,6 @@
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <unistd.h>
 #include <sys/types.h>
@@ -30,6 +29,7 @@
 #include <string.h>
 #include <stdlib.h>
 
+#include "busybox.h"
 #if !defined BB_SYSLOGD
 
 #define SYSLOG_NAMES
@@ -40,6 +40,7 @@
  * structures.  Argh.... bad libc, bad, bad...
  */
 #include <sys/syslog.h>
+
 typedef struct _code {
        char *c_name;
        int c_val;
index 872728b..8049fc5 100644 (file)
@@ -23,7 +23,6 @@
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <ctype.h>
@@ -56,6 +55,7 @@ static inline _syscall3(int, klogctl, int, type, char *, b, int, len);
 #else
 # include <sys/klog.h>
 #endif
+#include "busybox.h"
 
 
 
index 872728b..8049fc5 100644 (file)
--- a/syslogd.c
+++ b/syslogd.c
@@ -23,7 +23,6 @@
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <ctype.h>
@@ -56,6 +55,7 @@ static inline _syscall3(int, klogctl, int, type, char *, b, int, len);
 #else
 # include <sys/klog.h>
 #endif
+#include "busybox.h"
 
 
 
diff --git a/tail.c b/tail.c
index 778c2d1..a85256c 100644 (file)
--- a/tail.c
+++ b/tail.c
@@ -21,7 +21,6 @@
  *
  */
 
-#include "busybox.h"
 
 #include <fcntl.h>
 #include <getopt.h>
@@ -29,6 +28,7 @@
 #include <stdlib.h>
 #include <unistd.h>
 #include <sys/types.h>
+#include "busybox.h"
 
 static const struct suffix_mult tail_suffixes[] = {
        { "b", 512 },
diff --git a/tar.c b/tar.c
index 62f1b1d..a9363d5 100644 (file)
--- a/tar.c
+++ b/tar.c
  */
 
 
-#include "busybox.h"
-#define BB_DECLARE_EXTERN
-#define bb_need_io_error
-#define bb_need_name_longer_than_foo
-#include "messages.c"
 #include <stdio.h>
 #include <dirent.h>
 #include <errno.h>
 #include <string.h>
 #include <stdlib.h>
 #include <unistd.h>
+#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);
index ed92a84..fd1ace4 100644 (file)
--- a/telnet.c
+++ b/telnet.c
@@ -30,7 +30,6 @@
  *
  */
 
-#include "busybox.h"
 #include <termios.h>
 #include <unistd.h>
 #include <errno.h>
@@ -43,6 +42,7 @@
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <netdb.h>
+#include "busybox.h"
 
 #if 0
 static const int DOTRACE = 1;
diff --git a/test.c b/test.c
index 6439e3a..ab9c23e 100644 (file)
--- a/test.c
+++ b/test.c
  *     "This program is in the Public Domain."
  */
 
-#include "busybox.h"
 #include <sys/types.h>
 #include <unistd.h>
 #include <ctype.h>
 #include <errno.h>
 #include <stdlib.h>
 #include <string.h>
+#include "busybox.h"
 #define BB_DECLARE_EXTERN
 #define bb_need_help
 #include "messages.c"
diff --git a/touch.c b/touch.c
index a3256d5..1718da7 100644 (file)
--- a/touch.c
+++ b/touch.c
@@ -22,7 +22,6 @@
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <sys/types.h>
 #include <fcntl.h>
@@ -30,6 +29,7 @@
 #include <errno.h>
 #include <unistd.h>
 #include <stdlib.h>
+#include "busybox.h"
 
 extern int touch_main(int argc, char **argv)
 {
diff --git a/tr.c b/tr.c
index 92f399e..b7a6009 100644 (file)
--- a/tr.c
+++ b/tr.c
  * Original copyright notice is retained at the end of this file.
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
 #include <unistd.h>
 #include <sys/types.h>
+#include "busybox.h"
 #define BB_DECLARE_EXTERN
 #define bb_need_write_error
 #include "messages.c"
index 187f680..47d3bb1 100644 (file)
@@ -22,8 +22,8 @@
  *
  */
 
-#include "busybox.h"
 #include <stdlib.h>
+#include "busybox.h"
 
 
 extern int true_main(int argc, char **argv)
diff --git a/tty.c b/tty.c
index d71d8de..4510c29 100644 (file)
--- a/tty.c
+++ b/tty.c
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
 #include <sys/types.h>
+#include "busybox.h"
 
 extern int tty_main(int argc, char **argv)
 {
index c160ec2..2868a1b 100644 (file)
--- a/umount.c
+++ b/umount.c
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <mntent.h>
 #include <errno.h>
 #include <string.h>
 #include <stdlib.h>
+#include "busybox.h"
 
 
 static const int MNT_FORCE = 1;
diff --git a/uname.c b/uname.c
index 899da77..4931ff1 100644 (file)
--- a/uname.c
+++ b/uname.c
@@ -31,7 +31,6 @@
 
 /* Busyboxed by Erik Andersen */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <sys/types.h>
@@ -40,6 +39,7 @@
 #if defined (HAVE_SYSINFO) && defined (HAVE_SYS_SYSTEMINFO_H)
 # include <sys/systeminfo.h>
 #endif
+#include "busybox.h"
 
 static void print_element(unsigned int mask, char *element);
 
diff --git a/uniq.c b/uniq.c
index 84f1ed2..53e3c64 100644 (file)
--- a/uniq.c
+++ b/uniq.c
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <string.h>
 #include <getopt.h>
 #include <errno.h>
 #include <stdlib.h>
+#include "busybox.h"
 
 static int print_count;
 static int print_uniq = 1;
index 2cf4a98..b282b9e 100644 (file)
--- 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 <sys/param.h>
 #include <sys/syslog.h>
 #include <unistd.h> /* for getopt() */
@@ -42,6 +41,7 @@
 #include <linux/unistd.h>
 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;
index 213a398..64df194 100644 (file)
--- a/uptime.c
+++ b/uptime.c
  */
 
 
-#include "busybox.h"
 #include <stdio.h>
 #include <time.h>
 #include <errno.h>
 #include <stdlib.h>
+#include "busybox.h"
 
 static const int FSHIFT = 16;              /* nr of bits of precision */
 #define FIXED_1         (1<<FSHIFT)     /* 1.0 as fixed-point */
index c67c365..92e4437 100644 (file)
--- a/usleep.c
+++ b/usleep.c
@@ -21,9 +21,9 @@
  *
  */
 
-#include "busybox.h"
 #include <stdlib.h>
 #include <unistd.h>
+#include "busybox.h"
 
 extern int usleep_main(int argc, char **argv)
 {
index 47f9f44..2c85ed3 100644 (file)
@@ -15,7 +15,6 @@
  * Support, replaced getopt, added some gotos for redundant stuff.
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <getopt.h>
@@ -33,6 +32,7 @@ static inline _syscall3(int, klogctl, int, type, char *, b, int, len);
 #else
 # include <sys/klog.h>
 #endif
+#include "busybox.h"
 
 int dmesg_main(int argc, char **argv)
 {
index 9acabbe..72284a6 100644 (file)
@@ -24,7 +24,6 @@
  *     Geert Uytterhoeven (Geert.Uytterhoeven@cs.kuleuven.ac.be)
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
@@ -33,6 +32,7 @@
 #include <ctype.h>
 #include <string.h>
 #include <sys/ioctl.h>
+#include "busybox.h"
 
 #define DEFAULTFBDEV  "/dev/fb0"
 #define DEFAULTFBMODE "/etc/fb.modes"
index f10ccea..28f5cb6 100644 (file)
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <sys/ioctl.h>
 #include <fcntl.h>
 #include <stdlib.h>
+#include "busybox.h"
 
 /* From <linux/fd.h> */
 #define FDFLUSH  _IO(2,0x4b)
index 2b4c651..9a53a70 100644 (file)
@@ -86,7 +86,6 @@
  * enforced (but it's not much fun on a character device :-). 
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <errno.h>
 #include <unistd.h>
@@ -97,6 +96,7 @@
 #include <termios.h>
 #include <mntent.h>
 #include <sys/param.h>
+#include "busybox.h"
 
  
  typedef unsigned char u8;
index 6b4a3e2..b666338 100644 (file)
@@ -62,7 +62,6 @@
  *     removed getopt based parser and added a hand rolled one.
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <time.h>
 #include <unistd.h>
@@ -75,6 +74,7 @@
 #include <sys/ioctl.h>
 #include <sys/param.h>
 #include <mntent.h>
+#include "busybox.h"
 
 
 typedef unsigned char u8;
index 48637e8..b5153f6 100644 (file)
@@ -35,7 +35,6 @@
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <unistd.h>
 #include <string.h>
@@ -45,6 +44,7 @@
 #include <sys/utsname.h>
 #include <asm/page.h>                  /* for PAGE_SIZE and PAGE_SHIFT */
                                /* we also get PAGE_SIZE via getpagesize() */
+#include "busybox.h"
 
 #ifndef _IO
 /* pre-1.3.45 */
index c4c74fe..298e1cf 100644 (file)
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <fcntl.h>
 #include <signal.h>
 #include <stdlib.h>
 #include <sys/ioctl.h>
+#include "busybox.h"
 #define BB_DECLARE_EXTERN
 #define bb_need_help
 #include "messages.c"
index 2f5bba5..7b0bf3e 100644 (file)
@@ -43,7 +43,6 @@
  *     
  */
 
-#include "busybox.h"
 #include <stdlib.h>
 #include <unistd.h>
 #include <errno.h>
@@ -54,6 +53,7 @@
 #if defined BB_FEATURE_USE_DEVPS_PATCH
 #include <linux/devmtab.h> /* For Erik's nifty devmtab device driver */
 #endif
+#include "busybox.h"
 
 enum {
        MS_MGC_VAL = 0xc0ed0000, /* Magic number indicatng "new" flags */
index ae44f32..aee4969 100644 (file)
  * nfsmount.c,v 1.1.1.1 1993/11/18 08:40:51 jrs Exp
  */
 
-#include "busybox.h"
-#undef FALSE
-#undef TRUE
 #include <unistd.h>
 #include <stdio.h>
 #include <string.h>
 #include <errno.h>
 #include <netdb.h>
-#include <rpc/rpc.h>
-#include <rpc/pmap_prot.h>
-#include <rpc/pmap_clnt.h>
 #include <sys/socket.h>
 #include <time.h>
 #include <sys/utsname.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
-
-#include "nfsmount.h"
+#include <stdlib.h>
+#include "busybox.h"
+#undef TRUE
+#undef FALSE
+#include <rpc/rpc.h>
+#include <rpc/pmap_prot.h>
+#include <rpc/pmap_clnt.h>
 #include <linux/nfs.h>  /* For the kernels nfs stuff */
+#include "nfsmount.h"
 
 #ifndef NFS_FHSIZE
 static const int NFS_FHSIZE = 32;
index e007101..d7b80d7 100644 (file)
@@ -4,11 +4,11 @@
  *
  * busyboxed by Evin Robertson
  */
-#include "busybox.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <sys/syscall.h>
 #include <linux/unistd.h>
+#include "busybox.h"
 
 #ifndef __NR_pivot_root
 #error Sorry, but this kernel does not support the pivot_root syscall
index 38a7689..a3ea3a8 100644 (file)
@@ -21,9 +21,6 @@
  *
 */
 
-#include "busybox.h"
-#define BB_DECLARE_EXTERN
-#include "messages.c"
 #include <sys/time.h>
 #include <sys/types.h>
 #include <sys/socket.h>
@@ -33,6 +30,9 @@
 #include <getopt.h>
 #include <stdlib.h>
 #include <unistd.h>
+#include "busybox.h"
+#define BB_DECLARE_EXTERN
+#include "messages.c"
 
 
 static const int RFC_868_BIAS = 2208988800UL;
index 8dda097..0613fa1 100644 (file)
@@ -22,7 +22,6 @@
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <mntent.h>
 #include <dirent.h>
@@ -31,6 +30,7 @@
 #include <sys/mount.h>
 #include <sys/syscall.h>
 #include <linux/unistd.h>
+#include "busybox.h"
 
 _syscall2(int, swapon, const char *, path, int, flags);
 _syscall1(int, swapoff, const char *, path);
index c160ec2..2868a1b 100644 (file)
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <mntent.h>
 #include <errno.h>
 #include <string.h>
 #include <stdlib.h>
+#include "busybox.h"
 
 
 static const int MNT_FORCE = 1;
index 65496b9..cf0aecc 100644 (file)
--- a/utility.c
+++ b/utility.c
  *
  */
 
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <dirent.h>
+#include <time.h>
+#include <utime.h>
+#include <unistd.h>
+#include <ctype.h>
+#include <stdlib.h>
+#include <limits.h>
+#include <sys/ioctl.h>
+#include <sys/utsname.h>               /* for uname(2) */
+
 #include "busybox.h"
 #if defined (BB_CHMOD_CHOWN_CHGRP) \
  || defined (BB_CP_MV)            \
 #include "messages.c"
 #include "usage.h"
 
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <dirent.h>
-#include <time.h>
-#include <utime.h>
-#include <unistd.h>
-#include <ctype.h>
-#include <stdlib.h>
-#include <limits.h>
-#include <sys/ioctl.h>
-#include <sys/utsname.h>               /* for uname(2) */
-
 #include "pwd_grp/pwd.h"
 #include "pwd_grp/grp.h"
 
index c0e8cea..6a3f78a 100644 (file)
  */
 
 
-#include "busybox.h"
 
 #include <stdio.h>
 #include <errno.h>
 #include <getopt.h>
 #include <string.h>
 #include <stdlib.h>
+#include "busybox.h"
 #include "pwd_grp/pwd.h"
 #include "pwd_grp/grp.h"
 
index 8d5af4a..41541de 100644 (file)
 /* Hacked to work with BusyBox by Alfred M. Szmidt */
 
 
-#include "busybox.h"
 
 #include <stdio.h>
 #include <errno.h>
 #include <getopt.h>
 #include <stdlib.h>
+#include "busybox.h"
 
 #define        RW (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH)
 
index 65d0fc3..5b5fd69 100644 (file)
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <fcntl.h>
 #include <unistd.h>
 #include <stdlib.h>
+#include "busybox.h"
 
 extern int watchdog_main(int argc, char **argv)
 {
diff --git a/wc.c b/wc.c
index f416874..f2d33d6 100644 (file)
--- a/wc.c
+++ b/wc.c
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <getopt.h>
 #include <stdlib.h>
+#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 d1aacef..4b8392b 100644 (file)
--- a/wget.c
+++ b/wget.c
@@ -14,7 +14,6 @@
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <errno.h>
 #include <stdlib.h>
@@ -33,6 +32,8 @@
 #include <arpa/inet.h>
 #include <netdb.h>
 
+#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 1908db3..f9d51f2 100644 (file)
--- a/which.c
+++ b/which.c
  *
  */
 
-#include "busybox.h"
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include "busybox.h"
 
 extern int which_main(int argc, char **argv)
 {
index 54df0bf..0bbb54b 100644 (file)
--- a/whoami.c
+++ b/whoami.c
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
+#include "busybox.h"
 
 extern int whoami_main(int argc, char **argv)
 {
diff --git a/xargs.c b/xargs.c
index f05efd9..01aa5be 100644 (file)
--- a/xargs.c
+++ b/xargs.c
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include "busybox.h"
 
 int xargs_main(int argc, char **argv)
 {
diff --git a/yes.c b/yes.c
index 0a8ad83..ad7b98f 100644 (file)
--- a/yes.c
+++ b/yes.c
@@ -20,9 +20,9 @@
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <stdlib.h>
+#include "busybox.h"
 
 extern int yes_main(int argc, char **argv)
 {