Subject: sys/*.h files including other files.
To: None <tech-kern@netbsd.org>
From: Simon Burge <simonb@netbsd.org>
List: tech-kern
Date: 06/03/2000 02:44:26
While playing around with including <sys/sysctl.h> for the first time in
some files, I've noticed two painful things:

 + <sys/syscallargs.h> needs <sys/mount.h> included beforehand
   for fhandle_t and fsid_t.

 + <sys/sysctl.h> needs at least some of <sys/time.h>, <sys/ucred.h>
   <sys/proc.h> and <vm/vm.h> to get all the right things declared
   for the kinfo_proc structure that includes a 'struct proc'.  It
   even goes as far to include those if not _KERNEL.

Both sets of prerequisites are quite non-intuitive.  For syscallargs.h,
makesyscalls.sh explicitly doesn't pass the #include's from
syscalls.master - these are

	<sys/param.h>
	<sys/systm.h>
	<sys/signal.h>
	<sys/mount.h>
	<sys/syscallargs.h>

and well as some "opt_*" files.  Is there any bad reasons for just
passing the "#include <" files to syscallargs.h (except for the one that
matches the basename of $sysarghdr) and including the above files in
sysctl.h?

Simon.