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 /include/busybox.h | |
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 'include/busybox.h')
-rw-r--r-- | include/busybox.h | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/include/busybox.h b/include/busybox.h index be6c6f305..5f9425a5b 100644 --- a/include/busybox.h +++ b/include/busybox.h | |||
@@ -26,19 +26,10 @@ | |||
26 | 26 | ||
27 | #include "Config.h" | 27 | #include "Config.h" |
28 | 28 | ||
29 | #include <stdlib.h> | 29 | #include <stdio.h> |
30 | #include <stdarg.h> | 30 | #include <stdarg.h> |
31 | #include <string.h> | ||
32 | #include <unistd.h> | ||
33 | #include <errno.h> | ||
34 | #include <sys/stat.h> | 31 | #include <sys/stat.h> |
35 | #include <sys/param.h> | ||
36 | #include <sys/types.h> | 32 | #include <sys/types.h> |
37 | #include <mntent.h> | ||
38 | #include <regex.h> | ||
39 | /* for the _syscall() macros */ | ||
40 | #include <sys/syscall.h> | ||
41 | #include <linux/unistd.h> | ||
42 | 33 | ||
43 | #ifdef DMALLOC | 34 | #ifdef DMALLOC |
44 | #include "dmalloc.h" | 35 | #include "dmalloc.h" |
@@ -69,26 +60,6 @@ static inline int is_octal(ch) { return ((ch >= '0') && (ch <= '7')); } | |||
69 | #endif | 60 | #endif |
70 | 61 | ||
71 | 62 | ||
72 | /* I don't like nested includes, but the string and io functions are used | ||
73 | * too often | ||
74 | */ | ||
75 | #include <stdio.h> | ||
76 | #if !defined(NO_STRING_H) || defined(STDC_HEADERS) | ||
77 | # include <string.h> | ||
78 | # if !defined(STDC_HEADERS) && !defined(NO_MEMORY_H) && !defined(__GNUC__) | ||
79 | # include <memory.h> | ||
80 | # endif | ||
81 | # define memzero(s, n) memset ((void *)(s), 0, (n)) | ||
82 | #else | ||
83 | # include <strings.h> | ||
84 | # define strchr index | ||
85 | # define strrchr rindex | ||
86 | # define memcpy(d, s, n) bcopy((s), (d), (n)) | ||
87 | # define memcmp(s1, s2, n) bcmp((s1), (s2), (n)) | ||
88 | # define memzero(s, n) bzero((s), (n)) | ||
89 | #endif | ||
90 | |||
91 | |||
92 | enum Location { | 63 | enum Location { |
93 | _BB_DIR_ROOT = 0, | 64 | _BB_DIR_ROOT = 0, |
94 | _BB_DIR_BIN, | 65 | _BB_DIR_BIN, |
@@ -179,7 +150,6 @@ extern void print_file(FILE *file); | |||
179 | extern int print_file_by_name(char *filename); | 150 | extern int print_file_by_name(char *filename); |
180 | extern char process_escape_sequence(char **ptr); | 151 | extern char process_escape_sequence(char **ptr); |
181 | extern char *get_last_path_component(char *path); | 152 | extern char *get_last_path_component(char *path); |
182 | extern void xregcomp(regex_t *preg, const char *regex, int cflags); | ||
183 | extern FILE *wfopen(const char *path, const char *mode); | 153 | extern FILE *wfopen(const char *path, const char *mode); |
184 | extern FILE *xfopen(const char *path, const char *mode); | 154 | extern FILE *xfopen(const char *path, const char *mode); |
185 | 155 | ||