Subject: _KERNEL vs KERNEL preprocessor tokens?
To: None <tech-kern@NetBSD.ORG>
From: Jonathan Stone <jonathan@dsg.stanford.edu>
List: tech-kern
Date: 03/29/1995 22:04:34
[[I hope this is the right place to ask this...]]
I just sup'ped yesterday's -current kernel source, to try and rebuild
some pmax patches, and I've found I need to define both KERNEL and
_KERNEL to get a kernel to build.
I'd appreciate it if someone could explain why some header files in
-current contain ``#if[n]def KERNEL'', while others have been updated`
to use ``#if[n]def _KERNEL'' (presumably to avoid namespace
pollution).
Are the remaining occurrences of KERNEL an oversight, or is there some
non-trivial distinction that's being drawn here? If the former,
the following files still contain KERNEL:
dev/isa/wdreg.h /* a bogus token after #endif */
lib/libc_sa/printf.c
miscfs/fdesc/fdesc.h
miscfs/kernfs/kernfs.h
miscfs/nullfs/null.h
miscfs/portal/portal.h
miscfs/procfs/procfs.h
miscfs/umapfs/umap.h
miscfs/union/union.h
msdosfs/denode.h
msdosfs/direntry.h
msdosfs/fat.h
netccitt/llc_var.h
netinet/if_arc.h
netinet/if_ether.h
netinet/in_var.h
netiso/clnp.h
netiso/cons.h
netiso/esis.h
netiso/iso_snpac.h
netns/ns_if.h
sys/ktrace.h
sys/mbuf.h
sys/mtio.h
sys/socket.h
sys/sysctl.h
sys/uio.h
vm/vm_object.h
(I have patches for header files in sys/, vm/, and netinet/, if anyone cares.)
--Jonathan Stone