Subject: re: pkg/10616: sparc/cpu.h includes non-installed kernel includes
To: John Hawkinson <jhawk@MIT.EDU>
From: matthew green <mrg@eterna.com.au>
List: netbsd-bugs
Date: 08/04/2000 23:57:03
[ large distribution list; but none of the lists really has a wide
  distribution. ]
   
   Sigh. Perhaps we need to apply use of
   
   #if defined(LKM) && !defined(_KERNEL)
   
   and discourage LKM's from _KERNEL-ing? Ugh, this does get painful.


[ side rant ]


it is SO WRONG for non LKM's to define _LKM.  the kernel include opt_foo.h
files should really be only included #ifdef _KERNEL_OPT_H or something,
and all the kernel makefile's changed to do use that.  then about 90% of
the `_LKM' checks in our source tree can be removed (and rightly so as
they don't test anything to do with LKM's!).  eg, programs like pstat, etc.,
currently build -D_LKM and that is just wrong.


and LKM's *must* use -D_KERNEL.  they are kernel code and thus need to
be compiled as such.