Subject: Re: Automatic inclusion of by
To: Matt Thomas <>
From: Todd Vierling <>
List: tech-kern
Date: 07/15/2001 22:46:02
On Sun, 15 Jul 2001, Matt Thomas wrote:

: I'd like to change sys/uvm/uvm_extern.h to not include <machine/*.h>

Presuming you literally meant *, so as to make gcc do wildcard expansion,
this is flatly wrong.  If you have particular headers in mind, it should be

: by default if _KERNEL is not defined.  This is because both arm and
: powerpc have multiple pmap and vmparam headers which may be in use.  So
: there's is no one particular header which is appropriate to include.

If there's parameters that affect userland, then you need to have it include
what *is* appropriate.  If the typical <machine/pmap.h> and
<machine/vmparam.h> aren't defining the rigbht things, fix them.  Use
ifdefs, and if that is not right, rethink the problem.

For instance, sparc has a different pagesize on sun4 and sun4u versus sun4c
and sun4m.  The definition of NBPG on sparc, and its historically dependent
PAGE_SIZE in <sys/shm.h>, were changed to use sysconf(3) to get the correct
pagesize when in userspace.

Why, dare I ask, is this suddenly broken?  You aren't doing something
braindead like pointing /usr/include/machine to the $MACHINE_ARCH (as
opposed to $MACHINE) directory, right?

-- Todd Vierling <>  *  Wasabi NetBSD:  Run with it.
-- NetBSD 1.5 now available on CD-ROM  --