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 /utility.c | |
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 'utility.c')
-rw-r--r-- | utility.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -50,11 +50,17 @@ | |||
50 | #include <utime.h> | 50 | #include <utime.h> |
51 | #include <unistd.h> | 51 | #include <unistd.h> |
52 | #include <ctype.h> | 52 | #include <ctype.h> |
53 | #include <stdlib.h> | ||
53 | #include <sys/ioctl.h> | 54 | #include <sys/ioctl.h> |
54 | #include <sys/utsname.h> /* for uname(2) */ | 55 | #include <sys/utsname.h> /* for uname(2) */ |
56 | |||
55 | #include "pwd_grp/pwd.h" | 57 | #include "pwd_grp/pwd.h" |
56 | #include "pwd_grp/grp.h" | 58 | #include "pwd_grp/grp.h" |
57 | 59 | ||
60 | /* for the _syscall() macros */ | ||
61 | #include <sys/syscall.h> | ||
62 | #include <linux/unistd.h> | ||
63 | |||
58 | /* Busybox mount uses either /proc/filesystems or /dev/mtab to get the | 64 | /* Busybox mount uses either /proc/filesystems or /dev/mtab to get the |
59 | * list of available filesystems used for the -t auto option */ | 65 | * list of available filesystems used for the -t auto option */ |
60 | #if defined BB_FEATURE_USE_PROCFS && defined BB_FEATURE_USE_DEVPS_PATCH | 66 | #if defined BB_FEATURE_USE_PROCFS && defined BB_FEATURE_USE_DEVPS_PATCH |
@@ -1123,6 +1129,7 @@ extern int check_wildcard_match(const char *text, const char *pattern) | |||
1123 | 1129 | ||
1124 | 1130 | ||
1125 | #if defined BB_DF || defined BB_MTAB | 1131 | #if defined BB_DF || defined BB_MTAB |
1132 | #include <mntent.h> | ||
1126 | /* | 1133 | /* |
1127 | * Given a block device, find the mount table entry if that block device | 1134 | * Given a block device, find the mount table entry if that block device |
1128 | * is mounted. | 1135 | * is mounted. |
@@ -1645,6 +1652,7 @@ char *get_last_path_component(char *path) | |||
1645 | #endif | 1652 | #endif |
1646 | 1653 | ||
1647 | #if defined BB_GREP || defined BB_SED | 1654 | #if defined BB_GREP || defined BB_SED |
1655 | #include <regex.h> | ||
1648 | void xregcomp(regex_t *preg, const char *regex, int cflags) | 1656 | void xregcomp(regex_t *preg, const char *regex, int cflags) |
1649 | { | 1657 | { |
1650 | int ret; | 1658 | int ret; |