Kernel headers trouble
rob at landley.net
Tue Dec 6 23:05:58 UTC 2005
On Tuesday 06 December 2005 16:11, Tito wrote:
> > Would something like the attached work for you (untested)
> I think yes, it is about the same as i did but with another prefix (
> BB_CONFIG vs ENABLE_). Let Rob decide which one he likes better.
It's not a question of aesthetics. The problem is that CONFIG_ says the
symbol has a certain type of semantics, and ENABLE_ says it has a different
type of semantics.
CONFIG symbols are either #defined to y, or #undefined. ENABLE symbols are
always defined, to either 1 or 0. They get used in different ways.
will always be true.
if(CONFIG_FEATURE_BLAH && othertest) thingy();
will break the build if the feature is switched off.
Renaming a CONFIG_ symbol to ENABLE_ without changing its semantics is wrong.
Renaming CONFIG to BB_CONFIG breaks the pattern but doesn't actually violate
it. (It makes me wince because you have have to learn that BB_CONFIG works
like CONFIG. It's ok because it's still within the realm of the easily
guessable, but I'd rather it be uniformly obvious than make them guess in the
Steve Ballmer: Innovation! Inigo Montoya: You keep using that word.
I do not think it means what you think it means.
More information about the busybox