lkml.org 
[lkml]   [2008]   [Mar]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: why so many unexported headers checking __KERNEL__?
From
Date
On Sun, 2008-03-23 at 02:31 -0400, Robert P. J. Day wrote:
>
> as an unintended side effect of checking for proper exporting to
> user space and unifdef'ing, i noticed that there are literally
> hundreds of kernel header files that check the value of __KERNEL__ in
> some way, but are never exported to user space. what's the point of
> that? thanks.

There's no point -- we just haven't got round to removing it yet.

We should probably make headers_check or some other automated check
catch these two cases:

If a header is exported by header-y or not exported at all, it shouldn't
contain any #ifdef __KERNEL__.

And if it's exported and doesn't contain any #ifdef __KERNEL__, it
should be header-y not unifdef-y (and that's the case we should be
moving towards, by cleaning up headers to have separate files for the
user-visible parts).

--
dwmw2



\
 
 \ /
  Last update: 2008-03-26 13:11    [W:0.080 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site