Re: [RFC] Splitting kernel headers and deprecating __KERNEL__

From: Rob Landley
Date: Sun Dec 05 2004 - 19:09:17 EST


(Trimming linus from cc: list because he asked.)

On Sunday 05 December 2004 10:57 am, Andries Brouwer wrote:
> On Sun, Dec 05, 2004 at 01:19:46PM +0000, David Greaves wrote:
> > Err,
> >
> > Isn't this WRONG.
>
> You did not read my mail, or you did not understand it.
>
> Please write the patch for losetup to avoid looking at kernel source.
> If you after writing think that it is cleaner than the present setup,
> submit it.

Avoiding looking at the kernel source for the darn structure would be
relatively easy if the thing didn't vary by architecture. I agree that
hardwiring into userspace code #ifdefs for ARE_WE_ON_ALPHA is approximately
as ugly as hardwiring in #ifdefs for IS_THIS_2.6.

Both are ugly. This is why header files exist. I still don't understand why
we're not supposed to use 'em when the alternative is building incestuous
knowledge about the kernel version we're compiling against into our
application.

Bluntlly, I don't understand why "#include <linux/version.h>" and several
#ifdefs is an improvement on "#include <linux/loop.h>" with no #ifdefs.

Rob
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/