summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1999-12-29 04:46:21 +0000
committerpeter <peter@FreeBSD.org>1999-12-29 04:46:21 +0000
commit15b9bcb121e1f3735a2c98a11afdb52a03301d7e (patch)
treee999c95eb5db56737efc17feeb385a77941021bb
parent9ed7cb48bf4a00a23e7489706b0effe1c516cb5b (diff)
downloadFreeBSD-src-15b9bcb121e1f3735a2c98a11afdb52a03301d7e.zip
FreeBSD-src-15b9bcb121e1f3735a2c98a11afdb52a03301d7e.tar.gz
Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL"
is an application space macro and the applications are supposed to be free to use it as they please (but cannot). This is consistant with the other BSD's who made this change quite some time ago. More commits to come.
-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 7515a4a..5e59a54 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 d6fa59f..3332224 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 47b2a2c..b185295 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 f243f8b..a5f1b62 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 d3f24c2..b6b5b41 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 1965a5a..02ceb8b 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 eb22526..98f72e8 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 892d96d..fef95ce 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 66c5577..250db28 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 7691d71..e004779 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 d324942..440f819 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 46f57ba..dd6e9d0 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 5b21408..96f027e 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 321326f..bd1eb6c 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 0eb8ef2..57fbb69 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 5c48e64..9991213 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 d69c547..2af0ec4 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 879aeed..172c302 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 8eda490..6024399 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 03e1869..cf282de 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 75f278d..8e21dac 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 8d0e2d3..3ce7adb 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 4a2fe79..666af5c 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 48ec351..97b7694 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 756c08c..7fd8fda 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 2e7a31d..fb0a37f 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 2e7a31d..fb0a37f 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 dde7281..08beb5a 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 42e8abf..482ec96 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 1f81636..66b6b61 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 1d2b600..22738c3 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 55a26fd..d59a38f3 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 1f541c7..7b5b69a 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 d043d8b..8cbe870 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 02f2bb8..8f0a2f8 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 5ea3ee6..01e63c5 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 2003a66..77b9443 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 cf0667c..cc6ca67 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 15f8b3d..7f9396a 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 f6c997a..bd614cf 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 d6d802b..e32c236 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 85aa2d3..10f0884 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 d20c9b0..f628d94 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 f2aa03a..53e6308 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 f2aa03a..53e6308 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 b169483..ee013c2 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 b169483..ee013c2 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 2085bb6..d01489e 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 bda6afb..46405c6 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 919100f..f62d392 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 4d151eb..f2d1c22 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 0dc2016..7070f19 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 94c65e0..d50e5f2 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 97dc5ea..2342956 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 2085bb6..d01489e 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 bda6afb..46405c6 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 83696bb..1312b04 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 52380fa..4a68b9c 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 a744dc8..e10f9a1 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 7d4ba59..b98f80e2 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 7120321..531ad48 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 7d854e3..8ff2fb4 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 a6801f2..23e6058 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 b158229..73e4adb 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 5f34e50..4bb2c93 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 5f1c7fbd..7ed338c 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 da205d2..77cbba3 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 810cc7a..9fa4f58 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 e0a8609..0acdd26 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 45b8bde..fe3b99f 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 3cc18a3..1121285 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 8ce57f9..5e5d2e3 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 5c6463b..009d7ec 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 7b77a08..755e928 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 f4c397d..8993dd2 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 26ae120..a37bc49 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 5ad06ce..b309913 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 85b6494..fd767f8 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 f2aa03a..53e6308 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 75f278d..8e21dac 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 754965e..2ebffdf 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 b8d1af3..620b313 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 8d0e2d3..3ce7adb 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 4a2fe79..666af5c 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 48ec351..97b7694 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 cdd4047..412f1e0 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 756c08c..7fd8fda 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 9023c76..9e79a09 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 b399b7c..b5f9514 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 8ce57f9..5e5d2e3 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 f2d9beb..a441959 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 3b4da37..92724df 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 919100f..f62d392 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 2e7a31d..fb0a37f 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 97c4a18..0e943f7 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 dde7281..08beb5a 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 42e8abf..482ec96 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 6bf3ea1..628cd86 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 c8f93f4..adf460e 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 1f81636..66b6b61 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 1d2b600..22738c3 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 55a26fd..d59a38f3 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 e084f81..5a3cbe2 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 1f541c7..7b5b69a 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 d043d8b..8cbe870 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 02f2bb8..8f0a2f8 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 32dcd37..bf01e0a 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 5ea3ee6..01e63c5 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 2003a66..77b9443 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 39672cd..f2c5760 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 afa76ea..c57b41d 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 cf0667c..cc6ca67 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 2008c62..9debeb0 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 15f8b3d..7f9396a 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 be45150..7964c6a 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 f19867a..7dc9a87 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 d3ab193..9b04c82 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 0b2ed9e..4f9bcf7 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 e151e4e..d8cb94d 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 8e982d7..7295e5a 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 fc6acc6..9f83882 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 6ffb9ac..3158db9 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 350e6d8..0e0ff81 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 52eeb26..5bfbe4b 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 16b32a6..fbd2792 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 aac7c14..92ea90f 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 1708559..2ed5ed0 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 5d47287..84fede3 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 8d497d4..80de848 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 1427b34..8fbe10c 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 432607c..b1e32f3 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 ac509e0..8f2cace 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 55887eb..9dbbf97 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 f68f67a..899d535 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 5184de6..6c079a9 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 255fbe3..68d21fc 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 200e9c1..d72d02d 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 64c4ad0..19df859 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 1f3ee50..7316305 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 d97c31f..1a8771c 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 b6829ba..c4310aa 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 43511bf..360f06f 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 d59bc1e..7d84f94 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 aab7314..c9607fe 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 02d147c..62f09b1 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 09caa31..2d590ad 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 fc6acc6..9f83882 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 d22cd51..5688f24 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 15a182c..b18be00 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 98e8fd4..710756a 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 5aeb579..08733ad 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 5d18c56..13fa81d 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 c04c778..de2a6a6 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 2c0e8b9..61ca6dd 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 4a0bfd5..921ce37 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 eb4a999..11c56a4 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 201c3fc..b7d5400 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 abcceda..8c990c8 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 2c438d6..ac7f79c 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 c359cb4..dcca378 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 de50dd5..aeefb20 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 1f8d1b7..b2bcb43 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 9c24732..2b1b2e5 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 491632e..db28920 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 2786272..06137dd 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 9ae83a9..b3448f4 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 595aff1..b2f62cf 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 e206376..0e3ba9b 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 d962b21..6c59574 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 cafe9a5..ede21bc 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 ede791b..bd3bf54 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 c4e9924..0572592 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 3610a40..9423b7f 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 93f41d9..b2665c1 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 e0ade7a..efadb7f 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 c6ec19e..1086735 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 0543df5..2aeac7b 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 366f6c1..13bd9f9 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 acdafe5..c387738 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 6fca28a..0cf9829 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 94f2e2f..e602bb9d 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 ec02403..2062a24 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 ad91068..fc6e3a3 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 2ce0dc0..53eead8 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 9574a44..af4b3ba 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 2fb475f..b899edd 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 45048d7..431eb35 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 923293c..850e5e7 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 8ffb62b..a17d4fe 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 489b6df..bedc7ca 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 7cc58fe..b6cf706 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 ce43141..ab20d6b 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 a20b868..3e732d8 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 2340801..7375b0d 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 4dfabe7..e5eb4ef 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 8b5646a..2d82ba6 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 7501a0c..435df92 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 e1d88de..2bf0718 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 afa76ea..c57b41d 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 f243f8b..a5f1b62 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 55a26fd..d59a38f3 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 7515a4a..5e59a54 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 ea0436a..d75a295 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 c137ec3..2e405a2 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 d59d974..fae78c8 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 3a13fab..deaffd9 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 68a5698..b74eadd 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 f244a5f..7168a89 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 f244a5f..7168a89 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 a3cea15..84176db 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 a3cfcc2..c83bf44 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 dbb0f29..12d18cf 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 7a2403f..78e2248 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 d1c22fa..60b56ec 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 e192b7c..f4f6112 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 b6414a1..7314dbc 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 d121457..ae0fe80 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 9144b0e..b306e85 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 1e17d51..172ff75 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 19db37b..b9c39d1 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 71e0236..5c5d746 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 71e0236..5c5d746 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 71e0236..5c5d746 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 883a880..8efb1a3 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 c62d6ce..760219c 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 7931760..48a44df 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 3b7f14c..c921c04 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 c25b6af..b8ba98a 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 d58fbe8..58e1c65 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 d81be11..6172145 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 b2413ea..f6a9699 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 b81f904..d5b29e6 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 3b4da37..92724df 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 014a293..9ed6ac4 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 d276112..d383c1f 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 83ed79c..9cb2e35 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 6f7cd0c..ed276c6 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 3c6e7ec..065d5b5 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 8b1e95d..05ccf17 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 3dc3c1e..7e6fbde 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 11a22c6..4888df7 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 919100f..f62d392 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 d81c5bc..38892e9 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 8780967..7fa6dd0 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 a6f2b48..456173e 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 1dbc215..eac0fe7 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 dc3e120..5383fc4 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 e192b7c..f4f6112 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 407aba1..8a1446f 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 f0e62ec..ba85d9c 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 f06be8f..20ea44c 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 a69f790..48b30ab 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 363a5f0..36e354d 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 80ac51b..0ff4dff 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 d95ae14..800f45a 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 51743e9..4992423 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 3dd70f1..bb63f92 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 aa7df03..cdab884 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 30b8b99..e41a282 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 29e35e1..e42f8a1 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 6834ac0..a49fcc0 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 548e782..7dec828 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 7620a39..a2ba6de 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 400855c..f6af6d9 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 15f6e13..5f23fa3 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 f7f77ed..62c2d67 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 be4c8b7..dbaaa00 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 e084f81..5a3cbe2 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 5b8491e..a1220c0 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 eca8e47..92ed5bf 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 6283f31..0e59f75 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 5d115f5..5178b0e 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 89e7f9a..8f58d85 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 89e7f9a..8f58d85 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 798f5bb..4f31ba1 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 a792f56..444539e 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 c137ec3..2e405a2 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 b0c7060..ae82574 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 02f2bb8..8f0a2f8 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 902df4a..c252cb9 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 7111dc6..5eed695 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 f7ff74c..aedd690 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 f6f577a..e608b34 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 14a7a50..21cfbc4 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 c1ef6c8..d5697a6 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 87a5660..66fe731 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 8359101..21c16af 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 5caa181..bdf038a 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 72f4b9e..933a059 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 fea32d2..d7bbc83 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 6d2693c..3c6d39f 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 ba6dee0..668ac7a 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 fea32d2..d7bbc83 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 747d7f4..9de19957 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 f51fe66..46b11ea 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 69b00cb..34a1154 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 6009f93..256119c 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 e55b840..a2de90a 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 a99ba68..e7c3701 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 9a4b9ec..da2fbbe 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 375c3d4..f26b9f1 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 2ae45a3..0ca8432 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 afb6bfc..e37035a 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 c854e14..036dda8 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>
OpenPOWER on IntegriCloud