* just how "sanitized" are the sanitized headers?
@ 2006-11-29 23:15 Robert P. J. Day
2006-11-30 8:26 ` Alexey Dobriyan
0 siblings, 1 reply; 3+ messages in thread
From: Robert P. J. Day @ 2006-11-29 23:15 UTC (permalink / raw)
To: Linux kernel mailing list
i noticed that, when i generate the sanitized headers with "make
headers_install", there are still a number of headers files that are
installed with variations on "#ifdef __KERNEL__".
i always thought the fundamental property of sanitized headers was
to be compatible with glibc and have no traces of "KERNEL" content
left. so what's the purpose of leaving some header files with that
preprocessor content? thanks.
rday
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: just how "sanitized" are the sanitized headers?
2006-11-29 23:15 just how "sanitized" are the sanitized headers? Robert P. J. Day
@ 2006-11-30 8:26 ` Alexey Dobriyan
2006-11-30 9:55 ` Robert P. J. Day
0 siblings, 1 reply; 3+ messages in thread
From: Alexey Dobriyan @ 2006-11-30 8:26 UTC (permalink / raw)
To: Robert P. J. Day; +Cc: linux-kernel
On 11/30/06, Robert P. J. Day <rpjday@mindspring.com> wrote:
> i noticed that, when i generate the sanitized headers with "make
> headers_install", there are still a number of headers files that are
> installed with variations on "#ifdef __KERNEL__".
>
> i always thought the fundamental property of sanitized headers was
> to be compatible with glibc
You were wrong.
> and have no traces of "KERNEL" content
> left.
That's correct.
> so what's the purpose of leaving some header files with that
> preprocessor content?
When you see __KERNEL__ in sanitized headers, it's either due to
a) unifdef bug, or
b) header being listed in header-y when it should be listed in unifdef-y
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: just how "sanitized" are the sanitized headers?
2006-11-30 8:26 ` Alexey Dobriyan
@ 2006-11-30 9:55 ` Robert P. J. Day
0 siblings, 0 replies; 3+ messages in thread
From: Robert P. J. Day @ 2006-11-30 9:55 UTC (permalink / raw)
To: Alexey Dobriyan; +Cc: linux-kernel
On Thu, 30 Nov 2006, Alexey Dobriyan wrote:
> On 11/30/06, Robert P. J. Day <rpjday@mindspring.com> wrote:
> > i noticed that, when i generate the sanitized headers with "make
> > headers_install", there are still a number of headers files that are
> > installed with variations on "#ifdef __KERNEL__".
> >
> > i always thought the fundamental property of sanitized headers was
> > to be compatible with glibc
>
> You were wrong.
ok, my fault, i worded that badly. i have a *general* idea of the
purpose of sanitized headers -- i've been using a pre-built set for
crosstool for quite some time, and i'm assuming that (theoretically) i
should be able to replace that pre-built set with what's generated by
"make headers_install", is that right?
(BTW, what is the proper description for the sanitized headers?
there's *nothing* in the kernel source tree documentation that
explains their creation.)
> > and have no traces of "KERNEL" content
> > left.
>
> That's correct.
good. at least *that* part i got right. :-)
> > so what's the purpose of leaving some header files with that
> > preprocessor content?
>
> When you see __KERNEL__ in sanitized headers, it's either due to
> a) unifdef bug, or
> b) header being listed in header-y when it should be listed in unifdef-y
a couple things going on here, actually. in the simple case, there
are three header files:
linux/if_fddi.h
linux/personality.h
linux/wireless.h
that can be fixed simply by adding "unifdef-y" entries for them to the
Kbuild file (i can submit a patch shortly). but there are a few other
cases which still contain compound preprocessor directives such as:
#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
having never worked with unifdef before, i guess i was being overly
optimistic in thinking that it, if i "unifdef"ed __KERNEL__, it might
at least simplify the expression. oh, well ... live and learn.
rday
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-11-30 9:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-29 23:15 just how "sanitized" are the sanitized headers? Robert P. J. Day
2006-11-30 8:26 ` Alexey Dobriyan
2006-11-30 9:55 ` Robert P. J. Day
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®