diff options
author | Rob Landley | 2005-09-05 04:13:33 +0000 |
---|---|---|
committer | Rob Landley | 2005-09-05 04:13:33 +0000 |
commit | 8a7a678b0307f8390986f7020aea96b7927b72f4 (patch) | |
tree | 01fe0baffd683abaa750b63ee80ddced47dd608e /applets/busybox.c | |
parent | a1a1a9fa2c9b9e15ad15d3a33cc08d3696d01f3f (diff) | |
download | busybox-8a7a678b0307f8390986f7020aea96b7927b72f4.zip busybox-8a7a678b0307f8390986f7020aea96b7927b72f4.tar.gz |
Fixes so "make allnoconfig" works again.
The configure system's save function edited out sub-menus that wouldn't be
displayed in the current configuration, meaning config.h wouldn't have #udef
entries for those symbols, meaning bb_config.h would have the relevant
ENABLE_ missing instead of defined to 0. This broke the build.
So I fixed it, and then reorganized the applets.c and busybox.c to take
away the warnings this revealed (code that would be optimized out was making
calls to functions that hadn't been prototyped. So I added an #else case
to those #ifdefs to #define the relevant functions to empty macros to
placate the warnings.
I also reorganized the applets.c code to make adding such an #else case less
of a pain (and make the need for prototyping go away by moving the functions
up before they were used, and generally wind up with fewer #ifdefs in
the code by putting all the logic in one place). This resulted in a huge
seeming patch, when most if it just moves code from one place to another
without touching it...
Upside: make allyesconfig and make allnoconfig should both work now.
Diffstat (limited to 'applets/busybox.c')
-rw-r--r-- | applets/busybox.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/applets/busybox.c b/applets/busybox.c index 420c9c0..a495650 100644 --- a/applets/busybox.c +++ b/applets/busybox.c @@ -5,8 +5,10 @@ #include <errno.h> #include <stdlib.h> #include "busybox.h" -#ifdef CONFIG_LOCALE_SUPPORT +#if ENABLE_LOCALE_SUPPORT #include <locale.h> +#else +#define setlocale(x,y) #endif const char *bb_applet_name; @@ -54,6 +56,8 @@ static void install_links(const char *busybox, int use_symbolic_links) } } +#else +#define install_links(x,y) #endif /* CONFIG_FEATURE_INSTALLER */ int main(int argc, char **argv) |