mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Robert P. J. Day" <rpjday@mindspring.com>
To: Alexey Dobriyan <adobriyan@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: just how "sanitized" are the sanitized headers?
Date: Thu, 30 Nov 2006 04:55:59 -0500 (EST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0611300426070.6464@localhost.localdomain> (raw)
In-Reply-To: <b6fcc0a0611300026y6defe704o4f7dd4f1e82d5c1b@mail.gmail.com>

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

      reply	other threads:[~2006-11-30  9:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-29 23:15 Robert P. J. Day
2006-11-30  8:26 ` Alexey Dobriyan
2006-11-30  9:55   ` Robert P. J. Day [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.64.0611300426070.6464@localhost.localdomain \
    --to=rpjday@mindspring.com \
    --cc=adobriyan@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®