diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2011-03-28 01:23:38 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2011-03-28 01:23:38 +0200 |
commit | 6ec1510f719ad7463d76eea9284428cc605d6b38 (patch) | |
tree | f692b2720d96ad1208682035a1cba498c803b998 | |
parent | 4a2aecb53a193916a40594f7c40eab86fedd8f8e (diff) | |
download | busybox-w32-6ec1510f719ad7463d76eea9284428cc605d6b38.tar.gz busybox-w32-6ec1510f719ad7463d76eea9284428cc605d6b38.tar.bz2 busybox-w32-6ec1510f719ad7463d76eea9284428cc605d6b38.zip |
applet_tables: do not include libbb.h, that header ir for target builds
...and applets/applet_tables.c is built on *host*.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | applets/applet_tables.c | 10 | ||||
-rw-r--r-- | include/applet_metadata.h | 30 | ||||
-rw-r--r-- | include/busybox.h | 25 |
3 files changed, 40 insertions, 25 deletions
diff --git a/applets/applet_tables.c b/applets/applet_tables.c index 32dcdb73d..3859d7326 100644 --- a/applets/applet_tables.c +++ b/applets/applet_tables.c | |||
@@ -7,13 +7,19 @@ | |||
7 | * | 7 | * |
8 | * Licensed under GPLv2, see file LICENSE in this source tree. | 8 | * Licensed under GPLv2, see file LICENSE in this source tree. |
9 | */ | 9 | */ |
10 | 10 | #include <sys/types.h> | |
11 | #include <sys/stat.h> | ||
12 | #include <fcntl.h> | ||
11 | #include <stdlib.h> | 13 | #include <stdlib.h> |
12 | #include <string.h> | 14 | #include <string.h> |
13 | #include <stdio.h> | 15 | #include <stdio.h> |
16 | #include <unistd.h> | ||
17 | |||
18 | #undef ARRAY_SIZE | ||
19 | #define ARRAY_SIZE(x) ((unsigned)(sizeof(x) / sizeof((x)[0]))) | ||
14 | 20 | ||
15 | #include "../include/autoconf.h" | 21 | #include "../include/autoconf.h" |
16 | #include "../include/busybox.h" | 22 | #include "../include/applet_metadata.h" |
17 | 23 | ||
18 | struct bb_applet { | 24 | struct bb_applet { |
19 | const char *name; | 25 | const char *name; |
diff --git a/include/applet_metadata.h b/include/applet_metadata.h new file mode 100644 index 000000000..566ef3517 --- /dev/null +++ b/include/applet_metadata.h | |||
@@ -0,0 +1,30 @@ | |||
1 | /* vi: set sw=4 ts=4: */ | ||
2 | /* | ||
3 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | ||
4 | */ | ||
5 | #ifndef APPLET_METADATA_H | ||
6 | #define APPLET_METADATA_H 1 | ||
7 | |||
8 | /* Note: can be included by both host and target builds! */ | ||
9 | |||
10 | /* order matters: used as index into "install_dir[]" in appletlib.c */ | ||
11 | typedef enum bb_install_loc_t { | ||
12 | BB_DIR_ROOT = 0, | ||
13 | BB_DIR_BIN, | ||
14 | BB_DIR_SBIN, | ||
15 | #if ENABLE_INSTALL_NO_USR | ||
16 | BB_DIR_USR_BIN = BB_DIR_BIN, | ||
17 | BB_DIR_USR_SBIN = BB_DIR_SBIN, | ||
18 | #else | ||
19 | BB_DIR_USR_BIN, | ||
20 | BB_DIR_USR_SBIN, | ||
21 | #endif | ||
22 | } bb_install_loc_t; | ||
23 | |||
24 | typedef enum bb_suid_t { | ||
25 | BB_SUID_DROP = 0, | ||
26 | BB_SUID_MAYBE, | ||
27 | BB_SUID_REQUIRE | ||
28 | } bb_suid_t; | ||
29 | |||
30 | #endif | ||
diff --git a/include/busybox.h b/include/busybox.h index be06817e3..315ef8f26 100644 --- a/include/busybox.h +++ b/include/busybox.h | |||
@@ -1,37 +1,16 @@ | |||
1 | /* vi: set sw=4 ts=4: */ | 1 | /* vi: set sw=4 ts=4: */ |
2 | /* | 2 | /* |
3 | * Busybox main internal header file | ||
4 | * | ||
5 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 3 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
6 | */ | 4 | */ |
7 | #ifndef BUSYBOX_H | 5 | #ifndef BUSYBOX_H |
8 | #define BUSYBOX_H 1 | 6 | #define BUSYBOX_H 1 |
9 | 7 | ||
10 | #include "libbb.h" | 8 | #include "libbb.h" |
9 | /* BB_DIR_foo and BB_SUID_bar constants: */ | ||
10 | #include "applet_metadata.h" | ||
11 | 11 | ||
12 | PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN | 12 | PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN |
13 | 13 | ||
14 | /* order matters: used as index into "install_dir[]" in appletlib.c */ | ||
15 | typedef enum bb_install_loc_t { | ||
16 | BB_DIR_ROOT = 0, | ||
17 | BB_DIR_BIN, | ||
18 | BB_DIR_SBIN, | ||
19 | #if ENABLE_INSTALL_NO_USR | ||
20 | BB_DIR_USR_BIN = BB_DIR_BIN, | ||
21 | BB_DIR_USR_SBIN = BB_DIR_SBIN, | ||
22 | #else | ||
23 | BB_DIR_USR_BIN, | ||
24 | BB_DIR_USR_SBIN, | ||
25 | #endif | ||
26 | } bb_install_loc_t; | ||
27 | |||
28 | typedef enum bb_suid_t { | ||
29 | BB_SUID_DROP = 0, | ||
30 | BB_SUID_MAYBE, | ||
31 | BB_SUID_REQUIRE | ||
32 | } bb_suid_t; | ||
33 | |||
34 | |||
35 | /* Defined in appletlib.c (by including generated applet_tables.h) */ | 14 | /* Defined in appletlib.c (by including generated applet_tables.h) */ |
36 | /* Keep in sync with applets/applet_tables.c! */ | 15 | /* Keep in sync with applets/applet_tables.c! */ |
37 | extern const char applet_names[]; | 16 | extern const char applet_names[]; |