Header file cleanup. platform.h apparently needs to be included early on so it
[oweals/busybox.git] / include / busybox.h
1 /* vi: set sw=4 ts=4: */
2 /*
3  * Busybox main internal header file
4  *
5  * Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
6  */
7 #ifndef _BB_INTERNAL_H_
8 #define _BB_INTERNAL_H_    1
9
10 #include "bb_config.h"
11
12 #include "libbb.h"
13
14 enum Location {
15         _BB_DIR_ROOT = 0,
16         _BB_DIR_BIN,
17         _BB_DIR_SBIN,
18         _BB_DIR_USR_BIN,
19         _BB_DIR_USR_SBIN
20 };
21
22 enum SUIDRoot {
23         _BB_SUID_NEVER = 0,
24         _BB_SUID_MAYBE,
25         _BB_SUID_ALWAYS
26 };
27
28 struct BB_applet {
29         const char *name;
30         int (*main) (int argc, char **argv);
31         __extension__ enum Location location:4;
32         __extension__ enum SUIDRoot need_suid:4;
33 };
34
35 /* From busybox.c */
36 extern const struct BB_applet applets[];
37
38 /* Automagically pull in all the applet function prototypes and
39  * applet usage strings.  These are all of the form:
40  *              extern int foo_main(int argc, char **argv);
41  *              extern const char foo_usage[];
42  * These are all autogenerated from the set of currently defined applets.
43  */
44 #define PROTOTYPES
45 #include "applets.h"
46 #undef PROTOTYPES
47
48 #endif                                                  /* _BB_INTERNAL_H_ */