diff options
| author | Eric Andersen <andersen@codepoet.org> | 2001-01-27 08:24:39 +0000 |
|---|---|---|
| committer | Eric Andersen <andersen@codepoet.org> | 2001-01-27 08:24:39 +0000 |
| commit | ed3ef50c233ffb1b50ea0e7382a8e60b86491009 (patch) | |
| tree | ecb05ce51890c2cf84ad036543a972ac812320c3 /miscutils | |
| parent | ab050f5522e843bf08994685134adaaac7ffd392 (diff) | |
| download | busybox-w32-ed3ef50c233ffb1b50ea0e7382a8e60b86491009.tar.gz busybox-w32-ed3ef50c233ffb1b50ea0e7382a8e60b86491009.tar.bz2 busybox-w32-ed3ef50c233ffb1b50ea0e7382a8e60b86491009.zip | |
Fix header file usage -- there were many unnecessary header files included in
busybox.h which slowed compiles. I left only what was needed and then fixed up
all the apps to include their own header files. I also fixed naming for pwd.h
and grp.h functions. Tested to compile and run with libc5, glibc, and uClibc.
-Erik
Diffstat (limited to 'miscutils')
| -rw-r--r-- | miscutils/dutmp.c | 4 | ||||
| -rw-r--r-- | miscutils/mktemp.c | 2 | ||||
| -rw-r--r-- | miscutils/mt.c | 1 | ||||
| -rw-r--r-- | miscutils/readlink.c | 1 | ||||
| -rw-r--r-- | miscutils/update.c | 3 | ||||
| -rw-r--r-- | miscutils/watchdog.c | 2 |
6 files changed, 12 insertions, 1 deletions
diff --git a/miscutils/dutmp.c b/miscutils/dutmp.c index efd15dfbf..7e1d2eed7 100644 --- a/miscutils/dutmp.c +++ b/miscutils/dutmp.c | |||
| @@ -21,6 +21,8 @@ | |||
| 21 | #define bb_need_io_error | 21 | #define bb_need_io_error |
| 22 | #include "messages.c" | 22 | #include "messages.c" |
| 23 | #include <utmp.h> | 23 | #include <utmp.h> |
| 24 | #include <stdlib.h> | ||
| 25 | #include <unistd.h> | ||
| 24 | 26 | ||
| 25 | extern int dutmp_main(int argc, char **argv) | 27 | extern int dutmp_main(int argc, char **argv) |
| 26 | { | 28 | { |
| @@ -35,7 +37,7 @@ extern int dutmp_main(int argc, char **argv) | |||
| 35 | } else { | 37 | } else { |
| 36 | file = open(argv[1], O_RDONLY); | 38 | file = open(argv[1], O_RDONLY); |
| 37 | if (file < 0) { | 39 | if (file < 0) { |
| 38 | error_msg_and_die(io_error, argv[1], strerror(errno)); | 40 | perror_msg_and_die(io_error, argv[1]); |
| 39 | } | 41 | } |
| 40 | } | 42 | } |
| 41 | 43 | ||
diff --git a/miscutils/mktemp.c b/miscutils/mktemp.c index 2d53cc2a4..3b9f2b22c 100644 --- a/miscutils/mktemp.c +++ b/miscutils/mktemp.c | |||
| @@ -25,6 +25,8 @@ | |||
| 25 | #include "busybox.h" | 25 | #include "busybox.h" |
| 26 | #include <stdio.h> | 26 | #include <stdio.h> |
| 27 | #include <errno.h> | 27 | #include <errno.h> |
| 28 | #include <unistd.h> | ||
| 29 | #include <stdlib.h> | ||
| 28 | 30 | ||
| 29 | extern int mktemp_main(int argc, char **argv) | 31 | extern int mktemp_main(int argc, char **argv) |
| 30 | { | 32 | { |
diff --git a/miscutils/mt.c b/miscutils/mt.c index 70d03cca4..0d28339b9 100644 --- a/miscutils/mt.c +++ b/miscutils/mt.c | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | /* vi: set sw=4 ts=4: */ | 1 | /* vi: set sw=4 ts=4: */ |
| 2 | #include "busybox.h" | 2 | #include "busybox.h" |
| 3 | #include <stdio.h> | 3 | #include <stdio.h> |
| 4 | #include <stdlib.h> | ||
| 4 | #include <sys/mtio.h> | 5 | #include <sys/mtio.h> |
| 5 | #include <sys/fcntl.h> | 6 | #include <sys/fcntl.h> |
| 6 | 7 | ||
diff --git a/miscutils/readlink.c b/miscutils/readlink.c index bb2056a25..98f1dea4f 100644 --- a/miscutils/readlink.c +++ b/miscutils/readlink.c | |||
| @@ -25,6 +25,7 @@ | |||
| 25 | #include "busybox.h" | 25 | #include "busybox.h" |
| 26 | #include <errno.h> | 26 | #include <errno.h> |
| 27 | #include <unistd.h> | 27 | #include <unistd.h> |
| 28 | #include <stdlib.h> | ||
| 28 | 29 | ||
| 29 | int readlink_main(int argc, char **argv) | 30 | int readlink_main(int argc, char **argv) |
| 30 | { | 31 | { |
diff --git a/miscutils/update.c b/miscutils/update.c index 080cb99c3..309ce0cbd 100644 --- a/miscutils/update.c +++ b/miscutils/update.c | |||
| @@ -32,11 +32,14 @@ | |||
| 32 | #include <sys/param.h> | 32 | #include <sys/param.h> |
| 33 | #include <sys/syslog.h> | 33 | #include <sys/syslog.h> |
| 34 | #include <unistd.h> /* for getopt() */ | 34 | #include <unistd.h> /* for getopt() */ |
| 35 | #include <stdlib.h> | ||
| 35 | 36 | ||
| 36 | 37 | ||
| 37 | #if defined(__GLIBC__) | 38 | #if defined(__GLIBC__) |
| 38 | #include <sys/kdaemon.h> | 39 | #include <sys/kdaemon.h> |
| 39 | #else | 40 | #else |
| 41 | #include <sys/syscall.h> | ||
| 42 | #include <linux/unistd.h> | ||
| 40 | static _syscall2(int, bdflush, int, func, int, data); | 43 | static _syscall2(int, bdflush, int, func, int, data); |
| 41 | #endif /* __GLIBC__ */ | 44 | #endif /* __GLIBC__ */ |
| 42 | 45 | ||
diff --git a/miscutils/watchdog.c b/miscutils/watchdog.c index d297afa02..7026cc005 100644 --- a/miscutils/watchdog.c +++ b/miscutils/watchdog.c | |||
| @@ -23,6 +23,8 @@ | |||
| 23 | #include "busybox.h" | 23 | #include "busybox.h" |
| 24 | #include <stdio.h> | 24 | #include <stdio.h> |
| 25 | #include <fcntl.h> | 25 | #include <fcntl.h> |
| 26 | #include <unistd.h> | ||
| 27 | #include <stdlib.h> | ||
| 26 | 28 | ||
| 27 | extern int watchdog_main(int argc, char **argv) | 29 | extern int watchdog_main(int argc, char **argv) |
| 28 | { | 30 | { |
