This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Any idea what this is for? (fixincludes for svr4, _KERNEL)
- From: kaih at khms dot westfalen dot de (Kai Henningsen)
- To: gcc at gcc dot gnu dot org
- Date: 26 Jul 2003 11:25:00 +0200
- Subject: Re: Any idea what this is for? (fixincludes for svr4, _KERNEL)
- Comment: Unsolicited commercial mail will incur an US$100 handling fee per received mail.
- Organization: Organisation? Me?! Are you kidding?
- References: <20030726043251.GA995@twcny.rr.com>
neroden@twcny.rr.com (Nathanael Nerode) wrote on 26.07.03 in <20030726043251.GA995@twcny.rr.com>:
> The following code is in fixinc.svr4. It wraps entire files with
> #if _KERNEL. What I can't figure out is *WHY*. Is this just obsolete
> cruft, or is there a known reason for it?
> # Conditionalize all of <fs/rfs/rf_cache.h> on _KERNEL being defined.
(etc)
I can only <guess>, but it may be analoguous to the Linux <linux/*> and
<asm/*> stuff.
That is, these are kernel headers that get included (sometimes very
indirectly) from user-level headers to get at some constants and structs,
and while doing that expose other kernel-internal stuff that really
shouldn't come out of those user-level headers - including whole include
files.
If it is that, then this would be the same as removing all includes of
these files from all places where they happen, as an alternate strategy.
That change may not be feasible, of course.
The #ifdef _KERNEL, of course, is so if you *do* need to get at that
stuff, you can; and those that need it probably already do define _KERNEL
because there are other places needing it.
</guess>
MfG Kai