A significant number of applications need access to kernel data
authorMatthew Dillon <dillon@dragonflybsd.org>
Wed, 27 Aug 2003 02:03:23 +0000 (02:03 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Wed, 27 Aug 2003 02:03:23 +0000 (02:03 +0000)
commitec12abe0f04eb329b3f32e857a34f768fc93f3a1
tree2422f0960793cd1f458fc37f6b7fb0384190edb2
parenta108bf718cc1205ef0755235ee340cb6a9a9053c
A significant number of applications need access to kernel data
structures.  Traditionally they have done a #define _KERNEL and
then #include'd the files.  Unfortunately this can create huge
conflicts between libc declarations and kernel declarations.  Also,
every time we create a new dependancy between kernel includes we might
windup causing another unexpected header file to be included into such
a user program, causing its build to fail due to a conflict.

This commit introduces _KERNEL_STRUCTURES.  A user program which needs
access to kernel data structures sets this instead of _KERNEL.  This
define will cause the kernel data structure but not the inlines or
extern's to be brought in.

Only those header files which directly impact buildworld have been
modified so far, but the intent is for all significant kernel header files
to use this feature.
14 files changed:
sys/i386/include/globaldata.h
sys/net/if_arp.h
sys/platform/pc32/include/globaldata.h
sys/sys/errno.h
sys/sys/file.h
sys/sys/ipc.h
sys/sys/mount.h
sys/sys/msg.h
sys/sys/proc.h
sys/sys/sem.h
sys/sys/shm.h
sys/vfs/msdosfs/msdosfsmount.h
sys/vfs/ufs/inode.h
sys/vfs/union/union.h