Subject: Include order of system header files
To: None <tech-kern@netbsd.org>
From: Ian Zagorskih <ianzag@megasignal.com>
List: tech-kern
Date: 05/17/2005 18:03:42
In kernel land header files from <sys/> domain oftenly implicitly expect that
a set of other header files has been included. For example, <sys/conf.h>
expects that <sys/param.h> has been included and so on. When i'm writting a
kernel code from scratch, for example a character device driver, i'd to
remember which files and in what order to include. Right now for IO_NDELAY
i'd to include <sys/vnode.h> but looks like it expects some other files to be
here so i'd to spent time to traverse headers/code examples to find out a
right combination. IMHO it's at least a bit annoying :(
On the other hand i don't have such problems due to obvious reasons. 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? When i can just #include
<sys/vnode.h> in a naked C file and compile it without warnings or errors.
AFAIU there aren't *too* much of work to unify kernel include files (though i
can be wrong of course).
// wbr