Subject: Re: Include order of system header files
To: None <tech-kern@NetBSD.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-kern
Date: 05/18/2005 17:49:09
> In kernel land header files from <sys/> domain oftenly implicitly
> expect that a set of other header files has been included.

Yes.  Worse, this is true of userland use of the same files.

> IMHO it's at least a bit annoying :(

I go farther; I call it outright broken.  With perhaps a very few
exceptions, I consider any include file broken when a C file consisting
of just an #include of that file produces compiler errors.  (Except, of
course, files that are not intended to be included directly - files
which do not conceptually stand on their own and should never be
included except as part of the implementation of other files.  Examples
might be sys/cdefs_aout.h and sys/cdefs_elf.h.)

> So my question is: is there someone work going on on making kernel
> includes to be a bit more user/developer friendly as userland are?

I've been fixing such bugs in my own tree as I find them.  Some time
back (years), I tried to interest NetBSD in such fixes but I was told
in no uncertain terms that such things were not considered broken by
NetBSD and thus would not be fixed.  Perhaps that position has changed
since; I don't know.  I hope so.

You're certainly welcome to the fixes I've accumulated, though they
probably won't be much help since they're for 1.4T.  (If you want them
anyway, see
ftp.rodents.montreal.qc.ca:/mouse/source-tree/patches/working/doc and,
for any given change, the patch files under .../working/src/.)

/~\ The ASCII				der Mouse
\ / Ribbon Campaign
 X  Against HTML	       mouse@rodents.montreal.qc.ca
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B