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

Bernhard Fischer rep.nop at aon.at
Thu Mar 30 15:50:44 UTC 2006


On Thu, Mar 30, 2006 at 10:33:03AM -0500, Robert P. J. Day wrote:
>On Thu, 30 Mar 2006, Bernhard Fischer wrote:
>
>> On Thu, Mar 30, 2006 at 07:51:04AM -0500, Robert P. J. Day wrote:
>
>... snip ...
>
>> >diff -pru busybox.orig/e2fsprogs/mke2fs.c busybox/e2fsprogs/mke2fs.c
>> >--- busybox.orig/e2fsprogs/mke2fs.c	2006-03-29 07:43:43.000000000 -0500
>> >+++ busybox/e2fsprogs/mke2fs.c	2006-03-30 07:30:30.000000000 -0500
>> >@@ -33,6 +33,7 @@
>> > #include "e2p/e2p.h"
>> > #include "ext2fs/ext2fs.h"
>> > #include "util.h"
>> >+#include "platform.h"
>>
>> That include sounds wrong.
>> e2fsbb.h includes libbb.h which includes platform.h
>
>  hard to believe but i've been grappling with what to think about the
>layout of BB header files for a few days.
>
>  obviously, including "platform.h" is redundant but it doesn't hurt
>since all of the header files are protected against multiple inclusion
>so that's certainly not going to break anything, but there's more to
>it than that.
>
>  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>

As mentioned before on this list, IIRC we want to clean these up, so
only the headers necessary to get the types defined that are needed in
exactly that header are pulled in.

The applets should include any system-headers by themselves.


>  in effect, by letting "libbb.h" be this monstrous catch-all header
>file that grabs most everything else, it allows the programmer to be
>incredibly sloppy about which other header files to include.  yes, it
>works, but it just seems "messy" to me.

If memory serves me right, there was once talk about cleaning this up.

>
>rday
>
>



More information about the busybox mailing list