SVN checkin 11462 is broken.
Rob Landley
rob at landley.net
Thu Sep 15 18:14:44 UTC 2005
I'm confused by some of Vladimir's recent checkins. (I'd mail him directly,
but he's still spam-blocking me because the reverse DNS of my mail server
says it's on a DSL line. Which is the truth.)
The ENABLE_* macros are always defined. They may be 0 or 1, but they are
always defined as _something_. Therefore, code like this is a NOP:
find . -name "*.c" | xargs grep "#ifdef[ \t]*ENABLE_"
./libbb/procps.c:#ifdef ENABLE_FEATURE_TOP_CPU_USAGE_PERCENTAGE
./libbb/procps.c:#ifdef ENABLE_FEATURE_TOP_CPU_USAGE_PERCENTAGE
./libbb/procps.c:#ifdef ENABLE_FEATURE_TOP_CPU_USAGE_PERCENTAGE
./procps/top.c:#ifdef ENABLE_FEATURE_TOP_CPU_USAGE_PERCENTAGE
./procps/top.c:#ifdef ENABLE_FEATURE_TOP_CPU_USAGE_PERCENTAGE
./procps/top.c:#ifdef ENABLE_FEATURE_TOP_CPU_USAGE_PERCENTAGE
./procps/top.c:#ifdef ENABLE_FEATURE_TOP_CPU_USAGE_PERCENTAGE
./procps/top.c:#ifdef ENABLE_FEATURE_TOP_CPU_USAGE_PERCENTAGE
./procps/top.c:#ifdef ENABLE_FEATURE_TOP_CPU_USAGE_PERCENTAGE
./procps/top.c:#ifdef ENABLE_FEATURE_TOP_CPU_USAGE_PERCENTAGE
./procps/top.c:#ifdef ENABLE_FEATURE_TOP_CPU_USAGE_PERCENTAGE
./procps/top.c:#ifdef ENABLE_FEATURE_TOP_CPU_USAGE_PERCENTAGE
./procps/top.c:#ifdef ENABLE_FEATURE_TOP_CPU_USAGE_PERCENTAGE
./procps/top.c:#ifdef ENABLE_FEATURE_TOP_CPU_USAGE_PERCENTAGE
./procps/top.c:#ifdef ENABLE_FEATURE_TOP_CPU_USAGE_PERCENTAGE
I.E. "#ifdef CONFIG_THING" becomes "#if ENABLE_THING" and _not_ "#ifdef
ENABLE_THING", which would always be true.
Secondly, if a symbol in the .config file (and thus in include/config.h)
doesn't have a CONFIG_ prefix, it won't magically gain an ENABLE_ prefix.
include/bb_config.h is generated by a sed invocation going through and (among
other things) replacing CONFIG_ with ENABLE_.
So this checkin is conceptually broken to be always on, and
implementation-wise broken to be always off. Would someone please explain to
me what it was _trying_ to do?
Rob
More information about the busybox
mailing list