Subject: re: locators.h and LKM (was: Re: locators.h?)
To: None <tech-kern@netbsd.org>
From: matthew green <mrg@eterna.com.au>
List: tech-kern
Date: 04/02/2001 18:53:23
> How should this work with LKM?
It should probably say
#if defined(_KERNEL) && !defined(_LKM)
ugh, this reminds me. i once modified my tree to use -D_KERNEL_OPT_H for
including config(8) generated files, and replaced the above with a single
test for _KERNEL_OPT_H, and changed all the kernel Makefile's to define
this as well as _KERNEL. by the time i finished hacking on the source tree
for all of these lines, my tree was too old to properly test so it never
was finished. i propose that:
- all kernel makefile's be modified to define _KERNEL_OPT_H,
- and then kernel source code is updated to check for this instead
of the above construct.
the time between the first & second part can be large, and not all of the
sources need to be updated at the same time.
one of the major reasons behind this is to remove the following hacks:
src/usr.bin/fstat/fstat.c:#define _LKM
src/usr.sbin/pstat/pstat.c:#define _LKM
which are used solely to avoid including config(8) generated files.
i'm prepared to do this work (again).