aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2006-06-03 19:49:21 +0000
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2006-06-03 19:49:21 +0000
commitc89982dcd78b3076cf131dae3ec4ca4b83f1b4da (patch)
tree31f480da01f06ac69514532ce37bbcfde2c43e1b
parentdeda6a5c0d00d02813cfda0d6262a24462909e9f (diff)
downloadbusybox-w32-c89982dcd78b3076cf131dae3ec4ca4b83f1b4da.tar.gz
busybox-w32-c89982dcd78b3076cf131dae3ec4ca4b83f1b4da.tar.bz2
busybox-w32-c89982dcd78b3076cf131dae3ec4ca4b83f1b4da.zip
- move #include busybox.h to the very top so we pull in the config
and eventual platform specific includes in early.
-rw-r--r--miscutils/adjtimex.c5
-rw-r--r--miscutils/crond.c3
-rw-r--r--miscutils/crontab.c3
-rw-r--r--miscutils/dc.c2
-rw-r--r--miscutils/eject.c3
-rw-r--r--miscutils/hdparm.c4
-rw-r--r--miscutils/last.c2
-rw-r--r--miscutils/less.c3
-rw-r--r--miscutils/makedevs.c2
-rw-r--r--miscutils/mountpoint.c2
-rw-r--r--miscutils/mt.c2
-rw-r--r--miscutils/runlevel.c4
-rw-r--r--miscutils/rx.c2
-rw-r--r--miscutils/setsid.c3
-rw-r--r--miscutils/strings.c2
-rw-r--r--miscutils/time.c2
-rw-r--r--miscutils/watchdog.c2
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 @@
1/* vi: set sw=4 ts=4: */
1/* 2/*
2 * adjtimex.c - read, and possibly modify, the Linux kernel `timex' variables. 3 * adjtimex.c - read, and possibly modify, the Linux kernel `timex' variables.
3 * 4 *
@@ -6,16 +7,16 @@
6 * Copyright 1997, 2000, 2001 Larry Doolittle <LRDoolittle@lbl.gov> 7 * Copyright 1997, 2000, 2001 Larry Doolittle <LRDoolittle@lbl.gov>
7 * 8 *
8 * busyboxed 20 March 2001, Larry Doolittle <ldoolitt@recycle.lbl.gov> 9 * busyboxed 20 March 2001, Larry Doolittle <ldoolitt@recycle.lbl.gov>
9 * 10 *
10 * Licensed under GPLv2 or later, see file License in this tarball for details. 11 * Licensed under GPLv2 or later, see file License in this tarball for details.
11 */ 12 */
12 13
14#include "busybox.h"
13#include <stdio.h> 15#include <stdio.h>
14#include <sys/types.h> 16#include <sys/types.h>
15#include <stdlib.h> 17#include <stdlib.h>
16#include <unistd.h> 18#include <unistd.h>
17#include <sys/timex.h> 19#include <sys/timex.h>
18#include "busybox.h"
19 20
20static const struct {int bit; const char *name;} statlist[] = { 21static const struct {int bit; const char *name;} statlist[] = {
21 { STA_PLL, "PLL" }, 22 { 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 @@
12 12
13#define VERSION "2.3.2" 13#define VERSION "2.3.2"
14 14
15#include "busybox.h"
15#include <stdio.h> 16#include <stdio.h>
16#include <stdlib.h> 17#include <stdlib.h>
17#include <stdarg.h> 18#include <stdarg.h>
@@ -29,8 +30,6 @@
29#include <sys/stat.h> 30#include <sys/stat.h>
30#include <sys/resource.h> 31#include <sys/resource.h>
31 32
32#include "busybox.h"
33
34#define arysize(ary) (sizeof(ary)/sizeof((ary)[0])) 33#define arysize(ary) (sizeof(ary)/sizeof((ary)[0]))
35 34
36#ifndef CRONTABS 35#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 @@
10 * Licensed under the GPL v2 or later, see the file LICENSE in this tarball. 10 * Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
11 */ 11 */
12 12
13#include "busybox.h"
13#include <stdio.h> 14#include <stdio.h>
14#include <stdlib.h> 15#include <stdlib.h>
15#include <stdarg.h> 16#include <stdarg.h>
@@ -40,8 +41,6 @@
40#define PATH_VI "/bin/vi" /* location of vi */ 41#define PATH_VI "/bin/vi" /* location of vi */
41#endif 42#endif
42 43
43#include "busybox.h"
44
45static const char *CDir = CRONTABS; 44static const char *CDir = CRONTABS;
46 45
47static void EditFile(const char *user, const char *file); 46static 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 @@
1/* vi: set sw=4 ts=4: */ 1/* vi: set sw=4 ts=4: */
2#include "busybox.h"
2#include <ctype.h> 3#include <ctype.h>
3#include <stdio.h> 4#include <stdio.h>
4#include <stdlib.h> 5#include <stdlib.h>
5#include <string.h> 6#include <string.h>
6#include <unistd.h> 7#include <unistd.h>
7#include <math.h> 8#include <math.h>
8#include "busybox.h"
9 9
10/* Tiny RPN calculator, because "expr" didn't give me bitwise operations. */ 10/* Tiny RPN calculator, because "expr" didn't give me bitwise operations. */
11 11
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 @@
1/* vi: set sw=4 ts=4: */
1/* 2/*
2 * eject implementation for busybox 3 * eject implementation for busybox
3 * 4 *
@@ -12,12 +13,12 @@
12 * Most of the dirty work blatantly ripped off from cat.c =) 13 * Most of the dirty work blatantly ripped off from cat.c =)
13 */ 14 */
14 15
16#include "busybox.h"
15#include <fcntl.h> 17#include <fcntl.h>
16#include <sys/ioctl.h> 18#include <sys/ioctl.h>
17#include <unistd.h> 19#include <unistd.h>
18#include <sys/mount.h> 20#include <sys/mount.h>
19#include <mntent.h> 21#include <mntent.h>
20#include "busybox.h"
21 22
22/* various defines swiped from linux/cdrom.h */ 23/* various defines swiped from linux/cdrom.h */
23#define CDROMCLOSETRAY 0x5319 /* pendant of CDROMEJECT */ 24#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 @@
12 * - by Mark Lord (C) 1994-2002 -- freely distributable 12 * - by Mark Lord (C) 1994-2002 -- freely distributable
13 */ 13 */
14 14
15#include "busybox.h"
15#include <string.h> 16#include <string.h>
16#include <stdlib.h> 17#include <stdlib.h>
17#include <fcntl.h> 18#include <fcntl.h>
18#include <errno.h> 19#include <errno.h>
19#include <ctype.h> 20#include <ctype.h>
20#include <endian.h>
21#include <sys/ioctl.h> 21#include <sys/ioctl.h>
22#include <sys/sysmacros.h> 22#include <sys/sysmacros.h>
23#include <sys/times.h> 23#include <sys/times.h>
@@ -31,8 +31,6 @@
31#endif 31#endif
32#include <unistd.h> 32#include <unistd.h>
33 33
34#include "busybox.h"
35
36/* device types */ 34/* device types */
37/* ------------ */ 35/* ------------ */
38#define NO_DEV 0xffff 36#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 @@
7 * Licensed under the GPL v2 or later, see the file LICENSE in this tarball. 7 * Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
8 */ 8 */
9 9
10#include "busybox.h"
10#include <sys/types.h> 11#include <sys/types.h>
11#include <fcntl.h> 12#include <fcntl.h>
12#include <unistd.h> 13#include <unistd.h>
@@ -16,7 +17,6 @@
16#include <errno.h> 17#include <errno.h>
17#include <string.h> 18#include <string.h>
18#include <time.h> 19#include <time.h>
19#include "busybox.h"
20 20
21#ifndef SHUTDOWN_TIME 21#ifndef SHUTDOWN_TIME
22# define SHUTDOWN_TIME 254 22# 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 @@
30 * redirected input has been read from stdin 30 * redirected input has been read from stdin
31*/ 31*/
32 32
33#include "busybox.h"
33#include <stdio.h> 34#include <stdio.h>
34#include <stdlib.h> 35#include <stdlib.h>
35#include <string.h> 36#include <string.h>
@@ -37,8 +38,6 @@
37#include <unistd.h> 38#include <unistd.h>
38#include <ctype.h> 39#include <ctype.h>
39 40
40#include "busybox.h"
41
42#ifdef CONFIG_FEATURE_LESS_REGEXP 41#ifdef CONFIG_FEATURE_LESS_REGEXP
43#include "xregex.h" 42#include "xregex.h"
44#endif 43#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 @@
7 * known bugs: can't deal with alpha ranges 7 * known bugs: can't deal with alpha ranges
8 */ 8 */
9 9
10#include "busybox.h"
10#include <stdio.h> 11#include <stdio.h>
11#include <stdlib.h> 12#include <stdlib.h>
12#include <string.h> 13#include <string.h>
@@ -16,7 +17,6 @@
16#include <unistd.h> 17#include <unistd.h>
17#include <sys/types.h> 18#include <sys/types.h>
18#include <sys/sysmacros.h> /* major() and minor() */ 19#include <sys/sysmacros.h> /* major() and minor() */
19#include "busybox.h"
20 20
21#ifdef CONFIG_FEATURE_MAKEDEVS_LEAF 21#ifdef CONFIG_FEATURE_MAKEDEVS_LEAF
22int makedevs_main(int argc, char **argv) 22int 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 @@
9 * Based on sysvinit's mountpoint 9 * Based on sysvinit's mountpoint
10 */ 10 */
11 11
12#include "busybox.h"
12#include <sys/stat.h> 13#include <sys/stat.h>
13#include <errno.h> /* errno */ 14#include <errno.h> /* errno */
14#include <string.h> /* strerror */ 15#include <string.h> /* strerror */
15#include <getopt.h> /* optind */ 16#include <getopt.h> /* optind */
16#include "busybox.h"
17 17
18int mountpoint_main(int argc, char **argv) 18int mountpoint_main(int argc, char **argv)
19{ 19{
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 @@
1/* vi: set sw=4 ts=4: */ 1/* vi: set sw=4 ts=4: */
2#include "busybox.h"
2#include <stdio.h> 3#include <stdio.h>
3#include <stdlib.h> 4#include <stdlib.h>
4#include <string.h> 5#include <string.h>
5#include <sys/mtio.h> 6#include <sys/mtio.h>
6#include <fcntl.h> 7#include <fcntl.h>
7#include "busybox.h"
8 8
9struct mt_opcodes { 9struct mt_opcodes {
10 char *name; 10 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 @@
1/* vi: set sw=4 ts=4: */
1/* 2/*
2 * runlevel Prints out the previous and the current runlevel. 3 * runlevel Prints out the previous and the current runlevel.
3 * 4 *
@@ -11,13 +12,12 @@
11 * initially busyboxified by Bernhard Fischer 12 * initially busyboxified by Bernhard Fischer
12 */ 13 */
13 14
15#include "busybox.h"
14#include <stdio.h> 16#include <stdio.h>
15#include <utmp.h> 17#include <utmp.h>
16#include <time.h> 18#include <time.h>
17#include <stdlib.h> 19#include <stdlib.h>
18 20
19#include "busybox.h"
20
21int runlevel_main(int argc, char *argv[]) 21int runlevel_main(int argc, char *argv[])
22{ 22{
23 struct utmp *ut; 23 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 @@
20 * 20 *
21 */ 21 */
22 22
23#include "busybox.h"
23#include <stdlib.h> 24#include <stdlib.h>
24#include <stdarg.h> 25#include <stdarg.h>
25#include <stdio.h> 26#include <stdio.h>
@@ -31,7 +32,6 @@
31#include <sys/stat.h> 32#include <sys/stat.h>
32#include <fcntl.h> 33#include <fcntl.h>
33#include <string.h> 34#include <string.h>
34#include "busybox.h"
35 35
36 36
37#define SOH 0x01 37#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 @@
1/* vi: set sw=4 ts=4: */
1/* 2/*
2 * setsid.c -- execute a command in a new session 3 * setsid.c -- execute a command in a new session
3 * Rick Sladkey <jrs@world.std.com> 4 * Rick Sladkey <jrs@world.std.com>
@@ -13,10 +14,10 @@
13 * - busyboxed 14 * - busyboxed
14 */ 15 */
15 16
17#include "busybox.h"
16#include <stdio.h> 18#include <stdio.h>
17#include <unistd.h> 19#include <unistd.h>
18#include <stdlib.h> 20#include <stdlib.h>
19#include "busybox.h"
20 21
21int setsid_main(int argc, char *argv[]) 22int setsid_main(int argc, char *argv[])
22{ 23{
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 @@
13 * Badly hacked by Tito Ragusa <farmatito@tiscali.it> 13 * Badly hacked by Tito Ragusa <farmatito@tiscali.it>
14 */ 14 */
15 15
16#include "busybox.h"
16#include <stdio.h> 17#include <stdio.h>
17#include <stdlib.h> 18#include <stdlib.h>
18#include <getopt.h> 19#include <getopt.h>
19#include <ctype.h> 20#include <ctype.h>
20#include "busybox.h"
21 21
22#define WHOLE_FILE 1 22#define WHOLE_FILE 1
23#define PRINT_NAME 2 23#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 @@
21 Heavily modified for busybox by Erik Andersen <andersen@codepoet.org> 21 Heavily modified for busybox by Erik Andersen <andersen@codepoet.org>
22 */ 22 */
23 23
24#include "busybox.h"
24#include <stdlib.h> 25#include <stdlib.h>
25#include <stdio.h> 26#include <stdio.h>
26#include <signal.h> 27#include <signal.h>
@@ -35,7 +36,6 @@
35 36
36#define TV_MSEC tv_usec / 1000 37#define TV_MSEC tv_usec / 1000
37#include <sys/resource.h> 38#include <sys/resource.h>
38#include "busybox.h"
39 39
40/* Information on the resources used by a child process. */ 40/* Information on the resources used by a child process. */
41typedef struct 41typedef 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 @@
7 * Licensed under the GPL v2 or later, see the file LICENSE in this tarball. 7 * Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
8 */ 8 */
9 9
10#include "busybox.h"
10#include <stdio.h> 11#include <stdio.h>
11#include <fcntl.h> 12#include <fcntl.h>
12#include <unistd.h> 13#include <unistd.h>
13#include <stdlib.h> 14#include <stdlib.h>
14#include <signal.h> 15#include <signal.h>
15#include "busybox.h"
16 16
17/* Userspace timer duration, in seconds */ 17/* Userspace timer duration, in seconds */
18static unsigned int timer_duration = 30; 18static unsigned int timer_duration = 30;