Re: [RFC] Splitting kernel headers and deprecating __KERNEL__

David Woodhouse
2004-11-30T16:29:52Z

On Tue, 2004-11-30 at 07:58 -0800, Linus Torvalds wrote:
> The fact is, despite this stupid and way-too-long thread, #ifdef
> __KERNEL__ has worked for over a decade, and works damn well, everything
> considered.

I don't agree with that. The current setup is a complete PITA and that's
why people are clamouring for us to clean the crap up.

But if you feel this strongly about it, then let's go ahead with the
existing mess. We can add more ifdef __KERNEL__ and add rules to the
makefiles to export it for userspace, generating something like the
existing glibc-kernheaders setup. And of course we can look at the
better alternative 'annotations' instead of using #ifdef __KERNEL__.

I think we'll all hate it, and I don't think it's going to really fix
the problem. But we can always reconsider the position later.

> Same thing here. The __KERNEL__ approach says "whatever you want, boss".
> It doesn't get in the way. Maybe it doesn't actively _help_ you either,
> but you never have to fight any structure it imposes on you.

Having to think before adding something that's user visible is a
_benefit_ not a disadvantage.

--
dwmw2