[BusyBox] Re: [BusyBox-cvs] svn commit: trunk/busybox: include networking

Rob Landley rob at landley.net
Sat May 27 19:54:32 UTC 2006


On Saturday 27 May 2006 1:06 pm, Shaun Jackman wrote:
> For whatever reason it didn't occur to me at the time, but using an
> enum instead of a const int would've eliminated the binary size hit,
> and would have allowed all three use cases:
>
> #ifdef CONFIG_FEATURE_xxx
> #if CONFIG_FEATURE_xxx
> if (CONFIG_FEATURE_xxx)
>
> * Enabled
> #undef CONFIG_FEATURE_xxx
> #define CONFIG_FEATURE_xxx 1
>
> * Disabled
> #undef CONFIG_FEATURE_xxx
> enum { CONFIG_FEATURE_xxx = 0 };

Hmmm...  Good point.  A bit late now, though.

At this point we've switched over enough symbols from CONFIG_ to ENABLE_ that 
we're not going back, and it's easy to grep for CONFIG_ symbols in the code 
to see what hasn't been converted yet.  (I dislike patches that turn 
CONFIG_XXX into ENABLE_XXX with no other changes when it could easily be 
turned into if() or USE_ macros.  It's like typecasting away warnings, it 
just means we can't find it to fix it properly in the future...)

I have nebulous plans to redo our dependency checking in a way that handles 
ENABLE and USE more gracefully and automatically gets the multi-object C 
files and so on, but it's way down on the todo list.  Right now I'm clearing 
backlog, not adding new things...

Speaking of which, more backlog to clear...

> Cheers,
> Shaun

Rob
-- 
Never bet against the cheap plastic solution.



More information about the busybox mailing list