[PATCH] standardize on KERNEL_VERSION(a,b,c) test

Robert P. J. Day rpjday at mindspring.com
Fri Mar 31 13:39:54 UTC 2006


On Thu, 30 Mar 2006, Rob Landley wrote:

> On Thursday 30 March 2006 10:33 am, Robert P. J. Day wrote:

> >   as it stands now, i think the BB header files are unnecessarily
> > confusing simply because they're nested.  if you take a quick look
> > at, say, libbb.h, it starts off with:
> >
> > #include <stdio.h>
> > #include <stdlib.h>
> > #include <stdarg.h>
> > #include <sys/types.h>
> > #include <sys/stat.h>
> > #include <termios.h>
> > #include <stdint.h>
>
> It needs to include at least a decent chunk of those for types uses
> as function arguments or global variables.  Once youv'e got enough
> of them, quibbling about the rest becomes a bit silly.

assuming i understand what you're saying here, i don't agree.  sure,
"libbb.h" needs all of those header includes *now*.  but who's to say
it always will?

as it stands, a *lot* of the source files currently don't bother
including what would normally be required system header files just
because they count on getting those inclusions via "libbb.h".  so, one
day, "libbb.h" is restructured to not include that header file anymore
and, suddenly, lots of stuff breaks.

for cleanliness, i don't think any source file should count on getting
its *system* header files via a *local* header file inclusion.  even
if it's redundant, i'd prefer to see all source files explicitly
include all of the system header files they would normally need.  if
you don't, you're just begging to have stuff break in surprising ways
down the road.

rday



More information about the busybox mailing list