aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--applets/Kbuild2
-rw-r--r--applets/applets.c7
-rw-r--r--include/busybox.h14
3 files changed, 9 insertions, 14 deletions
diff --git a/applets/Kbuild b/applets/Kbuild
index 2c6bee999..8999ff097 100644
--- a/applets/Kbuild
+++ b/applets/Kbuild
@@ -10,7 +10,7 @@ obj-y += busybox.o
10 10
11# Generated file needs additional love 11# Generated file needs additional love
12 12
13applets/applets.o: include/usage_compressed.h 13applets/applets.o: .config include/usage_compressed.h
14 14
15hostprogs-y += usage 15hostprogs-y += usage
16always := $(hostprogs-y) 16always := $(hostprogs-y)
diff --git a/applets/applets.c b/applets/applets.c
index 8a17cbf0b..557e9e5d8 100644
--- a/applets/applets.c
+++ b/applets/applets.c
@@ -12,8 +12,13 @@
12 * Licensed under GPLv2 or later, see file License in this tarball for details. 12 * Licensed under GPLv2 or later, see file License in this tarball for details.
13 */ 13 */
14 14
15#include "busybox.h"
16#include <assert.h> 15#include <assert.h>
16#include "busybox.h"
17
18#define PROTOTYPES
19#include "applets.h"
20#undef PROTOTYPES
21
17 22
18/* Apparently uclibc defines __GLIBC__ (compat trick?). Oh well. */ 23/* Apparently uclibc defines __GLIBC__ (compat trick?). Oh well. */
19#if ENABLE_STATIC && defined(__GLIBC__) && !defined(__UCLIBC__) 24#if ENABLE_STATIC && defined(__GLIBC__) && !defined(__UCLIBC__)
diff --git a/include/busybox.h b/include/busybox.h
index a1139b5aa..76ff7b76a 100644
--- a/include/busybox.h
+++ b/include/busybox.h
@@ -31,19 +31,9 @@ struct BB_applet {
31 __extension__ enum SUIDRoot need_suid:4; 31 __extension__ enum SUIDRoot need_suid:4;
32}; 32};
33 33
34/* From busybox.c and applet.c */ 34/* Defined in busybox.c and applet.c */
35extern int busybox_main(int argc, char **argv); 35extern int busybox_main(int argc, char **argv);
36extern const struct BB_applet applets[]; 36extern const struct BB_applet applets[];
37extern const unsigned short NUM_APPLETS; 37extern const unsigned short NUM_APPLETS;
38 38
39/* Automagically pull in all the applet function prototypes and 39#endif /* _BB_INTERNAL_H_ */
40 * applet usage strings. These are all of the form:
41 * extern int foo_main(int argc, char **argv);
42 * extern const char foo_usage[];
43 * These are all autogenerated from the set of currently defined applets.
44 */
45#define PROTOTYPES
46#include "applets.h"
47#undef PROTOTYPES
48
49#endif /* _BB_INTERNAL_H_ */