Re: [RFC] Splitting kernel headers and deprecating __KERNEL__
From: David Woodhouse
Date: Tue Nov 30 2004 - 18:58:32 EST
On Tue, 2004-11-30 at 14:51 -0800, Linus Torvalds wrote:
> The way to prevent _future_ abuse is by adding something like
>
> #ifndef __KERNEL__
> #warning "This really doesn't work"
> #endif
>
> which does that, and has the advantage of not breaking anything at all.
>
> In other words: if you want to move things around just to break things,
> THEN THAT IS INCREDIBLY STUPID. We don't do things to screw our users
> over.
Linus, you're arguing that it's better to let users use something which
is non-portable and silently does the wrong thing, as long as it
actually compiles. That this is preferable to making sure it doesn't
compile.
Now, there are cases (like _perhaps_ byteorder.h) where we should
probably allow this kind of 'abuse' to continue because it's fairly
harmless and it does actually _work_.
But atomic.h isn't an example of that.
If I wrote a userspace program which relies upon the md5sum of certain
kernel headers not changing, would you decree that the headers in
question should not change at _all_ because that would 'break existing
software'? Of course not; you have to draw the line somewhere. And I
would draw it somewhere between atomic.h and byteorder.h -- where would
_you_ draw it?
--
dwmw2
-
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/