From c89982dcd78b3076cf131dae3ec4ca4b83f1b4da Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Sat, 3 Jun 2006 19:49:21 +0000 Subject: [PATCH] - move #include busybox.h to the very top so we pull in the config and eventual platform specific includes in early. --- miscutils/adjtimex.c | 5 +++-- miscutils/crond.c | 3 +-- miscutils/crontab.c | 3 +-- miscutils/dc.c | 2 +- miscutils/eject.c | 3 ++- miscutils/hdparm.c | 4 +--- miscutils/last.c | 2 +- miscutils/less.c | 3 +-- miscutils/makedevs.c | 2 +- miscutils/mountpoint.c | 2 +- miscutils/mt.c | 2 +- miscutils/runlevel.c | 4 ++-- miscutils/rx.c | 2 +- miscutils/setsid.c | 3 ++- miscutils/strings.c | 2 +- miscutils/time.c | 2 +- miscutils/watchdog.c | 2 +- 17 files changed, 22 insertions(+), 24 deletions(-) diff --git a/miscutils/adjtimex.c b/miscutils/adjtimex.c index 905b80f47..abd061897 100644 --- a/miscutils/adjtimex.c +++ b/miscutils/adjtimex.c @@ -1,3 +1,4 @@ +/* vi: set sw=4 ts=4: */ /* * adjtimex.c - read, and possibly modify, the Linux kernel `timex' variables. * @@ -6,16 +7,16 @@ * Copyright 1997, 2000, 2001 Larry Doolittle * * busyboxed 20 March 2001, Larry Doolittle - * + * * Licensed under GPLv2 or later, see file License in this tarball for details. */ +#include "busybox.h" #include #include #include #include #include -#include "busybox.h" static const struct {int bit; const char *name;} statlist[] = { { STA_PLL, "PLL" }, diff --git a/miscutils/crond.c b/miscutils/crond.c index 954d97965..3f60468de 100644 --- a/miscutils/crond.c +++ b/miscutils/crond.c @@ -12,6 +12,7 @@ #define VERSION "2.3.2" +#include "busybox.h" #include #include #include @@ -29,8 +30,6 @@ #include #include -#include "busybox.h" - #define arysize(ary) (sizeof(ary)/sizeof((ary)[0])) #ifndef CRONTABS diff --git a/miscutils/crontab.c b/miscutils/crontab.c index bad7f0018..67279fdeb 100644 --- a/miscutils/crontab.c +++ b/miscutils/crontab.c @@ -10,6 +10,7 @@ * Licensed under the GPL v2 or later, see the file LICENSE in this tarball. */ +#include "busybox.h" #include #include #include @@ -40,8 +41,6 @@ #define PATH_VI "/bin/vi" /* location of vi */ #endif -#include "busybox.h" - static const char *CDir = CRONTABS; static void EditFile(const char *user, const char *file); diff --git a/miscutils/dc.c b/miscutils/dc.c index 112f6df3f..5956b3af8 100644 --- a/miscutils/dc.c +++ b/miscutils/dc.c @@ -1,11 +1,11 @@ /* vi: set sw=4 ts=4: */ +#include "busybox.h" #include #include #include #include #include #include -#include "busybox.h" /* Tiny RPN calculator, because "expr" didn't give me bitwise operations. */ diff --git a/miscutils/eject.c b/miscutils/eject.c index d9cb0f67b..a402e49c6 100644 --- a/miscutils/eject.c +++ b/miscutils/eject.c @@ -1,3 +1,4 @@ +/* vi: set sw=4 ts=4: */ /* * eject implementation for busybox * @@ -12,12 +13,12 @@ * Most of the dirty work blatantly ripped off from cat.c =) */ +#include "busybox.h" #include #include #include #include #include -#include "busybox.h" /* various defines swiped from linux/cdrom.h */ #define CDROMCLOSETRAY 0x5319 /* pendant of CDROMEJECT */ diff --git a/miscutils/hdparm.c b/miscutils/hdparm.c index 37b87ea9f..24962dd25 100644 --- a/miscutils/hdparm.c +++ b/miscutils/hdparm.c @@ -12,12 +12,12 @@ * - by Mark Lord (C) 1994-2002 -- freely distributable */ +#include "busybox.h" #include #include #include #include #include -#include #include #include #include @@ -31,8 +31,6 @@ #endif #include -#include "busybox.h" - /* device types */ /* ------------ */ #define NO_DEV 0xffff diff --git a/miscutils/last.c b/miscutils/last.c index c10e1ea4f..47c18ffa0 100644 --- a/miscutils/last.c +++ b/miscutils/last.c @@ -7,6 +7,7 @@ * Licensed under the GPL v2 or later, see the file LICENSE in this tarball. */ +#include "busybox.h" #include #include #include @@ -16,7 +17,6 @@ #include #include #include -#include "busybox.h" #ifndef SHUTDOWN_TIME # define SHUTDOWN_TIME 254 diff --git a/miscutils/less.c b/miscutils/less.c index 940b1c865..596490483 100644 --- a/miscutils/less.c +++ b/miscutils/less.c @@ -30,6 +30,7 @@ * redirected input has been read from stdin */ +#include "busybox.h" #include #include #include @@ -37,8 +38,6 @@ #include #include -#include "busybox.h" - #ifdef CONFIG_FEATURE_LESS_REGEXP #include "xregex.h" #endif diff --git a/miscutils/makedevs.c b/miscutils/makedevs.c index 95889506f..776bcaa8d 100644 --- a/miscutils/makedevs.c +++ b/miscutils/makedevs.c @@ -7,6 +7,7 @@ * known bugs: can't deal with alpha ranges */ +#include "busybox.h" #include #include #include @@ -16,7 +17,6 @@ #include #include #include /* major() and minor() */ -#include "busybox.h" #ifdef CONFIG_FEATURE_MAKEDEVS_LEAF int makedevs_main(int argc, char **argv) diff --git a/miscutils/mountpoint.c b/miscutils/mountpoint.c index 1bebb56c5..6265a20e1 100644 --- a/miscutils/mountpoint.c +++ b/miscutils/mountpoint.c @@ -9,11 +9,11 @@ * Based on sysvinit's mountpoint */ +#include "busybox.h" #include #include /* errno */ #include /* strerror */ #include /* optind */ -#include "busybox.h" int mountpoint_main(int argc, char **argv) { diff --git a/miscutils/mt.c b/miscutils/mt.c index 9f2c5c335..3057158d8 100644 --- a/miscutils/mt.c +++ b/miscutils/mt.c @@ -1,10 +1,10 @@ /* vi: set sw=4 ts=4: */ +#include "busybox.h" #include #include #include #include #include -#include "busybox.h" struct mt_opcodes { char *name; diff --git a/miscutils/runlevel.c b/miscutils/runlevel.c index dfa846f81..a042a7012 100644 --- a/miscutils/runlevel.c +++ b/miscutils/runlevel.c @@ -1,3 +1,4 @@ +/* vi: set sw=4 ts=4: */ /* * runlevel Prints out the previous and the current runlevel. * @@ -11,13 +12,12 @@ * initially busyboxified by Bernhard Fischer */ +#include "busybox.h" #include #include #include #include -#include "busybox.h" - int runlevel_main(int argc, char *argv[]) { struct utmp *ut; diff --git a/miscutils/rx.c b/miscutils/rx.c index 5fa98b5ef..7642094b7 100644 --- a/miscutils/rx.c +++ b/miscutils/rx.c @@ -20,6 +20,7 @@ * */ +#include "busybox.h" #include #include #include @@ -31,7 +32,6 @@ #include #include #include -#include "busybox.h" #define SOH 0x01 diff --git a/miscutils/setsid.c b/miscutils/setsid.c index 80c719ca7..41d9ef2ce 100644 --- a/miscutils/setsid.c +++ b/miscutils/setsid.c @@ -1,3 +1,4 @@ +/* vi: set sw=4 ts=4: */ /* * setsid.c -- execute a command in a new session * Rick Sladkey @@ -13,10 +14,10 @@ * - busyboxed */ +#include "busybox.h" #include #include #include -#include "busybox.h" int setsid_main(int argc, char *argv[]) { diff --git a/miscutils/strings.c b/miscutils/strings.c index 7758907c7..107f6b4c4 100644 --- a/miscutils/strings.c +++ b/miscutils/strings.c @@ -13,11 +13,11 @@ * Badly hacked by Tito Ragusa */ +#include "busybox.h" #include #include #include #include -#include "busybox.h" #define WHOLE_FILE 1 #define PRINT_NAME 2 diff --git a/miscutils/time.c b/miscutils/time.c index 0a2fb7748..9d0d6c05f 100644 --- a/miscutils/time.c +++ b/miscutils/time.c @@ -21,6 +21,7 @@ Heavily modified for busybox by Erik Andersen */ +#include "busybox.h" #include #include #include @@ -35,7 +36,6 @@ #define TV_MSEC tv_usec / 1000 #include -#include "busybox.h" /* Information on the resources used by a child process. */ typedef struct diff --git a/miscutils/watchdog.c b/miscutils/watchdog.c index 58a606553..6fcb8f83c 100644 --- a/miscutils/watchdog.c +++ b/miscutils/watchdog.c @@ -7,12 +7,12 @@ * Licensed under the GPL v2 or later, see the file LICENSE in this tarball. */ +#include "busybox.h" #include #include #include #include #include -#include "busybox.h" /* Userspace timer duration, in seconds */ static unsigned int timer_duration = 30; -- 2.25.1