busybox/include
Rob Landley 7bfa88f315 New USE() macros
For each CONFIG_SYMBOL, include/bb_config.h now has both ENABLE_SYMBOL
and USE_SYMBOL(x).  ENABLE_SYMBOL is still always defined (1 or 0) so that
if(ENABLE) should optimize out when it's zero.  The USE_SYMBOL(X) will only
splice in X if the symbol is defined, otherwise it'll be empty.

Thus we can convert this:

#ifdef CONFIG_ARGS
    opt = bb_getopt_ulflags(argc, argv, "ab:c"
#ifdef CONFIG_THINGY
        "d:"
#endif
        , &bvalue
#ifdef CONFIG_THINGY
        , &thingy
#endif
    );
#endif

into this:
    if (ENABLE_ARGS) {
        opt = bb_getopt_ulflags(argc, argv, "ab:c" USE_THINGY("d:"), &bvalue
                USE_THINGY(, &thingy));
    }

And it should produce the same code.

Unlike the old versions in include/_usage.h, the new USE_SYMBOL(x) can handle
commas in its arguments (as shown above).  (The _usage.h file is obsolete and
no longer generated.)

Nobody should need to include config.h directly anymore, bb_config.h should
define all the configuration stuff we need.  Someday, the CONFIG_SYMBOL
versions should go away in favor of ENABLE_SYMBOL and USE_SYMBOL().

Thanks to vodz for the new version of bb_mkdep.c that works with function
macros.
2006-02-13 19:16:41 +00:00
..
.cvsignore Ignore generated files 2001-10-24 06:53:33 +00:00
applets.h Re-add initrd support, unify halt/reboot/poweroff, add -n and -f options. 2006-01-30 08:31:37 +00:00
busybox.h - add platform.h. 2006-01-22 22:55:11 +00:00
dump.h Major coreutils update. 2003-03-19 09:13:01 +00:00
grp_.h Replace the old and somewhat buggy pwd_grp stuff with the shiny 2004-07-15 12:53:49 +00:00
inet_common.h in order to make sure the INET6 prototypes are exported, we would have to include the libbb.h header file ... but then we have to worry about including too early/etc... 2005-07-30 08:54:43 +00:00
libbb.h - add platform.h. 2006-01-22 22:55:11 +00:00
platform.h New USE() macros 2006-02-13 19:16:41 +00:00
pwd_.h Replace the old and somewhat buggy pwd_grp stuff with the shiny 2004-07-15 12:53:49 +00:00
shadow_.h Replace the old and somewhat buggy pwd_grp stuff with the shiny 2004-07-15 12:53:49 +00:00
unarchive.h Patch from Aurelien Jacobs to add unlzma. (A new decompression type, 2006-01-20 18:28:50 +00:00
usage.h fixup whitespace in awk help output 2006-02-06 23:38:59 +00:00
xregex.h split libbb: moved xregcomp separatelly for speed up recompile 2005-09-14 16:59:11 +00:00