aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/alpha/alpha/genassym.c4
-rw-r--r--sys/alpha/alpha/ieee_float.c2
-rw-r--r--sys/alpha/include/asm.h4
-rw-r--r--sys/alpha/include/clock.h4
-rw-r--r--sys/alpha/include/cpu.h6
-rw-r--r--sys/alpha/include/cpuconf.h5
-rw-r--r--sys/alpha/include/cpufunc.h4
-rw-r--r--sys/alpha/include/elf.h4
-rw-r--r--sys/alpha/include/fpu.h2
-rw-r--r--sys/alpha/include/in_cksum.h4
-rw-r--r--sys/alpha/include/intrcnt.h2
-rw-r--r--sys/alpha/include/ioctl_fd.h2
-rw-r--r--sys/alpha/include/pc/vesa.h4
-rw-r--r--sys/alpha/include/pmap.h12
-rw-r--r--sys/alpha/include/profile.h4
-rw-r--r--sys/alpha/include/prom.h4
-rw-r--r--sys/alpha/include/ptrace.h4
-rw-r--r--sys/alpha/include/reg.h2
-rw-r--r--sys/alpha/include/sysarch.h4
-rw-r--r--sys/alpha/include/types.h2
-rw-r--r--sys/amd64/amd64/genassym.c4
-rw-r--r--sys/amd64/include/clock.h4
-rw-r--r--sys/amd64/include/cpu.h2
-rw-r--r--sys/amd64/include/cpufunc.h6
-rw-r--r--sys/amd64/include/elf.h4
-rw-r--r--sys/amd64/include/fpu.h2
-rw-r--r--sys/amd64/include/npx.h2
-rw-r--r--sys/amd64/include/pcb.h2
-rw-r--r--sys/amd64/include/pcb_ext.h2
-rw-r--r--sys/amd64/include/pmap.h10
-rw-r--r--sys/amd64/include/profile.h12
-rw-r--r--sys/amd64/include/ptrace.h4
-rw-r--r--sys/amd64/include/reg.h2
-rw-r--r--sys/amd64/include/segments.h4
-rw-r--r--sys/amd64/include/smp.h4
-rw-r--r--sys/amd64/include/sysarch.h4
-rw-r--r--sys/amd64/include/tss.h2
-rw-r--r--sys/amd64/isa/intr_machdep.h4
-rw-r--r--sys/amd64/isa/isa_dma.h4
-rw-r--r--sys/cam/scsi/scsi_all.c20
-rw-r--r--sys/cam/scsi/scsi_all.h10
-rw-r--r--sys/cam/scsi/scsi_sa.c8
-rw-r--r--sys/cam/scsi/scsi_targetio.h2
-rw-r--r--sys/conf/Makefile.i3866
-rw-r--r--sys/conf/Makefile.powerpc6
-rw-r--r--sys/dev/aic7xxx/93cx6.h4
-rw-r--r--sys/dev/aic7xxx/aic7xxx_93cx6.h4
-rw-r--r--sys/dev/atkbdc/atkbdcreg.h4
-rw-r--r--sys/dev/atkbdc/atkbdreg.h4
-rw-r--r--sys/dev/bktr/ioctl_meteor.h4
-rw-r--r--sys/dev/dpt/dpt.h4
-rw-r--r--sys/dev/fb/fbreg.h4
-rw-r--r--sys/dev/fb/vgareg.h4
-rw-r--r--sys/dev/iicbus/if_ic.c4
-rw-r--r--sys/dev/kbd/atkbdcreg.h4
-rw-r--r--sys/dev/kbd/atkbdreg.h4
-rw-r--r--sys/dev/kbd/kbdreg.h4
-rw-r--r--sys/dev/mii/miivar.h4
-rw-r--r--sys/dev/ppbus/immio.c8
-rw-r--r--sys/dev/ppbus/lpbb.c4
-rw-r--r--sys/dev/ppbus/lpt.c8
-rw-r--r--sys/dev/ppbus/ppi.h2
-rw-r--r--sys/dev/ppbus/vpo.c12
-rw-r--r--sys/dev/ppbus/vpoio.c8
-rw-r--r--sys/dev/sound/pcm/sound.h10
-rw-r--r--sys/dev/usb/usb.h4
-rw-r--r--sys/dev/vinum/vinumext.h4
-rw-r--r--sys/dev/vinum/vinumhdr.h6
-rw-r--r--sys/dev/vinum/vinumparser.c6
-rw-r--r--sys/dev/vinum/vinumutil.c6
-rw-r--r--sys/dev/vinum/vinumvar.h2
-rw-r--r--sys/dev/wi/if_wavelan_ieee.h2
-rw-r--r--sys/i386/boot/dosboot/dirent.h4
-rw-r--r--sys/i386/boot/dosboot/disklabe.h6
-rw-r--r--sys/i386/boot/dosboot/fs.h2
-rw-r--r--sys/i386/boot/dosboot/inode.h2
-rw-r--r--sys/i386/boot/dosboot/quota.h2
-rw-r--r--sys/i386/boot/dosboot/types.h2
-rw-r--r--sys/i386/conf/Makefile.i3866
-rw-r--r--sys/i386/i386/genassym.c4
-rw-r--r--sys/i386/include/apm_bios.h6
-rw-r--r--sys/i386/include/bootinfo.h2
-rw-r--r--sys/i386/include/clock.h4
-rw-r--r--sys/i386/include/cpu.h2
-rw-r--r--sys/i386/include/cpufunc.h6
-rw-r--r--sys/i386/include/cronyx.h6
-rw-r--r--sys/i386/include/elf.h4
-rw-r--r--sys/i386/include/endian.h4
-rw-r--r--sys/i386/include/globals.h4
-rw-r--r--sys/i386/include/if_wavelan_ieee.h2
-rw-r--r--sys/i386/include/in_cksum.h4
-rw-r--r--sys/i386/include/ioctl_fd.h2
-rw-r--r--sys/i386/include/ioctl_meteor.h4
-rw-r--r--sys/i386/include/npx.h2
-rw-r--r--sys/i386/include/pc/vesa.h4
-rw-r--r--sys/i386/include/pcb.h2
-rw-r--r--sys/i386/include/pcb_ext.h2
-rw-r--r--sys/i386/include/pcvt_ioctl.h4
-rw-r--r--sys/i386/include/perfmon.h6
-rw-r--r--sys/i386/include/pmap.h10
-rw-r--r--sys/i386/include/profile.h12
-rw-r--r--sys/i386/include/ptrace.h4
-rw-r--r--sys/i386/include/random.h4
-rw-r--r--sys/i386/include/reg.h2
-rw-r--r--sys/i386/include/segments.h4
-rw-r--r--sys/i386/include/smp.h4
-rw-r--r--sys/i386/include/spigot.h5
-rw-r--r--sys/i386/include/sysarch.h4
-rw-r--r--sys/i386/include/tss.h2
-rw-r--r--sys/i386/include/types.h2
-rw-r--r--sys/i386/isa/atapi.h3
-rw-r--r--sys/i386/isa/intr_machdep.h4
-rw-r--r--sys/i386/isa/isa_device.h6
-rw-r--r--sys/i386/isa/isa_dma.h4
-rw-r--r--sys/i386/isa/loran.c8
-rw-r--r--sys/i386/isa/wdreg.h4
-rw-r--r--sys/net/bpf.h4
-rw-r--r--sys/net/bpf_filter.c22
-rw-r--r--sys/net/bridge.h5
-rw-r--r--sys/net/ethernet.h4
-rw-r--r--sys/net/fddi.h2
-rw-r--r--sys/net/hostcache.h4
-rw-r--r--sys/net/if.h8
-rw-r--r--sys/net/if_arp.h2
-rw-r--r--sys/net/if_atm.h7
-rw-r--r--sys/net/if_dl.h4
-rw-r--r--sys/net/if_media.h4
-rw-r--r--sys/net/if_sppp.h2
-rw-r--r--sys/net/if_var.h8
-rw-r--r--sys/net/if_vlan_var.h6
-rw-r--r--sys/net/netisr.h2
-rw-r--r--sys/net/pfkeyv2.h4
-rw-r--r--sys/net/radix.c4
-rw-r--r--sys/net/radix.h4
-rw-r--r--sys/net/raw_cb.h2
-rw-r--r--sys/net/route.h2
-rw-r--r--sys/net/slcompress.c2
-rw-r--r--sys/net/zlib.c8
-rw-r--r--sys/net/zlib.h2
-rw-r--r--sys/netatalk/aarp.h4
-rw-r--r--sys/netatalk/at_var.h4
-rw-r--r--sys/netatalk/ddp_var.h4
-rw-r--r--sys/netgraph/netgraph.h2
-rw-r--r--sys/netgraph/ng_message.h4
-rw-r--r--sys/netinet/icmp_var.h4
-rw-r--r--sys/netinet/if_ether.h2
-rw-r--r--sys/netinet/if_fddi.h2
-rw-r--r--sys/netinet/igmp_var.h2
-rw-r--r--sys/netinet/in.h6
-rw-r--r--sys/netinet/in_hostcache.h4
-rw-r--r--sys/netinet/in_pcb.h4
-rw-r--r--sys/netinet/in_systm.h2
-rw-r--r--sys/netinet/in_var.h6
-rw-r--r--sys/netinet/ip_dummynet.h4
-rw-r--r--sys/netinet/ip_ecn.h2
-rw-r--r--sys/netinet/ip_fw.h4
-rw-r--r--sys/netinet/ip_icmp.h2
-rw-r--r--sys/netinet/ip_mroute.h4
-rw-r--r--sys/netinet/ip_var.h4
-rw-r--r--sys/netinet/tcp_debug.h2
-rw-r--r--sys/netinet/tcp_seq.h4
-rw-r--r--sys/netinet/tcp_timer.h4
-rw-r--r--sys/netinet/tcp_var.h4
-rw-r--r--sys/netinet/udp_var.h2
-rw-r--r--sys/netinet6/ah.h4
-rw-r--r--sys/netinet6/ah6.h4
-rw-r--r--sys/netinet6/esp.h4
-rw-r--r--sys/netinet6/esp6.h4
-rw-r--r--sys/netinet6/in6_pcb.h4
-rw-r--r--sys/netinet6/ip6_ecn.h2
-rw-r--r--sys/netinet6/ipsec.h12
-rw-r--r--sys/netinet6/ipsec6.h4
-rw-r--r--sys/netinet6/pim6_var.h4
-rw-r--r--sys/netinet6/tcp6_var.h4
-rw-r--r--sys/netinet6/udp6_var.h4
-rw-r--r--sys/netipx/ipx_if.h4
-rw-r--r--sys/netipx/ipx_ip.h4
-rw-r--r--sys/netipx/ipx_pcb.h4
-rw-r--r--sys/netipx/ipx_var.h4
-rw-r--r--sys/netipx/spx.h4
-rw-r--r--sys/netipx/spx_debug.h6
-rw-r--r--sys/netkey/key.h4
-rw-r--r--sys/netkey/key_debug.c26
-rw-r--r--sys/netkey/key_debug.h8
-rw-r--r--sys/netkey/keydb.h4
-rw-r--r--sys/netkey/keysock.h4
-rw-r--r--sys/netnatm/natm.h7
-rw-r--r--sys/netncp/ncp_conn.h4
-rw-r--r--sys/netncp/ncp_crypt.c4
-rw-r--r--sys/netncp/ncp_nls.h6
-rw-r--r--sys/netncp/ncp_rq.h6
-rw-r--r--sys/netns/idp_var.h2
-rw-r--r--sys/netns/ns.h2
-rw-r--r--sys/netns/ns_error.h2
-rw-r--r--sys/netns/ns_if.h2
-rw-r--r--sys/netns/ns_pcb.h2
-rw-r--r--sys/netns/spp_timer.h2
-rw-r--r--sys/netns/spp_var.h2
-rw-r--r--sys/pc98/pc98/atapi.h3
-rw-r--r--sys/powerpc/include/clock.h4
-rw-r--r--sys/powerpc/include/ptrace.h4
-rw-r--r--sys/powerpc/powerpc/genassym.c4
-rw-r--r--sys/sys/_posix.h4
-rw-r--r--sys/sys/_sigset.h2
-rw-r--r--sys/sys/acct.h4
-rw-r--r--sys/sys/acl.h6
-rw-r--r--sys/sys/aio.h2
-rw-r--r--sys/sys/bio.h12
-rw-r--r--sys/sys/buf.h12
-rw-r--r--sys/sys/bus.h4
-rw-r--r--sys/sys/callout.h4
-rw-r--r--sys/sys/cdio.h2
-rw-r--r--sys/sys/chio.h2
-rw-r--r--sys/sys/clist.h2
-rw-r--r--sys/sys/conf.h6
-rw-r--r--sys/sys/cons.h4
-rw-r--r--sys/sys/consio.h2
-rw-r--r--sys/sys/ctype.h4
-rw-r--r--sys/sys/devicestat.h2
-rw-r--r--sys/sys/dirent.h2
-rw-r--r--sys/sys/disklabel.h8
-rw-r--r--sys/sys/diskmbr.h8
-rw-r--r--sys/sys/diskpc98.h8
-rw-r--r--sys/sys/diskslice.h6
-rw-r--r--sys/sys/dkstat.h2
-rw-r--r--sys/sys/dmap.h2
-rw-r--r--sys/sys/domain.h2
-rw-r--r--sys/sys/errno.h4
-rw-r--r--sys/sys/exec.h2
-rw-r--r--sys/sys/extattr.h4
-rw-r--r--sys/sys/fbio.h2
-rw-r--r--sys/sys/fcntl.h12
-rw-r--r--sys/sys/fdcio.h2
-rw-r--r--sys/sys/file.h6
-rw-r--r--sys/sys/filedesc.h2
-rw-r--r--sys/sys/imgact.h2
-rw-r--r--sys/sys/imgact_aout.h4
-rw-r--r--sys/sys/imgact_elf.h4
-rw-r--r--sys/sys/inflate.h4
-rw-r--r--sys/sys/ioccom.h4
-rw-r--r--sys/sys/ioctl.h2
-rw-r--r--sys/sys/ioctl_meteor.h4
-rw-r--r--sys/sys/ipc.h6
-rw-r--r--sys/sys/jail.h6
-rw-r--r--sys/sys/kbio.h2
-rw-r--r--sys/sys/kernel.h4
-rw-r--r--sys/sys/ktrace.h6
-rw-r--r--sys/sys/linedisc.h6
-rw-r--r--sys/sys/linker.h10
-rw-r--r--sys/sys/malloc.h8
-rw-r--r--sys/sys/mbuf.h4
-rw-r--r--sys/sys/md5.h2
-rw-r--r--sys/sys/memrange.h4
-rw-r--r--sys/sys/mman.h4
-rw-r--r--sys/sys/module.h6
-rw-r--r--sys/sys/mount.h10
-rw-r--r--sys/sys/msg.h8
-rw-r--r--sys/sys/msgbuf.h2
-rw-r--r--sys/sys/mtio.h6
-rw-r--r--sys/sys/namei.h4
-rw-r--r--sys/sys/param.h12
-rw-r--r--sys/sys/pipe.h2
-rw-r--r--sys/sys/poll.h4
-rw-r--r--sys/sys/proc.h6
-rw-r--r--sys/sys/protosw.h8
-rw-r--r--sys/sys/ptrace.h6
-rw-r--r--sys/sys/queue.h4
-rw-r--r--sys/sys/random.h4
-rw-r--r--sys/sys/resource.h4
-rw-r--r--sys/sys/resourcevar.h2
-rw-r--r--sys/sys/rman.h8
-rw-r--r--sys/sys/rtprio.h4
-rw-r--r--sys/sys/select.h2
-rw-r--r--sys/sys/selinfo.h2
-rw-r--r--sys/sys/sem.h8
-rw-r--r--sys/sys/shm.h6
-rw-r--r--sys/sys/signal.h2
-rw-r--r--sys/sys/signalvar.h4
-rw-r--r--sys/sys/smp.h4
-rw-r--r--sys/sys/snoop.h8
-rw-r--r--sys/sys/socket.h4
-rw-r--r--sys/sys/socketvar.h4
-rw-r--r--sys/sys/soundcard.h2
-rw-r--r--sys/sys/stat.h10
-rw-r--r--sys/sys/sysctl.h10
-rw-r--r--sys/sys/sysent.h4
-rw-r--r--sys/sys/syslog.h8
-rw-r--r--sys/sys/tablet.h2
-rw-r--r--sys/sys/termios.h4
-rw-r--r--sys/sys/time.h12
-rw-r--r--sys/sys/timepps.h6
-rw-r--r--sys/sys/times.h2
-rw-r--r--sys/sys/timetc.h12
-rw-r--r--sys/sys/timex.h8
-rw-r--r--sys/sys/tty.h6
-rw-r--r--sys/sys/types.h12
-rw-r--r--sys/sys/ucred.h4
-rw-r--r--sys/sys/uio.h6
-rw-r--r--sys/sys/un.h6
-rw-r--r--sys/sys/user.h8
-rw-r--r--sys/sys/utsname.h4
-rw-r--r--sys/sys/vmmeter.h2
-rw-r--r--sys/sys/vnode.h8
-rw-r--r--sys/sys/wait.h2
304 files changed, 710 insertions, 703 deletions
diff --git a/sys/alpha/alpha/genassym.c b/sys/alpha/alpha/genassym.c
index 7515a4a86c14..5e59a543a2e4 100644
--- a/sys/alpha/alpha/genassym.c
+++ b/sys/alpha/alpha/genassym.c
@@ -53,9 +53,9 @@
#include <vm/vm_param.h>
#include <vm/pmap.h>
#include <vm/vm_map.h>
-#define KERNEL /* Avoid userland compatability headers */
+#define _KERNEL /* Avoid userland compatability headers */
#include <sys/user.h>
-#undef KERNEL
+#undef _KERNEL
#include <net/if.h>
#include <netinet/in.h>
#include <nfs/nfsv2.h>
diff --git a/sys/alpha/alpha/ieee_float.c b/sys/alpha/alpha/ieee_float.c
index d6fa59f89456..3332224549dd 100644
--- a/sys/alpha/alpha/ieee_float.c
+++ b/sys/alpha/alpha/ieee_float.c
@@ -1159,7 +1159,7 @@ ieee_convert_S_Q(fp_register_t f, int rnd,
return ieee_convert_T_Q(f, rnd, control, status);
}
-#ifndef KERNEL
+#ifndef _KERNEL
#include <stdio.h>
#include <math.h>
diff --git a/sys/alpha/include/asm.h b/sys/alpha/include/asm.h
index 47b2a2c79571..b185295c60c7 100644
--- a/sys/alpha/include/asm.h
+++ b/sys/alpha/include/asm.h
@@ -617,7 +617,7 @@ label: ASCIZ msg; \
* Kernel RCS ID tag and copyright macros
*/
-#ifdef KERNEL
+#ifdef _KERNEL
#ifdef __ELF__
#define __KERNEL_SECTIONSTRING(_sec, _str) \
@@ -635,4 +635,4 @@ label: ASCIZ msg; \
#define __KERNEL_RCSID(_n, _s) /* nothing */
#endif
-#endif /* KERNEL */
+#endif /* _KERNEL */
diff --git a/sys/alpha/include/clock.h b/sys/alpha/include/clock.h
index f243f8b20334..a5f1b62430a1 100644
--- a/sys/alpha/include/clock.h
+++ b/sys/alpha/include/clock.h
@@ -9,7 +9,7 @@
#ifndef _MACHINE_CLOCK_H_
#define _MACHINE_CLOCK_H_
-#ifdef KERNEL
+#ifdef _KERNEL
extern int disable_rtc_set;
extern int wall_cmos_clock;
@@ -20,6 +20,6 @@ int sysbeep __P((int pitch, int period));
int acquire_timer2 __P((int mode));
int release_timer2 __P((void));
-#endif /* KERNEL */
+#endif
#endif /* !_MACHINE_CLOCK_H_ */
diff --git a/sys/alpha/include/cpu.h b/sys/alpha/include/cpu.h
index d3f24c297717..b6b5b41e31a6 100644
--- a/sys/alpha/include/cpu.h
+++ b/sys/alpha/include/cpu.h
@@ -90,7 +90,7 @@ struct clockframe {
#define aston() (astpending = 1)
-#ifdef KERNEL
+#ifdef _KERNEL
u_int32_t astpending; /* need to trap before returning to user mode */
u_int32_t intr_nesting_level; /* bookeeping only; counts software intr */
u_int32_t want_resched; /* resched() was called */
@@ -124,7 +124,7 @@ u_int32_t want_resched; /* resched() was called */
{ "wall_cmos_clock", CTLTYPE_INT }, \
}
-#ifdef KERNEL
+#ifdef _KERNEL
struct pcb;
struct proc;
@@ -176,6 +176,6 @@ void syscall __P((u_int64_t, struct trapframe *));
void trap __P((unsigned long, unsigned long, unsigned long, unsigned long,
struct trapframe *));
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* _ALPHA_CPU_H_ */
diff --git a/sys/alpha/include/cpuconf.h b/sys/alpha/include/cpuconf.h
index 1965a5ad5a46..02ceb8be37d9 100644
--- a/sys/alpha/include/cpuconf.h
+++ b/sys/alpha/include/cpuconf.h
@@ -1,3 +1,4 @@
+/* $FreeBSD$ */
/* $NetBSD: cpuconf.h,v 1.7 1997/11/06 00:42:03 thorpej Exp $ */
#ifndef _ALPHA_CPUCONF_H
#define _ALPHA_CPUCONF_H
@@ -34,7 +35,7 @@
* Additional reworking by Matthew Jacob for NASA/Ames Research Center.
* Copyright (c) 1997
*/
-#ifdef KERNEL
+#ifdef _KERNEL
/*
* Platform Specific Information and Function Hooks.
*
@@ -119,5 +120,5 @@ extern int ncpuinit;
extern void platform_not_configured __P((int));
extern void platform_not_supported __P((int));
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_ALPHA_CPUCONF_H */
diff --git a/sys/alpha/include/cpufunc.h b/sys/alpha/include/cpufunc.h
index eb225261071c..98f72e85d046 100644
--- a/sys/alpha/include/cpufunc.h
+++ b/sys/alpha/include/cpufunc.h
@@ -29,7 +29,7 @@
#ifndef _MACHINE_CPUFUNC_H_
#define _MACHINE_CPUFUNC_H_
-#ifdef KERNEL
+#ifdef _KERNEL
#include <sys/types.h>
#include <machine/chipset.h>
@@ -100,6 +100,6 @@ extern void memsetw(void *, int, size_t);
extern void memsetw_io(u_int32_t, int, size_t);
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_MACHINE_CPUFUNC_H_ */
diff --git a/sys/alpha/include/elf.h b/sys/alpha/include/elf.h
index 892d96d0337e..fef95ce98633 100644
--- a/sys/alpha/include/elf.h
+++ b/sys/alpha/include/elf.h
@@ -135,7 +135,7 @@ __ElfType(Auxinfo);
#define ELF_TARG_MACH EM_ALPHA
#define ELF_TARG_VER 1
-#ifdef KERNEL
+#ifdef _KERNEL
/*
* On the Alpha we load the dynamic linker where a userland call
@@ -146,5 +146,5 @@ __ElfType(Auxinfo);
#define ELF_RTLD_ADDR(vmspace) \
(round_page((vm_offset_t)(vmspace)->vm_daddr + MAXDSIZ))
-#endif /* KERNEL */
+#endif
#endif /* !_MACHINE_ELF_H_ */
diff --git a/sys/alpha/include/fpu.h b/sys/alpha/include/fpu.h
index 66c557722429..250db28ddd01 100644
--- a/sys/alpha/include/fpu.h
+++ b/sys/alpha/include/fpu.h
@@ -115,7 +115,7 @@
__asm__("mt_fpcr %0" : : "f" (x)); \
__asm__("trapb")
-#ifdef KERNEL
+#ifdef _KERNEL
extern int fp_software_completion(u_int64_t regmask, struct proc *p);
diff --git a/sys/alpha/include/in_cksum.h b/sys/alpha/include/in_cksum.h
index 7691d71efad9..e00477983832 100644
--- a/sys/alpha/include/in_cksum.h
+++ b/sys/alpha/include/in_cksum.h
@@ -69,10 +69,10 @@ in_cksum_update(struct ip *ip)
#endif
typedef unsigned in_psum_t;
-#ifdef KERNEL
+#ifdef _KERNEL
u_int in_cksum_hdr(const struct ip *ip);
in_psum_t in_cksum_partial(in_psum_t psum, const u_short *w, int len);
int in_cksum_finalize(in_psum_t psum);
-#endif /* KERNEL */
+#endif
#endif /* _MACHINE_IN_CKSUM_H_ */
diff --git a/sys/alpha/include/intrcnt.h b/sys/alpha/include/intrcnt.h
index d32494281fb3..440f819410e6 100644
--- a/sys/alpha/include/intrcnt.h
+++ b/sys/alpha/include/intrcnt.h
@@ -72,7 +72,7 @@
# define INTRCNT_KN300_I2C_CTRL INTRCNT_KN300_IRQ + 17
# define INTRCNT_KN300_I2C_BUS INTRCNT_KN300_IRQ + 18
-#ifdef KERNEL
+#ifdef _KERNEL
#ifndef _LOCORE
extern volatile long intrcnt[];
#endif
diff --git a/sys/alpha/include/ioctl_fd.h b/sys/alpha/include/ioctl_fd.h
index 46f57baa95c5..dd6e9d0d944b 100644
--- a/sys/alpha/include/ioctl_fd.h
+++ b/sys/alpha/include/ioctl_fd.h
@@ -31,7 +31,7 @@
#ifndef _MACHINE_IOCTL_FD_H_
#define _MACHINE_IOCTL_FD_H_
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/types.h>
#endif
#include <sys/ioccom.h>
diff --git a/sys/alpha/include/pc/vesa.h b/sys/alpha/include/pc/vesa.h
index 5b214086311a..96f027e5d10b 100644
--- a/sys/alpha/include/pc/vesa.h
+++ b/sys/alpha/include/pc/vesa.h
@@ -112,7 +112,7 @@ struct vesa_mode
u_int8_t v_offscreensize;
};
-#ifdef KERNEL
+#ifdef _KERNEL
#define VESA_MODE(x) ((x) >= M_VESA_BASE)
@@ -123,6 +123,6 @@ int vesa_unload_ioctl(void);
int vesa_load(void);
#endif
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_MACHINE_PC_VESA_H */
diff --git a/sys/alpha/include/pmap.h b/sys/alpha/include/pmap.h
index 321326ff40ad..bd1eb6c2a7d2 100644
--- a/sys/alpha/include/pmap.h
+++ b/sys/alpha/include/pmap.h
@@ -107,14 +107,14 @@ typedef alpha_pt_entry_t pt_entry_t;
/*
* Address of current address space page table maps
*/
-#ifdef KERNEL
+#ifdef _KERNEL
extern pt_entry_t PTmap[]; /* lev3 page tables */
extern pt_entry_t PTlev2[]; /* lev2 page tables */
extern pt_entry_t PTlev1[]; /* lev1 page table */
extern pt_entry_t PTlev1pte; /* pte that maps lev1 page table */
#endif
-#ifdef KERNEL
+#ifdef _KERNEL
/*
* virtual address to page table entry and
* to physical address.
@@ -152,7 +152,7 @@ alpha_XXX_dmamap(vm_offset_t va)
return (pmap_kextract(va) | alpha_XXX_dmamap_or);
}
-#endif /* KERNEL */
+#endif /* _KERNEL */
/*
* Pmap stuff
@@ -188,7 +188,7 @@ struct pmap {
typedef struct pmap *pmap_t;
-#ifdef KERNEL
+#ifdef _KERNEL
extern pmap_t kernel_pmap;
#endif
@@ -209,7 +209,7 @@ typedef struct pv_entry {
#define PV_CI 0x01 /* all entries must be cache inhibited */
#define PV_PTPAGE 0x02 /* entry maps a page table page */
-#ifdef KERNEL
+#ifdef _KERNEL
extern caddr_t CADDR1;
extern pt_entry_t *CMAP1;
@@ -235,7 +235,7 @@ void pmap_set_opt_bsp __P((void));
void pmap_deactivate __P((struct proc *p));
void pmap_emulate_reference __P((struct proc *p, vm_offset_t v, int user, int write));
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !LOCORE */
diff --git a/sys/alpha/include/profile.h b/sys/alpha/include/profile.h
index 0eb8ef282098..57fbb695804b 100644
--- a/sys/alpha/include/profile.h
+++ b/sys/alpha/include/profile.h
@@ -207,7 +207,7 @@ LX98: ldgp $29,0($27); \
\
.end _mcount");
-#ifdef KERNEL
+#ifdef _KERNEL
/*
* The following two macros do splhigh and splx respectively.
* _alpha_pal_swpipl is a special version of alpha_pal_swpipl which
@@ -232,6 +232,6 @@ void stopguprof __P((struct gmonparam *p));
#define stopguprof(p)
#endif /* GUPROF */
-#else /* !KERNEL */
+#else /* !_KERNEL */
typedef u_long uintfptr_t;
#endif
diff --git a/sys/alpha/include/prom.h b/sys/alpha/include/prom.h
index 5c48e649df4e..9991213e7c8b 100644
--- a/sys/alpha/include/prom.h
+++ b/sys/alpha/include/prom.h
@@ -94,7 +94,7 @@ int prom_getenv __P((int, char *, int));
prom_dispatch(PROM_R_GETENV, id, (u_int64_t)buf, len, 0)
#ifndef ASSEMBLER
-#ifdef KERNEL
+#ifdef _KERNEL
void promcnputc __P((dev_t, int));
int promcngetc __P((dev_t));
int promcncheckc __P((dev_t));
@@ -102,5 +102,5 @@ int promcncheckc __P((dev_t));
u_int64_t prom_dispatch __P((u_int64_t, u_int64_t, u_int64_t, u_int64_t,
u_int64_t));
void init_bootstrap_console __P((void));
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* ASSEMBLER */
diff --git a/sys/alpha/include/ptrace.h b/sys/alpha/include/ptrace.h
index d69c5474fb5b..2af0ec498c9e 100644
--- a/sys/alpha/include/ptrace.h
+++ b/sys/alpha/include/ptrace.h
@@ -47,10 +47,10 @@
#define FIX_SSTEP(p) ptrace_clear_single_step(p)
-#ifdef KERNEL
+#ifdef _KERNEL
int ptrace_clear_single_step __P((struct proc *p));
int ptrace_read_u_check __P((struct proc *p, vm_offset_t off, size_t len));
-#endif /* !KERNEL */
+#endif
#endif
diff --git a/sys/alpha/include/reg.h b/sys/alpha/include/reg.h
index 879aeed1e8c6..172c3024a1e8 100644
--- a/sys/alpha/include/reg.h
+++ b/sys/alpha/include/reg.h
@@ -107,7 +107,7 @@ struct dbreg {
unsigned long wankage;
};
-#ifdef KERNEL
+#ifdef _KERNEL
void restorefpstate __P((struct fpreg *));
void savefpstate __P((struct fpreg *));
void setregs __P((struct proc *, u_long, u_long, u_long));
diff --git a/sys/alpha/include/sysarch.h b/sys/alpha/include/sysarch.h
index 8eda490525ef..60243991ad90 100644
--- a/sys/alpha/include/sysarch.h
+++ b/sys/alpha/include/sysarch.h
@@ -43,7 +43,7 @@
#define ALPHA_GET_FPMASK 1
#define ALPHA_SET_FPMASK 2
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/cdefs.h>
union descriptor;
@@ -51,6 +51,6 @@ union descriptor;
__BEGIN_DECLS
int alpha_sethae __P((u_int64_t));
__END_DECLS
-#endif /* !KERNEL */
+#endif
#endif /* !_MACHINE_SYSARCH_H_ */
diff --git a/sys/alpha/include/types.h b/sys/alpha/include/types.h
index 03e186996b34..cf282de6b53f 100644
--- a/sys/alpha/include/types.h
+++ b/sys/alpha/include/types.h
@@ -59,7 +59,7 @@ typedef unsigned long vm_size_t;
typedef __int64_t register_t;
-#ifdef KERNEL
+#ifdef _KERNEL
typedef long intfptr_t;
typedef unsigned long uintfptr_t;
#endif
diff --git a/sys/amd64/amd64/genassym.c b/sys/amd64/amd64/genassym.c
index 75f278db27ab..8e21dac8e2bc 100644
--- a/sys/amd64/amd64/genassym.c
+++ b/sys/amd64/amd64/genassym.c
@@ -56,9 +56,9 @@
#include <vm/vm_param.h>
#include <vm/pmap.h>
#include <vm/vm_map.h>
-#define KERNEL /* Avoid userland compatability headers */
+#define _KERNEL /* Avoid userland compatability headers */
#include <sys/user.h>
-#undef KERNEL
+#undef _KERNEL
#include <net/if.h>
#include <netinet/in.h>
#include <nfs/nfsv2.h>
diff --git a/sys/amd64/include/clock.h b/sys/amd64/include/clock.h
index 8d0e2d3ef20e..3ce7adb2bd27 100644
--- a/sys/amd64/include/clock.h
+++ b/sys/amd64/include/clock.h
@@ -9,7 +9,7 @@
#ifndef _MACHINE_CLOCK_H_
#define _MACHINE_CLOCK_H_
-#ifdef KERNEL
+#ifdef _KERNEL
/*
* i386 to clock driver interface.
* XXX large parts of the driver and its interface are misplaced.
@@ -46,6 +46,6 @@ int release_timer1 __P((void));
int sysbeep __P((int pitch, int period));
void i8254_restore __P((void));
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_MACHINE_CLOCK_H_ */
diff --git a/sys/amd64/include/cpu.h b/sys/amd64/include/cpu.h
index 4a2fe79f41ad..666af5cae395 100644
--- a/sys/amd64/include/cpu.h
+++ b/sys/amd64/include/cpu.h
@@ -124,7 +124,7 @@
{ "wall_cmos_clock", CTLTYPE_INT }, \
}
-#ifdef KERNEL
+#ifdef _KERNEL
extern int astpending;
extern char btext[];
extern char etext[];
diff --git a/sys/amd64/include/cpufunc.h b/sys/amd64/include/cpufunc.h
index 48ec3518fc89..97b7694ce2dd 100644
--- a/sys/amd64/include/cpufunc.h
+++ b/sys/amd64/include/cpufunc.h
@@ -240,7 +240,7 @@ invd(void)
__asm __volatile("invd");
}
-#if defined(SMP) && defined(KERNEL)
+#if defined(SMP) && defined(_KERNEL)
/*
* When using APIC IPI's, invlpg() is not simply the invlpg instruction
@@ -271,7 +271,7 @@ cpu_invltlb(void)
#endif
}
-#else /* !(SMP && KERNEL) */
+#else /* !(SMP && _KERNEL) */
static __inline void
invlpg(u_int addr)
@@ -294,7 +294,7 @@ invltlb(void)
#endif
}
-#endif /* SMP && KERNEL */
+#endif /* SMP && _KERNEL */
static __inline u_short
inw(u_int port)
diff --git a/sys/amd64/include/elf.h b/sys/amd64/include/elf.h
index 756c08c02042..7fd8fda56d82 100644
--- a/sys/amd64/include/elf.h
+++ b/sys/amd64/include/elf.h
@@ -118,7 +118,7 @@ __ElfType(Auxinfo);
#define ELF_TARG_MACH EM_386
#define ELF_TARG_VER 1
-#ifdef KERNEL
+#ifdef _KERNEL
/*
* On the i386 we load the dynamic linker where a userland call
@@ -129,5 +129,5 @@ __ElfType(Auxinfo);
#define ELF_RTLD_ADDR(vmspace) \
(round_page((vm_offset_t)(vmspace)->vm_daddr + MAXDSIZ))
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_MACHINE_ELF_H_ */
diff --git a/sys/amd64/include/fpu.h b/sys/amd64/include/fpu.h
index 2e7a31d25082..fb0a37f343ef 100644
--- a/sys/amd64/include/fpu.h
+++ b/sys/amd64/include/fpu.h
@@ -136,7 +136,7 @@ struct save87 {
#define __INITIAL_NPXCW__ __BDE_NPXCW__
#endif
-#ifdef KERNEL
+#ifdef _KERNEL
#ifndef npxproc
extern struct proc *npxproc;
#endif
diff --git a/sys/amd64/include/npx.h b/sys/amd64/include/npx.h
index 2e7a31d25082..fb0a37f343ef 100644
--- a/sys/amd64/include/npx.h
+++ b/sys/amd64/include/npx.h
@@ -136,7 +136,7 @@ struct save87 {
#define __INITIAL_NPXCW__ __BDE_NPXCW__
#endif
-#ifdef KERNEL
+#ifdef _KERNEL
#ifndef npxproc
extern struct proc *npxproc;
#endif
diff --git a/sys/amd64/include/pcb.h b/sys/amd64/include/pcb.h
index dde72812d5a6..08beb5a83059 100644
--- a/sys/amd64/include/pcb.h
+++ b/sys/amd64/include/pcb.h
@@ -89,7 +89,7 @@ struct pcb {
struct md_coredump {
};
-#ifdef KERNEL
+#ifdef _KERNEL
#ifndef curpcb
extern struct pcb *curpcb; /* our current running pcb */
diff --git a/sys/amd64/include/pcb_ext.h b/sys/amd64/include/pcb_ext.h
index 42e8abfc6a21..482ec96a9cab 100644
--- a/sys/amd64/include/pcb_ext.h
+++ b/sys/amd64/include/pcb_ext.h
@@ -51,7 +51,7 @@ struct pcb_ldt {
struct segment_descriptor ldt_sd;
};
-#ifdef KERNEL
+#ifdef _KERNEL
#ifdef USER_LDT
void set_user_ldt __P((struct pcb *));
diff --git a/sys/amd64/include/pmap.h b/sys/amd64/include/pmap.h
index 1f8163608769..66b6b613d569 100644
--- a/sys/amd64/include/pmap.h
+++ b/sys/amd64/include/pmap.h
@@ -137,14 +137,14 @@ typedef unsigned int *pt_entry_t;
* Address of current and alternate address space page table maps
* and directories.
*/
-#ifdef KERNEL
+#ifdef _KERNEL
extern pt_entry_t PTmap[], APTmap[], Upte;
extern pd_entry_t PTD[], APTD[], PTDpde, APTDpde, Upde;
extern pd_entry_t IdlePTD; /* physical address of "Idle" state directory */
#endif
-#ifdef KERNEL
+#ifdef _KERNEL
/*
* virtual address to page table entry and
* to physical address. Likewise for alternate address space.
@@ -208,7 +208,7 @@ struct pmap {
typedef struct pmap *pmap_t;
-#ifdef KERNEL
+#ifdef _KERNEL
extern pmap_t kernel_pmap;
#endif
@@ -229,7 +229,7 @@ typedef struct pv_entry {
#define PV_CI 0x01 /* all entries must be cache inhibited */
#define PV_PTPAGE 0x02 /* entry maps a page table page */
-#ifdef KERNEL
+#ifdef _KERNEL
#define NPPROVMTRR 8
#define PPRO_VMTRRphysBase0 0x200
@@ -260,7 +260,7 @@ vm_page_t pmap_use_pt __P((pmap_t, vm_offset_t));
void pmap_set_opt __P((void));
#endif
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !LOCORE */
diff --git a/sys/amd64/include/profile.h b/sys/amd64/include/profile.h
index 1d2b6009f52e..22738c3b1fb2 100644
--- a/sys/amd64/include/profile.h
+++ b/sys/amd64/include/profile.h
@@ -37,7 +37,7 @@
#ifndef _MACHINE_PROFILE_H_
#define _MACHINE_PROFILE_H_
-#ifdef KERNEL
+#ifdef _KERNEL
/*
* Config generates something to tell the compiler to align functions on 16
@@ -74,7 +74,7 @@
#endif
#endif /* GUPROF */
-#else /* !KERNEL */
+#else /* !_KERNEL */
#define FUNCTION_ALIGNMENT 4
@@ -105,7 +105,7 @@ mcount() \
typedef unsigned int uintfptr_t;
-#endif /* KERNEL */
+#endif /* _KERNEL */
/*
* An unsigned integral type that can hold non-negative difference between
@@ -113,7 +113,7 @@ typedef unsigned int uintfptr_t;
*/
typedef u_int fptrdiff_t;
-#ifdef KERNEL
+#ifdef _KERNEL
void mcount __P((uintfptr_t frompc, uintfptr_t selfpc));
@@ -129,7 +129,7 @@ void stopguprof __P((struct gmonparam *p));
#define stopguprof(p)
#endif /* GUPROF */
-#else /* !KERNEL */
+#else /* !_KERNEL */
#include <sys/cdefs.h>
@@ -144,7 +144,7 @@ void mcount __P((void)) __asm("mcount");
static void _mcount __P((uintfptr_t frompc, uintfptr_t selfpc));
__END_DECLS
-#endif /* KERNEL */
+#endif /* _KERNEL */
#ifdef GUPROF
/* XXX doesn't quite work outside kernel yet. */
diff --git a/sys/amd64/include/ptrace.h b/sys/amd64/include/ptrace.h
index 55a26fd636ad..d59a38f3409b 100644
--- a/sys/amd64/include/ptrace.h
+++ b/sys/amd64/include/ptrace.h
@@ -47,9 +47,9 @@
#define PT_GETDBREGS (PT_FIRSTMACH + 5)
#define PT_SETDBREGS (PT_FIRSTMACH + 6)
-#ifdef KERNEL
+#ifdef _KERNEL
int ptrace_read_u_check __P((struct proc *p, vm_offset_t off, size_t len));
-#endif /* !KERNEL */
+#endif
#endif
diff --git a/sys/amd64/include/reg.h b/sys/amd64/include/reg.h
index 1f541c7b30d0..7b5b69a1c2af 100644
--- a/sys/amd64/include/reg.h
+++ b/sys/amd64/include/reg.h
@@ -130,7 +130,7 @@ struct dbreg {
};
-#ifdef KERNEL
+#ifdef _KERNEL
/*
* XXX these interfaces are MI, so they should be declared in a MI place.
*/
diff --git a/sys/amd64/include/segments.h b/sys/amd64/include/segments.h
index d043d8b5a113..8cbe8704bd8e 100644
--- a/sys/amd64/include/segments.h
+++ b/sys/amd64/include/segments.h
@@ -242,7 +242,7 @@ struct region_descriptor {
#define LBSDICALLS_SEL 16 /* BSDI system call gate */
#define NLDT (LBSDICALLS_SEL + 1)
-#ifdef KERNEL
+#ifdef _KERNEL
#ifndef currentldt
extern int currentldt;
#endif
@@ -259,6 +259,6 @@ void sdtossd __P((struct segment_descriptor *sdp,
struct soft_segment_descriptor *ssdp));
void ssdtosd __P((struct soft_segment_descriptor *ssdp,
struct segment_descriptor *sdp));
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_MACHINE_SEGMENTS_H_ */
diff --git a/sys/amd64/include/smp.h b/sys/amd64/include/smp.h
index 02f2bb85b62e..8f0a2f8a4572 100644
--- a/sys/amd64/include/smp.h
+++ b/sys/amd64/include/smp.h
@@ -13,7 +13,7 @@
#ifndef _MACHINE_SMP_H_
#define _MACHINE_SMP_H_
-#ifdef KERNEL
+#ifdef _KERNEL
#if defined(SMP) && !defined(APIC_IO)
# error APIC_IO required for SMP, add "options APIC_IO" to your config file.
@@ -182,5 +182,5 @@ extern volatile int smp_idle_loops;
#endif /* !LOCORE */
#endif /* SMP || APIC_IO */
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* _MACHINE_SMP_H_ */
diff --git a/sys/amd64/include/sysarch.h b/sys/amd64/include/sysarch.h
index 5ea3ee6e8875..01e63c569a78 100644
--- a/sys/amd64/include/sysarch.h
+++ b/sys/amd64/include/sysarch.h
@@ -64,7 +64,7 @@ struct i386_vm86_args {
char *sub_args; /* args */
};
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/cdefs.h>
union descriptor;
@@ -76,6 +76,6 @@ int i386_get_ioperm __P((unsigned int, unsigned int *, int *));
int i386_set_ioperm __P((unsigned int, unsigned int, int));
int i386_vm86 __P((int, void *));
__END_DECLS
-#endif /* !KERNEL */
+#endif
#endif /* !_MACHINE_SYSARCH_H_ */
diff --git a/sys/amd64/include/tss.h b/sys/amd64/include/tss.h
index 2003a66609b4..77b94437c034 100644
--- a/sys/amd64/include/tss.h
+++ b/sys/amd64/include/tss.h
@@ -82,7 +82,7 @@ struct i386tss {
/* XXX unimplemented .. i/o permission bitmap */
};
-#ifdef KERNEL
+#ifdef _KERNEL
#ifndef common_tss
extern struct i386tss common_tss;
#endif
diff --git a/sys/amd64/isa/intr_machdep.h b/sys/amd64/isa/intr_machdep.h
index cf0667c92ea9..cc6ca67a3238 100644
--- a/sys/amd64/isa/intr_machdep.h
+++ b/sys/amd64/isa/intr_machdep.h
@@ -40,7 +40,7 @@
* Low level interrupt code.
*/
-#ifdef KERNEL
+#ifdef _KERNEL
#if defined(SMP) || defined(APIC_IO)
/*
@@ -208,6 +208,6 @@ int inthand_remove(struct intrec *idesc);
#endif /* LOCORE */
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_I386_ISA_INTR_MACHDEP_H_ */
diff --git a/sys/amd64/isa/isa_dma.h b/sys/amd64/isa/isa_dma.h
index 15f8b3d804da..7f9396a2fb06 100644
--- a/sys/amd64/isa/isa_dma.h
+++ b/sys/amd64/isa/isa_dma.h
@@ -37,7 +37,7 @@
#ifndef _I386_ISA_ISA_DMA_H_
#define _I386_ISA_ISA_DMA_H_
-#ifdef KERNEL
+#ifdef _KERNEL
void isa_dmacascade __P((int chan));
void isa_dmadone __P((int flags, caddr_t addr, int nbytes, int chan));
void isa_dmainit __P((int chan, u_int bouncebufsize));
@@ -46,6 +46,6 @@ int isa_dma_acquire __P((int chan));
void isa_dma_release __P((int chan));
int isa_dmastatus __P((int chan));
int isa_dmastop __P((int chan));
-#endif /* KERNEL */
+#endif
#endif /* !_I386_ISA_ISA_DMA_H_ */
diff --git a/sys/cam/scsi/scsi_all.c b/sys/cam/scsi/scsi_all.c
index f6c997a9c244..bd614cf1218f 100644
--- a/sys/cam/scsi/scsi_all.c
+++ b/sys/cam/scsi/scsi_all.c
@@ -31,7 +31,7 @@
#include <sys/param.h>
-#ifdef KERNEL
+#ifdef _KERNEL
#include <opt_scsi.h>
#include <sys/systm.h>
@@ -46,7 +46,7 @@
#include <cam/cam_xpt.h>
#include <cam/cam_xpt_periph.h>
#include <cam/scsi/scsi_all.h>
-#ifndef KERNEL
+#ifndef _KERNEL
#include <camlib.h>
#ifndef FALSE
@@ -57,7 +57,7 @@
#endif /* TRUE */
#define ERESTART -1 /* restart syscall */
#define EJUSTRETURN -2 /* don't modify regs, just return */
-#endif /* !KERNEL */
+#endif /* !_KERNEL */
const char *scsi_sense_key_text[] =
{
@@ -715,7 +715,7 @@ scsi_op_desc(u_int16_t opcode, struct scsi_inquiry_data *inq_data)
* If we're in the kernel, 'quantum' is already defined in cam_xpt.c.
* Otherwise, we need to define it.
*/
-#ifdef KERNEL
+#ifdef _KERNEL
extern const char quantum[];
#else
static const char quantum[] = "QUANTUM";
@@ -1622,7 +1622,7 @@ scsi_cdb_string(u_int8_t *cdb_ptr, char *cdb_string, size_t len)
* Because scsi_sense_print() utilizes transport layer functions, it will
* only work in the kernel.
*/
-#ifdef KERNEL
+#ifdef _KERNEL
void
scsi_sense_print(struct ccb_scsiio *csio)
@@ -1793,7 +1793,7 @@ scsi_sense_print(struct ccb_scsiio *csio)
printf("\n");
}
-#else /* !KERNEL */
+#else /* !_KERNEL */
char *
@@ -2102,9 +2102,9 @@ scsi_sense_print(struct cam_device *device, struct ccb_scsiio *csio,
fprintf(ofile, "%s", scsi_sense_string(device, csio, str, 2048));
}
-#endif /* KERNEL/!KERNEL */
+#endif /* _KERNEL/!_KERNEL */
-#ifdef KERNEL
+#ifdef _KERNEL
int
scsi_interpret_sense(union ccb *ccb, u_int32_t sense_flags,
u_int32_t *relsim_flags, u_int32_t *openings,
@@ -2128,7 +2128,7 @@ scsi_interpret_sense(struct cam_device *device, union ccb *ccb,
sense = &csio->sense_data;
scsi_extract_sense(sense, &error_code, &sense_key, &asc, &ascq);
-#ifdef KERNEL
+#ifdef _KERNEL
if (bootverbose) {
sense_flags |= SF_PRINT_ALWAYS;
print_sense = TRUE;
@@ -2280,7 +2280,7 @@ scsi_interpret_sense(struct cam_device *device, union ccb *ccb,
}
if (print_sense) {
-#ifdef KERNEL
+#ifdef _KERNEL
scsi_sense_print(csio);
#else
scsi_sense_print(device, csio, stdout);
diff --git a/sys/cam/scsi/scsi_all.h b/sys/cam/scsi/scsi_all.h
index d6d802bfceac..e32c236379f8 100644
--- a/sys/cam/scsi/scsi_all.h
+++ b/sys/cam/scsi/scsi_all.h
@@ -26,7 +26,7 @@
#include <sys/cdefs.h>
-#ifdef KERNEL
+#ifdef _KERNEL
#include "opt_scsi.h"
/*
* This is the number of seconds we wait for devices to settle after a SCSI
@@ -51,7 +51,7 @@
#if (SCSI_DELAY < 100)
#error "SCSI_DELAY is in milliseconds, not seconds! Please use a larger value"
#endif
-#endif /* KERNEL */
+#endif /* _KERNEL */
/*
* SCSI command format
@@ -701,7 +701,7 @@ struct scsi_op_quirk_entry {
struct ccb_scsiio;
struct cam_periph;
union ccb;
-#ifndef KERNEL
+#ifndef _KERNEL
struct cam_device;
#endif
@@ -712,7 +712,7 @@ const char * scsi_sense_desc(int asc, int ascq,
struct scsi_inquiry_data *inq_data);
scsi_sense_action scsi_error_action(int asc, int ascq,
struct scsi_inquiry_data *inq_data);
-#ifdef KERNEL
+#ifdef _KERNEL
void scsi_sense_print(struct ccb_scsiio *csio);
int scsi_interpret_sense(union ccb *ccb,
u_int32_t sense_flags,
@@ -733,7 +733,7 @@ int scsi_interpret_sense(struct cam_device *device,
u_int32_t *reduction,
u_int32_t *timeout,
scsi_sense_action error_action);
-#endif /* KERNEL */
+#endif /* _KERNEL */
#define SF_RETRY_UA 0x01
#define SF_NO_PRINT 0x02
diff --git a/sys/cam/scsi/scsi_sa.c b/sys/cam/scsi/scsi_sa.c
index 85aa2d3ea3d0..10f0884ea527 100644
--- a/sys/cam/scsi/scsi_sa.c
+++ b/sys/cam/scsi/scsi_sa.c
@@ -36,7 +36,7 @@
#include <sys/param.h>
#include <sys/queue.h>
-#ifdef KERNEL
+#ifdef _KERNEL
#include <sys/systm.h>
#include <sys/kernel.h>
#endif
@@ -49,7 +49,7 @@
#include <sys/devicestat.h>
#include <machine/limits.h>
-#ifndef KERNEL
+#ifndef _KERNEL
#include <stdio.h>
#include <string.h>
#endif
@@ -65,7 +65,7 @@
#include <cam/scsi/scsi_message.h>
#include <cam/scsi/scsi_sa.h>
-#ifdef KERNEL
+#ifdef _KERNEL
#include <opt_sa.h>
@@ -3210,7 +3210,7 @@ saerase(struct cam_periph *periph, int longerase)
return (error);
}
-#endif /* KERNEL */
+#endif /* _KERNEL */
/*
* Read tape block limits command.
diff --git a/sys/cam/scsi/scsi_targetio.h b/sys/cam/scsi/scsi_targetio.h
index d20c9b08fbc2..f628d945d954 100644
--- a/sys/cam/scsi/scsi_targetio.h
+++ b/sys/cam/scsi/scsi_targetio.h
@@ -30,7 +30,7 @@
#ifndef _CAM_SCSI_SCSI_TARGETIO_H_
#define _CAM_SCSI_SCSI_TARGETIO_H_
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/types.h>
#endif
#include <sys/ioccom.h>
diff --git a/sys/conf/Makefile.i386 b/sys/conf/Makefile.i386
index f2aa03afb508..53e63089932d 100644
--- a/sys/conf/Makefile.i386
+++ b/sys/conf/Makefile.i386
@@ -43,16 +43,14 @@ INCLUDES+= -I$S/../include
.else
INCLUDES+= -I/usr/include
.endif
-COPTS= ${INCLUDES} ${IDENT} -DKERNEL -include opt_global.h
-# KAME mandatory flags
-COPTS+= -D_KERNEL
+COPTS= ${INCLUDES} ${IDENT} -D_KERNEL -include opt_global.h
CFLAGS= ${COPTFLAGS} ${CWARNFLAGS} ${DEBUG} ${COPTS}
# XXX LOCORE means "don't declare C stuff" not "for locore.s".
ASM_CFLAGS= -x assembler-with-cpp -DLOCORE ${CFLAGS}
# Use the default object format for genassym, etc.
-GEN_CFLAGS= ${COPTFLAGS} ${CWARNFLAGS} ${DEBUG} ${COPTS} -UKERNEL
+GEN_CFLAGS= ${COPTFLAGS} ${CWARNFLAGS} ${DEBUG} ${COPTS} -U_KERNEL
# Select the correct set of tools. Can't set OBJFORMAT here because it
# doesn't get exported into the environment, and if it were exported
diff --git a/sys/conf/Makefile.powerpc b/sys/conf/Makefile.powerpc
index f2aa03afb508..53e63089932d 100644
--- a/sys/conf/Makefile.powerpc
+++ b/sys/conf/Makefile.powerpc
@@ -43,16 +43,14 @@ INCLUDES+= -I$S/../include
.else
INCLUDES+= -I/usr/include
.endif
-COPTS= ${INCLUDES} ${IDENT} -DKERNEL -include opt_global.h
-# KAME mandatory flags
-COPTS+= -D_KERNEL
+COPTS= ${INCLUDES} ${IDENT} -D_KERNEL -include opt_global.h
CFLAGS= ${COPTFLAGS} ${CWARNFLAGS} ${DEBUG} ${COPTS}
# XXX LOCORE means "don't declare C stuff" not "for locore.s".
ASM_CFLAGS= -x assembler-with-cpp -DLOCORE ${CFLAGS}
# Use the default object format for genassym, etc.
-GEN_CFLAGS= ${COPTFLAGS} ${CWARNFLAGS} ${DEBUG} ${COPTS} -UKERNEL
+GEN_CFLAGS= ${COPTFLAGS} ${CWARNFLAGS} ${DEBUG} ${COPTS} -U_KERNEL
# Select the correct set of tools. Can't set OBJFORMAT here because it
# doesn't get exported into the environment, and if it were exported
diff --git a/sys/dev/aic7xxx/93cx6.h b/sys/dev/aic7xxx/93cx6.h
index b1694834a06b..ee013c26e514 100644
--- a/sys/dev/aic7xxx/93cx6.h
+++ b/sys/dev/aic7xxx/93cx6.h
@@ -42,7 +42,7 @@
#include <sys/systm.h>
#endif
-#ifdef KERNEL
+#ifdef _KERNEL
typedef enum {
C46 = 6,
@@ -92,4 +92,4 @@ struct seeprom_descriptor {
int read_seeprom(struct seeprom_descriptor *sd, u_int16_t *buf,
bus_size_t start_addr, bus_size_t count);
-#endif /* KERNEL */
+#endif /* _KERNEL */
diff --git a/sys/dev/aic7xxx/aic7xxx_93cx6.h b/sys/dev/aic7xxx/aic7xxx_93cx6.h
index b1694834a06b..ee013c26e514 100644
--- a/sys/dev/aic7xxx/aic7xxx_93cx6.h
+++ b/sys/dev/aic7xxx/aic7xxx_93cx6.h
@@ -42,7 +42,7 @@
#include <sys/systm.h>
#endif
-#ifdef KERNEL
+#ifdef _KERNEL
typedef enum {
C46 = 6,
@@ -92,4 +92,4 @@ struct seeprom_descriptor {
int read_seeprom(struct seeprom_descriptor *sd, u_int16_t *buf,
bus_size_t start_addr, bus_size_t count);
-#endif /* KERNEL */
+#endif /* _KERNEL */
diff --git a/sys/dev/atkbdc/atkbdcreg.h b/sys/dev/atkbdc/atkbdcreg.h
index 2085bb67bb92..d01489ee84b8 100644
--- a/sys/dev/atkbdc/atkbdcreg.h
+++ b/sys/dev/atkbdc/atkbdcreg.h
@@ -133,7 +133,7 @@
#define PSM_BALLPOINT_ID 2
#define PSM_INTELLI_ID 3
-#ifdef KERNEL
+#ifdef _KERNEL
#define ATKBDC_DRIVER_NAME "atkbdc"
@@ -242,6 +242,6 @@ void kbdc_set_device_mask(KBDC kbdc, int mask);
int get_controller_command_byte(KBDC kbdc);
int set_controller_command_byte(KBDC kbdc, int command, int flag);
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_DEV_KBD_ATKBDCREG_H_ */
diff --git a/sys/dev/atkbdc/atkbdreg.h b/sys/dev/atkbdc/atkbdreg.h
index bda6afb8582d..46405c6be2a5 100644
--- a/sys/dev/atkbdc/atkbdreg.h
+++ b/sys/dev/atkbdc/atkbdreg.h
@@ -36,12 +36,12 @@
#define KB_CONF_NO_RESET (1 << 1) /* don't reset the keyboard */
#define KB_CONF_ALT_SCANCODESET (1 << 2) /* assume the XT type keyboard */
-#ifdef KERNEL
+#ifdef _KERNEL
int atkbd_probe_unit(int unit, int port, int irq, int flags);
int atkbd_attach_unit(int unit, keyboard_t **kbd,
int port, int irq, int flags);
-#endif /* KERNEL */
+#endif
#endif /* !_DEV_KBD_ATKBDREG_H_ */
diff --git a/sys/dev/bktr/ioctl_meteor.h b/sys/dev/bktr/ioctl_meteor.h
index 919100f8d534..f62d392ea0ae 100644
--- a/sys/dev/bktr/ioctl_meteor.h
+++ b/sys/dev/bktr/ioctl_meteor.h
@@ -27,6 +27,8 @@
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
+ *
+ * $FreeBSD$
*/
/*
* ioctl constants for Matrox Meteor Capture card.
@@ -35,7 +37,7 @@
#ifndef _MACHINE_IOCTL_METEOR_H_
#define _MACHINE_IOCTL_METEOR_H_
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/types.h>
#endif
#include <sys/ioccom.h>
diff --git a/sys/dev/dpt/dpt.h b/sys/dev/dpt/dpt.h
index 4d151eba3e08..f2d1c2209216 100644
--- a/sys/dev/dpt/dpt.h
+++ b/sys/dev/dpt/dpt.h
@@ -1222,7 +1222,7 @@ typedef struct dpt_user_softc {
* These all come from dpt_scsi.c
*
*/
-#ifdef KERNEL
+#ifdef _KERNEL
/* This function gets the current hi-res time and returns it to the caller */
static __inline struct timeval
dpt_time_now(void)
@@ -1244,7 +1244,7 @@ dpt_minor2unit(int minor)
dpt_softc_t *dpt_minor2softc(int minor_no);
-#endif /* KERNEL */
+#endif /* _KERNEL */
/*
* This function substracts one timval structure from another,
diff --git a/sys/dev/fb/fbreg.h b/sys/dev/fb/fbreg.h
index 0dc20165c496..7070f19d52f4 100644
--- a/sys/dev/fb/fbreg.h
+++ b/sys/dev/fb/fbreg.h
@@ -29,7 +29,7 @@
#ifndef _DEV_FB_FBREG_H_
#define _DEV_FB_FBREG_H_
-#ifdef KERNEL
+#ifdef _KERNEL
#define V_MAX_ADAPTERS 8 /* XXX */
@@ -205,6 +205,6 @@ void fb_dump_mode_info(char *driver, video_adapter_t *adp,
int fb_type(int adp_type);
int fb_commonioctl(video_adapter_t *adp, u_long cmd, caddr_t arg);
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_DEV_FB_FBREG_H_ */
diff --git a/sys/dev/fb/vgareg.h b/sys/dev/fb/vgareg.h
index 94c65e0976fe..d50e5f2caaa9 100644
--- a/sys/dev/fb/vgareg.h
+++ b/sys/dev/fb/vgareg.h
@@ -64,7 +64,7 @@
#define VGA_UNIT(dev) minor(dev)
#define VGA_MKMINOR(unit) (unit)
-#ifdef KERNEL
+#ifdef _KERNEL
struct video_adapter;
typedef struct vga_softc {
@@ -92,6 +92,6 @@ int vga_mmap(dev_t dev, vga_softc_t *sc, vm_offset_t offset,
extern int (*vga_sub_configure)(int flags);
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* _DEV_FB_VGAREG_H_ */
diff --git a/sys/dev/iicbus/if_ic.c b/sys/dev/iicbus/if_ic.c
index 97dc5ea9b1d9..2342956f4b1e 100644
--- a/sys/dev/iicbus/if_ic.c
+++ b/sys/dev/iicbus/if_ic.c
@@ -30,7 +30,7 @@
* I2C bus IP driver
*/
-#ifdef KERNEL
+#ifdef _KERNEL
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/proc.h>
@@ -48,7 +48,7 @@
#include <net/if_types.h>
#include <net/netisr.h>
-#endif /* KERNEL */
+#endif
#include <sys/mbuf.h>
#include <sys/socket.h>
#include <net/netisr.h>
diff --git a/sys/dev/kbd/atkbdcreg.h b/sys/dev/kbd/atkbdcreg.h
index 2085bb67bb92..d01489ee84b8 100644
--- a/sys/dev/kbd/atkbdcreg.h
+++ b/sys/dev/kbd/atkbdcreg.h
@@ -133,7 +133,7 @@
#define PSM_BALLPOINT_ID 2
#define PSM_INTELLI_ID 3
-#ifdef KERNEL
+#ifdef _KERNEL
#define ATKBDC_DRIVER_NAME "atkbdc"
@@ -242,6 +242,6 @@ void kbdc_set_device_mask(KBDC kbdc, int mask);
int get_controller_command_byte(KBDC kbdc);
int set_controller_command_byte(KBDC kbdc, int command, int flag);
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_DEV_KBD_ATKBDCREG_H_ */
diff --git a/sys/dev/kbd/atkbdreg.h b/sys/dev/kbd/atkbdreg.h
index bda6afb8582d..46405c6be2a5 100644
--- a/sys/dev/kbd/atkbdreg.h
+++ b/sys/dev/kbd/atkbdreg.h
@@ -36,12 +36,12 @@
#define KB_CONF_NO_RESET (1 << 1) /* don't reset the keyboard */
#define KB_CONF_ALT_SCANCODESET (1 << 2) /* assume the XT type keyboard */
-#ifdef KERNEL
+#ifdef _KERNEL
int atkbd_probe_unit(int unit, int port, int irq, int flags);
int atkbd_attach_unit(int unit, keyboard_t **kbd,
int port, int irq, int flags);
-#endif /* KERNEL */
+#endif
#endif /* !_DEV_KBD_ATKBDREG_H_ */
diff --git a/sys/dev/kbd/kbdreg.h b/sys/dev/kbd/kbdreg.h
index 83696bb40f4e..1312b04d397d 100644
--- a/sys/dev/kbd/kbdreg.h
+++ b/sys/dev/kbd/kbdreg.h
@@ -164,7 +164,7 @@ typedef struct keyboard_driver {
int (*configure)(int); /* backdoor for the console driver */
} keyboard_driver_t;
-#ifdef KERNEL
+#ifdef _KERNEL
#define KEYBOARD_DRIVER(name, sw, config) \
static struct keyboard_driver name##_kbd_driver = { \
@@ -252,6 +252,6 @@ int genkbd_commonioctl(keyboard_t *kbd, u_long cmd, caddr_t arg);
int genkbd_keyaction(keyboard_t *kbd, int keycode, int down,
int *shiftstate, int *accents);
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_DEV_KBD_KBDREG_H_ */
diff --git a/sys/dev/mii/miivar.h b/sys/dev/mii/miivar.h
index 52380fa946e3..4a68b9c7cf25 100644
--- a/sys/dev/mii/miivar.h
+++ b/sys/dev/mii/miivar.h
@@ -144,7 +144,7 @@ struct mii_attach_args {
};
typedef struct mii_attach_args mii_attach_args_t;
-#ifdef KERNEL
+#ifdef _KERNEL
#define PHY_READ(p, r) \
MIIBUS_READREG((p)->mii_dev, (p)->mii_phy, (r))
@@ -173,6 +173,6 @@ int mii_phy_auto __P((struct mii_softc *, int));
void mii_phy_reset __P((struct mii_softc *));
void ukphy_status __P((struct mii_softc *));
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* _DEV_MII_MIIVAR_H_ */
diff --git a/sys/dev/ppbus/immio.c b/sys/dev/ppbus/immio.c
index a744dc86651e..e10f9a1d1a1b 100644
--- a/sys/dev/ppbus/immio.c
+++ b/sys/dev/ppbus/immio.c
@@ -33,7 +33,7 @@
* Thanks to David Campbell work on the Linux driver and the Iomega specs
* Thanks to Thiebault Moeglin for the drive
*/
-#ifdef KERNEL
+#ifdef _KERNEL
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/malloc.h>
@@ -41,11 +41,11 @@
#include <machine/clock.h>
-#endif /* KERNEL */
+#endif /* _KERNEL */
-#ifdef KERNEL
+#ifdef _KERNEL
#include <sys/kernel.h>
-#endif /*KERNEL */
+#endif /* _KERNEL */
#include "opt_vpo.h"
diff --git a/sys/dev/ppbus/lpbb.c b/sys/dev/ppbus/lpbb.c
index 7d4ba59f4a2b..b98f80e28a67 100644
--- a/sys/dev/ppbus/lpbb.c
+++ b/sys/dev/ppbus/lpbb.c
@@ -103,14 +103,14 @@ static int lpbb_ppb_attach(struct ppb_device *dev);
static struct lpbb_softc *lpbbdata[MAXLPBB];
static int nlpbb = 0;
-#ifdef KERNEL
+#ifdef _KERNEL
static struct ppb_driver lpbbdriver = {
lpbb_ppb_probe, lpbb_ppb_attach, "lpbb"
};
DATA_SET(ppbdriver_set, lpbbdriver);
-#endif /* KERNEL */
+#endif
static int
lpbb_probe(device_t dev)
diff --git a/sys/dev/ppbus/lpt.c b/sys/dev/ppbus/lpt.c
index 712032137512..531ad48d5f25 100644
--- a/sys/dev/ppbus/lpt.c
+++ b/sys/dev/ppbus/lpt.c
@@ -62,7 +62,7 @@
*/
-#ifdef KERNEL
+#ifdef _KERNEL
#include <sys/param.h>
#include <sys/systm.h>
@@ -75,7 +75,7 @@
#include <machine/clock.h>
#include <machine/lpt.h>
-#endif /*KERNEL*/
+#endif
#include <dev/ppbus/ppbconf.h>
#include <dev/ppbus/ppb_1284.h>
@@ -154,14 +154,14 @@ static void lptintr(int unit);
static void lpt_intr(int unit); /* without spls */
-#ifdef KERNEL
+#ifdef _KERNEL
static struct ppb_driver lptdriver = {
lptprobe, lptattach, LPT_NAME
};
DATA_SET(ppbdriver_set, lptdriver);
-#endif /* KERNEL */
+#endif
/* bits for state */
#define OPEN (1<<0) /* device is open */
diff --git a/sys/dev/ppbus/ppi.h b/sys/dev/ppbus/ppi.h
index 7d854e3bfb7f..8ff2fb48c4ad 100644
--- a/sys/dev/ppbus/ppi.h
+++ b/sys/dev/ppbus/ppi.h
@@ -29,7 +29,7 @@
#ifndef __PPI_H
#define __PPI_H
-#ifndef KERNEL
+#ifndef _KERNEL
# include <sys/types.h>
#endif
#include <sys/ioccom.h>
diff --git a/sys/dev/ppbus/vpo.c b/sys/dev/ppbus/vpo.c
index a6801f23cfd0..23e605877f57 100644
--- a/sys/dev/ppbus/vpo.c
+++ b/sys/dev/ppbus/vpo.c
@@ -27,7 +27,7 @@
*
*/
-#ifdef KERNEL
+#ifdef _KERNEL
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/malloc.h>
@@ -35,7 +35,7 @@
#include <machine/clock.h>
-#endif /* KERNEL */
+#endif /* _KERNEL */
#include <cam/cam.h>
#include <cam/cam_ccb.h>
@@ -47,9 +47,9 @@
#include <cam/scsi/scsi_message.h>
#include <cam/scsi/scsi_da.h>
-#ifdef KERNEL
+#ifdef _KERNEL
#include <sys/kernel.h>
-#endif /*KERNEL */
+#endif
#include "opt_vpo.h"
@@ -87,7 +87,7 @@ static int nvpo = 0;
#define MAXVP0 8 /* XXX not much better! */
static struct vpo_data *vpodata[MAXVP0];
-#ifdef KERNEL
+#ifdef _KERNEL
/*
* Make ourselves visible as a ppbus driver
@@ -100,7 +100,7 @@ static struct ppb_driver vpodriver = {
};
DATA_SET(ppbdriver_set, vpodriver);
-#endif /* KERNEL */
+#endif
/*
* vpoprobe()
diff --git a/sys/dev/ppbus/vpoio.c b/sys/dev/ppbus/vpoio.c
index b1582293d825..73e4adb159fc 100644
--- a/sys/dev/ppbus/vpoio.c
+++ b/sys/dev/ppbus/vpoio.c
@@ -27,7 +27,7 @@
*
*/
-#ifdef KERNEL
+#ifdef _KERNEL
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/malloc.h>
@@ -35,11 +35,11 @@
#include <machine/clock.h>
-#endif /* KERNEL */
+#endif
-#ifdef KERNEL
+#ifdef _KERNEL
#include <sys/kernel.h>
-#endif /*KERNEL */
+#endif
#include "opt_vpo.h"
diff --git a/sys/dev/sound/pcm/sound.h b/sys/dev/sound/pcm/sound.h
index 5f34e5078305..4bb2c9384b97 100644
--- a/sys/dev/sound/pcm/sound.h
+++ b/sys/dev/sound/pcm/sound.h
@@ -27,7 +27,7 @@
* $FreeBSD$
*/
-#ifdef KERNEL
+#ifdef _KERNEL
#include "pcm.h"
#else
#error why?
@@ -42,7 +42,7 @@
#ifndef _OS_H_
#define _OS_H_
-#ifdef KERNEL
+#ifdef _KERNEL
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/ioccom.h>
@@ -85,7 +85,7 @@ struct isa_device { int dummy; };
#define d_write_t void
#define d_ioctl_t void
#define d_select_t void
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* _OS_H_ */
@@ -146,7 +146,7 @@ int fkchan_setup(pcm_channel *c);
#define ON 1
#define OFF 0
-#ifdef KERNEL
+#ifdef _KERNEL
/*
* some macros for debugging purposes
@@ -167,7 +167,7 @@ u_int32_t pcm_getflags(device_t dev);
void pcm_setflags(device_t dev, u_int32_t val);
void pcm_setswap(device_t dev, pcm_swap_t *swap);
-#endif /* KERNEL */
+#endif /* _KERNEL */
/* usage of flags in device config entry (config file) */
#define DV_F_DRQ_MASK 0x00000007 /* mask for secondary drq */
diff --git a/sys/dev/usb/usb.h b/sys/dev/usb/usb.h
index 5f1c7fbdb85f..7ed338cb2464 100644
--- a/sys/dev/usb/usb.h
+++ b/sys/dev/usb/usb.h
@@ -53,7 +53,7 @@
#endif /* _KERNEL */
#elif defined(__FreeBSD__)
-#if defined(KERNEL)
+#if defined(_KERNEL)
#include <sys/malloc.h>
MALLOC_DECLARE(M_USB);
@@ -61,7 +61,7 @@ MALLOC_DECLARE(M_USBDEV);
MALLOC_DECLARE(M_USBHC);
#include <dev/usb/usb_port.h>
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* __FreeBSD__ */
diff --git a/sys/dev/vinum/vinumext.h b/sys/dev/vinum/vinumext.h
index da205d227c5f..77cbba3fd0ee 100644
--- a/sys/dev/vinum/vinumext.h
+++ b/sys/dev/vinum/vinumext.h
@@ -51,12 +51,12 @@ extern int debug; /* debug flags */
printf (msg); \
longjmp (command_fail, -1); \
}
-#ifndef KERNEL
+#ifndef _KERNEL
struct vnode;
struct proc;
#endif
-#ifdef KERNEL
+#ifdef _KERNEL
int vinum_inactive(int);
void free_vinum(int);
int give_sd_to_plex(int plexno, int sdno);
diff --git a/sys/dev/vinum/vinumhdr.h b/sys/dev/vinum/vinumhdr.h
index 810cc7a8910e..9fa4f58cc1b3 100644
--- a/sys/dev/vinum/vinumhdr.h
+++ b/sys/dev/vinum/vinumhdr.h
@@ -41,7 +41,7 @@
*/
#include <sys/param.h>
-#ifdef KERNEL
+#ifdef _KERNEL
#include "opt_vinum.h"
#include <sys/systm.h>
#include <sys/kernel.h>
@@ -62,7 +62,7 @@
#include <sys/fcntl.h>
#include <sys/vnode.h>
#include <sys/queue.h>
-#ifdef KERNEL
+#ifdef _KERNEL
#include <machine/setjmp.h>
#include <machine/stdarg.h>
#else
@@ -77,7 +77,7 @@
#include <machine/cpu.h>
#undef Free /* defined in some funny net stuff */
-#ifdef KERNEL
+#ifdef _KERNEL
#ifdef VINUMDEBUG
#define Malloc(x) MMalloc ((x), __FILE__, __LINE__) /* show where we came from */
#define Free(x) FFree ((x), __FILE__, __LINE__) /* show where we came from */
diff --git a/sys/dev/vinum/vinumparser.c b/sys/dev/vinum/vinumparser.c
index e0a8609b1855..0acdd26c472c 100644
--- a/sys/dev/vinum/vinumparser.c
+++ b/sys/dev/vinum/vinumparser.c
@@ -57,7 +57,7 @@
*/
#include <sys/param.h>
-#ifdef KERNEL
+#ifdef _KERNEL
#include <sys/systm.h>
#else
#include <ctype.h>
@@ -115,7 +115,7 @@ struct _keywords keywords[] =
keypair(prefer),
keypair(rename),
keypair(detached),
-#ifndef KERNEL /* for vinum(8) only */
+#ifndef _KERNEL /* for vinum(8) only */
#ifdef VINUMDEBUG
keypair(debug),
keypair(stripe),
@@ -159,7 +159,7 @@ struct _keywords keywords[] =
};
struct keywordset keyword_set = KEYWORDSET(keywords);
-#ifndef KERNEL
+#ifndef _KERNEL
struct _keywords flag_keywords[] =
{flagkeypair(f),
flagkeypair(d),
diff --git a/sys/dev/vinum/vinumutil.c b/sys/dev/vinum/vinumutil.c
index 45b8bde65f1a..fe3b99f890c3 100644
--- a/sys/dev/vinum/vinumutil.c
+++ b/sys/dev/vinum/vinumutil.c
@@ -42,7 +42,7 @@
#include <dev/vinum/vinumhdr.h>
#include <dev/vinum/statetexts.h>
-#ifndef KERNEL
+#ifndef _KERNEL
#include <stdio.h>
extern jmp_buf command_fail; /* return on a failed command */
#endif
@@ -219,14 +219,14 @@ sizespec(char *spec)
return size * sign * 1024 * 1024 * 1024;
}
}
-#ifdef KERNEL
+#ifdef _KERNEL
throw_rude_remark(EINVAL, "Invalid length specification: %s", spec);
#else
fprintf(stderr, "Invalid length specification: %s", spec);
longjmp(command_fail, -1);
#endif
}
-#ifdef KERNEL
+#ifdef _KERNEL
throw_rude_remark(EINVAL, "Missing length specification");
#else
fprintf(stderr, "Missing length specification");
diff --git a/sys/dev/vinum/vinumvar.h b/sys/dev/vinum/vinumvar.h
index 3cc18a3cbb98..112128581976 100644
--- a/sys/dev/vinum/vinumvar.h
+++ b/sys/dev/vinum/vinumvar.h
@@ -643,7 +643,7 @@ enum debugflags {
DEBUG_WARNINGS = 512, /* log various relatively harmless warnings */
};
-#ifdef KERNEL
+#ifdef _KERNEL
#define longjmp LongJmp /* test our longjmps */
#endif
#endif
diff --git a/sys/dev/wi/if_wavelan_ieee.h b/sys/dev/wi/if_wavelan_ieee.h
index 8ce57f9257f1..5e5d2e30c23d 100644
--- a/sys/dev/wi/if_wavelan_ieee.h
+++ b/sys/dev/wi/if_wavelan_ieee.h
@@ -145,7 +145,7 @@ struct wi_sigcache {
};
#endif
-#ifndef KERNEL
+#ifndef _KERNEL
struct wi_counters {
u_int32_t wi_tx_unicast_frames;
u_int32_t wi_tx_multicast_frames;
diff --git a/sys/i386/boot/dosboot/dirent.h b/sys/i386/boot/dosboot/dirent.h
index 5c6463b14dce..009d7ec9247a 100644
--- a/sys/i386/boot/dosboot/dirent.h
+++ b/sys/i386/boot/dosboot/dirent.h
@@ -31,6 +31,8 @@
* SUCH DAMAGE.
*
* @(#)dirent.h 5.18 (Berkeley) 2/23/91
+ *
+ * $FreeBSD$
*/
#ifndef _DIRENT_H_
@@ -103,6 +105,6 @@ int getdirentries __P((int, char *, int, long *));
#endif /* not POSIX */
__END_DECLS
-#endif /* !KERNEL */
+#endif /* !_KERNEL */
#endif /* !_DIRENT_H_ */
diff --git a/sys/i386/boot/dosboot/disklabe.h b/sys/i386/boot/dosboot/disklabe.h
index 7b77a0850eeb..755e928e616a 100644
--- a/sys/i386/boot/dosboot/disklabe.h
+++ b/sys/i386/boot/dosboot/disklabe.h
@@ -103,7 +103,7 @@ struct disklabel {
* as found in /boot. These are returned when using
* getdiskbyname(3) to retrieve the values from /etc/disktab.
*/
-#if defined(KERNEL) || defined(STANDALONE)
+#if defined(_KERNEL) || defined(STANDALONE)
char d_packname[16]; /* pack identifier */
#else
union {
@@ -116,7 +116,7 @@ struct disklabel {
#define d_packname d_un.un_d_packname
#define d_boot0 d_un.un_b.un_d_boot0
#define d_boot1 d_un.un_b.un_d_boot1
-#endif /* ! KERNEL or STANDALONE */
+#endif /* ! _KERNEL or STANDALONE */
/* disk geometry: */
u_long d_secsize; /* # of bytes per sector */
u_long d_nsectors; /* # of data sectors per track */
@@ -387,7 +387,7 @@ char * readMBRtolabel __P(( dev_t dev , void (*strat)(), register struct disklab
#endif
#endif
-#if !defined(KERNEL) && !defined(LOCORE)
+#if !defined(_KERNEL) && !defined(LOCORE)
#include "cdefs.h"
diff --git a/sys/i386/boot/dosboot/fs.h b/sys/i386/boot/dosboot/fs.h
index f4c397d3cac6..8993dd259f01 100644
--- a/sys/i386/boot/dosboot/fs.h
+++ b/sys/i386/boot/dosboot/fs.h
@@ -461,5 +461,5 @@ extern void setblock(struct fs *, u_char *, daddr_t);
extern ino_t dirpref(struct fs *);
extern daddr_t mapsearch(struct fs *, struct cg *, daddr_t, int);
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* _UFS_FS_H_ */
diff --git a/sys/i386/boot/dosboot/inode.h b/sys/i386/boot/dosboot/inode.h
index 26ae12090e08..a37bc49b9c3b 100644
--- a/sys/i386/boot/dosboot/inode.h
+++ b/sys/i386/boot/dosboot/inode.h
@@ -264,5 +264,5 @@ extern int indirtrunc(struct inode *, daddr_t, daddr_t, int, long *);
extern int bmap(struct inode *, daddr_t, daddr_t *);
extern int balloc(struct inode *, daddr_t, int, struct buf **, int);
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* _UFS_INODE_H_ */
diff --git a/sys/i386/boot/dosboot/quota.h b/sys/i386/boot/dosboot/quota.h
index 5ad06ce018bb..b30991305458 100644
--- a/sys/i386/boot/dosboot/quota.h
+++ b/sys/i386/boot/dosboot/quota.h
@@ -204,5 +204,5 @@ __BEGIN_DECLS
int quotactl __P((const char *, int, int, void *));
__END_DECLS
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* _QUOTA_ */
diff --git a/sys/i386/boot/dosboot/types.h b/sys/i386/boot/dosboot/types.h
index 85b64942897a..fd767f8d379e 100644
--- a/sys/i386/boot/dosboot/types.h
+++ b/sys/i386/boot/dosboot/types.h
@@ -153,7 +153,7 @@ typedef struct fd_set {
#define FD_COPY(f, t) bcopy(f, t, sizeof(*(f)))
#define FD_ZERO(p) bzero(p, sizeof(*(p)))
-#if defined(__STDC__) && defined(KERNEL)
+#if defined(__STDC__) && defined(_KERNEL)
/*
* Forward structure declarations for function prototypes. We include the
* common structures that cross subsystem boundaries here; others are mostly
diff --git a/sys/i386/conf/Makefile.i386 b/sys/i386/conf/Makefile.i386
index f2aa03afb508..53e63089932d 100644
--- a/sys/i386/conf/Makefile.i386
+++ b/sys/i386/conf/Makefile.i386
@@ -43,16 +43,14 @@ INCLUDES+= -I$S/../include
.else
INCLUDES+= -I/usr/include
.endif
-COPTS= ${INCLUDES} ${IDENT} -DKERNEL -include opt_global.h
-# KAME mandatory flags
-COPTS+= -D_KERNEL
+COPTS= ${INCLUDES} ${IDENT} -D_KERNEL -include opt_global.h
CFLAGS= ${COPTFLAGS} ${CWARNFLAGS} ${DEBUG} ${COPTS}
# XXX LOCORE means "don't declare C stuff" not "for locore.s".
ASM_CFLAGS= -x assembler-with-cpp -DLOCORE ${CFLAGS}
# Use the default object format for genassym, etc.
-GEN_CFLAGS= ${COPTFLAGS} ${CWARNFLAGS} ${DEBUG} ${COPTS} -UKERNEL
+GEN_CFLAGS= ${COPTFLAGS} ${CWARNFLAGS} ${DEBUG} ${COPTS} -U_KERNEL
# Select the correct set of tools. Can't set OBJFORMAT here because it
# doesn't get exported into the environment, and if it were exported
diff --git a/sys/i386/i386/genassym.c b/sys/i386/i386/genassym.c
index 75f278db27ab..8e21dac8e2bc 100644
--- a/sys/i386/i386/genassym.c
+++ b/sys/i386/i386/genassym.c
@@ -56,9 +56,9 @@
#include <vm/vm_param.h>
#include <vm/pmap.h>
#include <vm/vm_map.h>
-#define KERNEL /* Avoid userland compatability headers */
+#define _KERNEL /* Avoid userland compatability headers */
#include <sys/user.h>
-#undef KERNEL
+#undef _KERNEL
#include <net/if.h>
#include <netinet/in.h>
#include <nfs/nfsv2.h>
diff --git a/sys/i386/include/apm_bios.h b/sys/i386/include/apm_bios.h
index 754965ef388f..2ebffdfbc5ff 100644
--- a/sys/i386/include/apm_bios.h
+++ b/sys/i386/include/apm_bios.h
@@ -18,7 +18,7 @@
#ifndef _MACHINE_APM_BIOS_H_
#define _MACHINE_APM_BIOS_H_
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/types.h>
#endif
#include <sys/ioccom.h>
@@ -148,7 +148,7 @@ struct apmhook {
#define APM_HOOK_RESUME 1
#define NAPM_HOOK 2
-#ifdef KERNEL
+#ifdef _KERNEL
void apm_suspend(int state);
struct apmhook *apm_hook_establish (int apmh, struct apmhook *);
@@ -156,7 +156,7 @@ void apm_hook_disestablish (int apmh, struct apmhook *);
void apm_cpu_idle(void);
void apm_cpu_busy(void);
-#endif /* KERNEL */
+#endif
#endif /* !ASSEMBLER && !INITIALIZER */
diff --git a/sys/i386/include/bootinfo.h b/sys/i386/include/bootinfo.h
index b8d1af3b2c51..620b31324a51 100644
--- a/sys/i386/include/bootinfo.h
+++ b/sys/i386/include/bootinfo.h
@@ -67,7 +67,7 @@ struct bootinfo {
u_int32_t bi_modulep; /* preloaded modules */
};
-#ifdef KERNEL
+#ifdef _KERNEL
extern struct bootinfo bootinfo;
#endif
diff --git a/sys/i386/include/clock.h b/sys/i386/include/clock.h
index 8d0e2d3ef20e..3ce7adb2bd27 100644
--- a/sys/i386/include/clock.h
+++ b/sys/i386/include/clock.h
@@ -9,7 +9,7 @@
#ifndef _MACHINE_CLOCK_H_
#define _MACHINE_CLOCK_H_
-#ifdef KERNEL
+#ifdef _KERNEL
/*
* i386 to clock driver interface.
* XXX large parts of the driver and its interface are misplaced.
@@ -46,6 +46,6 @@ int release_timer1 __P((void));
int sysbeep __P((int pitch, int period));
void i8254_restore __P((void));
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_MACHINE_CLOCK_H_ */
diff --git a/sys/i386/include/cpu.h b/sys/i386/include/cpu.h
index 4a2fe79f41ad..666af5cae395 100644
--- a/sys/i386/include/cpu.h
+++ b/sys/i386/include/cpu.h
@@ -124,7 +124,7 @@
{ "wall_cmos_clock", CTLTYPE_INT }, \
}
-#ifdef KERNEL
+#ifdef _KERNEL
extern int astpending;
extern char btext[];
extern char etext[];
diff --git a/sys/i386/include/cpufunc.h b/sys/i386/include/cpufunc.h
index 48ec3518fc89..97b7694ce2dd 100644
--- a/sys/i386/include/cpufunc.h
+++ b/sys/i386/include/cpufunc.h
@@ -240,7 +240,7 @@ invd(void)
__asm __volatile("invd");
}
-#if defined(SMP) && defined(KERNEL)
+#if defined(SMP) && defined(_KERNEL)
/*
* When using APIC IPI's, invlpg() is not simply the invlpg instruction
@@ -271,7 +271,7 @@ cpu_invltlb(void)
#endif
}
-#else /* !(SMP && KERNEL) */
+#else /* !(SMP && _KERNEL) */
static __inline void
invlpg(u_int addr)
@@ -294,7 +294,7 @@ invltlb(void)
#endif
}
-#endif /* SMP && KERNEL */
+#endif /* SMP && _KERNEL */
static __inline u_short
inw(u_int port)
diff --git a/sys/i386/include/cronyx.h b/sys/i386/include/cronyx.h
index cdd404736826..412f1e01ccac 100644
--- a/sys/i386/include/cronyx.h
+++ b/sys/i386/include/cronyx.h
@@ -12,6 +12,8 @@
* all derivative works or modified versions.
*
* Version 1.9, Wed Oct 4 18:58:15 MSK 1995
+ *
+ * $FreeBSD$
*/
/*
* Asynchronous channel mode -------------------------------------------------
@@ -409,7 +411,7 @@ typedef struct _chan_t {
unsigned long btphys; /* transmitter B phys address */
unsigned char dtr; /* DTR signal value */
unsigned char rts; /* RTS signal value */
-#ifdef KERNEL
+#ifdef _KERNEL
struct tty *ttyp; /* tty structure pointer */
struct ifnet *ifp; /* network interface data */
struct ifnet *master; /* master interface, or ==ifp */
@@ -465,7 +467,7 @@ typedef struct _board_t {
#define CX_SPEED_DFLT 9600
-#ifdef KERNEL
+#ifdef _KERNEL
int cx_probe_board (int port);
void cx_init (cx_board_t *b, int num, int port, int irq, int dma);
void cx_setup_board (cx_board_t *b);
diff --git a/sys/i386/include/elf.h b/sys/i386/include/elf.h
index 756c08c02042..7fd8fda56d82 100644
--- a/sys/i386/include/elf.h
+++ b/sys/i386/include/elf.h
@@ -118,7 +118,7 @@ __ElfType(Auxinfo);
#define ELF_TARG_MACH EM_386
#define ELF_TARG_VER 1
-#ifdef KERNEL
+#ifdef _KERNEL
/*
* On the i386 we load the dynamic linker where a userland call
@@ -129,5 +129,5 @@ __ElfType(Auxinfo);
#define ELF_RTLD_ADDR(vmspace) \
(round_page((vm_offset_t)(vmspace)->vm_daddr + MAXDSIZ))
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_MACHINE_ELF_H_ */
diff --git a/sys/i386/include/endian.h b/sys/i386/include/endian.h
index 9023c7680107..9e79a09c254b 100644
--- a/sys/i386/include/endian.h
+++ b/sys/i386/include/endian.h
@@ -55,7 +55,7 @@
#define BYTE_ORDER LITTLE_ENDIAN
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/cdefs.h>
#endif
@@ -73,7 +73,7 @@ __extension__ ({ register u_long __X = (x); \
: "0" (__X)); \
__X; })
-#if defined(KERNEL) && (defined(I486_CPU) || defined(I586_CPU) || defined(I686_CPU)) && !defined(I386_CPU)
+#if defined(_KERNEL) && (defined(I486_CPU) || defined(I586_CPU) || defined(I686_CPU)) && !defined(I386_CPU)
#define __byte_swap_long(x) \
__extension__ ({ register u_long __X = (x); \
diff --git a/sys/i386/include/globals.h b/sys/i386/include/globals.h
index b399b7c27ad1..b5f9514af648 100644
--- a/sys/i386/include/globals.h
+++ b/sys/i386/include/globals.h
@@ -29,7 +29,7 @@
#ifndef _MACHINE_GLOBALS_H_
#define _MACHINE_GLOBALS_H_
-#ifdef KERNEL
+#ifdef _KERNEL
#define GLOBAL_LVALUE(name, type) \
(*(type *)_global_ptr_##name())
@@ -140,6 +140,6 @@ GLOBAL_FUNC(prv_PADDR1)
#define SET_CURPROC(x) (_global_curproc_set_nv((int)x))
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_MACHINE_GLOBALS_H_ */
diff --git a/sys/i386/include/if_wavelan_ieee.h b/sys/i386/include/if_wavelan_ieee.h
index 8ce57f9257f1..5e5d2e30c23d 100644
--- a/sys/i386/include/if_wavelan_ieee.h
+++ b/sys/i386/include/if_wavelan_ieee.h
@@ -145,7 +145,7 @@ struct wi_sigcache {
};
#endif
-#ifndef KERNEL
+#ifndef _KERNEL
struct wi_counters {
u_int32_t wi_tx_unicast_frames;
u_int32_t wi_tx_multicast_frames;
diff --git a/sys/i386/include/in_cksum.h b/sys/i386/include/in_cksum.h
index f2d9beb18993..a4419591c9de 100644
--- a/sys/i386/include/in_cksum.h
+++ b/sys/i386/include/in_cksum.h
@@ -93,9 +93,9 @@ u_int in_cksum_hdr __P((const struct ip *));
#endif
typedef unsigned in_psum_t;
-#ifdef KERNEL
+#ifdef _KERNEL
in_psum_t in_cksum_partial(in_psum_t psum, const u_short *w, int len);
int in_cksum_finalize(in_psum_t psum);
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* _MACHINE_IN_CKSUM_H_ */
diff --git a/sys/i386/include/ioctl_fd.h b/sys/i386/include/ioctl_fd.h
index 3b4da37da238..92724df1356e 100644
--- a/sys/i386/include/ioctl_fd.h
+++ b/sys/i386/include/ioctl_fd.h
@@ -30,7 +30,7 @@
#ifndef _MACHINE_IOCTL_FD_H_
#define _MACHINE_IOCTL_FD_H_
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/types.h>
#endif
#include <sys/ioccom.h>
diff --git a/sys/i386/include/ioctl_meteor.h b/sys/i386/include/ioctl_meteor.h
index 919100f8d534..f62d392ea0ae 100644
--- a/sys/i386/include/ioctl_meteor.h
+++ b/sys/i386/include/ioctl_meteor.h
@@ -27,6 +27,8 @@
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
+ *
+ * $FreeBSD$
*/
/*
* ioctl constants for Matrox Meteor Capture card.
@@ -35,7 +37,7 @@
#ifndef _MACHINE_IOCTL_METEOR_H_
#define _MACHINE_IOCTL_METEOR_H_
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/types.h>
#endif
#include <sys/ioccom.h>
diff --git a/sys/i386/include/npx.h b/sys/i386/include/npx.h
index 2e7a31d25082..fb0a37f343ef 100644
--- a/sys/i386/include/npx.h
+++ b/sys/i386/include/npx.h
@@ -136,7 +136,7 @@ struct save87 {
#define __INITIAL_NPXCW__ __BDE_NPXCW__
#endif
-#ifdef KERNEL
+#ifdef _KERNEL
#ifndef npxproc
extern struct proc *npxproc;
#endif
diff --git a/sys/i386/include/pc/vesa.h b/sys/i386/include/pc/vesa.h
index 97c4a180d6f9..0e943f7d98f5 100644
--- a/sys/i386/include/pc/vesa.h
+++ b/sys/i386/include/pc/vesa.h
@@ -108,13 +108,13 @@ struct vesa_mode
u_int16_t v_offscreensize;
};
-#ifdef KERNEL
+#ifdef _KERNEL
#define VESA_MODE(x) ((x) >= M_VESA_BASE)
int vesa_load_ioctl(void);
int vesa_unload_ioctl(void);
-#endif /* KERNEL */
+#endif
#endif /* !_MACHINE_PC_VESA_H */
diff --git a/sys/i386/include/pcb.h b/sys/i386/include/pcb.h
index dde72812d5a6..08beb5a83059 100644
--- a/sys/i386/include/pcb.h
+++ b/sys/i386/include/pcb.h
@@ -89,7 +89,7 @@ struct pcb {
struct md_coredump {
};
-#ifdef KERNEL
+#ifdef _KERNEL
#ifndef curpcb
extern struct pcb *curpcb; /* our current running pcb */
diff --git a/sys/i386/include/pcb_ext.h b/sys/i386/include/pcb_ext.h
index 42e8abfc6a21..482ec96a9cab 100644
--- a/sys/i386/include/pcb_ext.h
+++ b/sys/i386/include/pcb_ext.h
@@ -51,7 +51,7 @@ struct pcb_ldt {
struct segment_descriptor ldt_sd;
};
-#ifdef KERNEL
+#ifdef _KERNEL
#ifdef USER_LDT
void set_user_ldt __P((struct pcb *));
diff --git a/sys/i386/include/pcvt_ioctl.h b/sys/i386/include/pcvt_ioctl.h
index 6bf3ea135d24..628cd862ddb1 100644
--- a/sys/i386/include/pcvt_ioctl.h
+++ b/sys/i386/include/pcvt_ioctl.h
@@ -45,7 +45,7 @@
*
*
* @(#)ioctl_pcvt.h, 3.20, Last Edit-Date: [Fri Apr 7 10:17:13 1995]
- *
+ * $FreeBSD$
*/
/*---------------------------------------------------------------------------
@@ -70,7 +70,7 @@
#define PCVTIDMAJOR 3 /* driver id - major release */
#define PCVTIDMINOR 20 /* driver id - minor release */
-#if !defined(KERNEL) && !defined(_KERNEL)
+#if !defined(_KERNEL)
#include <sys/types.h>
#endif
#include <sys/ioccom.h>
diff --git a/sys/i386/include/perfmon.h b/sys/i386/include/perfmon.h
index c8f93f4ee52e..adf460eb2e9d 100644
--- a/sys/i386/include/perfmon.h
+++ b/sys/i386/include/perfmon.h
@@ -37,7 +37,7 @@
#ifndef _MACHINE_PERFMON_H_
#define _MACHINE_PERFMON_H_
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/types.h>
#endif
#include <sys/ioccom.h>
@@ -93,7 +93,7 @@ struct pmc_tstamp {
quad_t pmct_value;
};
-#ifndef KERNEL
+#ifndef _KERNEL
#define _PATH_PERFMON "/dev/perfmon"
@@ -112,7 +112,7 @@ int perfmon_stop __P((int));
int perfmon_read __P((int, quad_t *));
int perfmon_reset __P((int));
-#endif /* KERNEL */
+#endif /* _KERNEL */
/*
* Pentium Pro performance counters, from Appendix B.
diff --git a/sys/i386/include/pmap.h b/sys/i386/include/pmap.h
index 1f8163608769..66b6b613d569 100644
--- a/sys/i386/include/pmap.h
+++ b/sys/i386/include/pmap.h
@@ -137,14 +137,14 @@ typedef unsigned int *pt_entry_t;
* Address of current and alternate address space page table maps
* and directories.
*/
-#ifdef KERNEL
+#ifdef _KERNEL
extern pt_entry_t PTmap[], APTmap[], Upte;
extern pd_entry_t PTD[], APTD[], PTDpde, APTDpde, Upde;
extern pd_entry_t IdlePTD; /* physical address of "Idle" state directory */
#endif
-#ifdef KERNEL
+#ifdef _KERNEL
/*
* virtual address to page table entry and
* to physical address. Likewise for alternate address space.
@@ -208,7 +208,7 @@ struct pmap {
typedef struct pmap *pmap_t;
-#ifdef KERNEL
+#ifdef _KERNEL
extern pmap_t kernel_pmap;
#endif
@@ -229,7 +229,7 @@ typedef struct pv_entry {
#define PV_CI 0x01 /* all entries must be cache inhibited */
#define PV_PTPAGE 0x02 /* entry maps a page table page */
-#ifdef KERNEL
+#ifdef _KERNEL
#define NPPROVMTRR 8
#define PPRO_VMTRRphysBase0 0x200
@@ -260,7 +260,7 @@ vm_page_t pmap_use_pt __P((pmap_t, vm_offset_t));
void pmap_set_opt __P((void));
#endif
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !LOCORE */
diff --git a/sys/i386/include/profile.h b/sys/i386/include/profile.h
index 1d2b6009f52e..22738c3b1fb2 100644
--- a/sys/i386/include/profile.h
+++ b/sys/i386/include/profile.h
@@ -37,7 +37,7 @@
#ifndef _MACHINE_PROFILE_H_
#define _MACHINE_PROFILE_H_
-#ifdef KERNEL
+#ifdef _KERNEL
/*
* Config generates something to tell the compiler to align functions on 16
@@ -74,7 +74,7 @@
#endif
#endif /* GUPROF */
-#else /* !KERNEL */
+#else /* !_KERNEL */
#define FUNCTION_ALIGNMENT 4
@@ -105,7 +105,7 @@ mcount() \
typedef unsigned int uintfptr_t;
-#endif /* KERNEL */
+#endif /* _KERNEL */
/*
* An unsigned integral type that can hold non-negative difference between
@@ -113,7 +113,7 @@ typedef unsigned int uintfptr_t;
*/
typedef u_int fptrdiff_t;
-#ifdef KERNEL
+#ifdef _KERNEL
void mcount __P((uintfptr_t frompc, uintfptr_t selfpc));
@@ -129,7 +129,7 @@ void stopguprof __P((struct gmonparam *p));
#define stopguprof(p)
#endif /* GUPROF */
-#else /* !KERNEL */
+#else /* !_KERNEL */
#include <sys/cdefs.h>
@@ -144,7 +144,7 @@ void mcount __P((void)) __asm("mcount");
static void _mcount __P((uintfptr_t frompc, uintfptr_t selfpc));
__END_DECLS
-#endif /* KERNEL */
+#endif /* _KERNEL */
#ifdef GUPROF
/* XXX doesn't quite work outside kernel yet. */
diff --git a/sys/i386/include/ptrace.h b/sys/i386/include/ptrace.h
index 55a26fd636ad..d59a38f3409b 100644
--- a/sys/i386/include/ptrace.h
+++ b/sys/i386/include/ptrace.h
@@ -47,9 +47,9 @@
#define PT_GETDBREGS (PT_FIRSTMACH + 5)
#define PT_SETDBREGS (PT_FIRSTMACH + 6)
-#ifdef KERNEL
+#ifdef _KERNEL
int ptrace_read_u_check __P((struct proc *p, vm_offset_t off, size_t len));
-#endif /* !KERNEL */
+#endif
#endif
diff --git a/sys/i386/include/random.h b/sys/i386/include/random.h
index e084f8111d1e..5a3cbe247f23 100644
--- a/sys/i386/include/random.h
+++ b/sys/i386/include/random.h
@@ -56,7 +56,7 @@
#define MEM_CLEARIRQ _IOW('r', 2, u_int16_t) /* clear interrupt */
#define MEM_RETURNIRQ _IOR('r', 3, u_int16_t) /* return interrupt */
-#ifdef KERNEL
+#ifdef _KERNEL
/* Type of the cookie passed to add_interrupt_randomness. */
@@ -85,6 +85,6 @@ u_int write_random(const char *buf, u_int nbytes);
#endif
int random_poll(dev_t dev, int events, struct proc *p);
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_MACHINE_RANDOM_H_ */
diff --git a/sys/i386/include/reg.h b/sys/i386/include/reg.h
index 1f541c7b30d0..7b5b69a1c2af 100644
--- a/sys/i386/include/reg.h
+++ b/sys/i386/include/reg.h
@@ -130,7 +130,7 @@ struct dbreg {
};
-#ifdef KERNEL
+#ifdef _KERNEL
/*
* XXX these interfaces are MI, so they should be declared in a MI place.
*/
diff --git a/sys/i386/include/segments.h b/sys/i386/include/segments.h
index d043d8b5a113..8cbe8704bd8e 100644
--- a/sys/i386/include/segments.h
+++ b/sys/i386/include/segments.h
@@ -242,7 +242,7 @@ struct region_descriptor {
#define LBSDICALLS_SEL 16 /* BSDI system call gate */
#define NLDT (LBSDICALLS_SEL + 1)
-#ifdef KERNEL
+#ifdef _KERNEL
#ifndef currentldt
extern int currentldt;
#endif
@@ -259,6 +259,6 @@ void sdtossd __P((struct segment_descriptor *sdp,
struct soft_segment_descriptor *ssdp));
void ssdtosd __P((struct soft_segment_descriptor *ssdp,
struct segment_descriptor *sdp));
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_MACHINE_SEGMENTS_H_ */
diff --git a/sys/i386/include/smp.h b/sys/i386/include/smp.h
index 02f2bb85b62e..8f0a2f8a4572 100644
--- a/sys/i386/include/smp.h
+++ b/sys/i386/include/smp.h
@@ -13,7 +13,7 @@
#ifndef _MACHINE_SMP_H_
#define _MACHINE_SMP_H_
-#ifdef KERNEL
+#ifdef _KERNEL
#if defined(SMP) && !defined(APIC_IO)
# error APIC_IO required for SMP, add "options APIC_IO" to your config file.
@@ -182,5 +182,5 @@ extern volatile int smp_idle_loops;
#endif /* !LOCORE */
#endif /* SMP || APIC_IO */
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* _MACHINE_SMP_H_ */
diff --git a/sys/i386/include/spigot.h b/sys/i386/include/spigot.h
index 32dcd3758912..bf01e0a707ad 100644
--- a/sys/i386/include/spigot.h
+++ b/sys/i386/include/spigot.h
@@ -24,6 +24,7 @@
* SUCH DAMAGE.
*
* Version 1.2, Aug 30, 1995.
+ * $FreeBSD$
*/
#ifndef _MACHINE_SPIGOT_H_
@@ -50,7 +51,7 @@ struct spigot_info {
#define SPIGOT_IOPL_ON _IO ('s', 6)
#define SPIGOT_IOPL_OFF _IO ('s', 7)
-#ifndef KERNEL
+#ifndef _KERNEL
/*
* Defines for spigot library.
*/
@@ -91,6 +92,6 @@ unsigned char spigot_status(void);
*
* spigot_status() will return the above status bits.
*/
-#endif /* !KERNEL */
+#endif /* !_KERNEL */
#endif /* !_MACHINE_SPIGOT_H_ */
diff --git a/sys/i386/include/sysarch.h b/sys/i386/include/sysarch.h
index 5ea3ee6e8875..01e63c569a78 100644
--- a/sys/i386/include/sysarch.h
+++ b/sys/i386/include/sysarch.h
@@ -64,7 +64,7 @@ struct i386_vm86_args {
char *sub_args; /* args */
};
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/cdefs.h>
union descriptor;
@@ -76,6 +76,6 @@ int i386_get_ioperm __P((unsigned int, unsigned int *, int *));
int i386_set_ioperm __P((unsigned int, unsigned int, int));
int i386_vm86 __P((int, void *));
__END_DECLS
-#endif /* !KERNEL */
+#endif
#endif /* !_MACHINE_SYSARCH_H_ */
diff --git a/sys/i386/include/tss.h b/sys/i386/include/tss.h
index 2003a66609b4..77b94437c034 100644
--- a/sys/i386/include/tss.h
+++ b/sys/i386/include/tss.h
@@ -82,7 +82,7 @@ struct i386tss {
/* XXX unimplemented .. i/o permission bitmap */
};
-#ifdef KERNEL
+#ifdef _KERNEL
#ifndef common_tss
extern struct i386tss common_tss;
#endif
diff --git a/sys/i386/include/types.h b/sys/i386/include/types.h
index 39672cd98b09..f2c5760c1003 100644
--- a/sys/i386/include/types.h
+++ b/sys/i386/include/types.h
@@ -55,7 +55,7 @@ typedef unsigned int vm_size_t;
typedef __int32_t register_t;
-#ifdef KERNEL
+#ifdef _KERNEL
typedef int intfptr_t;
typedef unsigned int uintfptr_t;
#endif
diff --git a/sys/i386/isa/atapi.h b/sys/i386/isa/atapi.h
index afa76ea01c92..c57b41da731c 100644
--- a/sys/i386/isa/atapi.h
+++ b/sys/i386/isa/atapi.h
@@ -12,6 +12,7 @@
* all derivative works or modified versions.
*
* Version 1.9, Thu Oct 12 15:53:50 MSK 1995
+ * $FreeBSD$
*/
/*
@@ -261,7 +262,7 @@ struct atapi { /* ATAPI controller data */
struct atapicmd cmdrq[16]; /* pool of command requests */
};
-#ifdef KERNEL
+#ifdef _KERNEL
struct atapi;
extern struct atapidrv atapi_drvtab[4]; /* delayed attach info */
diff --git a/sys/i386/isa/intr_machdep.h b/sys/i386/isa/intr_machdep.h
index cf0667c92ea9..cc6ca67a3238 100644
--- a/sys/i386/isa/intr_machdep.h
+++ b/sys/i386/isa/intr_machdep.h
@@ -40,7 +40,7 @@
* Low level interrupt code.
*/
-#ifdef KERNEL
+#ifdef _KERNEL
#if defined(SMP) || defined(APIC_IO)
/*
@@ -208,6 +208,6 @@ int inthand_remove(struct intrec *idesc);
#endif /* LOCORE */
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_I386_ISA_INTR_MACHDEP_H_ */
diff --git a/sys/i386/isa/isa_device.h b/sys/i386/isa/isa_device.h
index 2008c62b8a4b..9debeb097529 100644
--- a/sys/i386/isa/isa_device.h
+++ b/sys/i386/isa/isa_device.h
@@ -37,7 +37,7 @@
#ifndef _I386_ISA_ISA_DEVICE_H_
#define _I386_ISA_ISA_DEVICE_H_
-#ifdef KERNEL
+#ifdef _KERNEL
#ifndef _ISA_ISAVAR_H_
#include <i386/isa/isa_dma.h>
#endif
@@ -98,12 +98,12 @@ struct isa_driver {
int sensitive_hw; /* true if other probes confuse us */
};
-#ifdef KERNEL
+#ifdef _KERNEL
int haveseen_iobase __P((struct isa_device *dvp, int iosize));
void reconfig_isadev __P((struct isa_device *isdp, u_int *mp));
int isa_compat_nextid __P((void));
-#endif /* KERNEL */
+#endif
#endif /* !_I386_ISA_ISA_DEVICE_H_ */
diff --git a/sys/i386/isa/isa_dma.h b/sys/i386/isa/isa_dma.h
index 15f8b3d804da..7f9396a2fb06 100644
--- a/sys/i386/isa/isa_dma.h
+++ b/sys/i386/isa/isa_dma.h
@@ -37,7 +37,7 @@
#ifndef _I386_ISA_ISA_DMA_H_
#define _I386_ISA_ISA_DMA_H_
-#ifdef KERNEL
+#ifdef _KERNEL
void isa_dmacascade __P((int chan));
void isa_dmadone __P((int flags, caddr_t addr, int nbytes, int chan));
void isa_dmainit __P((int chan, u_int bouncebufsize));
@@ -46,6 +46,6 @@ int isa_dma_acquire __P((int chan));
void isa_dma_release __P((int chan));
int isa_dmastatus __P((int chan));
int isa_dmastop __P((int chan));
-#endif /* KERNEL */
+#endif
#endif /* !_I386_ISA_ISA_DMA_H_ */
diff --git a/sys/i386/isa/loran.c b/sys/i386/isa/loran.c
index be4515078d8b..7964c6a0ac94 100644
--- a/sys/i386/isa/loran.c
+++ b/sys/i386/isa/loran.c
@@ -20,7 +20,7 @@
*
*/
-#ifdef KERNEL
+#ifdef _KERNEL
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/sysctl.h>
@@ -30,7 +30,7 @@
#include <sys/malloc.h>
#include <i386/isa/isa_device.h>
-#endif /* KERNEL */
+#endif /* _KERNEL */
typedef TAILQ_HEAD(, datapoint) dphead_t;
@@ -95,7 +95,7 @@ struct datapoint {
#define PGUARD 990 /* program guard time (cycle) (990!) */
-#ifdef KERNEL
+#ifdef _KERNEL
#define NLORAN 10 /* Allow ten minor devices */
@@ -642,4 +642,4 @@ static struct cdevsw loran_cdevsw = {
/* bmaj */ -1
};
-#endif /* KERNEL */
+#endif /* _KERNEL */
diff --git a/sys/i386/isa/wdreg.h b/sys/i386/isa/wdreg.h
index f19867ac7968..7dc9a87465ef 100644
--- a/sys/i386/isa/wdreg.h
+++ b/sys/i386/isa/wdreg.h
@@ -143,7 +143,7 @@
#define WDSD_IBM 0xa0 /* forced to 512 byte sector, ecc */
#define WDSD_LBA 0x40 /* use Logical Block Adressing */
-#ifdef KERNEL
+#ifdef _KERNEL
/*
* read parameters command returns this:
*/
@@ -317,4 +317,4 @@ extern struct wddma wddma[];
void wdintr __P((void *unit));
-#endif /* KERNEL */
+#endif /* _KERNEL */
diff --git a/sys/net/bpf.h b/sys/net/bpf.h
index d3ab193146bf..9b04c82944c2 100644
--- a/sys/net/bpf.h
+++ b/sys/net/bpf.h
@@ -129,7 +129,7 @@ struct bpf_hdr {
* will insist on inserting padding; hence, sizeof(struct bpf_hdr) won't work.
* Only the kernel needs to know about it; applications use bh_hdrlen.
*/
-#ifdef KERNEL
+#ifdef _KERNEL
#define SIZEOF_BPF_HDR (sizeof(struct bpf_hdr) <= 20 ? 18 : \
sizeof(struct bpf_hdr))
#endif
@@ -225,7 +225,7 @@ struct bpf_insn {
#define BPF_STMT(code, k) { (u_short)(code), 0, 0, k }
#define BPF_JUMP(code, k, jt, jf) { (u_short)(code), jt, jf, k }
-#ifdef KERNEL
+#ifdef _KERNEL
int bpf_validate __P((const struct bpf_insn *, int));
void bpf_tap __P((struct ifnet *, u_char *, u_int));
void bpf_mtap __P((struct ifnet *, struct mbuf *));
diff --git a/sys/net/bpf_filter.c b/sys/net/bpf_filter.c
index 0b2ed9e0d316..4f9bcf7cd2a0 100644
--- a/sys/net/bpf_filter.c
+++ b/sys/net/bpf_filter.c
@@ -65,11 +65,11 @@
(u_int32_t)*((u_char *)p+3)<<0)
#endif
-#ifdef KERNEL
+#ifdef _KERNEL
#include <sys/mbuf.h>
#endif
#include <net/bpf.h>
-#ifdef KERNEL
+#ifdef _KERNEL
#define MINDEX(m, k) \
{ \
register int len = m->m_len; \
@@ -204,7 +204,7 @@ bpf_filter(pc, p, wirelen, buflen)
switch (pc->code) {
default:
-#ifdef KERNEL
+#ifdef _KERNEL
return 0;
#else
abort();
@@ -218,7 +218,7 @@ bpf_filter(pc, p, wirelen, buflen)
case BPF_LD|BPF_W|BPF_ABS:
k = pc->k;
if (k > buflen || sizeof(int32_t) > buflen - k) {
-#ifdef KERNEL
+#ifdef _KERNEL
int merr;
if (buflen != 0)
@@ -242,7 +242,7 @@ bpf_filter(pc, p, wirelen, buflen)
case BPF_LD|BPF_H|BPF_ABS:
k = pc->k;
if (k > buflen || sizeof(int16_t) > buflen - k) {
-#ifdef KERNEL
+#ifdef _KERNEL
int merr;
if (buflen != 0)
@@ -259,7 +259,7 @@ bpf_filter(pc, p, wirelen, buflen)
case BPF_LD|BPF_B|BPF_ABS:
k = pc->k;
if (k >= buflen) {
-#ifdef KERNEL
+#ifdef _KERNEL
register struct mbuf *m;
if (buflen != 0)
@@ -287,7 +287,7 @@ bpf_filter(pc, p, wirelen, buflen)
k = X + pc->k;
if (pc->k > buflen || X > buflen - pc->k ||
sizeof(int32_t) > buflen - k) {
-#ifdef KERNEL
+#ifdef _KERNEL
int merr;
if (buflen != 0)
@@ -312,7 +312,7 @@ bpf_filter(pc, p, wirelen, buflen)
k = X + pc->k;
if (X > buflen || pc->k > buflen - X ||
sizeof(int16_t) > buflen - k) {
-#ifdef KERNEL
+#ifdef _KERNEL
int merr;
if (buflen != 0)
@@ -331,7 +331,7 @@ bpf_filter(pc, p, wirelen, buflen)
case BPF_LD|BPF_B|BPF_IND:
k = X + pc->k;
if (pc->k >= buflen || X >= buflen - pc->k) {
-#ifdef KERNEL
+#ifdef _KERNEL
register struct mbuf *m;
if (buflen != 0)
@@ -350,7 +350,7 @@ bpf_filter(pc, p, wirelen, buflen)
case BPF_LDX|BPF_MSH|BPF_B:
k = pc->k;
if (k >= buflen) {
-#ifdef KERNEL
+#ifdef _KERNEL
register struct mbuf *m;
if (buflen != 0)
@@ -507,7 +507,7 @@ bpf_filter(pc, p, wirelen, buflen)
}
}
-#ifdef KERNEL
+#ifdef _KERNEL
/*
* Return true if the 'fcode' is a valid filter program.
* The constraints are that each jump be forward and to a valid
diff --git a/sys/net/bridge.h b/sys/net/bridge.h
index e151e4e6ac7d..d8cb94d5f47a 100644
--- a/sys/net/bridge.h
+++ b/sys/net/bridge.h
@@ -22,6 +22,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
+ * $FreeBSD$
*/
extern int do_bridge;
@@ -99,7 +100,7 @@ struct bdg_stats {
#define BDG_STAT(ifp, type) bdg_stats.s[ifp->if_index].p_in[(int)type]++
-#ifdef KERNEL
+#ifdef _KERNEL
/*
* Find the right pkt destination:
* BDG_BCAST is a broadcast
@@ -139,4 +140,4 @@ bridge_dst_lookup(struct mbuf *m)
return BDG_UNKNOWN ;
}
-#endif /* KERNEL */
+#endif /* _KERNEL */
diff --git a/sys/net/ethernet.h b/sys/net/ethernet.h
index 8e982d755f9b..7295e5a40d3f 100644
--- a/sys/net/ethernet.h
+++ b/sys/net/ethernet.h
@@ -80,7 +80,7 @@ struct ether_addr {
#define ETHERMTU (ETHER_MAX_LEN-ETHER_HDR_LEN-ETHER_CRC_LEN)
#define ETHERMIN (ETHER_MIN_LEN-ETHER_HDR_LEN-ETHER_CRC_LEN)
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/cdefs.h>
/*
@@ -93,6 +93,6 @@ int ether_line __P((char *, struct ether_addr *, char *));
char *ether_ntoa __P((struct ether_addr *));
int ether_ntohost __P((char *, struct ether_addr *));
__END_DECLS
-#endif /* !KERNEL */
+#endif
#endif /* !_NET_ETHERNET_H_ */
diff --git a/sys/net/fddi.h b/sys/net/fddi.h
index fc6acc6c9c8f..9f83882cdf10 100644
--- a/sys/net/fddi.h
+++ b/sys/net/fddi.h
@@ -69,7 +69,7 @@ struct fddi_header {
#define FDDIFC_LLC_SYNC 0xd0
#define FDDIFC_SMT 0x40
-#if defined(KERNEL) || defined(_KERNEL)
+#if defined(_KERNEL)
#define fddibroadcastaddr etherbroadcastaddr
#define fddi_ipmulticast_min ether_ipmulticast_min
#define fddi_ipmulticast_max ether_ipmulticast_max
diff --git a/sys/net/hostcache.h b/sys/net/hostcache.h
index 6ffb9ace5e3a..3158db9dc8c3 100644
--- a/sys/net/hostcache.h
+++ b/sys/net/hostcache.h
@@ -75,7 +75,7 @@ struct hctable {
int hct_primes;
};
-#ifdef KERNEL
+#ifdef _KERNEL
#ifdef MALLOC_DECLARE
MALLOC_DECLARE(M_HOSTCACHE);
@@ -90,6 +90,6 @@ void hc_ref(struct hcentry *hc);
void hc_rele(struct hcentry *hc);
int hc_insert(struct hcentry *hc);
int hc_delete(struct hcentry *hc);
-#endif /* KERNEL */
+#endif
#endif /* _NET_HOSTCACHE_H */
diff --git a/sys/net/if.h b/sys/net/if.h
index 350e6d86ab11..0e0ff819e039 100644
--- a/sys/net/if.h
+++ b/sys/net/if.h
@@ -41,7 +41,7 @@
* <net/if.h> does not depend on <sys/time.h> on most other systems. This
* helps userland compatability. (struct timeval ifi_lastchange)
*/
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/time.h>
#endif
@@ -241,14 +241,14 @@ struct if_laddrreq {
struct sockaddr_storage dstaddr; /* out */
};
-#ifdef KERNEL
+#ifdef _KERNEL
#ifdef MALLOC_DECLARE
MALLOC_DECLARE(M_IFADDR);
MALLOC_DECLARE(M_IFMADDR);
#endif
#endif
-#ifndef KERNEL
+#ifndef _KERNEL
struct if_nameindex {
u_int if_index; /* 1, 2, ... */
char *if_name; /* null terminated name: "le0", ... */
@@ -262,7 +262,7 @@ void if_freenameindex __P((struct if_nameindex *));
__END_DECLS
#endif
-#ifdef KERNEL
+#ifdef _KERNEL
struct proc;
int prison_if __P((struct proc *p, struct sockaddr *sa));
diff --git a/sys/net/if_arp.h b/sys/net/if_arp.h
index 52eeb26876e3..5bfbe4b65567 100644
--- a/sys/net/if_arp.h
+++ b/sys/net/if_arp.h
@@ -89,7 +89,7 @@ struct arpreq {
#define ATF_PUBL 0x08 /* publish entry (respond for other host) */
#define ATF_USETRAILERS 0x10 /* has requested trailers */
-#ifdef KERNEL
+#ifdef _KERNEL
/*
* Structure shared between the ethernet driver modules and
* the address resolution code. For example, each ec_softc or il_softc
diff --git a/sys/net/if_atm.h b/sys/net/if_atm.h
index 16b32a65d3d5..fbd27926b271 100644
--- a/sys/net/if_atm.h
+++ b/sys/net/if_atm.h
@@ -1,4 +1,5 @@
/* $NetBSD: if_atm.h,v 1.7 1996/11/09 23:02:27 chuck Exp $ */
+/* $FreeBSD$ */
/*
*
@@ -36,12 +37,6 @@
* net/if_atm.h
*/
-#if (defined(__FreeBSD__) || defined(__bsdi__)) && defined(KERNEL)
-#ifndef _KERNEL
-#define _KERNEL
-#endif
-#endif /* freebsd doesn't define _KERNEL */
-
#if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__bsdi__)
#define RTALLOC1(A,B) rtalloc1((A),(B))
#elif defined(__FreeBSD__)
diff --git a/sys/net/if_dl.h b/sys/net/if_dl.h
index aac7c1439dce..92ea90f921ab 100644
--- a/sys/net/if_dl.h
+++ b/sys/net/if_dl.h
@@ -74,7 +74,7 @@ struct sockaddr_dl {
#define LLADDR(s) ((caddr_t)((s)->sdl_data + (s)->sdl_nlen))
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/cdefs.h>
@@ -83,6 +83,6 @@ void link_addr __P((const char *, struct sockaddr_dl *));
char *link_ntoa __P((const struct sockaddr_dl *));
__END_DECLS
-#endif /* !KERNEL */
+#endif /* !_KERNEL */
#endif
diff --git a/sys/net/if_media.h b/sys/net/if_media.h
index 1708559c08cc..2ed5ed0171c7 100644
--- a/sys/net/if_media.h
+++ b/sys/net/if_media.h
@@ -50,7 +50,7 @@
* to implement this interface.
*/
-#ifdef KERNEL
+#ifdef _KERNEL
#include <sys/queue.h>
@@ -104,7 +104,7 @@ void ifmedia_set __P((struct ifmedia *ifm, int mword));
int ifmedia_ioctl __P((struct ifnet *ifp, struct ifreq *ifr,
struct ifmedia *ifm, u_long cmd));
-#endif /*KERNEL */
+#endif /*_KERNEL */
/*
* if_media Options word:
diff --git a/sys/net/if_sppp.h b/sys/net/if_sppp.h
index 5d47287a4f11..84fede39716d 100644
--- a/sys/net/if_sppp.h
+++ b/sys/net/if_sppp.h
@@ -161,7 +161,7 @@ struct spppreq {
struct sppp defs;
};
-#ifdef KERNEL
+#ifdef _KERNEL
void sppp_attach (struct ifnet *ifp);
void sppp_detach (struct ifnet *ifp);
void sppp_input (struct ifnet *ifp, struct mbuf *m);
diff --git a/sys/net/if_var.h b/sys/net/if_var.h
index 8d497d4d1f66..80de848d11aa 100644
--- a/sys/net/if_var.h
+++ b/sys/net/if_var.h
@@ -210,7 +210,7 @@ typedef void if_init_f_t __P((void *));
} \
}
-#ifdef KERNEL
+#ifdef _KERNEL
#define IF_ENQ_DROP(ifq, m) if_enq_drop(ifq, m)
#if defined(__GNUC__) && defined(MT_HEADER)
@@ -245,7 +245,7 @@ int if_enq_drop __P((struct ifqueue *, struct mbuf *));
#define IF_MINMTU 72
#define IF_MAXMTU 65535
-#endif /* KERNEL */
+#endif /* _KERNEL */
/*
* The ifaddr structure contains information about one address
@@ -306,7 +306,7 @@ struct ifmultiaddr {
void *ifma_protospec; /* protocol-specific state, if any */
};
-#ifdef KERNEL
+#ifdef _KERNEL
#define IFAFREE(ifa) \
do { \
if ((ifa)->ifa_refcnt <= 0) \
@@ -364,7 +364,7 @@ struct ifmultiaddr *ifmaof_ifpforaddr __P((struct sockaddr *,
int if_simloop __P((struct ifnet *ifp, struct mbuf *m,
struct sockaddr *dst, int hlen));
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_NET_IF_VAR_H_ */
diff --git a/sys/net/if_vlan_var.h b/sys/net/if_vlan_var.h
index 1427b34ea84f..8fbe10ca1ac9 100644
--- a/sys/net/if_vlan_var.h
+++ b/sys/net/if_vlan_var.h
@@ -32,7 +32,7 @@
#ifndef _NET_IF_VLAN_VAR_H_
#define _NET_IF_VLAN_VAR_H_ 1
-#ifdef KERNEL
+#ifdef _KERNEL
struct vlan_mc_entry {
struct ether_addr mc_addr;
SLIST_ENTRY(vlan_mc_entry) mc_entries;
@@ -50,7 +50,7 @@ struct ifvlan {
};
#define ifv_if ifv_ac.ac_if
#define ifv_tag ifv_mib.ifvm_tag
-#endif /* KERNEL */
+#endif /* _KERNEL */
struct ether_vlan_header {
u_char evl_dhost[ETHER_ADDR_LEN];
@@ -81,7 +81,7 @@ struct vlanreq {
#define SIOCSETVLAN SIOCSIFGENERIC
#define SIOCGETVLAN SIOCGIFGENERIC
-#ifdef KERNEL
+#ifdef _KERNEL
/* shared with if_ethersubr.c: */
extern u_int vlan_proto;
extern int vlan_input(struct ether_header *eh, struct mbuf *m);
diff --git a/sys/net/netisr.h b/sys/net/netisr.h
index 432607cf9840..b1e32f39e3e9 100644
--- a/sys/net/netisr.h
+++ b/sys/net/netisr.h
@@ -73,7 +73,7 @@
#define schednetisr(anisr) { netisr |= 1<<(anisr); setsoftnet(); }
#ifndef LOCORE
-#ifdef KERNEL
+#ifdef _KERNEL
extern volatile unsigned int netisr; /* scheduling bits for network */
typedef void netisr_t __P((void));
diff --git a/sys/net/pfkeyv2.h b/sys/net/pfkeyv2.h
index ac509e0922bd..8f2cace27c1b 100644
--- a/sys/net/pfkeyv2.h
+++ b/sys/net/pfkeyv2.h
@@ -362,7 +362,7 @@ struct sadb_x_ipsecrequest {
#define PFKEY_UNUNIT64(a) ((a) << 3)
#define PFKEY_UNIT64(a) ((a) >> 3)
-#ifndef KERNEL
+#ifndef _KERNEL
extern void pfkey_sadump(struct sadb_msg *m);
extern void pfkey_spdump(struct sadb_msg *m);
@@ -413,7 +413,7 @@ int pfkey_send __P((int so, struct sadb_msg *msg, int len));
int pfkey_align __P((struct sadb_msg *msg, caddr_t *mhp));
int pfkey_check __P((caddr_t *mhp));
-#endif /*!KERNEL*/
+#endif /*!_KERNEL*/
#endif /* __PFKEY_V2_H */
diff --git a/sys/net/radix.c b/sys/net/radix.c
index 55887eb61eb9..9dbbf97c7a5f 100644
--- a/sys/net/radix.c
+++ b/sys/net/radix.c
@@ -39,7 +39,7 @@
*/
#ifndef _RADIX_H_
#include <sys/param.h>
-#ifdef KERNEL
+#ifdef _KERNEL
#include <sys/systm.h>
#include <sys/malloc.h>
#define M_DONTWAIT M_NOWAIT
@@ -1003,7 +1003,7 @@ void
rn_init()
{
char *cp, *cplim;
-#ifdef KERNEL
+#ifdef _KERNEL
struct domain *dom;
for (dom = domains; dom; dom = dom->dom_next)
diff --git a/sys/net/radix.h b/sys/net/radix.h
index f68f67aaecd5..899d53538370 100644
--- a/sys/net/radix.h
+++ b/sys/net/radix.h
@@ -140,7 +140,7 @@ struct radix_node_head {
struct radix_node rnh_nodes[3]; /* empty tree for common case */
};
-#ifndef KERNEL
+#ifndef _KERNEL
#define Bcmp(a, b, n) bcmp(((char *)(a)), ((char *)(b)), (n))
#define Bcopy(a, b, n) bcopy(((char *)(a)), ((char *)(b)), (unsigned)(n))
#define Bzero(p, n) bzero((char *)(p), (int)(n));
@@ -152,7 +152,7 @@ struct radix_node_head {
#define Bzero(p, n) bzero((caddr_t)(p), (unsigned)(n));
#define R_Malloc(p, t, n) (p = (t) malloc((unsigned long)(n), M_RTABLE, M_DONTWAIT))
#define Free(p) free((caddr_t)p, M_RTABLE);
-#endif /*KERNEL*/
+#endif /* _KERNEL */
void rn_init __P((void));
int rn_inithead __P((void **, int));
diff --git a/sys/net/raw_cb.h b/sys/net/raw_cb.h
index 5184de6f1376..6c079a92878f 100644
--- a/sys/net/raw_cb.h
+++ b/sys/net/raw_cb.h
@@ -59,7 +59,7 @@ struct rawcb {
#define RAWSNDQ 8192
#define RAWRCVQ 8192
-#ifdef KERNEL
+#ifdef _KERNEL
extern LIST_HEAD(rawcb_list_head, rawcb) rawcb_list;
int raw_attach __P((struct socket *, int));
diff --git a/sys/net/route.h b/sys/net/route.h
index 255fbe3ed897..68d21fc778eb 100644
--- a/sys/net/route.h
+++ b/sys/net/route.h
@@ -259,7 +259,7 @@ struct route_cb {
int any_count;
};
-#ifdef KERNEL
+#ifdef _KERNEL
#define RTFREE(rt) \
do { \
if ((rt)->rt_refcnt <= 1) \
diff --git a/sys/net/slcompress.c b/sys/net/slcompress.c
index 200e9c17e969..d72d02dcd556 100644
--- a/sys/net/slcompress.c
+++ b/sys/net/slcompress.c
@@ -62,7 +62,7 @@
#define BCMP(p1, p2, n) bcmp((char *)(p1), (char *)(p2), (int)(n))
#define BCOPY(p1, p2, n) bcopy((char *)(p1), (char *)(p2), (int)(n))
-#ifndef KERNEL
+#ifndef _KERNEL
#define ovbcopy bcopy
#endif
diff --git a/sys/net/zlib.c b/sys/net/zlib.c
index 64c4ad0eaf6a..19df8590db24 100644
--- a/sys/net/zlib.c
+++ b/sys/net/zlib.c
@@ -24,7 +24,7 @@
#define NO_ZCFUNCS
#define MY_ZCALLOC
-#if defined(__FreeBSD__) && (defined(KERNEL) || defined(_KERNEL))
+#if defined(__FreeBSD__) && defined(_KERNEL)
#define inflate inflate_ppp /* FreeBSD already has an inflate :-( */
#endif
@@ -45,13 +45,13 @@
#ifndef _Z_UTIL_H
#define _Z_UTIL_H
-#ifdef KERNEL
+#ifdef _KERNEL
#include <net/zlib.h>
#else
#include "zlib.h"
#endif
-#if defined(KERNEL) || defined(_KERNEL)
+#ifdef _KERNEL
/* Assume this is a *BSD or SVR4 kernel */
#include <sys/types.h>
#include <sys/time.h>
@@ -80,7 +80,7 @@
# include <stdlib.h>
#endif
#endif /* __KERNEL__ */
-#endif /* _KERNEL || KERNEL */
+#endif /* _KERNEL */
#ifndef local
# define local static
diff --git a/sys/net/zlib.h b/sys/net/zlib.h
index 1f3ee5049f10..7316305ba2f3 100644
--- a/sys/net/zlib.h
+++ b/sys/net/zlib.h
@@ -507,7 +507,7 @@ extern int EXPORT inflateInit OF((z_streamp strm));
done by inflate().
*/
-#if defined(__FreeBSD__) && (defined(KERNEL) || defined(_KERNEL))
+#if defined(__FreeBSD__) && defined(_KERNEL)
#define inflate inflate_ppp /* FreeBSD already has an inflate :-( */
#endif
diff --git a/sys/netatalk/aarp.h b/sys/netatalk/aarp.h
index d97c31fadd06..1a8771c817b2 100644
--- a/sys/netatalk/aarp.h
+++ b/sys/netatalk/aarp.h
@@ -1,6 +1,8 @@
/*
* Copyright (c) 1990,1991 Regents of The University of Michigan.
* All Rights Reserved.
+ *
+ * $FreeBSD$
*/
#ifndef _NETATALK_AARP_H_
@@ -53,7 +55,7 @@ struct aarptab {
#define AARPOP_RESPONSE 0x02
#define AARPOP_PROBE 0x03
-#ifdef KERNEL
+#ifdef _KERNEL
struct aarptab *aarptnew(struct at_addr *);
#endif
diff --git a/sys/netatalk/at_var.h b/sys/netatalk/at_var.h
index b6829bab7d87..c4310aa52d21 100644
--- a/sys/netatalk/at_var.h
+++ b/sys/netatalk/at_var.h
@@ -19,6 +19,8 @@
* Ann Arbor, Michigan
* +1-313-763-0525
* netatalk@itd.umich.edu
+ *
+ * $FreeBSD$
*/
#ifndef _NETATALK_AT_VAR_H_
@@ -57,7 +59,7 @@ struct at_aliasreq {
#define AFA_PROBING 0x0002
#define AFA_PHASE2 0x0004
-#ifdef KERNEL
+#ifdef _KERNEL
extern struct at_ifaddr *at_ifaddr;
extern struct ifqueue atintrq1, atintrq2;
#endif
diff --git a/sys/netatalk/ddp_var.h b/sys/netatalk/ddp_var.h
index 43511bf489fb..360f06f2427d 100644
--- a/sys/netatalk/ddp_var.h
+++ b/sys/netatalk/ddp_var.h
@@ -1,6 +1,8 @@
/*
* Copyright (c) 1990,1994 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
+ *
+ * $FreeBSD$
*/
#ifndef _NETATALK_DDP_VAR_H_
@@ -28,7 +30,7 @@ struct ddpstat {
long ddps_nosockspace; /* no space in sockbuf for packet */
};
-#ifdef KERNEL
+#ifdef _KERNEL
extern int ddp_cksum;
extern struct ddpcb *ddp_ports[ ];
extern struct ddpcb *ddpcb;
diff --git a/sys/netgraph/netgraph.h b/sys/netgraph/netgraph.h
index d59bc1e32ce7..7d84f9409967 100644
--- a/sys/netgraph/netgraph.h
+++ b/sys/netgraph/netgraph.h
@@ -47,7 +47,7 @@
#include <sys/malloc.h>
#include <sys/module.h>
-#ifndef KERNEL
+#ifndef _KERNEL
#error "This file should not be included in user level programs"
#endif
diff --git a/sys/netgraph/ng_message.h b/sys/netgraph/ng_message.h
index aab7314bcf2c..c9607fecdd18 100644
--- a/sys/netgraph/ng_message.h
+++ b/sys/netgraph/ng_message.h
@@ -282,7 +282,7 @@ struct typelist {
#define NGIOCGINFO _IOR('N', 40, struct nodeinfo) /* get node info */
#define NGIOCSETNAME _IOW('N', 41, struct ngm_name) /* set node name */
-#ifdef KERNEL
+#ifdef _KERNEL
/*
* Allocate and initialize a netgraph message "msg" with "len"
* extra bytes of argument. Sets "msg" to NULL if fails.
@@ -323,7 +323,7 @@ struct typelist {
sizeof((rsp)->header.cmdstr)); \
(rsp)->header.flags |= NGF_RESP; \
} while (0)
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* _NETGRAPH_NG_MESSAGE_H_ */
diff --git a/sys/netinet/icmp_var.h b/sys/netinet/icmp_var.h
index 02d147c31331..62f09b13afc5 100644
--- a/sys/netinet/icmp_var.h
+++ b/sys/netinet/icmp_var.h
@@ -37,7 +37,7 @@
#ifndef _NETINET_ICMP_VAR_H_
#define _NETINET_ICMP_VAR_H_
-#ifdef KERNEL
+#ifdef _KERNEL
#include "opt_icmp_bandlim.h" /* for ICMP_BANDLIM */
#endif
@@ -77,7 +77,7 @@ struct icmpstat {
{ "icmplim", CTLTYPE_INT }, \
}
-#ifdef KERNEL
+#ifdef _KERNEL
SYSCTL_DECL(_net_inet_icmp);
#ifdef ICMP_BANDLIM
extern int badport_bandlim __P((int));
diff --git a/sys/netinet/if_ether.h b/sys/netinet/if_ether.h
index 09caa3128075..2d590ad2e607 100644
--- a/sys/netinet/if_ether.h
+++ b/sys/netinet/if_ether.h
@@ -109,7 +109,7 @@ struct sockaddr_inarp {
#define RTF_USETRAILERS RTF_PROTO1 /* use trailers */
#define RTF_ANNOUNCE RTF_PROTO2 /* announce new arp entry */
-#ifdef KERNEL
+#ifdef _KERNEL
extern u_char ether_ipmulticast_min[ETHER_ADDR_LEN];
extern u_char ether_ipmulticast_max[ETHER_ADDR_LEN];
extern struct ifqueue arpintrq;
diff --git a/sys/netinet/if_fddi.h b/sys/netinet/if_fddi.h
index fc6acc6c9c8f..9f83882cdf10 100644
--- a/sys/netinet/if_fddi.h
+++ b/sys/netinet/if_fddi.h
@@ -69,7 +69,7 @@ struct fddi_header {
#define FDDIFC_LLC_SYNC 0xd0
#define FDDIFC_SMT 0x40
-#if defined(KERNEL) || defined(_KERNEL)
+#if defined(_KERNEL)
#define fddibroadcastaddr etherbroadcastaddr
#define fddi_ipmulticast_min ether_ipmulticast_min
#define fddi_ipmulticast_max ether_ipmulticast_max
diff --git a/sys/netinet/igmp_var.h b/sys/netinet/igmp_var.h
index d22cd510b5b2..5688f246dd5e 100644
--- a/sys/netinet/igmp_var.h
+++ b/sys/netinet/igmp_var.h
@@ -62,7 +62,7 @@ struct igmpstat {
u_int igps_snd_reports; /* sent membership reports */
};
-#ifdef KERNEL
+#ifdef _KERNEL
#define IGMP_RANDOM_DELAY(X) (random() % (X) + 1)
/*
diff --git a/sys/netinet/in.h b/sys/netinet/in.h
index 15a182c97e9a..b18be00afd70 100644
--- a/sys/netinet/in.h
+++ b/sys/netinet/in.h
@@ -267,7 +267,7 @@ struct in_addr {
#define INADDR_ANY (u_int32_t)0x00000000
#define INADDR_LOOPBACK (u_int32_t)0x7f000001
#define INADDR_BROADCAST (u_int32_t)0xffffffff /* must be masked */
-#ifndef KERNEL
+#ifndef _KERNEL
#define INADDR_NONE 0xffffffff /* -1 return */
#endif
@@ -444,7 +444,7 @@ struct ip_mreq {
/* INET6 stuff */
#include <netinet6/in6.h>
-#ifdef KERNEL
+#ifdef _KERNEL
struct ifnet; struct mbuf; /* forward declarations for Standard C */
struct proc;
@@ -457,6 +457,6 @@ char *inet_ntoa __P((struct in_addr)); /* in libkern */
int prison_ip __P((struct proc *p, int flag, u_int32_t *ip));
void prison_remote_ip __P((struct proc *p, int flag, u_int32_t *ip));
-#endif /* KERNEL */
+#endif
#endif
diff --git a/sys/netinet/in_hostcache.h b/sys/netinet/in_hostcache.h
index 98e8fd433ecb..710756a7dd6b 100644
--- a/sys/netinet/in_hostcache.h
+++ b/sys/netinet/in_hostcache.h
@@ -67,7 +67,7 @@ struct in_hcentry {
#define INHC_MULTICAST 0x0004 /* this address is multicast */
#define INHC_REDUCEDMTU 0x0008 /* we reduced the mtu via PMTU discovery */
-#ifdef KERNEL
+#ifdef _KERNEL
/*
* inhc_alloc can block while adding a new entry to the cache;
* inhc_lookup will does not add new entries and so can be called
@@ -78,6 +78,6 @@ int inhc_init(void);
struct in_hcentry *inhc_lookup(struct sockaddr_in *sin);
#define inhc_ref(inhc) (hc_ref(&(inhc)->inhc_hc))
#define inhc_rele(inhc) (hc_rele(&(inhc)->inhc_hc))
-#endif /* KERNEL */
+#endif
#endif /* _NETINET_IN_HOSTCACHE_H */
diff --git a/sys/netinet/in_pcb.h b/sys/netinet/in_pcb.h
index 5aeb579989e9..08733ad152a8 100644
--- a/sys/netinet/in_pcb.h
+++ b/sys/netinet/in_pcb.h
@@ -265,7 +265,7 @@ struct inpcbinfo { /* XXX documentation, prefixes */
#define INP_CHECK_SOCKAF(so, af) (INP_SOCKAF(so) == af)
-#ifdef KERNEL
+#ifdef _KERNEL
extern int ipport_lowfirstauto;
extern int ipport_lowlastauto;
extern int ipport_firstauto;
@@ -296,6 +296,6 @@ int in_setpeeraddr __P((struct socket *so, struct sockaddr **nam));
int in_setsockaddr __P((struct socket *so, struct sockaddr **nam));
void in_pcbremlists __P((struct inpcb *inp));
int prison_xinpcb __P((struct proc *p, struct inpcb *inp));
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_NETINET_IN_PCB_H_ */
diff --git a/sys/netinet/in_systm.h b/sys/netinet/in_systm.h
index 5d18c56e7175..13fa81d02465 100644
--- a/sys/netinet/in_systm.h
+++ b/sys/netinet/in_systm.h
@@ -55,7 +55,7 @@ typedef u_int32_t n_long; /* long as received from the net */
typedef u_int32_t n_time; /* ms since 00:00 GMT, byte rev */
-#ifdef KERNEL
+#ifdef _KERNEL
n_time iptime __P((void));
#endif
diff --git a/sys/netinet/in_var.h b/sys/netinet/in_var.h
index c04c7781969f..de2a6a6e16fc 100644
--- a/sys/netinet/in_var.h
+++ b/sys/netinet/in_var.h
@@ -80,7 +80,7 @@ struct in_aliasreq {
((ntohl((in).s_addr) & ~((struct in_ifaddr *)(ifa)->ia_subnetmask))
-#ifdef KERNEL
+#ifdef _KERNEL
extern TAILQ_HEAD(in_ifaddrhead, in_ifaddr) in_ifaddrhead;
extern struct ifqueue ipintrq; /* ip packet input queue */
extern struct in_addr zeroin_addr;
@@ -156,7 +156,7 @@ struct in_multi {
struct router_info *inm_rti; /* router info*/
};
-#ifdef KERNEL
+#ifdef _KERNEL
#ifdef SYSCTL_DECL
SYSCTL_DECL(_net_inet_ip);
@@ -230,7 +230,7 @@ int ipflow_fastforward __P((struct mbuf *));
void ipflow_create __P((const struct route *, struct mbuf *));
void ipflow_slowtimo __P((void));
-#endif /* KERNEL */
+#endif /* _KERNEL */
/* INET6 stuff */
#include <netinet6/in6_var.h>
diff --git a/sys/netinet/ip_dummynet.h b/sys/netinet/ip_dummynet.h
index 2c0e8b931e53..61ca6ddf365c 100644
--- a/sys/netinet/ip_dummynet.h
+++ b/sys/netinet/ip_dummynet.h
@@ -99,7 +99,7 @@ struct dn_pipe { /* a pipe */
#define DN_TO_IP_IN 2
#define DN_TO_BDG_FWD 3
-#ifdef KERNEL
+#ifdef _KERNEL
MALLOC_DECLARE(M_IPFW);
@@ -111,6 +111,6 @@ int dummynet_io(int pipe, int dir,
struct mbuf *m, struct ifnet *ifp, struct route *ro,
struct sockaddr_in * dst,
struct ip_fw_chain *rule, int flags);
-#endif /* KERNEL */
+#endif
#endif /* _IP_DUMMYNET_H */
diff --git a/sys/netinet/ip_ecn.h b/sys/netinet/ip_ecn.h
index 4a0bfd50b5a8..921ce374eb75 100644
--- a/sys/netinet/ip_ecn.h
+++ b/sys/netinet/ip_ecn.h
@@ -38,7 +38,7 @@
#define ECN_FORBIDDEN 0 /* ECN forbidden */
#define ECN_NOCARE (-1) /* no consideration to ECN */
-#if defined(KERNEL) || defined(_KERNEL)
+#ifdef _KERNEL
extern void ip_ecn_ingress __P((int, u_int8_t *, u_int8_t *));
extern void ip_ecn_egress __P((int, u_int8_t *, u_int8_t *));
#endif
diff --git a/sys/netinet/ip_fw.h b/sys/netinet/ip_fw.h
index eb4a999d604d..11c56a48a54f 100644
--- a/sys/netinet/ip_fw.h
+++ b/sys/netinet/ip_fw.h
@@ -210,7 +210,7 @@ struct ip_fw_chain {
/*
* Main firewall chains definitions and global var's definitions.
*/
-#ifdef KERNEL
+#ifdef _KERNEL
#define IP_FW_PORT_DYNT_FLAG 0x10000
#define IP_FW_PORT_TEE_FLAG 0x20000
@@ -229,6 +229,6 @@ typedef int ip_fw_ctl_t __P((struct sockopt *));
extern ip_fw_chk_t *ip_fw_chk_ptr;
extern ip_fw_ctl_t *ip_fw_ctl_ptr;
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* _IP_FW_H */
diff --git a/sys/netinet/ip_icmp.h b/sys/netinet/ip_icmp.h
index 201c3fc2b698..b7d540054482 100644
--- a/sys/netinet/ip_icmp.h
+++ b/sys/netinet/ip_icmp.h
@@ -184,7 +184,7 @@ struct icmp {
(type) == ICMP_IREQ || (type) == ICMP_IREQREPLY || \
(type) == ICMP_MASKREQ || (type) == ICMP_MASKREPLY)
-#ifdef KERNEL
+#ifdef _KERNEL
void icmp_error __P((struct mbuf *, int, int, n_long, struct ifnet *));
void icmp_input __P((struct mbuf *, int, int));
#endif
diff --git a/sys/netinet/ip_mroute.h b/sys/netinet/ip_mroute.h
index abccedaa02a9..8c990c845a32 100644
--- a/sys/netinet/ip_mroute.h
+++ b/sys/netinet/ip_mroute.h
@@ -249,7 +249,7 @@ struct tbf
struct mbuf *tbf_t; /* tail-insertion pointer */
};
-#ifdef KERNEL
+#ifdef _KERNEL
struct sockopt;
@@ -262,6 +262,6 @@ extern int (*mrt_ioctl) __P((int, caddr_t));
extern int (*mrt_ioctl) __P((int, caddr_t, struct proc *));
#endif
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* _NETINET_IP_MROUTE_H_ */
diff --git a/sys/netinet/ip_var.h b/sys/netinet/ip_var.h
index 2c438d638d77..ac7f79c5bc9e 100644
--- a/sys/netinet/ip_var.h
+++ b/sys/netinet/ip_var.h
@@ -124,7 +124,7 @@ struct ipstat {
u_long ips_nogif; /* no match gif found */
};
-#ifdef KERNEL
+#ifdef _KERNEL
/* flags passed to ip_output as last parameter */
#define IP_FORWARDING 0x1 /* most of ip header exists */
@@ -189,6 +189,6 @@ extern u_int16_t ip_divert_cookie;
extern struct sockaddr_in *ip_fw_fwd_addr;
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_NETINET_IP_VAR_H_ */
diff --git a/sys/netinet/tcp_debug.h b/sys/netinet/tcp_debug.h
index c359cb4034b1..dcca378c94cf 100644
--- a/sys/netinet/tcp_debug.h
+++ b/sys/netinet/tcp_debug.h
@@ -60,7 +60,7 @@ static char *tanames[] =
#define TCP_NDEBUG 100
-#ifndef KERNEL
+#ifndef _KERNEL
/* XXX common variables for broken applications. */
struct tcp_debug tcp_debug[TCP_NDEBUG];
int tcp_debx;
diff --git a/sys/netinet/tcp_seq.h b/sys/netinet/tcp_seq.h
index de50dd5b1ca8..aeefb209f85a 100644
--- a/sys/netinet/tcp_seq.h
+++ b/sys/netinet/tcp_seq.h
@@ -78,7 +78,7 @@
#define TCP_PAWS_IDLE (24 * 24 * 60 * 60 * hz)
/* timestamp wrap-around time */
-#ifdef KERNEL
+#ifdef _KERNEL
extern tcp_cc tcp_ccgen; /* global connection count */
/*
@@ -98,5 +98,5 @@ extern tcp_cc tcp_ccgen; /* global connection count */
extern tcp_seq tcp_iss; /* tcp initial send seq # */
#else
#define TCP_ISSINCR (250*1024) /* increment for tcp_iss each second */
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* _NETINET_TCP_SEQ_H_ */
diff --git a/sys/netinet/tcp_timer.h b/sys/netinet/tcp_timer.h
index 1f8d1b768fa3..b2bcb43c0303 100644
--- a/sys/netinet/tcp_timer.h
+++ b/sys/netinet/tcp_timer.h
@@ -117,7 +117,7 @@ static char *tcptimers[] =
(tv) = (tvmax); \
} while(0)
-#ifdef KERNEL
+#ifdef _KERNEL
extern int tcp_keepinit; /* time to establish connection */
extern int tcp_keepidle; /* time before keepalive probes begin */
extern int tcp_keepintvl; /* time between keepalive probes */
@@ -134,6 +134,6 @@ void tcp_timer_persist __P((void *xtp));
void tcp_timer_rexmt __P((void *xtp));
void tcp_timer_delack __P((void *xtp));
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_NETINET_TCP_TIMER_H_ */
diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h
index 9c24732d2561..2b1b2e55556a 100644
--- a/sys/netinet/tcp_var.h
+++ b/sys/netinet/tcp_var.h
@@ -336,7 +336,7 @@ struct xtcpcb {
}
-#ifdef KERNEL
+#ifdef _KERNEL
#ifdef SYSCTL_DECL
SYSCTL_DECL(_net_inet_tcp);
#endif
@@ -385,6 +385,6 @@ extern struct pr_usrreqs tcp_usrreqs;
extern u_long tcp_sendspace;
extern u_long tcp_recvspace;
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* _NETINET_TCP_VAR_H_ */
diff --git a/sys/netinet/udp_var.h b/sys/netinet/udp_var.h
index 491632e6cc0d..db289206881d 100644
--- a/sys/netinet/udp_var.h
+++ b/sys/netinet/udp_var.h
@@ -102,7 +102,7 @@ struct udpstat {
{ "pcblist", CTLTYPE_STRUCT }, \
}
-#ifdef KERNEL
+#ifdef _KERNEL
SYSCTL_DECL(_net_inet_udp);
extern struct pr_usrreqs udp_usrreqs;
diff --git a/sys/netinet6/ah.h b/sys/netinet6/ah.h
index 2786272cbb31..06137ddbec95 100644
--- a/sys/netinet6/ah.h
+++ b/sys/netinet6/ah.h
@@ -72,7 +72,7 @@ struct ah_algorithm {
#define AH_MAXSUMSIZE 16
-#ifdef KERNEL
+#ifdef _KERNEL
extern struct ah_algorithm ah_algorithms[];
/* cksum routines */
@@ -83,6 +83,6 @@ extern void ah4_input __P((struct mbuf *, int, int));
extern int ah4_output __P((struct mbuf *, struct ipsecrequest *));
extern int ah4_calccksum __P((struct mbuf *, caddr_t,
struct ah_algorithm *, struct secasvar *));
-#endif /*KERNEL*/
+#endif
#endif /*_NETINET6_AH_H_*/
diff --git a/sys/netinet6/ah6.h b/sys/netinet6/ah6.h
index 9ae83a96955d..b3448f4cfaeb 100644
--- a/sys/netinet6/ah6.h
+++ b/sys/netinet6/ah6.h
@@ -36,7 +36,7 @@
#ifndef _NETINET6_AH6_H_
#define _NETINET6_AH6_H_
-#ifdef KERNEL
+#ifdef _KERNEL
struct secasvar;
extern int ah6_input __P((struct mbuf **, int *, int));
@@ -44,6 +44,6 @@ extern int ah6_output __P((struct mbuf *, u_char *, struct mbuf *,
struct ipsecrequest *));
extern int ah6_calccksum __P((struct mbuf *, caddr_t,
struct ah_algorithm *, struct secasvar *));
-#endif /*KERNEL*/
+#endif
#endif /*_NETINET6_AH6_H_*/
diff --git a/sys/netinet6/esp.h b/sys/netinet6/esp.h
index 595aff1a1765..b2f62cfd4bd2 100644
--- a/sys/netinet6/esp.h
+++ b/sys/netinet6/esp.h
@@ -84,14 +84,14 @@ struct esp_algorithm {
struct secasvar *, struct esp_algorithm *, int));
};
-#ifdef KERNEL
+#ifdef _KERNEL
extern struct esp_algorithm esp_algorithms[];
/* crypt routines */
extern int esp4_output __P((struct mbuf *, struct ipsecrequest *));
extern void esp4_input __P((struct mbuf *, int, int));
extern size_t esp_hdrsiz __P((struct ipsecrequest *));
-#endif /*KERNEL*/
+#endif
extern int esp_auth __P((struct mbuf *, size_t, size_t,
struct secasvar *, u_char *));
diff --git a/sys/netinet6/esp6.h b/sys/netinet6/esp6.h
index e2063767bd5f..0e3ba9bd7ea5 100644
--- a/sys/netinet6/esp6.h
+++ b/sys/netinet6/esp6.h
@@ -36,10 +36,10 @@
#ifndef _NETINET6_ESP6_H_
#define _NETINET6_ESP6_H_
-#ifdef KERNEL
+#ifdef _KERNEL
extern int esp6_output __P((struct mbuf *, u_char *, struct mbuf *,
struct ipsecrequest *));
extern int esp6_input __P((struct mbuf **, int *, int));
-#endif /*KERNEL*/
+#endif
#endif /*_NETINET6_ESP6_H_*/
diff --git a/sys/netinet6/in6_pcb.h b/sys/netinet6/in6_pcb.h
index d962b2187f19..6c59574566ad 100644
--- a/sys/netinet6/in6_pcb.h
+++ b/sys/netinet6/in6_pcb.h
@@ -67,7 +67,7 @@
#ifndef _NETINET6_IN6_PCB_H_
#define _NETINET6_IN6_PCB_H_
-#ifdef KERNEL
+#ifdef _KERNEL
#define satosin6(sa) ((struct sockaddr_in6 *)(sa))
#define sin6tosa(sin6) ((struct sockaddr *)(sin6))
#define ifatoia6(ifa) ((struct in6_ifaddr *)(ifa))
@@ -103,6 +103,6 @@ struct in6_addr *in6_selectsrc __P((struct sockaddr_in6 *,
int in6_selecthlim __P((struct inpcb *, struct ifnet *));
void init_sin6 __P((struct sockaddr_in6 *sin6, struct mbuf *m));
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_NETINET6_IN6_PCB_H_ */
diff --git a/sys/netinet6/ip6_ecn.h b/sys/netinet6/ip6_ecn.h
index cafe9a57afd1..ede21bcc9b7e 100644
--- a/sys/netinet6/ip6_ecn.h
+++ b/sys/netinet6/ip6_ecn.h
@@ -34,7 +34,7 @@
* http://www.aciri.org/floyd/papers/draft-ipsec-ecn-00.txt
*/
-#if defined(KERNEL) || defined(_KERNEL)
+#ifdef _KERNEL
extern void ip6_ecn_ingress __P((int, u_int32_t *, u_int32_t *));
extern void ip6_ecn_egress __P((int, u_int32_t *, u_int32_t *));
#endif
diff --git a/sys/netinet6/ipsec.h b/sys/netinet6/ipsec.h
index ede791bb70ac..bd3bf540f7a3 100644
--- a/sys/netinet6/ipsec.h
+++ b/sys/netinet6/ipsec.h
@@ -39,7 +39,7 @@
#include <net/pfkeyv2.h>
#include <netkey/keydb.h>
-#ifdef KERNEL
+#ifdef _KERNEL
/*
* Security Policy Index
@@ -91,7 +91,7 @@ struct inpcbpolicy {
struct secpolicy *sp_out;
int priv; /* privileged socket ? */
};
-#endif /*KERNEL*/
+#endif /*_KERNEL*/
#define IPSEC_PORT_ANY 65535
#define IPSEC_ULPROTO_ANY 255
@@ -237,7 +237,7 @@ struct ipsecstat {
&ip6_ipsec_ecn, \
}
-#ifdef KERNEL
+#ifdef _KERNEL
#ifdef SYSCTL_DECL
SYSCTL_DECL(_net_inet_ipsec);
@@ -305,16 +305,16 @@ extern int ipsec4_tunnel_validate __P((struct ip *, u_int,
extern struct mbuf *ipsec_copypkt __P((struct mbuf *));
-#endif /*KERNEL*/
+#endif /*_KERNEL*/
-#ifndef KERNEL
+#ifndef _KERNEL
extern caddr_t ipsec_set_policy __P((char *policy, int buflen));
extern int ipsec_get_policylen __P((caddr_t buf));
extern char *ipsec_dump_policy __P((caddr_t buf, char *delimiter));
extern char *ipsec_strerror __P((void));
-#endif /*!KERNEL*/
+#endif /*!_KERNEL*/
#endif /*_NETINET6_IPSEC_H_*/
diff --git a/sys/netinet6/ipsec6.h b/sys/netinet6/ipsec6.h
index c4e992437d41..0572592a6e3d 100644
--- a/sys/netinet6/ipsec6.h
+++ b/sys/netinet6/ipsec6.h
@@ -36,7 +36,7 @@
#ifndef _NETINET6_IPSEC6_H_
#define _NETINET6_IPSEC6_H_
-#ifdef KERNEL
+#ifdef _KERNEL
#ifdef SYSCTL_DECL
SYSCTL_DECL(_net_inet6_ipsec6);
@@ -77,5 +77,5 @@ extern int ipsec6_output_tunnel __P((struct ipsec_output_state *,
extern int ipsec6_tunnel_validate __P((struct ip6_hdr *, u_int,
struct secasvar *));
-#endif /*KERNEL*/
+#endif /*_KERNEL*/
#endif /* _NETINET6_IPSEC6_H_ */
diff --git a/sys/netinet6/pim6_var.h b/sys/netinet6/pim6_var.h
index 3610a40a1102..9423b7fe409b 100644
--- a/sys/netinet6/pim6_var.h
+++ b/sys/netinet6/pim6_var.h
@@ -51,11 +51,11 @@ struct pim6stat {
u_int pim6s_snd_registers; /* sent registers */
};
-#if (defined(KERNEL)) || (defined(_KERNEL))
+#ifdef _KERNEL
extern struct pim6stat pim6stat;
int pim6_input __P((struct mbuf **, int*, int));
-#endif /* KERNEL */
+#endif
/*
* Names for PIM sysctl objects
diff --git a/sys/netinet6/tcp6_var.h b/sys/netinet6/tcp6_var.h
index 93f41d9b3d87..b2665c154588 100644
--- a/sys/netinet6/tcp6_var.h
+++ b/sys/netinet6/tcp6_var.h
@@ -68,7 +68,7 @@
#ifndef _NETINET_TCP6_VAR_H_
#define _NETINET_TCP6_VAR_H_
-#ifdef KERNEL
+#ifdef _KERNEL
struct ip6_hdr;
void tcp6_ctlinput __P((int, struct sockaddr *, void *));
@@ -78,6 +78,6 @@ struct rtentry *tcp_rtlookup6 __P((struct inpcb *));
extern struct pr_usrreqs tcp6_usrreqs;
-#endif /* KERNEL */
+#endif
#endif /* _NETINET_TCP6_VAR_H_ */
diff --git a/sys/netinet6/udp6_var.h b/sys/netinet6/udp6_var.h
index e0ade7afc635..efadb7ffcf08 100644
--- a/sys/netinet6/udp6_var.h
+++ b/sys/netinet6/udp6_var.h
@@ -67,7 +67,7 @@
#ifndef _NETINET6_UDP6_VAR_H_
#define _NETINET6_UDP6_VAR_H_
-#ifdef KERNEL
+#ifdef _KERNEL
SYSCTL_DECL(_net_inet6_udp6);
extern struct pr_usrreqs udp6_usrreqs;
@@ -77,6 +77,6 @@ int udp6_input __P((struct mbuf **, int *, int));
int udp6_output __P((struct inpcb *inp, struct mbuf *m,
struct sockaddr *addr, struct mbuf *control,
struct proc *p));
-#endif /* KERNEL */
+#endif
#endif /*_NETINET6_UDP6_VAR_H_*/
diff --git a/sys/netipx/ipx_if.h b/sys/netipx/ipx_if.h
index c6ec19e0ded0..10867359b586 100644
--- a/sys/netipx/ipx_if.h
+++ b/sys/netipx/ipx_if.h
@@ -87,11 +87,11 @@ struct ipxip_req {
};
#endif
-#ifdef KERNEL
+#ifdef _KERNEL
extern struct ifqueue ipxintrq; /* IPX input packet queue */
extern struct ipx_ifaddr *ipx_ifaddr;
struct ipx_ifaddr *ipx_iaonnetof __P((struct ipx_addr *dst));
-#endif /* KERNEL */
+#endif
#endif /* !_NETIPX_IPX_IF_H_ */
diff --git a/sys/netipx/ipx_ip.h b/sys/netipx/ipx_ip.h
index 0543df5dab29..2aeac7b06737 100644
--- a/sys/netipx/ipx_ip.h
+++ b/sys/netipx/ipx_ip.h
@@ -49,12 +49,12 @@ struct ifnet_en {
#define LOMTU (1024+512) /* XXX this is TINY_LOMTU */
-#ifdef KERNEL
+#ifdef _KERNEL
void ipxip_ctlinput __P((int cmd, struct sockaddr *sa, void *arg));
void ipxip_input __P((struct mbuf *m, int hlen));
int ipxip_route __P((struct socket *so, struct sockopt *sopt));
-#endif /* KERNEL */
+#endif
#endif /* !_NETIPX_IPXIP_H_ */
diff --git a/sys/netipx/ipx_pcb.h b/sys/netipx/ipx_pcb.h
index 366f6c1c4f9c..13bd9f9ee322 100644
--- a/sys/netipx/ipx_pcb.h
+++ b/sys/netipx/ipx_pcb.h
@@ -79,7 +79,7 @@ struct ipxpcb {
#define IPXSNDQ 16384
#define IPXRCVQ 40960
-#ifdef KERNEL
+#ifdef _KERNEL
extern struct ipxpcb ipxpcb; /* head of list */
int ipx_pcballoc __P((struct socket *so, struct ipxpcb *head,
@@ -96,6 +96,6 @@ void ipx_pcbnotify __P((struct ipx_addr *dst, int errno,
void (*notify)(struct ipxpcb *), long param));
void ipx_setpeeraddr __P((struct ipxpcb *ipxp, struct sockaddr **nam));
void ipx_setsockaddr __P((struct ipxpcb *ipxp, struct sockaddr **nam));
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_NETIPX_IPX_PCB_H_ */
diff --git a/sys/netipx/ipx_var.h b/sys/netipx/ipx_var.h
index acdafe5adcf6..c3877383c1fc 100644
--- a/sys/netipx/ipx_var.h
+++ b/sys/netipx/ipx_var.h
@@ -56,7 +56,7 @@ struct ipxstat {
u_long ipxs_mtutoosmall; /* the interface mtu is too small */
};
-#ifdef KERNEL
+#ifdef _KERNEL
#ifdef SYSCTL_DECL
SYSCTL_DECL(_net_ipx);
@@ -103,6 +103,6 @@ void ipx_printhost __P((struct ipx_addr *addr));
int ipx_sockaddr __P((struct socket *so, struct sockaddr **nam));
void ipx_watch_output __P((struct mbuf *m, struct ifnet *ifp));
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_NETIPX_IPX_VAR_H_ */
diff --git a/sys/netipx/spx.h b/sys/netipx/spx.h
index 6fca28a17d7a..0cf9829d927b 100644
--- a/sys/netipx/spx.h
+++ b/sys/netipx/spx.h
@@ -167,7 +167,7 @@ struct spxpcb {
#define ipxtospxpcb(np) ((struct spxpcb *)(np)->ipxp_pcb)
#define sotospxpcb(so) (ipxtospxpcb(sotoipxpcb(so)))
-#ifdef KERNEL
+#ifdef _KERNEL
extern struct pr_usrreqs spx_usrreqs;
extern struct pr_usrreqs spx_usrreq_sps;
@@ -179,6 +179,6 @@ void spx_init __P((void));
void spx_input __P((struct mbuf *m, struct ipxpcb *ipxp));
void spx_slowtimo __P((void));
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_NETIPX_SPX_H_ */
diff --git a/sys/netipx/spx_debug.h b/sys/netipx/spx_debug.h
index 94f2e2f3bbf9..e602bb9dfaeb 100644
--- a/sys/netipx/spx_debug.h
+++ b/sys/netipx/spx_debug.h
@@ -61,19 +61,19 @@ char *spxnames[] =
#endif
#define SPX_NDEBUG 100
-#ifndef KERNEL
+#ifndef _KERNEL
/* XXX common variables for broken applications. */
struct spx_debug spx_debug[SPX_NDEBUG];
int spx_debx;
#endif
-#ifdef KERNEL
+#ifdef _KERNEL
extern char *prurequests[];
extern char *sanames[];
extern char *tcpstates[];
void spx_trace __P((int act, int ostate, struct spxpcb *sp, struct spx *si,
int req));
-#endif /* KERNEL */
+#endif
#endif /* !_NETIPX_SPX_DEBUG_H_ */
diff --git a/sys/netkey/key.h b/sys/netkey/key.h
index ec02403560ae..2062a24ff014 100644
--- a/sys/netkey/key.h
+++ b/sys/netkey/key.h
@@ -34,7 +34,7 @@
#ifndef _NETKEY_KEY_H_
#define _NETKEY_KEY_H_
-#if defined(KERNEL)
+#ifdef _KERNEL
extern struct key_cb key_cb;
@@ -74,5 +74,5 @@ extern void key_sa_routechange __P((struct sockaddr *dst));
MALLOC_DECLARE(M_SECA);
#endif /* MALLOC_DECLARE */
-#endif /* defined(KERNEL) */
+#endif /* _KERNEL */
#endif /* _NETKEY_KEY_H_ */
diff --git a/sys/netkey/key_debug.c b/sys/netkey/key_debug.c
index ad91068cda8f..fc6e3a3f57f3 100644
--- a/sys/netkey/key_debug.c
+++ b/sys/netkey/key_debug.c
@@ -32,19 +32,13 @@
/* KAME @(#)$Id: key_debug.c,v 1.1.6.2.4.3 1999/07/06 12:05:13 itojun Exp $ */
#ifdef _KERNEL
-# ifndef KERNEL
-# define KERNEL
-# endif
-#endif
-
-#ifdef KERNEL
#include "opt_inet6.h"
#include "opt_ipsec.h"
#endif
#include <sys/types.h>
#include <sys/param.h>
-#ifdef KERNEL
+#ifdef _KERNEL
#include <sys/systm.h>
#include <sys/mbuf.h>
#endif
@@ -59,13 +53,13 @@
#include <netinet6/in6.h>
#include <netinet6/ipsec.h>
-#if !defined(KERNEL)
+#ifndef _KERNEL
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
-#endif /* defined(KERNEL) */
+#endif
-#if !defined(KERNEL) || (defined(KERNEL) && defined(IPSEC_DEBUG))
+#if !defined(_KERNEL) || (defined(_KERNEL) && defined(IPSEC_DEBUG))
static void kdebug_sadb_prop __P((struct sadb_ext *));
static void kdebug_sadb_identity __P((struct sadb_ext *));
@@ -75,11 +69,11 @@ static void kdebug_sadb_sa __P((struct sadb_ext *));
static void kdebug_sadb_address __P((struct sadb_ext *));
static void kdebug_sadb_key __P((struct sadb_ext *));
-#ifdef KERNEL
+#ifdef _KERNEL
static void kdebug_secreplay __P((struct secreplay *));
#endif
-#ifndef KERNEL
+#ifndef _KERNEL
#define panic(param) { printf(param); exit(-1); }
#endif
@@ -234,7 +228,7 @@ kdebug_sadb_identity(ext)
printf(" type=%d id=%lu",
id->sadb_ident_type, (u_long)id->sadb_ident_id);
if (len) {
-#ifdef KERNEL
+#ifdef _KERNEL
ipsec_hexdump((caddr_t)(id + 1), len); /*XXX cast ?*/
#else
char *p, *ep;
@@ -422,7 +416,7 @@ kdebug_sadb_x_policy(ext)
return;
}
-#ifdef KERNEL
+#ifdef _KERNEL
/* %%%: about SPD and SAD */
void
kdebug_secpolicy(sp)
@@ -626,7 +620,7 @@ kdebug_mbuf(m0)
return;
}
-#endif /* KERNEL */
+#endif /* _KERNEL */
void
kdebug_sockaddr(addr)
@@ -655,7 +649,7 @@ kdebug_sockaddr(addr)
return;
}
-#endif /* !defined(KERNEL) || (defined(KERNEL) && defined(IPSEC_DEBUG)) */
+#endif /* !defined(_KERNEL) || (defined(_KERNEL) && defined(IPSEC_DEBUG)) */
void
ipsec_bindump(buf, len)
diff --git a/sys/netkey/key_debug.h b/sys/netkey/key_debug.h
index 2ce0dc0dec1b..53eead8650fa 100644
--- a/sys/netkey/key_debug.h
+++ b/sys/netkey/key_debug.h
@@ -55,16 +55,16 @@
#define KEYDEBUG(lev,arg) if ((key_debug_level & (lev)) == (lev)) { arg; }
-#ifdef KERNEL
+#ifdef _KERNEL
extern u_int32_t key_debug_level;
-#endif /*KERNEL*/
+#endif
struct sadb_msg;
struct sadb_ext;
extern void kdebug_sadb __P((struct sadb_msg *));
extern void kdebug_sadb_x_policy __P((struct sadb_ext *));
-#ifdef KERNEL
+#ifdef _KERNEL
struct secpolicy;
struct secpolicyindex;
struct secasindex;
@@ -77,7 +77,7 @@ extern void kdebug_secasindex __P((struct secasindex *));
extern void kdebug_secasv __P((struct secasvar *));
extern void kdebug_mbufhdr __P((struct mbuf *));
extern void kdebug_mbuf __P((struct mbuf *));
-#endif /*KERNEL*/
+#endif
struct sockaddr;
extern void kdebug_sockaddr __P((struct sockaddr *));
diff --git a/sys/netkey/keydb.h b/sys/netkey/keydb.h
index 9574a440e7fc..af4b3ba497a2 100644
--- a/sys/netkey/keydb.h
+++ b/sys/netkey/keydb.h
@@ -32,7 +32,7 @@
#ifndef _NETKEY_KEYDB_H_
#define _NETKEY_KEYDB_H_
-#ifdef KERNEL
+#ifdef _KERNEL
/* Security Assocciation Index */
/* NOTE: Encure to be same address family */
@@ -130,6 +130,6 @@ struct key_cb {
int any_count;
};
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* _NETKEY_KEYDB_H_ */
diff --git a/sys/netkey/keysock.h b/sys/netkey/keysock.h
index 2fb475f8ca5d..b899edd3ea41 100644
--- a/sys/netkey/keysock.h
+++ b/sys/netkey/keysock.h
@@ -34,7 +34,7 @@
#ifndef _NETKEY_KEYSOCK_H_
#define _NETKEY_KEYSOCK_H_
-#if defined(KERNEL)
+#ifdef _KERNEL
struct keycb {
struct rawcb kp_raw; /* rawcb */
int kp_promisc; /* promiscuous mode */
@@ -51,6 +51,6 @@ extern int key_usrreq __P((struct socket *, int, struct mbuf *,
extern int key_sendup __P((struct socket *, struct sadb_msg *, u_int,
int));
-#endif /* defined(KERNEL) */
+#endif /* _KERNEL */
#endif _NETKEY_KEYSOCK_H_
diff --git a/sys/netnatm/natm.h b/sys/netnatm/natm.h
index 45048d78516e..431eb3544647 100644
--- a/sys/netnatm/natm.h
+++ b/sys/netnatm/natm.h
@@ -1,4 +1,5 @@
/* $NetBSD: natm.h,v 1.1 1996/07/04 03:20:12 chuck Exp $ */
+/* $FreeBSD$ */
/*
*
@@ -57,11 +58,7 @@ struct sockaddr_natm {
};
-#if defined(__FreeBSD__) && defined(KERNEL)
-
-#ifndef _KERNEL
-#define _KERNEL
-#endif
+#if defined(__FreeBSD__) && defined(_KERNEL)
#define SPLSOFTNET() splnet()
diff --git a/sys/netncp/ncp_conn.h b/sys/netncp/ncp_conn.h
index 923293c49eed..850e5e7217a6 100644
--- a/sys/netncp/ncp_conn.h
+++ b/sys/netncp/ncp_conn.h
@@ -135,7 +135,7 @@ struct ncp_conn_stat {
char user[NCP_MAXUSERNAMELEN+1];
};
-#ifdef KERNEL
+#ifdef _KERNEL
#ifndef LK_SHARED
#include <sys/lock.h>
@@ -234,5 +234,5 @@ extern int ncp_burst_enabled;
MALLOC_DECLARE(M_NCPDATA);
#endif
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* _NCP_CONN_H_ */
diff --git a/sys/netncp/ncp_crypt.c b/sys/netncp/ncp_crypt.c
index 8ffb62b68747..a17d4fef93d4 100644
--- a/sys/netncp/ncp_crypt.c
+++ b/sys/netncp/ncp_crypt.c
@@ -134,7 +134,7 @@ nw_encrypt(const u_char *fra, const u_char *buf, u_char *target) {
*target++ = k[s] ^ k[15 - s];
}
-#ifdef KERNEL
+#ifdef _KERNEL
/*
* MD4 routine taken from libmd sources
*/
@@ -271,4 +271,4 @@ unsigned int len;
(((UINT4)input[j+2]) << 16) | (((UINT4)input[j+3]) << 24);
}
-#endif /* KERNEL */
+#endif /* _KERNEL */
diff --git a/sys/netncp/ncp_nls.h b/sys/netncp/ncp_nls.h
index 489b6df486c7..bedc7ca53a90 100644
--- a/sys/netncp/ncp_nls.h
+++ b/sys/netncp/ncp_nls.h
@@ -50,7 +50,7 @@ struct ncp_nlstables {
int opt; /* may depend on context */
};
-#ifndef KERNEL
+#ifndef _KERNEL
/*
* NLS, supported character conversion schemes.
* NCP_NLS_UNIXCHARSET_NETWARECHARSET
@@ -74,7 +74,7 @@ char* ncp_nls_mem_u2n(char *dst, const char *src, int size);
__END_DECLS
-#else /* !KERNEL */
+#else /* !_KERNEL */
extern struct ncp_nlstables ncp_defnls;
@@ -85,6 +85,6 @@ void ncp_pathcopy(char *src, char *dst, int len, struct ncp_nlstables *nt);
int ncp_pathcheck(char *s, int len, struct ncp_nlstables *nt, int strict);
void ncp_path2unix(char *src, char *dst, int len, struct ncp_nlstables *nt);
-#endif /* !KERNEL */
+#endif /* !_KERNEL */
#endif /* _NCP_NCP_NLS_H_ */
diff --git a/sys/netncp/ncp_rq.h b/sys/netncp/ncp_rq.h
index 7cc58fe5209e..b6cf7064086d 100644
--- a/sys/netncp/ncp_rq.h
+++ b/sys/netncp/ncp_rq.h
@@ -81,7 +81,7 @@
#endif
-#ifdef KERNEL
+#ifdef _KERNEL
struct ncp_nlstables;
/*
* Structure to prepare ncp request and receive reply
@@ -154,7 +154,7 @@ static int __inline ncp_rq_usermem(struct ncp_rq *rqp, caddr_t source, int size)
}
void ncp_sign_init(const char *logindata, char *sign_root);
-#else /* ifdef KERNEL */
+#else /* ifdef _KERNEL */
#define DECLARE_RQ struct ncp_buf conn1, *conn=&conn1
@@ -189,6 +189,6 @@ ConvertToNWfromDWORD(u_int32_t sfd, ncp_fh *fh) {
__END_DECLS
-#endif /* ifdef KERNEL */
+#endif /* ifdef _KERNEL */
#endif /* !_NETNCP_NCP_RQ_H_ */
diff --git a/sys/netns/idp_var.h b/sys/netns/idp_var.h
index ce4314177404..ab20d6bb5732 100644
--- a/sys/netns/idp_var.h
+++ b/sys/netns/idp_var.h
@@ -48,7 +48,7 @@ struct idpstat {
int idps_badlen; /* ip length < ip header length */
};
-#ifdef KERNEL
+#ifdef _KERNEL
struct idpstat idpstat;
#endif
diff --git a/sys/netns/ns.h b/sys/netns/ns.h
index a20b868cab61..3e732d80c5c7 100644
--- a/sys/netns/ns.h
+++ b/sys/netns/ns.h
@@ -135,7 +135,7 @@ struct sockaddr_ns {
#define ns_nullhost(x) (((x).x_host.s_host[0]==0) && \
((x).x_host.s_host[1]==0) && ((x).x_host.s_host[2]==0))
-#ifdef KERNEL
+#ifdef _KERNEL
extern struct domain nsdomain;
union ns_host ns_thishost;
union ns_host ns_zerohost;
diff --git a/sys/netns/ns_error.h b/sys/netns/ns_error.h
index 234080130fa7..7375b0db2ede 100644
--- a/sys/netns/ns_error.h
+++ b/sys/netns/ns_error.h
@@ -89,7 +89,7 @@ struct ns_errstat {
since we might not know all */
};
-#ifdef KERNEL
+#ifdef _KERNEL
struct ns_errstat ns_errstat;
#endif
diff --git a/sys/netns/ns_if.h b/sys/netns/ns_if.h
index 4dfabe7c7494..e5eb4ef730d0 100644
--- a/sys/netns/ns_if.h
+++ b/sys/netns/ns_if.h
@@ -79,7 +79,7 @@ struct nsip_req {
};
#endif
-#ifdef KERNEL
+#ifdef _KERNEL
struct ns_ifaddr *ns_ifaddr;
struct ns_ifaddr *ns_iaonnetof();
void nsintr __P((void));
diff --git a/sys/netns/ns_pcb.h b/sys/netns/ns_pcb.h
index 8b5646a32cc5..2d82ba629a25 100644
--- a/sys/netns/ns_pcb.h
+++ b/sys/netns/ns_pcb.h
@@ -77,7 +77,7 @@ struct nspcb {
#define NSRCVQ 2048
-#ifdef KERNEL
+#ifdef _KERNEL
struct nspcb nspcb; /* head of list */
struct nspcb *ns_pcblookup();
#endif
diff --git a/sys/netns/spp_timer.h b/sys/netns/spp_timer.h
index 7501a0cc9889..435df926b115 100644
--- a/sys/netns/spp_timer.h
+++ b/sys/netns/spp_timer.h
@@ -121,7 +121,7 @@ char *spptimers[] =
(tv) = (tvmax); \
}
-#ifdef KERNEL
+#ifdef _KERNEL
extern int spp_backoff[];
#endif
diff --git a/sys/netns/spp_var.h b/sys/netns/spp_var.h
index e1d88dee9ec2..2bf071865246 100644
--- a/sys/netns/spp_var.h
+++ b/sys/netns/spp_var.h
@@ -186,7 +186,7 @@ struct spp_istat {
struct sppstat newstats;
};
-#ifdef KERNEL
+#ifdef _KERNEL
struct spp_istat spp_istat;
/* Following was struct sppstat sppstat; */
diff --git a/sys/pc98/pc98/atapi.h b/sys/pc98/pc98/atapi.h
index afa76ea01c92..c57b41da731c 100644
--- a/sys/pc98/pc98/atapi.h
+++ b/sys/pc98/pc98/atapi.h
@@ -12,6 +12,7 @@
* all derivative works or modified versions.
*
* Version 1.9, Thu Oct 12 15:53:50 MSK 1995
+ * $FreeBSD$
*/
/*
@@ -261,7 +262,7 @@ struct atapi { /* ATAPI controller data */
struct atapicmd cmdrq[16]; /* pool of command requests */
};
-#ifdef KERNEL
+#ifdef _KERNEL
struct atapi;
extern struct atapidrv atapi_drvtab[4]; /* delayed attach info */
diff --git a/sys/powerpc/include/clock.h b/sys/powerpc/include/clock.h
index f243f8b20334..a5f1b62430a1 100644
--- a/sys/powerpc/include/clock.h
+++ b/sys/powerpc/include/clock.h
@@ -9,7 +9,7 @@
#ifndef _MACHINE_CLOCK_H_
#define _MACHINE_CLOCK_H_
-#ifdef KERNEL
+#ifdef _KERNEL
extern int disable_rtc_set;
extern int wall_cmos_clock;
@@ -20,6 +20,6 @@ int sysbeep __P((int pitch, int period));
int acquire_timer2 __P((int mode));
int release_timer2 __P((void));
-#endif /* KERNEL */
+#endif
#endif /* !_MACHINE_CLOCK_H_ */
diff --git a/sys/powerpc/include/ptrace.h b/sys/powerpc/include/ptrace.h
index 55a26fd636ad..d59a38f3409b 100644
--- a/sys/powerpc/include/ptrace.h
+++ b/sys/powerpc/include/ptrace.h
@@ -47,9 +47,9 @@
#define PT_GETDBREGS (PT_FIRSTMACH + 5)
#define PT_SETDBREGS (PT_FIRSTMACH + 6)
-#ifdef KERNEL
+#ifdef _KERNEL
int ptrace_read_u_check __P((struct proc *p, vm_offset_t off, size_t len));
-#endif /* !KERNEL */
+#endif
#endif
diff --git a/sys/powerpc/powerpc/genassym.c b/sys/powerpc/powerpc/genassym.c
index 7515a4a86c14..5e59a543a2e4 100644
--- a/sys/powerpc/powerpc/genassym.c
+++ b/sys/powerpc/powerpc/genassym.c
@@ -53,9 +53,9 @@
#include <vm/vm_param.h>
#include <vm/pmap.h>
#include <vm/vm_map.h>
-#define KERNEL /* Avoid userland compatability headers */
+#define _KERNEL /* Avoid userland compatability headers */
#include <sys/user.h>
-#undef KERNEL
+#undef _KERNEL
#include <net/if.h>
#include <netinet/in.h>
#include <nfs/nfsv2.h>
diff --git a/sys/sys/_posix.h b/sys/sys/_posix.h
index ea0436a93b54..d75a29547fa5 100644
--- a/sys/sys/_posix.h
+++ b/sys/sys/_posix.h
@@ -39,7 +39,7 @@
*
*/
-#ifdef KERNEL
+#ifdef _KERNEL
#if !defined(KLD_MODULE)
#include "opt_posix.h"
@@ -93,5 +93,5 @@
#define _P1003_1B_VISIBLE_HISTORICALLY
#endif
-#endif /* not KERNEL */
+#endif /* _KERNEL */
#endif /* _SYS__POSIX_H_ */
diff --git a/sys/sys/_sigset.h b/sys/sys/_sigset.h
index c137ec35db77..2e405a2d03cc 100644
--- a/sys/sys/_sigset.h
+++ b/sys/sys/_sigset.h
@@ -124,7 +124,7 @@ typedef void __sighandler_t __P((int));
#define SIG_IGN ((__sighandler_t *)1)
#define SIG_ERR ((__sighandler_t *)-1)
-#if defined(_P1003_1B_VISIBLE) || defined(KERNEL)
+#if defined(_P1003_1B_VISIBLE) || defined(_KERNEL)
union sigval {
/* Members as suggested by Annex C of POSIX 1003.1b. */
int sigval_int;
diff --git a/sys/sys/acct.h b/sys/sys/acct.h
index d59d974cb41e..fae78c8bf944 100644
--- a/sys/sys/acct.h
+++ b/sys/sys/acct.h
@@ -49,7 +49,7 @@
*/
typedef u_int16_t comp_t;
-#ifdef KERNEL
+#ifdef _KERNEL
#define __dev_t udev_t
#else
#define __dev_t dev_t
@@ -83,7 +83,7 @@ struct acct {
*/
#define AHZ 64
-#ifdef KERNEL
+#ifdef _KERNEL
struct proc;
int acct_process __P((struct proc *p));
diff --git a/sys/sys/acl.h b/sys/sys/acl.h
index 3a13fab54214..deaffd92eb7e 100644
--- a/sys/sys/acl.h
+++ b/sys/sys/acl.h
@@ -93,7 +93,7 @@ typedef struct acl *acl_t;
#define ACL_PERM_BITS (ACL_PERM_EXEC | ACL_PERM_WRITE | ACL_PERM_READ)
#define ACL_POSIX1E_BITS (ACL_PERM_EXEC | ACL_PERM_WRITE | ACL_PERM_READ)
-#ifdef KERNEL
+#ifdef _KERNEL
/*
* Storage for ACLs and support structures
*/
@@ -124,7 +124,7 @@ int generic_vop_getacl(struct vop_getacl_args *ap);
int generic_vop_aclcheck(struct vop_aclcheck_args *ap);
int posix1e_vop_aclcheck(struct vop_aclcheck_args *ap);
-#else /* KERNEL */
+#else /* _KERNEL */
/*
* Syscall interface -- use the library calls instead as the syscalls
@@ -165,5 +165,5 @@ int acl_valid_file(const char *path_p, acl_type_t type, acl_t acl);
int acl_valid_fd(int fd, acl_type_t type, acl_t acl);
int acl_free(void *obj_p);
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* _SYS_ACL_H */
diff --git a/sys/sys/aio.h b/sys/sys/aio.h
index 68a5698503d1..b74eadddd7c0 100644
--- a/sys/sys/aio.h
+++ b/sys/sys/aio.h
@@ -89,7 +89,7 @@ typedef struct aiocb {
struct __aiocb_private _aiocb_private;
} aiocb_t;
-#ifndef KERNEL
+#ifndef _KERNEL
__BEGIN_DECLS
/*
diff --git a/sys/sys/bio.h b/sys/sys/bio.h
index f244a5f87ad4..7168a894e993 100644
--- a/sys/sys/bio.h
+++ b/sys/sys/bio.h
@@ -238,7 +238,7 @@ struct buf {
#define NOOFFSET (-1LL) /* No buffer offset calculated yet */
-#ifdef KERNEL
+#ifdef _KERNEL
/*
* Buffer locking
*/
@@ -342,7 +342,7 @@ BUF_REFCNT(struct buf *bp)
return ret;
}
-#endif /* KERNEL */
+#endif /* _KERNEL */
struct buf_queue_head {
TAILQ_HEAD(buf_queue, buf) queue;
@@ -365,7 +365,7 @@ struct cluster_save {
struct buf **bs_children; /* List of associated buffers. */
};
-#ifdef KERNEL
+#ifdef _KERNEL
static __inline void bufq_init __P((struct buf_queue_head *head));
static __inline void bufq_insert_tail __P((struct buf_queue_head *head,
@@ -417,7 +417,7 @@ bufq_first(struct buf_queue_head *head)
return (TAILQ_FIRST(&head->queue));
}
-#endif /* KERNEL */
+#endif /* _KERNEL */
/*
* Definitions for the buffer free lists.
@@ -443,7 +443,7 @@ bufq_first(struct buf_queue_head *head)
#define B_CLRBUF 0x01 /* Request allocated buffer be cleared. */
#define B_SYNC 0x02 /* Do all allocations synchronously. */
-#ifdef KERNEL
+#ifdef _KERNEL
extern int nbuf; /* The number of buffer headers */
extern int buf_maxio; /* nominal maximum I/O for buffer */
extern struct buf *buf; /* The buffer headers. */
@@ -507,6 +507,6 @@ void reassignbuf __P((struct buf *, struct vnode *));
void pbreassignbuf __P((struct buf *, struct vnode *));
struct buf *trypbuf __P((int *));
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_SYS_BUF_H_ */
diff --git a/sys/sys/buf.h b/sys/sys/buf.h
index f244a5f87ad4..7168a894e993 100644
--- a/sys/sys/buf.h
+++ b/sys/sys/buf.h
@@ -238,7 +238,7 @@ struct buf {
#define NOOFFSET (-1LL) /* No buffer offset calculated yet */
-#ifdef KERNEL
+#ifdef _KERNEL
/*
* Buffer locking
*/
@@ -342,7 +342,7 @@ BUF_REFCNT(struct buf *bp)
return ret;
}
-#endif /* KERNEL */
+#endif /* _KERNEL */
struct buf_queue_head {
TAILQ_HEAD(buf_queue, buf) queue;
@@ -365,7 +365,7 @@ struct cluster_save {
struct buf **bs_children; /* List of associated buffers. */
};
-#ifdef KERNEL
+#ifdef _KERNEL
static __inline void bufq_init __P((struct buf_queue_head *head));
static __inline void bufq_insert_tail __P((struct buf_queue_head *head,
@@ -417,7 +417,7 @@ bufq_first(struct buf_queue_head *head)
return (TAILQ_FIRST(&head->queue));
}
-#endif /* KERNEL */
+#endif /* _KERNEL */
/*
* Definitions for the buffer free lists.
@@ -443,7 +443,7 @@ bufq_first(struct buf_queue_head *head)
#define B_CLRBUF 0x01 /* Request allocated buffer be cleared. */
#define B_SYNC 0x02 /* Do all allocations synchronously. */
-#ifdef KERNEL
+#ifdef _KERNEL
extern int nbuf; /* The number of buffer headers */
extern int buf_maxio; /* nominal maximum I/O for buffer */
extern struct buf *buf; /* The buffer headers. */
@@ -507,6 +507,6 @@ void reassignbuf __P((struct buf *, struct vnode *));
void pbreassignbuf __P((struct buf *, struct vnode *));
struct buf *trypbuf __P((int *));
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_SYS_BUF_H_ */
diff --git a/sys/sys/bus.h b/sys/sys/bus.h
index a3cea1555d06..84176db97551 100644
--- a/sys/sys/bus.h
+++ b/sys/sys/bus.h
@@ -29,7 +29,7 @@
#ifndef _SYS_BUS_H_
#define _SYS_BUS_H_
-#ifdef KERNEL
+#ifdef _KERNEL
#include <sys/queue.h>
@@ -364,6 +364,6 @@ static moduledata_t name##_##busname##_mod = { \
DECLARE_MODULE(name##_##busname, name##_##busname##_mod, \
SI_SUB_DRIVERS, SI_ORDER_MIDDLE)
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_SYS_BUS_H_ */
diff --git a/sys/sys/callout.h b/sys/sys/callout.h
index a3cfcc24a80c..c83bf442c707 100644
--- a/sys/sys/callout.h
+++ b/sys/sys/callout.h
@@ -66,7 +66,7 @@ struct callout_handle {
struct callout *callout;
};
-#ifdef KERNEL
+#ifdef _KERNEL
extern struct callout_list callfree;
extern struct callout *callout;
extern int ncallout;
@@ -80,6 +80,6 @@ void callout_init __P((struct callout *));
void callout_reset __P((struct callout *, int, void (*)(void *), void *));
void callout_stop __P((struct callout *));
-#endif /* KERNEL */
+#endif
#endif /* _SYS_CALLOUT_H_ */
diff --git a/sys/sys/cdio.h b/sys/sys/cdio.h
index dbb0f29f9abc..12d18cf67830 100644
--- a/sys/sys/cdio.h
+++ b/sys/sys/cdio.h
@@ -26,7 +26,7 @@
#ifndef _SYS_CDIO_H_
#define _SYS_CDIO_H_
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/types.h>
#endif
#include <sys/ioccom.h>
diff --git a/sys/sys/chio.h b/sys/sys/chio.h
index 7a2403f27dd3..78e2248e995f 100644
--- a/sys/sys/chio.h
+++ b/sys/sys/chio.h
@@ -35,7 +35,7 @@
#ifndef _SYS_CHIO_H_
#define _SYS_CHIO_H_
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/types.h>
#endif
#include <sys/ioccom.h>
diff --git a/sys/sys/clist.h b/sys/sys/clist.h
index d1c22fa3d599..60b56ecf43de 100644
--- a/sys/sys/clist.h
+++ b/sys/sys/clist.h
@@ -43,7 +43,7 @@ struct cblock {
unsigned char c_info[CBSIZE]; /* characters */
};
-#ifdef KERNEL
+#ifdef _KERNEL
extern struct cblock *cfree;
extern int cfreecount;
#endif
diff --git a/sys/sys/conf.h b/sys/sys/conf.h
index e192b7cd86ca..f4f611277453 100644
--- a/sys/sys/conf.h
+++ b/sys/sys/conf.h
@@ -191,7 +191,7 @@ struct linesw {
u_char l_hotchar;
};
-#ifdef KERNEL
+#ifdef _KERNEL
extern struct linesw linesw[];
extern int nlinesw;
@@ -214,7 +214,7 @@ struct swdevt {
#define SW_SEQUENTIAL 0x02
#define sw_freed sw_flags /* XXX compat */
-#ifdef KERNEL
+#ifdef _KERNEL
d_open_t noopen;
d_close_t noclose;
d_read_t noread;
@@ -285,6 +285,6 @@ extern devfs_create_t *devfs_create_hook;
#define GID_GAMES 13
#define GID_DIALER 68
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_SYS_CONF_H_ */
diff --git a/sys/sys/cons.h b/sys/sys/cons.h
index b6414a1244ca..7314dbcf993b 100644
--- a/sys/sys/cons.h
+++ b/sys/sys/cons.h
@@ -74,7 +74,7 @@ struct consdev {
#define CN_INTERNAL 2 /* "internal" bit-mapped display */
#define CN_REMOTE 3 /* serial interface with remote bit set */
-#ifdef KERNEL
+#ifdef _KERNEL
extern struct linker_set cons_set;
extern int cons_unavail;
extern struct consdev *cn_tab;
@@ -92,6 +92,6 @@ void cninit __P((void));
void cninit_finish __P((void));
void cnputc __P((int));
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_MACHINE_CONS_H_ */
diff --git a/sys/sys/consio.h b/sys/sys/consio.h
index d121457cfc66..ae0fe802aacb 100644
--- a/sys/sys/consio.h
+++ b/sys/sys/consio.h
@@ -31,7 +31,7 @@
#ifndef _SYS_CONSIO_H_
#define _SYS_CONSIO_H_
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/types.h>
#endif
#include <sys/ioccom.h>
diff --git a/sys/sys/ctype.h b/sys/sys/ctype.h
index 9144b0e725f1..b306e85e762c 100644
--- a/sys/sys/ctype.h
+++ b/sys/sys/ctype.h
@@ -41,7 +41,7 @@
#ifndef _SYS_CTYPE_H_
#define _SYS_CTYPE_H_
-#ifdef KERNEL
+#ifdef _KERNEL
#define isspace(c) ((c) == ' ' || ((c) >= '\t' && (c) <= '\r'))
#define isascii(c) (((c) & ~0x7f) == 0)
@@ -56,5 +56,5 @@
#define toupper(c) ((c) - 0x20 * (((c) >= 'a') && ((c) <= 'z')))
#define tolower(c) ((c) + 0x20 * (((c) >= 'A') && ((c) <= 'Z')))
-#endif /* KERNEL */
+#endif
#endif /* !_SYS_CTYPE_H_ */
diff --git a/sys/sys/devicestat.h b/sys/sys/devicestat.h
index 1e17d5117c62..172ff75540b1 100644
--- a/sys/sys/devicestat.h
+++ b/sys/sys/devicestat.h
@@ -205,7 +205,7 @@ struct devstat {
devstat_priority priority; /* Controls list pos. */
};
-#ifdef KERNEL
+#ifdef _KERNEL
struct buf;
void devstat_add_entry(struct devstat *ds, const char *dev_name,
int unit_number, u_int32_t block_size,
diff --git a/sys/sys/dirent.h b/sys/sys/dirent.h
index 19db37ba43e7..b9c39d1b4972 100644
--- a/sys/sys/dirent.h
+++ b/sys/sys/dirent.h
@@ -91,7 +91,7 @@ struct dirent {
#define _GENERIC_DIRSIZ(dp) \
((sizeof (struct dirent) - (MAXNAMLEN+1)) + (((dp)->d_namlen+1 + 3) &~ 3))
-#ifdef KERNEL
+#ifdef _KERNEL
#define GENERIC_DIRSIZ(dp) _GENERIC_DIRSIZ(dp)
#endif
diff --git a/sys/sys/disklabel.h b/sys/sys/disklabel.h
index 71e023647756..5c5d7463b29b 100644
--- a/sys/sys/disklabel.h
+++ b/sys/sys/disklabel.h
@@ -37,7 +37,7 @@
#ifndef _SYS_DISKLABEL_H_
#define _SYS_DISKLABEL_H_
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/types.h>
#endif
#include <sys/ioccom.h>
@@ -389,7 +389,7 @@ struct dos_partition {
#define DIOCWLABEL _IOW('d', 109, int) /* write en/disable label */
-#ifdef KERNEL
+#ifdef _KERNEL
/*
* XXX encoding of disk minor numbers, should be elsewhere.
@@ -454,11 +454,11 @@ int writedisklabel __P((dev_t dev, struct disklabel *lp));
void alpha_fix_srm_checksum __P((struct buf *bp));
#endif
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* LOCORE */
-#ifndef KERNEL
+#ifndef _KERNEL
__BEGIN_DECLS
struct disklabel *getdiskbyname __P((const char *));
__END_DECLS
diff --git a/sys/sys/diskmbr.h b/sys/sys/diskmbr.h
index 71e023647756..5c5d7463b29b 100644
--- a/sys/sys/diskmbr.h
+++ b/sys/sys/diskmbr.h
@@ -37,7 +37,7 @@
#ifndef _SYS_DISKLABEL_H_
#define _SYS_DISKLABEL_H_
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/types.h>
#endif
#include <sys/ioccom.h>
@@ -389,7 +389,7 @@ struct dos_partition {
#define DIOCWLABEL _IOW('d', 109, int) /* write en/disable label */
-#ifdef KERNEL
+#ifdef _KERNEL
/*
* XXX encoding of disk minor numbers, should be elsewhere.
@@ -454,11 +454,11 @@ int writedisklabel __P((dev_t dev, struct disklabel *lp));
void alpha_fix_srm_checksum __P((struct buf *bp));
#endif
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* LOCORE */
-#ifndef KERNEL
+#ifndef _KERNEL
__BEGIN_DECLS
struct disklabel *getdiskbyname __P((const char *));
__END_DECLS
diff --git a/sys/sys/diskpc98.h b/sys/sys/diskpc98.h
index 71e023647756..5c5d7463b29b 100644
--- a/sys/sys/diskpc98.h
+++ b/sys/sys/diskpc98.h
@@ -37,7 +37,7 @@
#ifndef _SYS_DISKLABEL_H_
#define _SYS_DISKLABEL_H_
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/types.h>
#endif
#include <sys/ioccom.h>
@@ -389,7 +389,7 @@ struct dos_partition {
#define DIOCWLABEL _IOW('d', 109, int) /* write en/disable label */
-#ifdef KERNEL
+#ifdef _KERNEL
/*
* XXX encoding of disk minor numbers, should be elsewhere.
@@ -454,11 +454,11 @@ int writedisklabel __P((dev_t dev, struct disklabel *lp));
void alpha_fix_srm_checksum __P((struct buf *bp));
#endif
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* LOCORE */
-#ifndef KERNEL
+#ifndef _KERNEL
__BEGIN_DECLS
struct disklabel *getdiskbyname __P((const char *));
__END_DECLS
diff --git a/sys/sys/diskslice.h b/sys/sys/diskslice.h
index 883a8800ef4e..8efb1a3238ae 100644
--- a/sys/sys/diskslice.h
+++ b/sys/sys/diskslice.h
@@ -29,7 +29,7 @@
#ifndef _SYS_DISKSLICE_H_
#define _SYS_DISKSLICE_H_
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/types.h>
#endif
#include <sys/ioccom.h>
@@ -79,7 +79,7 @@ struct diskslices {
dss_slices[MAX_SLICES]; /* actually usually less */
};
-#ifdef KERNEL
+#ifdef _KERNEL
/* Flags for dsopen(). */
#define DSO_NOLABELS 1
@@ -105,6 +105,6 @@ int dsopen __P((dev_t dev, int mode, u_int flags,
struct diskslices **sspp, struct disklabel *lp));
int dssize __P((dev_t dev, struct diskslices **sspp));
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_SYS_DISKSLICE_H_ */
diff --git a/sys/sys/dkstat.h b/sys/sys/dkstat.h
index c62d6ce1350f..760219c190ef 100644
--- a/sys/sys/dkstat.h
+++ b/sys/sys/dkstat.h
@@ -49,7 +49,7 @@
#define CP_IDLE 4
#define CPUSTATES 5
-#ifdef KERNEL
+#ifdef _KERNEL
extern long tk_cancc;
extern long tk_nin;
diff --git a/sys/sys/dmap.h b/sys/sys/dmap.h
index 793176086738..48a44df0df1a 100644
--- a/sys/sys/dmap.h
+++ b/sys/sys/dmap.h
@@ -48,7 +48,7 @@ struct dmap {
swblk_t dm_alloc; /* amount of physical swap space allocated */
swblk_t dm_map[NDMAP]; /* first disk block number in each chunk */
};
-#ifdef KERNEL
+#ifdef _KERNEL
extern struct dmap zdmap;
extern int dmmin, dmmax, dmtext;
#endif
diff --git a/sys/sys/domain.h b/sys/sys/domain.h
index 3b7f14c37aac..c921c04d69b4 100644
--- a/sys/sys/domain.h
+++ b/sys/sys/domain.h
@@ -63,7 +63,7 @@ struct domain {
int dom_maxrtkey; /* for routing layer */
};
-#ifdef KERNEL
+#ifdef _KERNEL
extern struct domain *domains;
extern struct domain localdomain;
extern void net_add_domain(void *);
diff --git a/sys/sys/errno.h b/sys/sys/errno.h
index c25b6afef90d..b8ba98a797d0 100644
--- a/sys/sys/errno.h
+++ b/sys/sys/errno.h
@@ -42,7 +42,7 @@
#ifndef _SYS_ERRNO_H_
#define _SYS_ERRNO_H_
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/cdefs.h>
__BEGIN_DECLS
int * __error __P((void));
@@ -170,7 +170,7 @@ __END_DECLS
#endif /* _POSIX_SOURCE */
-#ifdef KERNEL
+#ifdef _KERNEL
/* pseudo-errors returned inside kernel to modify return to process */
#define ERESTART (-1) /* restart syscall */
#define EJUSTRETURN (-2) /* don't modify regs, just return */
diff --git a/sys/sys/exec.h b/sys/sys/exec.h
index d58fbe89ac4d..58e1c652a410 100644
--- a/sys/sys/exec.h
+++ b/sys/sys/exec.h
@@ -72,7 +72,7 @@ struct execsw {
#include <machine/exec.h>
-#ifdef KERNEL
+#ifdef _KERNEL
#include <sys/cdefs.h>
int exec_map_first_page __P((struct image_params *));
diff --git a/sys/sys/extattr.h b/sys/sys/extattr.h
index d81be11bd756..617214543768 100644
--- a/sys/sys/extattr.h
+++ b/sys/sys/extattr.h
@@ -44,7 +44,7 @@
#define EXTATTR_MAXNAMELEN NAME_MAX
-#ifndef KERNEL
+#ifndef _KERNEL
int extattrctl(char *path, int cmd, char *attrname, caddr_t arg);
int extattr_set_file(char *path, char *attrname, struct iovec *iovp,
@@ -53,5 +53,5 @@ int extattr_get_file(char *path, char *attrname, struct iovec *iovp,
u_int iovcnt);
int extattr_delete_file(char *path, char *attrname);
-#endif /* KERNEL */
+#endif
#endif /* _SYS_EXTATTR_H_ */
diff --git a/sys/sys/fbio.h b/sys/sys/fbio.h
index b2413ead61ed..f6a969988f4a 100644
--- a/sys/sys/fbio.h
+++ b/sys/sys/fbio.h
@@ -42,7 +42,7 @@
#ifndef _SYS_FBIO_H_
#define _SYS_FBIO_H_
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/types.h>
#endif
#include <sys/ioccom.h>
diff --git a/sys/sys/fcntl.h b/sys/sys/fcntl.h
index b81f904daaba..d5b29e656f23 100644
--- a/sys/sys/fcntl.h
+++ b/sys/sys/fcntl.h
@@ -48,7 +48,7 @@
* related kernel definitions.
*/
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/types.h>
#endif
@@ -70,7 +70,7 @@
* independently testable: 1 greater than the above.
*
* XXX
- * FREAD and FWRITE are excluded from the #ifdef KERNEL so that TIOCFLUSH,
+ * FREAD and FWRITE are excluded from the #ifdef _KERNEL so that TIOCFLUSH,
* which was documented to use FREAD/FWRITE, continues to work.
*/
#ifndef _POSIX_SOURCE
@@ -89,7 +89,7 @@
#define O_CREAT 0x0200 /* create if nonexistent */
#define O_TRUNC 0x0400 /* truncate to zero length */
#define O_EXCL 0x0800 /* error if already exists */
-#ifdef KERNEL
+#ifdef _KERNEL
#define FMARK 0x1000 /* mark during gc() */
#define FDEFER 0x2000 /* defer for next gc pass */
#define FHASLOCK 0x4000 /* descriptor holds advisory lock */
@@ -98,7 +98,7 @@
/* Defined by POSIX 1003.1; BSD default, but must be distinct from O_RDONLY. */
#define O_NOCTTY 0x8000 /* don't assign controlling terminal */
-#ifdef KERNEL
+#ifdef _KERNEL
/* convert from open() flags to/from fflags; convert O_RD/WR to FREAD/FWRITE */
#define FFLAGS(oflags) ((oflags) + 1)
#define OFLAGS(fflags) ((fflags) - 1)
@@ -148,7 +148,7 @@
#define F_RDLCK 1 /* shared or read lock */
#define F_UNLCK 2 /* unlock */
#define F_WRLCK 3 /* exclusive or write lock */
-#ifdef KERNEL
+#ifdef _KERNEL
#define F_WAIT 0x010 /* Wait until lock is granted */
#define F_FLOCK 0x020 /* Use flock(2) semantics for lock */
#define F_POSIX 0x040 /* Use POSIX semantics for lock */
@@ -176,7 +176,7 @@ struct flock {
#endif
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/cdefs.h>
__BEGIN_DECLS
diff --git a/sys/sys/fdcio.h b/sys/sys/fdcio.h
index 3b4da37da238..92724df1356e 100644
--- a/sys/sys/fdcio.h
+++ b/sys/sys/fdcio.h
@@ -30,7 +30,7 @@
#ifndef _MACHINE_IOCTL_FD_H_
#define _MACHINE_IOCTL_FD_H_
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/types.h>
#endif
#include <sys/ioccom.h>
diff --git a/sys/sys/file.h b/sys/sys/file.h
index 014a2931b673..9ed6ac4827e7 100644
--- a/sys/sys/file.h
+++ b/sys/sys/file.h
@@ -37,12 +37,12 @@
#ifndef _SYS_FILE_H_
#define _SYS_FILE_H_
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/fcntl.h>
#include <sys/unistd.h>
#endif
-#ifdef KERNEL
+#ifdef _KERNEL
#include <sys/queue.h>
struct stat;
@@ -211,6 +211,6 @@ fo_close(fp, p)
return ((*fp->f_ops->fo_close)(fp, p));
}
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !SYS_FILE_H */
diff --git a/sys/sys/filedesc.h b/sys/sys/filedesc.h
index d27611209517..d383c1fde090 100644
--- a/sys/sys/filedesc.h
+++ b/sys/sys/filedesc.h
@@ -118,7 +118,7 @@ struct sigio {
SLIST_HEAD(sigiolst, sigio);
-#ifdef KERNEL
+#ifdef _KERNEL
/*
* Kernel global variables and routines.
*/
diff --git a/sys/sys/imgact.h b/sys/sys/imgact.h
index 83ed79c34999..9cb2e3580554 100644
--- a/sys/sys/imgact.h
+++ b/sys/sys/imgact.h
@@ -58,7 +58,7 @@ struct image_params {
unsigned long ps_strings; /* PS_STRINGS for BSD/OS binaries */
};
-#ifdef KERNEL
+#ifdef _KERNEL
int exec_check_permissions __P((struct image_params *));
int exec_extract_strings __P((struct image_params *));
int exec_new_vmspace __P((struct image_params *));
diff --git a/sys/sys/imgact_aout.h b/sys/sys/imgact_aout.h
index 6f7cd0cb024e..ed276c63cff6 100644
--- a/sys/sys/imgact_aout.h
+++ b/sys/sys/imgact_aout.h
@@ -147,10 +147,10 @@ struct exec {
#define EX_DYNAMIC 0x20 /* contains run-time link-edit info */
#define EX_DPMASK 0x30 /* mask for the above */
-#ifdef KERNEL
+#ifdef _KERNEL
struct proc;
int aout_coredump __P((struct proc *p, struct vnode *vp, off_t limit));
-#endif /* KERNEL */
+#endif
#endif /* !_IMGACT_AOUT_H_ */
diff --git a/sys/sys/imgact_elf.h b/sys/sys/imgact_elf.h
index 3c6e7ec96c31..065d5b592fb5 100644
--- a/sys/sys/imgact_elf.h
+++ b/sys/sys/imgact_elf.h
@@ -33,7 +33,7 @@
#include <machine/elf.h>
-#ifdef KERNEL
+#ifdef _KERNEL
#define AUXARGS_ENTRY(pos, id, val) {suword(pos++, id); suword(pos++, val);}
@@ -105,6 +105,6 @@ struct proc;
int elf_coredump __P((struct proc *, struct vnode *, off_t));
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_SYS_IMGACT_ELF_H_ */
diff --git a/sys/sys/inflate.h b/sys/sys/inflate.h
index 8b1e95de1958..05ccf17f7c88 100644
--- a/sys/sys/inflate.h
+++ b/sys/sys/inflate.h
@@ -12,7 +12,7 @@
#ifndef _SYS_INFLATE_H_
#define _SYS_INFLATE_H_
-#if defined(KERNEL) || defined(KZIP)
+#if defined(_KERNEL) || defined(KZIP)
#define GZ_EOF -1
@@ -48,6 +48,6 @@ struct inflate {
int inflate __P((struct inflate *));
-#endif /* KERNEL || KZIP */
+#endif /* _KERNEL || KZIP */
#endif /* ! _SYS_INFLATE_H_ */
diff --git a/sys/sys/ioccom.h b/sys/sys/ioccom.h
index 3dc3c1e0164a..7e6fbde52245 100644
--- a/sys/sys/ioccom.h
+++ b/sys/sys/ioccom.h
@@ -62,7 +62,7 @@
/* this should be _IORW, but stdio got there first */
#define _IOWR(g,n,t) _IOC(IOC_INOUT, (g), (n), sizeof(t))
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/cdefs.h>
@@ -70,6 +70,6 @@ __BEGIN_DECLS
int ioctl __P((int, unsigned long, ...));
__END_DECLS
-#endif /* !KERNEL */
+#endif
#endif /* !_SYS_IOCCOM_H_ */
diff --git a/sys/sys/ioctl.h b/sys/sys/ioctl.h
index 11a22c60434e..4888df72f876 100644
--- a/sys/sys/ioctl.h
+++ b/sys/sys/ioctl.h
@@ -42,7 +42,7 @@
#ifndef _SYS_IOCTL_H_
#define _SYS_IOCTL_H_
-#ifdef KERNEL
+#ifdef _KERNEL
#warning "Don't #include ioctl.h in the kernel. Include xxxio.h instead."
#endif
diff --git a/sys/sys/ioctl_meteor.h b/sys/sys/ioctl_meteor.h
index 919100f8d534..f62d392ea0ae 100644
--- a/sys/sys/ioctl_meteor.h
+++ b/sys/sys/ioctl_meteor.h
@@ -27,6 +27,8 @@
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
+ *
+ * $FreeBSD$
*/
/*
* ioctl constants for Matrox Meteor Capture card.
@@ -35,7 +37,7 @@
#ifndef _MACHINE_IOCTL_METEOR_H_
#define _MACHINE_IOCTL_METEOR_H_
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/types.h>
#endif
#include <sys/ioccom.h>
diff --git a/sys/sys/ipc.h b/sys/sys/ipc.h
index d81c5bc9d118..38892e967202 100644
--- a/sys/sys/ipc.h
+++ b/sys/sys/ipc.h
@@ -76,7 +76,7 @@ struct ipc_perm {
#define IPC_SET 1 /* set options */
#define IPC_STAT 2 /* get options */
-#ifdef KERNEL
+#ifdef _KERNEL
/* Macros to convert between ipc ids and array indices or sequence ids */
#define IPCID_TO_IX(id) ((id) & 0xffff)
#define IPCID_TO_SEQ(id) (((id) >> 16) & 0xffff)
@@ -85,7 +85,7 @@ struct ipc_perm {
struct proc;
int ipcperm __P((struct proc *, struct ipc_perm *, int));
-#else /* ! KERNEL */
+#else /* ! _KERNEL */
/* XXX doesn't really belong here, but has been historical practice in SysV. */
@@ -95,6 +95,6 @@ __BEGIN_DECLS
key_t ftok __P((const char *, int));
__END_DECLS
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_SYS_IPC_H_ */
diff --git a/sys/sys/jail.h b/sys/sys/jail.h
index 87809673357b..7fa6dd0720ab 100644
--- a/sys/sys/jail.h
+++ b/sys/sys/jail.h
@@ -20,11 +20,11 @@ struct jail {
u_int32_t ip_number;
};
-#ifndef KERNEL
+#ifndef _KERNEL
int jail __P((struct jail *));
-#else /* KERNEL */
+#else /* _KERNEL */
#ifdef MALLOC_DECLARE
MALLOC_DECLARE(M_PRISON);
@@ -43,5 +43,5 @@ struct prison {
void *pr_linux;
};
-#endif /* !KERNEL */
+#endif /* !_KERNEL */
#endif /* !_SYS_JAIL_H_ */
diff --git a/sys/sys/kbio.h b/sys/sys/kbio.h
index a6f2b4886ac0..456173e4713e 100644
--- a/sys/sys/kbio.h
+++ b/sys/sys/kbio.h
@@ -5,7 +5,7 @@
#ifndef _SYS_KBIO_H_
#define _SYS_KBIO_H_
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/types.h>
#endif
#include <sys/ioccom.h>
diff --git a/sys/sys/kernel.h b/sys/sys/kernel.h
index 1dbc2159651b..eac0fe7d9d8b 100644
--- a/sys/sys/kernel.h
+++ b/sys/sys/kernel.h
@@ -47,7 +47,7 @@
#include <sys/linker_set.h>
-#ifdef KERNEL
+#ifdef _KERNEL
/* for intrhook below */
#include <sys/queue.h>
@@ -78,7 +78,7 @@ extern int lbolt; /* once a second sleep address */
extern int tickdelta;
extern long timedelta;
-#endif /* KERNEL */
+#endif /* _KERNEL */
/*
* Enumerated types for known system startup interfaces.
diff --git a/sys/sys/ktrace.h b/sys/sys/ktrace.h
index dc3e120ed1bc..5383fc409a24 100644
--- a/sys/sys/ktrace.h
+++ b/sys/sys/ktrace.h
@@ -156,7 +156,7 @@ struct ktr_csw {
#define KTRFAC_INHERIT 0x40000000 /* pass trace flags to children */
#define KTRFAC_ACTIVE 0x20000000 /* ktrace logging in progress, ignore */
-#ifdef KERNEL
+#ifdef _KERNEL
void ktrnamei __P((struct vnode *,char *));
void ktrcsw __P((struct vnode *,int,int));
void ktrpsig __P((struct vnode *, int, sig_t, sigset_t *, int));
@@ -164,7 +164,7 @@ void ktrgenio __P((struct vnode *,int, enum uio_rw,struct iovec *,int,int));
void ktrsyscall __P((struct vnode *, int, int narg, register_t args[]));
void ktrsysret __P((struct vnode *, int, int, register_t));
-#else /* KERNEL */
+#else
#include <sys/cdefs.h>
@@ -173,6 +173,6 @@ int ktrace __P((const char *, int, int, pid_t));
int utrace __P((const void *, size_t));
__END_DECLS
-#endif /* !KERNEL */
+#endif
#endif
diff --git a/sys/sys/linedisc.h b/sys/sys/linedisc.h
index e192b7cd86ca..f4f611277453 100644
--- a/sys/sys/linedisc.h
+++ b/sys/sys/linedisc.h
@@ -191,7 +191,7 @@ struct linesw {
u_char l_hotchar;
};
-#ifdef KERNEL
+#ifdef _KERNEL
extern struct linesw linesw[];
extern int nlinesw;
@@ -214,7 +214,7 @@ struct swdevt {
#define SW_SEQUENTIAL 0x02
#define sw_freed sw_flags /* XXX compat */
-#ifdef KERNEL
+#ifdef _KERNEL
d_open_t noopen;
d_close_t noclose;
d_read_t noread;
@@ -285,6 +285,6 @@ extern devfs_create_t *devfs_create_hook;
#define GID_GAMES 13
#define GID_DIALER 68
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_SYS_CONF_H_ */
diff --git a/sys/sys/linker.h b/sys/sys/linker.h
index 407aba14f8d1..8a1446f922da 100644
--- a/sys/sys/linker.h
+++ b/sys/sys/linker.h
@@ -29,7 +29,7 @@
#ifndef _SYS_LINKER_H_
#define _SYS_LINKER_H_
-#ifdef KERNEL
+#ifdef _KERNEL
#include <machine/elf.h>
@@ -198,7 +198,7 @@ int linker_ddb_search_symbol(caddr_t value, c_linker_sym_t *sym, long *diffp);
int linker_ddb_symbol_values(c_linker_sym_t sym, linker_symval_t *symval);
-#endif /* KERNEL */
+#endif /* _KERNEL */
/*
* Module information subtypes
@@ -221,7 +221,7 @@ int linker_ddb_symbol_values(c_linker_sym_t sym, linker_symval_t *symval);
#define MODINFOMD_DEPLIST (0x4001 | MODINFOMD_NOCOPY) /* depends on */
-#ifdef KERNEL
+#ifdef _KERNEL
/*
* Module lookup
@@ -257,7 +257,7 @@ int elf_reloc(linker_file_t lf, const void *rel, int type, const char *sym);
#define ELF_RELOC_REL 1
#define ELF_RELOC_RELA 2
-#endif /* KERNEL */
+#endif /* _KERNEL */
struct kld_file_stat {
int version; /* set to sizeof(linker_file_stat) */
@@ -276,7 +276,7 @@ struct kld_sym_lookup {
};
#define KLDSYM_LOOKUP 1
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/cdefs.h>
diff --git a/sys/sys/malloc.h b/sys/sys/malloc.h
index f0e62ec15969..ba85d9ca54b5 100644
--- a/sys/sys/malloc.h
+++ b/sys/sys/malloc.h
@@ -65,7 +65,7 @@ struct malloc_type {
u_short ks_mapblocks; /* number of times blocked for kernel map */
};
-#ifdef KERNEL
+#ifdef _KERNEL
#define MALLOC_DEFINE(type, shortdesc, longdesc) \
struct malloc_type type[1] = { \
{ NULL, 0, 0, 0, 0, 0, 0, M_MAGIC, shortdesc, 0, 0 } \
@@ -82,7 +82,7 @@ MALLOC_DECLARE(M_TEMP);
MALLOC_DECLARE(M_IP6OPT); /* for INET6 */
MALLOC_DECLARE(M_IP6NDP); /* for INET6 */
-#endif /* KERNEL */
+#endif /* _KERNEL */
/*
* Array of descriptors that describe the contents of each page
@@ -111,7 +111,7 @@ struct kmembuckets {
long kb_couldfree; /* over high water mark and could free */
};
-#ifdef KERNEL
+#ifdef _KERNEL
#define MINALLOCSIZE (1 << MINBUCKET)
#define BUCKETINDX(size) \
((size) <= (MINALLOCSIZE * 128) \
@@ -214,6 +214,6 @@ void free __P((void *addr, struct malloc_type *type));
void *malloc __P((unsigned long size, struct malloc_type *type, int flags));
void malloc_init __P((void *));
void malloc_uninit __P((void *));
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_SYS_MALLOC_H_ */
diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h
index f06be8f7bf7f..20ea44ce8122 100644
--- a/sys/sys/mbuf.h
+++ b/sys/sys/mbuf.h
@@ -497,7 +497,7 @@ union mcluster {
/* compatibility with 4.3 */
#define m_copy(m, o, l) m_copym((m), (o), (l), M_DONTWAIT)
-#ifdef KERNEL
+#ifdef _KERNEL
extern u_int m_clalloc_wid; /* mbuf cluster wait count */
extern u_int m_mballoc_wid; /* mbuf wait count */
extern int max_linkhdr; /* largest link-level header */
@@ -538,6 +538,6 @@ struct mbuf *m_pullup __P((struct mbuf *, int));
struct mbuf *m_retry __P((int, int));
struct mbuf *m_retryhdr __P((int, int));
struct mbuf *m_split __P((struct mbuf *,int,int));
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_SYS_MBUF_H_ */
diff --git a/sys/sys/md5.h b/sys/sys/md5.h
index a69f79099560..48b30ab693c7 100644
--- a/sys/sys/md5.h
+++ b/sys/sys/md5.h
@@ -43,7 +43,7 @@ void MD5Final (unsigned char [16], MD5_CTX *);
char * MD5End(MD5_CTX *, char *);
char * MD5File(const char *, char *);
char * MD5Data(const unsigned char *, unsigned int, char *);
-#ifdef KERNEL
+#ifdef _KERNEL
void MD5Transform __P((u_int32_t [4], const unsigned char [64]));
#endif
__END_DECLS
diff --git a/sys/sys/memrange.h b/sys/sys/memrange.h
index 363a5f09904c..36e354df49c7 100644
--- a/sys/sys/memrange.h
+++ b/sys/sys/memrange.h
@@ -1,5 +1,7 @@
/*
* Memory range attribute operations, peformed on /dev/mem
+ *
+ * $FreeBSD$
*/
/* Memory range attributes */
@@ -38,7 +40,7 @@ struct mem_range_op
#define MEMRANGE_GET _IOWR('m', 50, struct mem_range_op)
#define MEMRANGE_SET _IOW('m', 51, struct mem_range_op)
-#ifdef KERNEL
+#ifdef _KERNEL
MALLOC_DECLARE(M_MEMDESC);
diff --git a/sys/sys/mman.h b/sys/sys/mman.h
index 80ac51bd24fe..0ff4dff42b76 100644
--- a/sys/sys/mman.h
+++ b/sys/sys/mman.h
@@ -116,7 +116,7 @@
#define MINCORE_REFERENCED_OTHER 0x8 /* Page has been referenced */
#define MINCORE_MODIFIED_OTHER 0x10 /* Page has been modified */
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/cdefs.h>
@@ -143,6 +143,6 @@ int minherit __P((void *, size_t, int));
#endif
__END_DECLS
-#endif /* !KERNEL */
+#endif /* !_KERNEL */
#endif
diff --git a/sys/sys/module.h b/sys/sys/module.h
index d95ae14db65c..800f45aa4195 100644
--- a/sys/sys/module.h
+++ b/sys/sys/module.h
@@ -60,7 +60,7 @@ typedef union modspecific {
u_long ulongval;
} modspecific_t;
-#ifdef KERNEL
+#ifdef _KERNEL
#define DECLARE_MODULE(name, data, sub, order) \
SYSINIT(name##module, sub, order, module_register_init, &data) \
@@ -94,7 +94,7 @@ extern int mod_debug;
#endif
-#endif /* KERNEL */
+#endif /* _KERNEL */
#define MAXMODNAME 32
@@ -106,7 +106,7 @@ struct module_stat {
modspecific_t data;
};
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/cdefs.h>
diff --git a/sys/sys/mount.h b/sys/sys/mount.h
index 51743e90295d..49924236fb16 100644
--- a/sys/sys/mount.h
+++ b/sys/sys/mount.h
@@ -39,11 +39,11 @@
#include <sys/ucred.h>
-#ifndef KERNEL
+#ifndef _KERNEL
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#include <sys/stat.h>
#endif /* !_POSIX_C_SOURCE */
-#endif /* !KERNEL */
+#endif /* !_KERNEL */
#include <sys/queue.h>
#include <sys/lock.h>
@@ -291,7 +291,7 @@ struct ovfsconf {
#define VFCF_LOOPBACK 0x00100000 /* aliases some other mounted FS */
#define VFCF_UNICODE 0x00200000 /* stores file names as Unicode*/
-#ifdef KERNEL
+#ifdef _KERNEL
#ifdef MALLOC_DECLARE
MALLOC_DECLARE(M_MOUNT);
@@ -447,7 +447,7 @@ int vfs_stduninit __P((struct vfsconf *));
int vfs_stdextattrctl __P((struct mount *mp, int cmd, char *attrname,
caddr_t arg, struct proc *p));
-#else /* !KERNEL */
+#else /* !_KERNEL */
#include <sys/cdefs.h>
@@ -475,6 +475,6 @@ int vfsisloadable __P((const char *));
int vfsload __P((const char *));
__END_DECLS
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_SYS_MOUNT_H_ */
diff --git a/sys/sys/msg.h b/sys/sys/msg.h
index 3dd70f1bc89d..bb63f9259c2b 100644
--- a/sys/sys/msg.h
+++ b/sys/sys/msg.h
@@ -92,7 +92,7 @@ struct msginfo {
msgssz, /* size of a message segment (see notes above) */
msgseg; /* number of message segments */
};
-#ifdef KERNEL
+#ifdef _KERNEL
extern struct msginfo msginfo;
#ifndef MSGSSZ
@@ -141,9 +141,9 @@ extern struct msqid_ds *msqids; /* MSGMNI msqid_ds struct's */
#define MSG_LOCKED 01000 /* Is this msqid_ds locked? */
-#endif /* KERNEL */
+#endif /* _KERNEL */
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/cdefs.h>
__BEGIN_DECLS
@@ -153,6 +153,6 @@ int msgget __P((key_t, int));
int msgsnd __P((int, void *, size_t, int));
int msgrcv __P((int, void*, size_t, long, int));
__END_DECLS
-#endif /* !KERNEL */
+#endif
#endif /* !_SYS_MSG_H_ */
diff --git a/sys/sys/msgbuf.h b/sys/sys/msgbuf.h
index aa7df03e7915..cdab88457ddd 100644
--- a/sys/sys/msgbuf.h
+++ b/sys/sys/msgbuf.h
@@ -46,7 +46,7 @@ struct msgbuf {
char * msg_ptr; /* pointer to buffer */
};
-#ifdef KERNEL
+#ifdef _KERNEL
extern int msgbufmapped;
extern struct msgbuf *msgbufp;
void msgbufinit __P((void *ptr, size_t size));
diff --git a/sys/sys/mtio.h b/sys/sys/mtio.h
index 30b8b993819e..e41a28246fd5 100644
--- a/sys/sys/mtio.h
+++ b/sys/sys/mtio.h
@@ -37,7 +37,7 @@
#ifndef _SYS_MTIO_H_
#define _SYS_MTIO_H_
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/types.h>
#endif
#include <sys/ioccom.h>
@@ -224,11 +224,11 @@ union mterrstat {
/* Get current EOT model */
#define MTIOCGETEOTMODEL _IOR('m', 8, u_int32_t)
-#ifndef KERNEL
+#ifndef _KERNEL
#define DEFTAPE "/dev/nrsa0"
#endif
-#ifdef KERNEL
+#ifdef _KERNEL
/*
* minor device number
*/
diff --git a/sys/sys/namei.h b/sys/sys/namei.h
index 29e35e1ab287..e42f8a1517cd 100644
--- a/sys/sys/namei.h
+++ b/sys/sys/namei.h
@@ -93,7 +93,7 @@ struct nameidata {
} ni_cnd;
};
-#ifdef KERNEL
+#ifdef _KERNEL
/*
* namei operations
*/
@@ -206,7 +206,7 @@ NDINIT(ndp, op, flags, segflg, namep, p)
#endif
-#ifdef KERNEL
+#ifdef _KERNEL
int namei __P((struct nameidata *ndp));
int lookup __P((struct nameidata *ndp));
diff --git a/sys/sys/param.h b/sys/sys/param.h
index 6834ac040cbf..a49fcc0885ac 100644
--- a/sys/sys/param.h
+++ b/sys/sys/param.h
@@ -76,7 +76,7 @@
#define MAXHOSTNAMELEN 256 /* max hostname size */
/* More types and definitions used throughout the kernel. */
-#ifdef KERNEL
+#ifdef _KERNEL
#include <sys/cdefs.h>
#include <sys/errno.h>
#include <sys/time.h>
@@ -85,14 +85,14 @@
#define TRUE 1
#endif
-#ifndef KERNEL
+#ifndef _KERNEL
/* Signals. */
#include <sys/signal.h>
#endif
/* Machine type dependent parameters. */
#include <machine/param.h>
-#ifndef KERNEL
+#ifndef _KERNEL
#include <machine/limits.h>
#endif
@@ -122,7 +122,7 @@
#define NBPW sizeof(int) /* number of bytes per word (integer) */
#define CMASK 022 /* default file mask: S_IWGRP|S_IWOTH */
-#ifdef KERNEL
+#ifdef _KERNEL
#define NODEV (dev_t)(-1) /* non-existent device */
#define NOUDEV (udev_t)(-1) /* non-existent device */
#define NOMAJ 256 /* non-existent device */
@@ -192,7 +192,7 @@
#define powerof2(x) ((((x)-1)&(x))==0)
/* Macros for min/max. */
-#ifndef KERNEL
+#ifndef _KERNEL
#define MIN(a,b) (((a)<(b))?(a):(b))
#define MAX(a,b) (((a)>(b))?(a):(b))
#endif
@@ -244,7 +244,7 @@
* Make this available for most of the kernel. There were too many
* things that included sys/systm.h just for panic().
*/
-#ifdef KERNEL
+#ifdef _KERNEL
void panic __P((const char *, ...)) __dead2 __printflike(1, 2);
#endif
diff --git a/sys/sys/pipe.h b/sys/sys/pipe.h
index 548e782a42e9..7dec8286246e 100644
--- a/sys/sys/pipe.h
+++ b/sys/sys/pipe.h
@@ -24,7 +24,7 @@
#ifndef _SYS_PIPE_H_
#define _SYS_PIPE_H_
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/time.h> /* for struct timespec */
#include <sys/select.h> /* for struct selinfo */
#include <vm/vm.h> /* for vm_page_t */
diff --git a/sys/sys/poll.h b/sys/sys/poll.h
index 7620a39bd512..a2ba6de38940 100644
--- a/sys/sys/poll.h
+++ b/sys/sys/poll.h
@@ -89,7 +89,7 @@ struct pollfd {
*/
#define INFTIM (-1)
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/cdefs.h>
@@ -103,6 +103,6 @@ __BEGIN_DECLS
int poll __P((struct pollfd *_pfd, unsigned _nfds, int _timeout));
__END_DECLS
-#endif /* !KERNEL */
+#endif /* !_KERNEL */
#endif /* !_SYS_POLL_H_ */
diff --git a/sys/sys/proc.h b/sys/sys/proc.h
index 400855c87379..f6af6d91b664 100644
--- a/sys/sys/proc.h
+++ b/sys/sys/proc.h
@@ -48,7 +48,7 @@
#include <sys/queue.h>
#include <sys/rtprio.h> /* For struct rtprio. */
#include <sys/signal.h>
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/time.h> /* For structs itimerval, timeval. */
#endif
#include <sys/ucred.h>
@@ -304,7 +304,7 @@ struct pcred {
};
-#ifdef KERNEL
+#ifdef _KERNEL
#ifdef MALLOC_DECLARE
MALLOC_DECLARE(M_SESSION);
@@ -440,6 +440,6 @@ void faultin __P((struct proc *p));
struct proc * chooseproc __P((void));
u_int32_t procrunnable __P((void));
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_SYS_PROC_H_ */
diff --git a/sys/sys/protosw.h b/sys/sys/protosw.h
index 15f6e13aef55..5f23fa3f9626 100644
--- a/sys/sys/protosw.h
+++ b/sys/sys/protosw.h
@@ -44,7 +44,7 @@ struct sockaddr;
struct socket;
struct sockopt;
-/*#ifdef KERNEL*/
+/*#ifdef _KERNEL*/
/*
* Protocol switch table.
*
@@ -165,7 +165,7 @@ char *prurequests[] = {
};
#endif
-#ifdef KERNEL /* users shouldn't see this decl */
+#ifdef _KERNEL /* users shouldn't see this decl */
struct ifnet;
struct stat;
@@ -240,7 +240,7 @@ int pru_rcvd_notsupp __P((struct socket *so, int flags));
int pru_rcvoob_notsupp __P((struct socket *so, struct mbuf *m, int flags));
int pru_sense_null __P((struct socket *so, struct stat *sb));
-#endif /* KERNEL */
+#endif /* _KERNEL */
/*
* The arguments to the ctlinput routine are
@@ -310,7 +310,7 @@ char *prcorequests[] = {
};
#endif
-#ifdef KERNEL
+#ifdef _KERNEL
void pfctlinput __P((int, struct sockaddr *));
struct protosw *pffindproto __P((int family, int protocol, int type));
struct protosw *pffindtype __P((int family, int type));
diff --git a/sys/sys/ptrace.h b/sys/sys/ptrace.h
index f7f77edeec81..62c2d676bde7 100644
--- a/sys/sys/ptrace.h
+++ b/sys/sys/ptrace.h
@@ -54,12 +54,12 @@
#define PT_FIRSTMACH 32 /* for machine-specific requests */
#include <machine/ptrace.h> /* machine-specific requests, if any */
-#ifdef KERNEL
+#ifdef _KERNEL
void proc_reparent __P((struct proc *child, struct proc *newparent));
int ptrace_set_pc __P((struct proc *p, unsigned long addr));
int ptrace_single_step __P((struct proc *p));
int ptrace_write_u __P((struct proc *p, vm_offset_t off, long data));
-#else /* !KERNEL */
+#else /* !_KERNEL */
#include <sys/cdefs.h>
@@ -67,6 +67,6 @@ __BEGIN_DECLS
int ptrace __P((int _request, pid_t _pid, caddr_t _addr, int _data));
__END_DECLS
-#endif /* !KERNEL */
+#endif /* !_KERNEL */
#endif /* !_SYS_PTRACE_H_ */
diff --git a/sys/sys/queue.h b/sys/sys/queue.h
index be4c8b7e7b54..dbaaa00d6809 100644
--- a/sys/sys/queue.h
+++ b/sys/sys/queue.h
@@ -481,7 +481,7 @@ struct { \
(elm)->field.cqe_next; \
} while (0)
-#ifdef KERNEL
+#ifdef _KERNEL
/*
* XXX insque() and remque() are an old way of handling certain queues.
@@ -523,6 +523,6 @@ void remque __P((void *a));
#endif /* __GNUC__ */
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_SYS_QUEUE_H_ */
diff --git a/sys/sys/random.h b/sys/sys/random.h
index e084f8111d1e..5a3cbe247f23 100644
--- a/sys/sys/random.h
+++ b/sys/sys/random.h
@@ -56,7 +56,7 @@
#define MEM_CLEARIRQ _IOW('r', 2, u_int16_t) /* clear interrupt */
#define MEM_RETURNIRQ _IOR('r', 3, u_int16_t) /* return interrupt */
-#ifdef KERNEL
+#ifdef _KERNEL
/* Type of the cookie passed to add_interrupt_randomness. */
@@ -85,6 +85,6 @@ u_int write_random(const char *buf, u_int nbytes);
#endif
int random_poll(dev_t dev, int events, struct proc *p);
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_MACHINE_RANDOM_H_ */
diff --git a/sys/sys/resource.h b/sys/sys/resource.h
index 5b8491e2fefa..a1220c00a7f9 100644
--- a/sys/sys/resource.h
+++ b/sys/sys/resource.h
@@ -129,7 +129,7 @@ struct loadavg {
long fscale;
};
-#ifdef KERNEL
+#ifdef _KERNEL
extern struct loadavg averunnable;
#else
@@ -143,5 +143,5 @@ int setpriority __P((int, int, int));
int setrlimit __P((int, const struct rlimit *));
__END_DECLS
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_SYS_RESOURCE_H_ */
diff --git a/sys/sys/resourcevar.h b/sys/sys/resourcevar.h
index eca8e47d968e..92ed5bf687bd 100644
--- a/sys/sys/resourcevar.h
+++ b/sys/sys/resourcevar.h
@@ -83,7 +83,7 @@ struct plimit {
rlim_t p_cpulimit; /* current cpu limit in usec */
};
-#ifdef KERNEL
+#ifdef _KERNEL
struct proc;
void addupc_intr __P((struct proc *p, u_long pc, u_int ticks));
diff --git a/sys/sys/rman.h b/sys/sys/rman.h
index 6283f315ce1e..0e59f75fced4 100644
--- a/sys/sys/rman.h
+++ b/sys/sys/rman.h
@@ -32,9 +32,9 @@
#ifndef _SYS_RMAN_H_
#define _SYS_RMAN_H_ 1
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/queue.h>
-#endif /* !KERNEL */
+#endif
/*
* We use a linked list rather than a bitmap because we need to be able to
@@ -77,7 +77,7 @@ struct rman {
};
TAILQ_HEAD(rman_head, rman);
-#ifdef KERNEL
+#ifdef _KERNEL
int rman_activate_resource(struct resource *r);
int rman_await_resource(struct resource *r, int pri, int timo);
@@ -101,6 +101,6 @@ struct resource *rman_reserve_resource(struct rman *rm, u_long start,
#define rman_get_bushandle(r) ((r)->r_bushandle)
extern struct rman_head rman_head;
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_SYS_RMAN_H_ */
diff --git a/sys/sys/rtprio.h b/sys/sys/rtprio.h
index 5d115f5693db..5178b0e4ea69 100644
--- a/sys/sys/rtprio.h
+++ b/sys/sys/rtprio.h
@@ -70,11 +70,11 @@ struct rtprio {
};
#endif
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/cdefs.h>
__BEGIN_DECLS
int rtprio __P((int, pid_t, struct rtprio *));
__END_DECLS
-#endif /* !KERNEL */
+#endif /* !_KERNEL */
#endif /* !_SYS_RTPRIO_H_ */
diff --git a/sys/sys/select.h b/sys/sys/select.h
index 89e7f9adcbbc..8f58d858ba07 100644
--- a/sys/sys/select.h
+++ b/sys/sys/select.h
@@ -47,7 +47,7 @@ struct selinfo {
};
#define SI_COLL 0x0001 /* collision occurred */
-#ifdef KERNEL
+#ifdef _KERNEL
struct proc;
void selrecord __P((struct proc *selector, struct selinfo *));
diff --git a/sys/sys/selinfo.h b/sys/sys/selinfo.h
index 89e7f9adcbbc..8f58d858ba07 100644
--- a/sys/sys/selinfo.h
+++ b/sys/sys/selinfo.h
@@ -47,7 +47,7 @@ struct selinfo {
};
#define SI_COLL 0x0001 /* collision occurred */
-#ifdef KERNEL
+#ifdef _KERNEL
struct proc;
void selrecord __P((struct proc *selector, struct selinfo *));
diff --git a/sys/sys/sem.h b/sys/sys/sem.h
index 798f5bb7d124..4f31ba1d23eb 100644
--- a/sys/sys/sem.h
+++ b/sys/sys/sem.h
@@ -70,7 +70,7 @@ union semun {
#define SEM_A 0200 /* alter permission */
#define SEM_R 0400 /* read permission */
-#ifdef KERNEL
+#ifdef _KERNEL
/*
* Kernel implementation stuff
*/
@@ -171,9 +171,9 @@ typedef enum {
SEM_CONFIG_FREEZE, /* Freeze the semaphore facility. */
SEM_CONFIG_THAW /* Thaw the semaphore facility. */
} semconfig_ctl_t;
-#endif /* KERNEL */
+#endif /* _KERNEL */
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/cdefs.h>
__BEGIN_DECLS
@@ -182,6 +182,6 @@ int semctl __P((int, int, int, ...));
int semget __P((key_t, int, int));
int semop __P((int, struct sembuf *,unsigned));
__END_DECLS
-#endif /* !KERNEL */
+#endif /* !_KERNEL */
#endif /* !_SEM_H_ */
diff --git a/sys/sys/shm.h b/sys/sys/shm.h
index a792f561b116..444539e4f5a1 100644
--- a/sys/sys/shm.h
+++ b/sys/sys/shm.h
@@ -63,7 +63,7 @@ struct shmid_ds {
void *shm_internal; /* sysv stupidity */
};
-#ifdef KERNEL
+#ifdef _KERNEL
/*
* System 5 style catch-all structure for shared memory constants that
@@ -83,7 +83,7 @@ struct proc;
void shmexit __P((struct proc *));
void shmfork __P((struct proc *, struct proc *));
-#else /* !KERNEL */
+#else /* !_KERNEL */
#include <sys/cdefs.h>
@@ -95,6 +95,6 @@ int shmctl __P((int, int, struct shmid_ds *));
int shmdt __P((void *));
__END_DECLS
-#endif /* !KERNEL */
+#endif /* !_KERNEL */
#endif /* !_SYS_SHM_H_ */
diff --git a/sys/sys/signal.h b/sys/sys/signal.h
index c137ec35db77..2e405a2d03cc 100644
--- a/sys/sys/signal.h
+++ b/sys/sys/signal.h
@@ -124,7 +124,7 @@ typedef void __sighandler_t __P((int));
#define SIG_IGN ((__sighandler_t *)1)
#define SIG_ERR ((__sighandler_t *)-1)
-#if defined(_P1003_1B_VISIBLE) || defined(KERNEL)
+#if defined(_P1003_1B_VISIBLE) || defined(_KERNEL)
union sigval {
/* Members as suggested by Annex C of POSIX 1003.1b. */
int sigval_int;
diff --git a/sys/sys/signalvar.h b/sys/sys/signalvar.h
index b0c7060e6359..ae825746c470 100644
--- a/sys/sys/signalvar.h
+++ b/sys/sys/signalvar.h
@@ -188,7 +188,7 @@ __sigseteq(sigset_t *set1, sigset_t *set2)
return (1);
}
-#ifdef KERNEL
+#ifdef _KERNEL
struct pgrp;
struct proc;
@@ -239,6 +239,6 @@ extern __inline int __cursig(struct proc *p)
? 0 : issignal(p));
}
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_SYS_SIGNALVAR_H_ */
diff --git a/sys/sys/smp.h b/sys/sys/smp.h
index 02f2bb85b62e..8f0a2f8a4572 100644
--- a/sys/sys/smp.h
+++ b/sys/sys/smp.h
@@ -13,7 +13,7 @@
#ifndef _MACHINE_SMP_H_
#define _MACHINE_SMP_H_
-#ifdef KERNEL
+#ifdef _KERNEL
#if defined(SMP) && !defined(APIC_IO)
# error APIC_IO required for SMP, add "options APIC_IO" to your config file.
@@ -182,5 +182,5 @@ extern volatile int smp_idle_loops;
#endif /* !LOCORE */
#endif /* SMP || APIC_IO */
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* _MACHINE_SMP_H_ */
diff --git a/sys/sys/snoop.h b/sys/sys/snoop.h
index 902df4a1990d..c252cb90e312 100644
--- a/sys/sys/snoop.h
+++ b/sys/sys/snoop.h
@@ -11,17 +11,19 @@
* This software is provided ``AS IS'' without any warranties of any kind.
*
* Snoop stuff.
+ *
+ * $FreeBSD$
*/
#ifndef _SYS_SNOOP_H_
#define _SYS_SNOOP_H_
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/types.h>
#endif
#include <sys/ioccom.h>
-#ifdef KERNEL
+#ifdef _KERNEL
#define SNOOP_MINLEN (4*1024) /* This should be power of 2.
* 4K tested to be the minimum
* for which on normal tty
@@ -58,7 +60,7 @@ struct snoop {
int snpdown __P((struct snoop *snp));
int snpin __P((struct snoop *snp, char *buf, int n));
int snpinc __P((struct snoop *snp, char c));
-#endif /* KERNEL */
+#endif /* _KERNEL */
/*
* Theese are snoop io controls
diff --git a/sys/sys/socket.h b/sys/sys/socket.h
index 7111dc62abef..5eed6952f3f1 100644
--- a/sys/sys/socket.h
+++ b/sys/sys/socket.h
@@ -414,7 +414,7 @@ struct sf_hdtr {
int trl_cnt; /* number of trailer iovec's */
};
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/cdefs.h>
@@ -442,6 +442,6 @@ int socketpair __P((int, int, int, int *));
void pfctlinput __P((int, struct sockaddr *));
__END_DECLS
-#endif /* !KERNEL */
+#endif /* !_KERNEL */
#endif /* !_SYS_SOCKET_H_ */
diff --git a/sys/sys/socketvar.h b/sys/sys/socketvar.h
index f7ff74c6e7fd..aedd69043be1 100644
--- a/sys/sys/socketvar.h
+++ b/sys/sys/socketvar.h
@@ -243,7 +243,7 @@ struct xsocket {
sowakeup((so), &(so)->so_snd); \
} while (0)
-#ifdef KERNEL
+#ifdef _KERNEL
/*
* Argument structure for sosetopt et seq. This is in the KERNEL
@@ -376,6 +376,6 @@ int soshutdown __P((struct socket *so, int how));
void sotoxsocket __P((struct socket *so, struct xsocket *xso));
void sowakeup __P((struct socket *so, struct sockbuf *sb));
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_SYS_SOCKETVAR_H_ */
diff --git a/sys/sys/soundcard.h b/sys/sys/soundcard.h
index f6f577a1cd1f..e608b3445137 100644
--- a/sys/sys/soundcard.h
+++ b/sys/sys/soundcard.h
@@ -1087,7 +1087,7 @@ typedef struct copr_msg {
*/
#define LOCL_STARTAUDIO 1
-#if (!defined(__KERNEL__) && !defined(KERNEL) && !defined(INKERNEL) && !defined(_KERNEL)) || defined(USE_SEQ_MACROS)
+#if (!defined(_KERNEL) && !defined(INKERNEL)) || defined(USE_SEQ_MACROS)
/*
* Some convenience macros to simplify programming of the
* /dev/sequencer interface
diff --git a/sys/sys/stat.h b/sys/sys/stat.h
index 14a7a50324f6..21cfbc4a023e 100644
--- a/sys/sys/stat.h
+++ b/sys/sys/stat.h
@@ -42,7 +42,7 @@
#ifndef _SYS_STAT_H_
#define _SYS_STAT_H_
-#if !defined(KERNEL) && !defined(_POSIX_SOURCE)
+#if !defined(_KERNEL) && !defined(_POSIX_SOURCE)
/*
* XXX we need this for struct timespec. We get miscellaneous namespace
* pollution with it.
@@ -50,7 +50,7 @@
#include <sys/time.h>
#endif
-#ifdef KERNEL
+#ifdef _KERNEL
#define __dev_t udev_t
#else
#define __dev_t dev_t
@@ -223,7 +223,7 @@ struct nstat {
#define SF_APPEND 0x00040000 /* writes to file may only append */
#define SF_NOUNLINK 0x00100000 /* file may not be removed or renamed */
-#ifdef KERNEL
+#ifdef _KERNEL
/*
* Shorthand abbreviations of above.
*/
@@ -235,7 +235,7 @@ struct nstat {
#endif /* !_POSIX_SOURCE */
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/cdefs.h>
__BEGIN_DECLS
@@ -255,6 +255,6 @@ int lstat __P((const char *, struct stat *));
#endif
__END_DECLS
-#endif /* !KERNEL */
+#endif /* !_KERNEL */
#endif /* !_SYS_STAT_H_ */
diff --git a/sys/sys/sysctl.h b/sys/sys/sysctl.h
index c1ef6c87bdff..d5697a6edb10 100644
--- a/sys/sys/sysctl.h
+++ b/sys/sys/sysctl.h
@@ -91,7 +91,7 @@ struct ctlname {
*/
#define OID_AUTO (-1)
-#ifdef KERNEL
+#ifdef _KERNEL
#define SYSCTL_HANDLER_ARGS (struct sysctl_oid *oidp, void *arg1, int arg2, \
struct sysctl_req *req)
@@ -193,7 +193,7 @@ void sysctl_unregister_oid(struct sysctl_oid *oidp);
#define SYSCTL_PROC(parent, nbr, name, access, ptr, arg, handler, fmt, descr) \
SYSCTL_OID(parent, nbr, name, access, \
ptr, arg, handler, fmt, descr)
-#endif /* KERNEL */
+#endif /* _KERNEL */
/*
* Top-level identifiers
@@ -468,7 +468,7 @@ void sysctl_unregister_oid(struct sysctl_oid *oidp);
{ "timer_max", CTLTYPE_INT }, \
}
-#ifdef KERNEL
+#ifdef _KERNEL
/*
* Declare some common oids.
@@ -502,13 +502,13 @@ int userland_sysctl(struct proc *p, int *name, u_int namelen, void *old,
int sysctl_find_oid(int *name, u_int namelen, struct sysctl_oid **noid,
int *nindx, struct sysctl_req *req);
-#else /* !KERNEL */
+#else /* !_KERNEL */
#include <sys/cdefs.h>
__BEGIN_DECLS
int sysctl __P((int *, u_int, void *, size_t *, void *, size_t));
int sysctlbyname __P((const char *, void *, size_t *, void *, size_t));
__END_DECLS
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_SYS_SYSCTL_H_ */
diff --git a/sys/sys/sysent.h b/sys/sys/sysent.h
index 87a5660383fb..66fe731ae66c 100644
--- a/sys/sys/sysent.h
+++ b/sys/sys/sysent.h
@@ -77,7 +77,7 @@ struct sysentvec {
/* function to dump core, or NULL */
};
-#ifdef KERNEL
+#ifdef _KERNEL
extern struct sysentvec aout_sysvec;
extern struct sysent sysent[];
@@ -110,6 +110,6 @@ int syscall_register __P((int *offset, struct sysent *new_sysent,
int syscall_deregister __P((int *offset, struct sysent *old_sysent));
int syscall_module_handler __P((struct module *mod, int what, void *arg));
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_SYS_SYSENT_H_ */
diff --git a/sys/sys/syslog.h b/sys/sys/syslog.h
index 8359101a59e8..21c16af99874 100644
--- a/sys/sys/syslog.h
+++ b/sys/sys/syslog.h
@@ -152,7 +152,7 @@ CODE facilitynames[] = {
};
#endif
-#ifdef KERNEL
+#ifdef _KERNEL
#define LOG_PRINTF -1 /* pseudo-priority to indicate use of printf */
#endif
@@ -175,9 +175,9 @@ CODE facilitynames[] = {
#define LOG_NOWAIT 0x10 /* don't wait for console forks: DEPRECATED */
#define LOG_PERROR 0x20 /* log to stderr as well */
-#ifdef KERNEL
+#ifdef _KERNEL
-#else /* not KERNEL */
+#else /* not _KERNEL */
/*
* Don't use va_list in the vsyslog() prototype. Va_list is typedef'd in two
@@ -197,6 +197,6 @@ void syslog __P((int, const char *, ...)) __printflike(2, 3);
void vsyslog __P((int, const char *, _BSD_VA_LIST_)) __printflike(2, 0);
__END_DECLS
-#endif /* !KERNEL */
+#endif /* !_KERNEL */
#endif
diff --git a/sys/sys/tablet.h b/sys/sys/tablet.h
index 5caa181af9f1..bdf038a99732 100644
--- a/sys/sys/tablet.h
+++ b/sys/sys/tablet.h
@@ -41,7 +41,7 @@
* Tablet line discipline.
*/
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/types.h>
#endif
#include <sys/ioccom.h>
diff --git a/sys/sys/termios.h b/sys/sys/termios.h
index 72f4b9e060cf..933a05948035 100644
--- a/sys/sys/termios.h
+++ b/sys/sys/termios.h
@@ -230,7 +230,7 @@ struct termios {
#define EXTB 38400
#endif /* !_POSIX_SOURCE */
-#ifndef KERNEL
+#ifndef _KERNEL
#define TCIFLUSH 1
#define TCOFLUSH 2
@@ -260,7 +260,7 @@ int cfsetspeed __P((struct termios *, speed_t));
#endif /* !_POSIX_SOURCE */
__END_DECLS
-#endif /* !KERNEL */
+#endif /* !_KERNEL */
#ifndef _POSIX_SOURCE
diff --git a/sys/sys/time.h b/sys/sys/time.h
index fea32d29e407..d7bbc839e0af 100644
--- a/sys/sys/time.h
+++ b/sys/sys/time.h
@@ -159,7 +159,7 @@ struct timecounter {
struct timecounter *tc_tweak;
};
-#ifdef KERNEL
+#ifdef _KERNEL
/* Operations on timespecs */
#define timespecclear(tvp) ((tvp)->tv_sec = (tvp)->tv_nsec = 0)
@@ -198,9 +198,9 @@ struct timecounter {
/* timevaladd and timevalsub are not inlined */
-#endif /* KERNEL */
+#endif /* _KERNEL */
-#ifndef KERNEL /* NetBSD/OpenBSD compatable interfaces */
+#ifndef _KERNEL /* NetBSD/OpenBSD compatable interfaces */
#define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0
#define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec)
@@ -265,7 +265,7 @@ struct clockinfo {
#define TIMER_ABSTIME 0x1 /* absolute timer */
#endif
-#ifdef KERNEL
+#ifdef _KERNEL
extern struct timecounter *timecounter;
extern time_t time_second;
@@ -285,7 +285,7 @@ void timevaladd __P((struct timeval *, struct timeval *));
void timevalsub __P((struct timeval *, struct timeval *));
int tvtohz __P((struct timeval *));
void update_timecounter __P((struct timecounter *tc));
-#else /* !KERNEL */
+#else /* !_KERNEL */
#include <time.h>
#include <sys/cdefs.h>
@@ -301,6 +301,6 @@ int settimeofday __P((const struct timeval *, const struct timezone *));
int utimes __P((const char *, const struct timeval *));
__END_DECLS
-#endif /* !KERNEL */
+#endif /* !_KERNEL */
#endif /* !_SYS_TIME_H_ */
diff --git a/sys/sys/timepps.h b/sys/sys/timepps.h
index 6d2693c79d3d..3c6d39f4277b 100644
--- a/sys/sys/timepps.h
+++ b/sys/sys/timepps.h
@@ -102,7 +102,7 @@ struct pps_kcbind_args {
#define PPS_IOC_FETCH _IOWR('1', 6, struct pps_fetch_args)
#define PPS_IOC_KCBIND _IOW('1', 7, struct pps_kcbind_args)
-#ifdef KERNEL
+#ifdef _KERNEL
struct pps_state {
pps_params_t ppsparam;
pps_info_t ppsinfo;
@@ -117,7 +117,7 @@ void pps_init __P((struct pps_state *pps));
int pps_ioctl __P((u_long cmd, caddr_t data, struct pps_state *pps));
void hardpps __P((struct timespec *tsp, long nsec));
-#else /* !KERNEL */
+#else /* !_KERNEL */
static __inline int
time_pps_create(int filedes, pps_handle_t *handle)
@@ -186,5 +186,5 @@ time_pps_kcbind(pps_handle_t handle, const int kernel_consumer,
return (ioctl(handle, PPS_IOC_KCBIND, &arg));
}
-#endif /* !KERNEL */
+#endif /* !_KERNEL */
#endif /* _SYS_TIMEPPS_H_ */
diff --git a/sys/sys/times.h b/sys/sys/times.h
index ba6dee0ed709..668ac7a338ac 100644
--- a/sys/sys/times.h
+++ b/sys/sys/times.h
@@ -56,7 +56,7 @@ struct tms {
clock_t tms_cstime; /* System CPU time of terminated child procs */
};
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/cdefs.h>
__BEGIN_DECLS
diff --git a/sys/sys/timetc.h b/sys/sys/timetc.h
index fea32d29e407..d7bbc839e0af 100644
--- a/sys/sys/timetc.h
+++ b/sys/sys/timetc.h
@@ -159,7 +159,7 @@ struct timecounter {
struct timecounter *tc_tweak;
};
-#ifdef KERNEL
+#ifdef _KERNEL
/* Operations on timespecs */
#define timespecclear(tvp) ((tvp)->tv_sec = (tvp)->tv_nsec = 0)
@@ -198,9 +198,9 @@ struct timecounter {
/* timevaladd and timevalsub are not inlined */
-#endif /* KERNEL */
+#endif /* _KERNEL */
-#ifndef KERNEL /* NetBSD/OpenBSD compatable interfaces */
+#ifndef _KERNEL /* NetBSD/OpenBSD compatable interfaces */
#define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0
#define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec)
@@ -265,7 +265,7 @@ struct clockinfo {
#define TIMER_ABSTIME 0x1 /* absolute timer */
#endif
-#ifdef KERNEL
+#ifdef _KERNEL
extern struct timecounter *timecounter;
extern time_t time_second;
@@ -285,7 +285,7 @@ void timevaladd __P((struct timeval *, struct timeval *));
void timevalsub __P((struct timeval *, struct timeval *));
int tvtohz __P((struct timeval *));
void update_timecounter __P((struct timecounter *tc));
-#else /* !KERNEL */
+#else /* !_KERNEL */
#include <time.h>
#include <sys/cdefs.h>
@@ -301,6 +301,6 @@ int settimeofday __P((const struct timeval *, const struct timezone *));
int utimes __P((const char *, const struct timeval *));
__END_DECLS
-#endif /* !KERNEL */
+#endif /* !_KERNEL */
#endif /* !_SYS_TIME_H_ */
diff --git a/sys/sys/timex.h b/sys/sys/timex.h
index 747d7f4d1023..9de19957b7b2 100644
--- a/sys/sys/timex.h
+++ b/sys/sys/timex.h
@@ -39,6 +39,8 @@
*
* 17 Sep 93 David L. Mills
* Created file
+ *
+ * $FreeBSD$
*/
/*
* This header file defines the Network Time Protocol (NTP) interfaces
@@ -211,17 +213,17 @@ struct timex {
#ifdef __FreeBSD__
-#ifdef KERNEL
+#ifdef _KERNEL
struct timecounter;
void ntp_update_second __P((struct timecounter *tc));
-#else /* !KERNEL */
+#else /* !_KERNEL */
#include <sys/cdefs.h>
__BEGIN_DECLS
int ntp_adjtime __P((struct timex *));
int ntp_gettime __P((struct ntptimeval *));
__END_DECLS
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* __FreeBSD__ */
diff --git a/sys/sys/tty.h b/sys/sys/tty.h
index f51fe66c443d..46b11ea4edc0 100644
--- a/sys/sys/tty.h
+++ b/sys/sys/tty.h
@@ -130,7 +130,7 @@ struct tty {
#define TTYHOG 1024
#endif
-#ifdef KERNEL
+#ifdef _KERNEL
#define TTMAXHIWAT roundup(2048, CBSIZE)
#define TTMINHIWAT roundup(100, CBSIZE)
#define TTMAXLOWAT 256
@@ -220,7 +220,7 @@ struct speedtab {
#define TSA_PTC_WRITE(tp) ((void *)&(tp)->t_rawq.c_cl)
#define TSA_PTS_READ(tp) ((void *)&(tp)->t_canq)
-#ifdef KERNEL
+#ifdef _KERNEL
#ifdef MALLOC_DECLARE
MALLOC_DECLARE(M_TTYS);
#endif
@@ -271,6 +271,6 @@ int ttywait __P((struct tty *tp));
int ttywrite __P((dev_t dev, struct uio *uio, int flag));
int unputc __P((struct clist *q));
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_SYS_TTY_H_ */
diff --git a/sys/sys/types.h b/sys/sys/types.h
index 69b00cb706fa..34a115409de0 100644
--- a/sys/sys/types.h
+++ b/sys/sys/types.h
@@ -89,20 +89,20 @@ typedef int32_t swblk_t; /* swap offset */
typedef int32_t ufs_daddr_t;
typedef u_int32_t uid_t; /* user id */
-#ifdef KERNEL
+#ifdef _KERNEL
typedef int boolean_t;
typedef u_int64_t uoff_t;
typedef struct vm_page *vm_page_t;
#endif
-#ifdef KERNEL
+#ifdef _KERNEL
struct specinfo;
typedef u_int32_t udev_t; /* device number */
typedef struct specinfo *dev_t;
-#else /* !KERNEL */
+#else /* !_KERNEL */
typedef u_int32_t dev_t; /* device number */
#define udev_t dev_t
@@ -120,7 +120,7 @@ typedef u_int32_t dev_t; /* device number */
#endif /* _POSIX_SOURCE */
-#endif /* !KERNEL */
+#endif /* !_KERNEL */
#include <machine/endian.h>
@@ -189,7 +189,7 @@ typedef struct fd_set {
* <stdio.h> to give broken programs a better chance of working with
* 64-bit off_t's.
*/
-#ifndef KERNEL
+#ifndef _KERNEL
__BEGIN_DECLS
#ifndef _FTRUNCATE_DECLARED
#define _FTRUNCATE_DECLARED
@@ -208,7 +208,7 @@ void * mmap __P((void *, size_t, int, int, int, off_t));
int truncate __P((const char *, off_t));
#endif
__END_DECLS
-#endif /* !KERNEL */
+#endif /* !_KERNEL */
#endif /* !_POSIX_SOURCE */
diff --git a/sys/sys/ucred.h b/sys/sys/ucred.h
index 6009f93a675d..256119ce2757 100644
--- a/sys/sys/ucred.h
+++ b/sys/sys/ucred.h
@@ -53,7 +53,7 @@ struct ucred {
#define NOCRED ((struct ucred *)0) /* no credential available */
#define FSCRED ((struct ucred *)-1) /* filesystem credential */
-#ifdef KERNEL
+#ifdef _KERNEL
#define crhold(cr) (cr)->cr_ref++
struct ucred *crcopy __P((struct ucred *cr));
@@ -61,6 +61,6 @@ struct ucred *crdup __P((struct ucred *cr));
void crfree __P((struct ucred *cr));
struct ucred *crget __P((void));
int groupmember __P((gid_t gid, struct ucred *cred));
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_SYS_UCRED_H_ */
diff --git a/sys/sys/uio.h b/sys/sys/uio.h
index e55b84055563..a2de90ac235b 100644
--- a/sys/sys/uio.h
+++ b/sys/sys/uio.h
@@ -56,7 +56,7 @@ enum uio_seg {
UIO_NOCOPY /* don't copy, already in object */
};
-#ifdef KERNEL
+#ifdef _KERNEL
struct uio {
struct iovec *uio_iov;
@@ -80,7 +80,7 @@ int uiomove __P((caddr_t, int, struct uio *));
int uiomoveco __P((caddr_t, int, struct uio *, struct vm_object *));
int uioread __P((int, struct uio *, struct vm_object *, int *));
-#else /* !KERNEL */
+#else /* !_KERNEL */
#include <sys/cdefs.h>
@@ -89,6 +89,6 @@ ssize_t readv __P((int, const struct iovec *, int));
ssize_t writev __P((int, const struct iovec *, int));
__END_DECLS
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_SYS_UIO_H_ */
diff --git a/sys/sys/un.h b/sys/sys/un.h
index a99ba68d9a14..e7c370195a50 100644
--- a/sys/sys/un.h
+++ b/sys/sys/un.h
@@ -46,7 +46,7 @@ struct sockaddr_un {
char sun_path[104]; /* path name (gag) */
};
-#ifdef KERNEL
+#ifdef _KERNEL
struct mbuf;
struct socket;
@@ -57,12 +57,12 @@ void unp_dispose __P((struct mbuf *m));
int unp_externalize __P((struct mbuf *rights));
void unp_init __P((void));
extern struct pr_usrreqs uipc_usrreqs;
-#else /* !KERNEL */
+#else /* !_KERNEL */
/* actual length of an initialized sockaddr_un */
#define SUN_LEN(su) \
(sizeof(*(su)) - sizeof((su)->sun_path) + strlen((su)->sun_path))
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_SYS_UN_H_ */
diff --git a/sys/sys/user.h b/sys/sys/user.h
index 9a4b9ecc9a41..da2fbbe5bb30 100644
--- a/sys/sys/user.h
+++ b/sys/sys/user.h
@@ -38,7 +38,7 @@
#define _SYS_USER_H_
#include <machine/pcb.h>
-#ifndef KERNEL
+#ifndef _KERNEL
/* stuff that *used* to be included by user.h, or is now needed */
#include <sys/errno.h>
#include <sys/time.h>
@@ -51,7 +51,7 @@
#include <vm/pmap.h> /* XXX */
#include <sys/lock.h> /* XXX */
#include <vm/vm_map.h> /* XXX */
-#endif /* !KERNEL */
+#endif /* !_KERNEL */
#ifndef _SYS_RESOURCEVAR_H_
#include <sys/resourcevar.h>
#endif
@@ -130,13 +130,13 @@ struct user {
#define U_sig u_kproc.kp_proc.p_sig
#define U_code u_kproc.kp_proc.p_code
-#ifndef KERNEL
+#ifndef _KERNEL
#define u_ar0 U_ar0
#define u_tsize U_tsize
#define u_dsize U_dsize
#define u_ssize U_ssize
#define u_sig U_sig
#define u_code U_code
-#endif /* KERNEL */
+#endif
#endif
diff --git a/sys/sys/utsname.h b/sys/sys/utsname.h
index 375c3d403f36..f26b9f1e7020 100644
--- a/sys/sys/utsname.h
+++ b/sys/sys/utsname.h
@@ -54,7 +54,7 @@ struct utsname {
#include <sys/cdefs.h>
-#ifndef KERNEL
+#ifndef _KERNEL
#ifdef __STDC__
__BEGIN_DECLS
int uname __P((struct utsname *));
@@ -64,6 +64,6 @@ extern int uname();
#endif
#else
extern struct utsname utsname;
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_SYS_UTSNAME_H */
diff --git a/sys/sys/vmmeter.h b/sys/sys/vmmeter.h
index 2ae45a378cdc..0ca843226154 100644
--- a/sys/sys/vmmeter.h
+++ b/sys/sys/vmmeter.h
@@ -93,7 +93,7 @@ struct vmmeter {
u_int v_interrupt_free_min; /* reserved number of pages for int code */
u_int v_free_severe; /* severe depletion of pages below this pt */
};
-#ifdef KERNEL
+#ifdef _KERNEL
extern struct vmmeter cnt;
diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h
index afb6bfce377e..e37035a82084 100644
--- a/sys/sys/vnode.h
+++ b/sys/sys/vnode.h
@@ -226,7 +226,7 @@ struct vattr {
*/
#define VNOVAL (-1)
-#ifdef KERNEL
+#ifdef _KERNEL
#ifdef MALLOC_DECLARE
MALLOC_DECLARE(M_VNODE);
@@ -300,7 +300,7 @@ extern void (*lease_updatetime) __P((int deltat));
(((vp)->v_flag & (VFREE|VTBFREE)) && \
((vp)->v_holdcnt || (vp)->v_usecount))
-#endif /* KERNEL */
+#endif /* _KERNEL */
/*
@@ -352,7 +352,7 @@ struct vnodeop_desc {
caddr_t *vdesc_transports;
};
-#ifdef KERNEL
+#ifdef _KERNEL
/*
* A list of all the operation descs.
*/
@@ -621,6 +621,6 @@ extern vop_t **spec_vnodeop_p;
extern TAILQ_HEAD(tobefreelist, vnode)
vnode_tobefree_list; /* vnode free list */
-#endif /* KERNEL */
+#endif /* _KERNEL */
#endif /* !_SYS_VNODE_H_ */
diff --git a/sys/sys/wait.h b/sys/sys/wait.h
index c854e149d3c6..036dda852eeb 100644
--- a/sys/sys/wait.h
+++ b/sys/sys/wait.h
@@ -144,7 +144,7 @@ union wait {
#define WSTOPPED _WSTOPPED
#endif /* _POSIX_SOURCE */
-#ifndef KERNEL
+#ifndef _KERNEL
#include <sys/types.h>
#include <sys/cdefs.h>