From 1bd40720808d2f178f59c2f4916f3cbc730a967c Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Sat, 20 May 2006 02:42:15 +0000 Subject: [PATCH] I'm growing tired of having to add #include lines for header files that the include file(s) I really want depend on. Go through nearly all major system include files and add appropriately #ifndef'd #include lines to include all dependant header files. Kernel source files now only need to #include the header files they directly depend on. So, for example, if I wanted to add a SYSCTL to a kernel source file, I would only have to #include to bring in the support for it, rather then four or five header files in addition to . --- sys/cpu/i386/include/asmacros.h | 4 ++- sys/cpu/i386/include/atomic.h | 6 +++- sys/cpu/i386/include/bus_dma.h | 6 +++- sys/cpu/i386/include/cpu.h | 12 +++++++- sys/cpu/i386/include/cpufunc.h | 7 ++++- sys/cpu/i386/include/npx.h | 8 ++++- sys/cpu/i386/include/perfmon.h | 8 +++-- sys/cpu/i386/include/pmap.h | 31 +++++++++++++++++-- sys/cpu/i386/include/profile.h | 6 +++- sys/cpu/i386/include/reg.h | 7 ++++- sys/cpu/i386/include/segments.h | 7 ++++- sys/cpu/i386/include/sigframe.h | 12 +++++++- sys/cpu/i386/include/signal.h | 8 ++++- sys/cpu/i386/include/specialreg.h | 11 +++++-- sys/cpu/i386/include/tls.h | 10 +++++- sys/cpu/i386/include/tss.h | 4 +-- sys/cpu/i386/include/types.h | 6 +++- sys/cpu/i386/include/vm86.h | 11 +++++-- sys/ddb/db_access.h | 10 +++++- sys/ddb/db_break.h | 14 ++++++++- sys/ddb/db_command.h | 14 +++++++-- sys/ddb/db_lex.h | 30 ++++++++++++------ sys/ddb/db_sym.h | 6 +++- sys/ddb/db_variables.h | 19 +++++++++--- sys/ddb/db_watch.h | 9 +++++- sys/ddb/ddb.h | 7 ++++- sys/dev/disk/ncv/dvcfg.h | 6 +++- sys/emulation/svr4/svr4_ioctl.c | 4 +-- sys/i386/include/acpica_machdep.h | 8 ++--- sys/i386/include/apm_bios.h | 6 ++-- sys/i386/include/asmacros.h | 4 ++- sys/i386/include/atomic.h | 6 +++- sys/i386/include/bootinfo.h | 6 +++- sys/i386/include/bus_dma.h | 6 +++- sys/i386/include/clock.h | 7 ++++- sys/i386/include/cpu.h | 12 +++++++- sys/i386/include/cpufunc.h | 7 ++++- sys/i386/include/dvcfg.h | 6 +++- sys/i386/include/iic.h | 7 ++++- sys/i386/include/ioctl_fd.h | 6 ++-- sys/i386/include/md_var.h | 6 +++- sys/i386/include/nexusvar.h | 11 +++++-- sys/i386/include/npx.h | 8 ++++- sys/i386/include/pcb_ext.h | 18 +++++++++-- sys/i386/include/pci_cfgreg.h | 10 +++++- sys/i386/include/perfmon.h | 8 +++-- sys/i386/include/pmap.h | 31 +++++++++++++++++-- sys/i386/include/pmap_inval.h | 10 +++++- sys/i386/include/profile.h | 6 +++- sys/i386/include/ptrace.h | 10 +++++- sys/i386/include/reg.h | 7 ++++- sys/i386/include/segments.h | 7 ++++- sys/i386/include/sigframe.h | 12 +++++++- sys/i386/include/signal.h | 8 ++++- sys/i386/include/smb.h | 7 ++++- sys/i386/include/specialreg.h | 11 +++++-- sys/i386/include/thread.h | 4 ++- sys/i386/include/tls.h | 10 +++++- sys/i386/include/tss.h | 4 +-- sys/i386/include/types.h | 6 +++- sys/i386/include/uc_device.h | 6 +++- sys/i386/include/vm86.h | 11 +++++-- sys/i386/include/vmparam.h | 4 +-- sys/net/altq/if_altq.h | 8 ++--- sys/net/bpf.h | 12 +++++++- sys/net/ethernet.h | 6 +++- sys/net/hostcache.h | 15 ++++++--- sys/net/if.h | 20 +++++++----- sys/net/if_arc.h | 9 +++++- sys/net/if_arp.h | 12 +++++++- sys/net/if_atm.h | 14 ++++++++- sys/net/if_dl.h | 6 +++- sys/net/if_llc.h | 6 +++- sys/net/if_media.h | 12 +++++++- sys/net/if_mib.h | 12 +++++--- sys/net/if_var.h | 5 ++- sys/net/ifq_var.h | 25 +++++++++++++-- sys/net/intrq.h | 10 +++++- sys/net/iso88025.h | 7 ++++- sys/net/net_osdep.h | 8 ++--- sys/net/netmsg.h | 13 ++++++-- sys/net/pfil.h | 10 +++++- sys/net/pfkeyv2.h | 6 +++- sys/net/radix.h | 12 +++++--- sys/net/raw_cb.h | 13 +++++++- sys/net/route.h | 13 +++++++- sys/net/slcompress.h | 9 +++++- sys/net/zlib.h | 8 ++--- sys/netgraph/netgraph.h | 16 ++++++++-- sys/netgraph/ng_message.h | 8 +++-- sys/netgraph/ng_parse.h | 6 +++- sys/netgraph/ng_sample.h | 6 +++- sys/netinet/icmp6.h | 12 +++++++- sys/netinet/icmp_var.h | 12 +++++++- sys/netinet/if_atm.h | 7 ++++- sys/netinet/if_ether.h | 9 +++++- sys/netinet/if_fddi.h | 7 ++++- sys/netinet/igmp.h | 9 +++++- sys/netinet/igmp_var.h | 17 +++++++++- sys/netinet/in_gif.h | 5 ++- sys/netinet/in_hostcache.h | 10 ++++-- sys/netinet/in_pcb.h | 12 ++++++-- sys/netinet/in_systm.h | 6 +++- sys/netinet/in_var.h | 12 +++++++- sys/netinet/ip.h | 15 ++++++++- sys/netinet/ip6.h | 13 +++++++- sys/netinet/ip_ecn.h | 11 ++++++- sys/netinet/ip_encap.h | 18 +++++++++-- sys/netinet/ip_flow.h | 15 ++++++++- sys/netinet/ip_gre.h | 11 ++++++- sys/netinet/ip_icmp.h | 15 ++++++++- sys/netinet/ip_var.h | 24 +++++++++++++-- sys/netinet/pim.h | 8 ++++- sys/netinet/pim_var.h | 17 +++++++++- sys/netinet/sctp.h | 4 ++- sys/netinet/sctp_asconf.h | 16 ++++++++-- sys/netinet/sctp_callout.h | 10 ++++-- sys/netinet/sctp_constants.h | 6 ++-- sys/netinet/sctp_crc32.h | 10 +++--- sys/netinet/sctp_hashdriver.h | 9 +++--- sys/netinet/sctp_header.h | 17 +++++++--- sys/netinet/sctp_indata.h | 23 ++++++++++++-- sys/netinet/sctp_input.h | 23 +++++++++++--- sys/netinet/sctp_output.h | 19 +++++++++--- sys/netinet/sctp_pcb.h | 15 +++++---- sys/netinet/sctp_peeloff.h | 6 ++-- sys/netinet/sctp_sha1.h | 7 +++-- sys/netinet/sctp_structs.h | 20 ++++++++++-- sys/netinet/sctp_timer.h | 17 ++++++++-- sys/netinet/sctp_uio.h | 8 ++--- sys/netinet/sctputil.h | 28 +++++++++++++++-- sys/netinet/tcp.h | 9 +++++- sys/netinet/tcp_debug.h | 18 ++++++++++- sys/netinet/tcp_seq.h | 7 ++++- sys/netinet/tcp_var.h | 9 +++++- sys/netinet/tcpip.h | 9 +++++- sys/netinet/udp.h | 6 +++- sys/netinet/udp_var.h | 9 +++++- sys/netinet6/ah.h | 9 +++++- sys/netinet6/ah6.h | 12 +++++++- sys/netinet6/esp.h | 9 +++++- sys/netinet6/esp6.h | 12 +++++++- sys/netinet6/esp_rijndael.h | 19 +++++++++++- sys/netinet6/in6.h | 12 +++++++- sys/netinet6/in6_gif.h | 9 +++++- sys/netinet6/in6_ifattach.h | 11 ++++++- sys/netinet6/in6_pcb.h | 17 +++++++++- sys/netinet6/in6_prefix.h | 21 ++++++++++++- sys/netinet6/in6_var.h | 16 +++++++++- sys/netinet6/ip6_ecn.h | 8 ++++- sys/netinet6/ip6_mroute.h | 18 ++++++++++- sys/netinet6/ip6_var.h | 20 +++++++++--- sys/netinet6/ip6protosw.h | 7 ++++- sys/netinet6/ipcomp.h | 11 +++++-- sys/netinet6/ipcomp6.h | 11 ++++++- sys/netinet6/ipsec6.h | 16 ++++++---- sys/netinet6/mld6_var.h | 6 +++- sys/netinet6/nd6.h | 18 ++++++++++- sys/netinet6/pim6.h | 16 +++++++++- sys/netinet6/pim6_var.h | 10 +++++- sys/netinet6/raw_ip6.h | 6 +++- sys/netinet6/scope6_var.h | 18 +++++++++-- sys/netinet6/sctp6_var.h | 15 ++++++++- sys/netinet6/tcp6_var.h | 8 +++-- sys/netinet6/udp6_var.h | 12 +++++++- sys/netproto/key/keydb.h | 18 ++++++++++- sys/platform/pc32/include/acpica_machdep.h | 8 ++--- sys/platform/pc32/include/apm_bios.h | 6 ++-- sys/platform/pc32/include/bootinfo.h | 6 +++- sys/platform/pc32/include/clock.h | 7 ++++- sys/platform/pc32/include/dvcfg.h | 6 +++- sys/platform/pc32/include/iic.h | 7 ++++- sys/platform/pc32/include/ioctl_fd.h | 6 ++-- sys/platform/pc32/include/md_var.h | 6 +++- sys/platform/pc32/include/nexusvar.h | 11 +++++-- sys/platform/pc32/include/pcb_ext.h | 18 +++++++++-- sys/platform/pc32/include/pci_cfgreg.h | 10 +++++- sys/platform/pc32/include/pmap_inval.h | 10 +++++- sys/platform/pc32/include/ptrace.h | 10 +++++- sys/platform/pc32/include/smb.h | 7 ++++- sys/platform/pc32/include/thread.h | 4 ++- sys/platform/pc32/include/uc_device.h | 6 +++- sys/platform/pc32/include/vmparam.h | 4 +-- sys/sys/acct.h | 6 +++- sys/sys/acl.h | 12 +++++--- sys/sys/agpio.h | 6 +++- sys/sys/aio.h | 19 ++++++++++-- sys/sys/ata.h | 7 ++++- sys/sys/bio.h | 5 ++- sys/sys/blist.h | 6 +++- sys/sys/buf2.h | 5 ++- sys/sys/bus.h | 9 +++++- sys/sys/camlib.h | 8 ++--- sys/sys/caps.h | 3 +- sys/sys/ccdvar.h | 17 +++++++++- sys/sys/cdio.h | 6 ++-- sys/sys/cdrio.h | 7 ++++- sys/sys/checkpoint.h | 6 +++- sys/sys/chio.h | 6 ++-- sys/sys/ckpt.h | 24 ++++++++++++++- sys/sys/clist.h | 6 +++- sys/sys/cons.h | 7 ++++- sys/sys/consio.h | 6 ++-- sys/sys/device.h | 5 ++- sys/sys/disklabel.h | 11 +++++-- sys/sys/disklabel32.h | 11 +++++-- sys/sys/diskmbr.h | 7 ++++- sys/sys/diskslice.h | 6 ++-- sys/sys/dkstat.h | 6 +++- sys/sys/dmap.h | 6 +++- sys/sys/dvdio.h | 6 +++- sys/sys/elf32.h | 7 ++++- sys/sys/elf64.h | 7 ++++- sys/sys/elf_common.h | 6 +++- sys/sys/elf_generic.h | 14 ++++++++- sys/sys/endian.h | 7 ++++- sys/sys/eui64.h | 12 +++++--- sys/sys/event.h | 6 +++- sys/sys/eventvar.h | 12 +++++++- sys/sys/fbio.h | 6 ++-- sys/sys/fcntl.h | 10 ++---- sys/sys/file.h | 11 +++++-- sys/sys/file2.h | 6 +++- sys/sys/filedesc.h | 8 ++++- sys/sys/firmware.h | 6 ++-- sys/sys/fnv_hash.h | 11 ++++++- sys/sys/iconv.h | 6 +++- sys/sys/ieee754.h | 7 ++++- sys/sys/imgact_aout.h | 6 +++- sys/sys/in_cksum.h | 9 +++++- sys/sys/inflate.h | 6 +++- sys/sys/ipc.h | 6 +++- sys/sys/jail.h | 12 +++++++- sys/sys/journal.h | 9 +++++- sys/sys/kbio.h | 6 ++-- sys/sys/kcore.h | 10 ++++-- sys/sys/kernel.h | 7 ++++- sys/sys/kinfo.h | 9 +++++- sys/sys/kobj.h | 6 +++- sys/sys/kthread.h | 6 +++- sys/sys/ktr.h | 6 +++- sys/sys/ktrace.h | 10 +++++- sys/sys/linker.h | 13 +++++++- sys/sys/lockf.h | 7 ++++- sys/sys/mapped_ioctl.h | 7 ++++- sys/sys/mbuf.h | 10 +++++- sys/sys/mchain.h | 24 +++++++++------ sys/sys/md4.h | 16 +++++++--- sys/sys/md5.h | 8 ++++- sys/sys/memrange.h | 19 +++++++++++- sys/sys/module.h | 6 +++- sys/sys/mountctl.h | 28 +++++++++++++++-- sys/sys/msgbuf.h | 6 +++- sys/sys/mtio.h | 6 ++-- sys/sys/namecache.h | 11 ++++++- sys/sys/objcache.h | 19 ++++++++++-- sys/sys/odisklabel.h | 11 +++++-- sys/sys/pciio.h | 7 ++++- sys/sys/pioctl.h | 7 +++-- sys/sys/pipe.h | 16 +++++++--- sys/sys/power.h | 7 ++++- sys/sys/protosw.h | 6 +++- sys/sys/ptrace.h | 20 ++++++++++-- sys/sys/random.h | 8 +++-- sys/sys/resident.h | 14 +++++++-- sys/sys/resource.h | 9 +++++- sys/sys/resourcevar.h | 13 ++++++-- sys/sys/rman.h | 9 ++++-- sys/sys/rtprio.h | 6 +++- sys/sys/sbuf.h | 5 ++- sys/sys/sfbuf.h | 10 +++++- sys/sys/soundcard.h | 10 ++++-- sys/sys/stat.h | 6 ++-- sys/sys/sysctl.h | 9 +++++- sys/sys/sysent.h | 6 +++- sys/sys/sysmsg.h | 5 ++- sys/sys/systimer.h | 9 +++++- sys/sys/thread.h | 5 ++- sys/sys/timeb.h | 9 +++++- sys/sys/timepps.h | 7 ++++- sys/sys/timex.h | 10 ++++-- sys/sys/tprintf.h | 6 +++- sys/sys/ucontext.h | 7 ++++- sys/sys/ucred.h | 9 +++++- sys/sys/uio.h | 10 +++++- sys/sys/un.h | 6 +++- sys/sys/upcall.h | 5 ++- sys/sys/usched.h | 9 +++++- sys/sys/user.h | 36 +++++++++++++++++++--- sys/sys/utsname.h | 8 ++--- sys/sys/vfscache.h | 8 ++++- sys/sys/vmmeter.h | 6 +++- sys/sys/wait.h | 8 ++++- sys/sys/wormio.h | 7 ++++- sys/sys/xio.h | 11 ++++++- sys/sys/xrpuio.h | 7 ++++- sys/sys/xwait.h | 6 +++- sys/vm/pmap.h | 28 ++++++++--------- sys/vm/swap_pager.h | 15 ++++++--- sys/vm/vm.h | 12 +++++--- sys/vm/vm_extern.h | 18 ++++++++--- sys/vm/vm_kern.h | 11 +++++-- sys/vm/vm_map.h | 23 +++++++++++--- sys/vm/vm_object.h | 26 +++++++++++++--- sys/vm/vm_page.h | 26 +++++++++++++--- sys/vm/vm_page2.h | 8 ++--- sys/vm/vm_pageout.h | 8 +++-- sys/vm/vm_pager.h | 16 +++++++--- sys/vm/vm_param.h | 13 +++++--- sys/vm/vm_zone.h | 8 ++--- sys/vm/vnode_pager.h | 16 +++++++--- 311 files changed, 2646 insertions(+), 567 deletions(-) diff --git a/sys/cpu/i386/include/asmacros.h b/sys/cpu/i386/include/asmacros.h index 020b072096..82062462b6 100644 --- a/sys/cpu/i386/include/asmacros.h +++ b/sys/cpu/i386/include/asmacros.h @@ -31,13 +31,15 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/include/asmacros.h,v 1.18 1999/08/28 00:44:06 peter Exp $ - * $DragonFly: src/sys/cpu/i386/include/asmacros.h,v 1.9 2005/11/02 09:35:09 dillon Exp $ + * $DragonFly: src/sys/cpu/i386/include/asmacros.h,v 1.10 2006/05/20 02:42:06 dillon Exp $ */ #ifndef _MACHINE_ASMACROS_H_ #define _MACHINE_ASMACROS_H_ +#ifndef _SYS_CDEFS_H_ #include +#endif #ifdef _KERNEL diff --git a/sys/cpu/i386/include/atomic.h b/sys/cpu/i386/include/atomic.h index 370892354a..81788a4155 100644 --- a/sys/cpu/i386/include/atomic.h +++ b/sys/cpu/i386/include/atomic.h @@ -24,11 +24,15 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/include/atomic.h,v 1.9.2.1 2000/07/07 00:38:47 obrien Exp $ - * $DragonFly: src/sys/cpu/i386/include/atomic.h,v 1.17 2006/05/16 14:24:06 sephe Exp $ + * $DragonFly: src/sys/cpu/i386/include/atomic.h,v 1.18 2006/05/20 02:42:06 dillon Exp $ */ #ifndef _MACHINE_ATOMIC_H_ #define _MACHINE_ATOMIC_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif + /* * Various simple arithmetic on memory which is atomic in the presence * of interrupts and multiple processors. diff --git a/sys/cpu/i386/include/bus_dma.h b/sys/cpu/i386/include/bus_dma.h index 9950a0f831..1b530de6a1 100644 --- a/sys/cpu/i386/include/bus_dma.h +++ b/sys/cpu/i386/include/bus_dma.h @@ -68,11 +68,15 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* $FreeBSD: src/sys/i386/include/bus_dma.h,v 1.15.2.2 2002/11/21 23:36:01 sam Exp $ */ -/* $DragonFly: src/sys/cpu/i386/include/bus_dma.h,v 1.4 2004/02/16 19:35:53 joerg Exp $ */ +/* $DragonFly: src/sys/cpu/i386/include/bus_dma.h,v 1.5 2006/05/20 02:42:06 dillon Exp $ */ #ifndef _I386_BUS_DMA_H_ #define _I386_BUS_DMA_H_ +#ifndef _MACHINE_BUS_AT386_H_ +#include +#endif + /* * Flags used in various bus DMA methods. */ diff --git a/sys/cpu/i386/include/cpu.h b/sys/cpu/i386/include/cpu.h index 4a9820a0af..5ed2a0fb3a 100644 --- a/sys/cpu/i386/include/cpu.h +++ b/sys/cpu/i386/include/cpu.h @@ -35,7 +35,7 @@ * * from: @(#)cpu.h 5.4 (Berkeley) 5/9/91 * $FreeBSD: src/sys/i386/include/cpu.h,v 1.43.2.2 2001/06/15 09:37:57 scottl Exp $ - * $DragonFly: src/sys/cpu/i386/include/cpu.h,v 1.15 2004/03/30 19:14:06 dillon Exp $ + * $DragonFly: src/sys/cpu/i386/include/cpu.h,v 1.16 2006/05/20 02:42:06 dillon Exp $ */ #ifndef _MACHINE_CPU_H_ @@ -44,9 +44,15 @@ /* * Definitions unique to i386 cpu support. */ +#ifndef _MACHINE_PSL_H_ #include "psl.h" +#endif +#ifndef _MACHINE_FRAME_H_ #include "frame.h" +#endif +#ifndef _MACHINE_SEGMENTS_H_ #include "segments.h" +#endif /* * definitions of cpu-dependent requirements @@ -115,11 +121,15 @@ } #ifdef _KERNEL + +struct proc; + extern char btext[]; extern char etext[]; void fork_trampoline (void); void fork_return (struct proc *, struct trapframe); + #endif #endif /* !_MACHINE_CPU_H_ */ diff --git a/sys/cpu/i386/include/cpufunc.h b/sys/cpu/i386/include/cpufunc.h index a27dd35104..f057819a01 100644 --- a/sys/cpu/i386/include/cpufunc.h +++ b/sys/cpu/i386/include/cpufunc.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/include/cpufunc.h,v 1.96.2.3 2002/04/28 22:50:54 dwmalone Exp $ - * $DragonFly: src/sys/cpu/i386/include/cpufunc.h,v 1.14 2005/08/28 15:27:05 hsu Exp $ + * $DragonFly: src/sys/cpu/i386/include/cpufunc.h,v 1.15 2006/05/20 02:42:06 dillon Exp $ */ /* @@ -41,7 +41,12 @@ #ifndef _MACHINE_CPUFUNC_H_ #define _MACHINE_CPUFUNC_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _SYS_CDEFS_H_ #include +#endif __BEGIN_DECLS #define readb(va) (*(volatile u_int8_t *) (va)) diff --git a/sys/cpu/i386/include/npx.h b/sys/cpu/i386/include/npx.h index 72061ef3c2..12c576e138 100644 --- a/sys/cpu/i386/include/npx.h +++ b/sys/cpu/i386/include/npx.h @@ -35,7 +35,7 @@ * * from: @(#)npx.h 5.3 (Berkeley) 1/18/91 * $FreeBSD: src/sys/i386/include/npx.h,v 1.18.2.1 2001/08/15 01:23:52 peter Exp $ - * $DragonFly: src/sys/cpu/i386/include/npx.h,v 1.7 2004/05/05 19:26:42 dillon Exp $ + * $DragonFly: src/sys/cpu/i386/include/npx.h,v 1.8 2006/05/20 02:42:06 dillon Exp $ */ /* @@ -46,6 +46,10 @@ #ifndef _MACHINE_NPX_H_ #define _MACHINE_NPX_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif + /* Environment information of floating point unit */ struct env87 { long en_cw; /* control word (16bits) */ @@ -143,6 +147,8 @@ union savefpu { #ifdef _KERNEL +struct proc; + int npxdna (void); void npxexit (struct proc *p); void npxinit (u_short control); diff --git a/sys/cpu/i386/include/perfmon.h b/sys/cpu/i386/include/perfmon.h index dfa6c60ca5..58c9ac9642 100644 --- a/sys/cpu/i386/include/perfmon.h +++ b/sys/cpu/i386/include/perfmon.h @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/include/perfmon.h,v 1.7 1999/12/29 04:33:04 peter Exp $ - * $DragonFly: src/sys/cpu/i386/include/perfmon.h,v 1.3 2003/08/26 21:42:18 rob Exp $ + * $DragonFly: src/sys/cpu/i386/include/perfmon.h,v 1.4 2006/05/20 02:42:06 dillon Exp $ */ /* @@ -37,11 +37,13 @@ #ifndef _MACHINE_PERFMON_H_ #define _MACHINE_PERFMON_H_ - -#ifndef _KERNEL + +#ifndef _SYS_TYPES_H_ #include #endif +#ifndef _SYS_IOCCOM_H_ #include +#endif #define NPMC 2 diff --git a/sys/cpu/i386/include/pmap.h b/sys/cpu/i386/include/pmap.h index b4f6d32063..116b09d1c7 100644 --- a/sys/cpu/i386/include/pmap.h +++ b/sys/cpu/i386/include/pmap.h @@ -43,7 +43,7 @@ * from: hp300: @(#)pmap.h 7.2 (Berkeley) 12/16/90 * from: @(#)pmap.h 7.4 (Berkeley) 5/12/91 * $FreeBSD: src/sys/i386/include/pmap.h,v 1.65.2.3 2001/10/03 07:15:37 peter Exp $ - * $DragonFly: src/sys/cpu/i386/include/pmap.h,v 1.8 2005/08/12 00:25:10 hmp Exp $ + * $DragonFly: src/sys/cpu/i386/include/pmap.h,v 1.9 2006/05/20 02:42:06 dillon Exp $ */ #ifndef _MACHINE_PMAP_H_ @@ -130,7 +130,18 @@ #ifndef LOCORE +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _SYS_QUEUE_H_ #include +#endif +#ifndef _MACHINE_TYPES_H_ +#include +#endif +#ifndef _MACHINE_PARAM_H_ +#include +#endif /* * Address of current and alternate address space page table maps @@ -187,16 +198,30 @@ pmap_kextract(vm_offset_t va) /* * Pmap stuff */ -struct pv_entry; +struct pv_entry; +struct vm_page; +struct vm_object; struct md_page { int pv_list_count; TAILQ_HEAD(,pv_entry) pv_list; }; +/* + * Each machine dependent implementation is expected to + * keep certain statistics. They may do this anyway they + * so choose, but are expected to return the statistics + * in the following structure. + */ +struct pmap_statistics { + long resident_count; /* # of pages mapped (total) */ + long wired_count; /* # of pages wired */ +}; +typedef struct pmap_statistics *pmap_statistics_t; + struct pmap { pd_entry_t *pm_pdir; /* KVA of page directory */ - vm_object_t pm_pteobj; /* Container for pte's */ + struct vm_object *pm_pteobj; /* Container for pte's */ TAILQ_HEAD(,pv_entry) pm_pvlist; /* list of mappings in pmap */ int pm_count; /* reference count */ cpumask_t pm_active; /* active on cpus */ diff --git a/sys/cpu/i386/include/profile.h b/sys/cpu/i386/include/profile.h index f92e18d40f..f6280dfa9b 100644 --- a/sys/cpu/i386/include/profile.h +++ b/sys/cpu/i386/include/profile.h @@ -32,12 +32,16 @@ * * @(#)profile.h 8.1 (Berkeley) 6/11/93 * $FreeBSD: src/sys/i386/include/profile.h,v 1.20 1999/12/29 04:33:05 peter Exp $ - * $DragonFly: src/sys/cpu/i386/include/profile.h,v 1.6 2005/12/24 20:34:04 swildner Exp $ + * $DragonFly: src/sys/cpu/i386/include/profile.h,v 1.7 2006/05/20 02:42:06 dillon Exp $ */ #ifndef _MACHINE_PROFILE_H_ #define _MACHINE_PROFILE_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif + #ifdef _KERNEL /* diff --git a/sys/cpu/i386/include/reg.h b/sys/cpu/i386/include/reg.h index 000dfe8a5f..39101d5002 100644 --- a/sys/cpu/i386/include/reg.h +++ b/sys/cpu/i386/include/reg.h @@ -35,7 +35,7 @@ * * from: @(#)reg.h 5.5 (Berkeley) 1/18/91 * $FreeBSD: src/sys/i386/include/reg.h,v 1.22.2.2 2002/11/07 22:47:55 alfred Exp $ - * $DragonFly: src/sys/cpu/i386/include/reg.h,v 1.4 2005/10/27 03:15:47 sephe Exp $ + * $DragonFly: src/sys/cpu/i386/include/reg.h,v 1.5 2006/05/20 02:42:06 dillon Exp $ */ #ifndef _MACHINE_REG_H_ @@ -142,6 +142,10 @@ struct dbreg { #ifdef _KERNEL +#ifndef _SYS_TYPES_H_ +#include +#endif + struct proc; struct lwp; @@ -152,6 +156,7 @@ int set_fpregs (struct lwp *, struct fpreg *); int set_regs (struct lwp *lp, struct reg *regs); void setregs (struct proc *, u_long, u_long, u_long); int set_dbregs (struct lwp *lp, struct dbreg *dbregs); + #endif #endif /* !_MACHINE_REG_H_ */ diff --git a/sys/cpu/i386/include/segments.h b/sys/cpu/i386/include/segments.h index 79b92a5daa..f39a32c71c 100644 --- a/sys/cpu/i386/include/segments.h +++ b/sys/cpu/i386/include/segments.h @@ -36,7 +36,7 @@ * * from: @(#)segments.h 7.1 (Berkeley) 5/9/91 * $FreeBSD: src/sys/i386/include/segments.h,v 1.24 1999/12/29 04:33:07 peter Exp $ - * $DragonFly: src/sys/cpu/i386/include/segments.h,v 1.10 2005/11/04 08:57:29 dillon Exp $ + * $DragonFly: src/sys/cpu/i386/include/segments.h,v 1.11 2006/05/20 02:42:06 dillon Exp $ */ #ifndef _MACHINE_SEGMENTS_H_ @@ -251,6 +251,11 @@ struct region_descriptor { #define NLDT (LBSDICALLS_SEL + 1) #if defined(_KERNEL) && !defined(LOCORE) + +#ifndef _SYS_TYPES_H_ +#include +#endif + extern int _default_ldt; extern union descriptor gdt[]; extern struct soft_segment_descriptor gdt_segs[]; diff --git a/sys/cpu/i386/include/sigframe.h b/sys/cpu/i386/include/sigframe.h index d5a35a7511..5d0a6184af 100644 --- a/sys/cpu/i386/include/sigframe.h +++ b/sys/cpu/i386/include/sigframe.h @@ -26,12 +26,22 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/i386/include/sigframe.h,v 1.5 1999/12/04 10:40:24 marcel Exp $ - * $DragonFly: src/sys/cpu/i386/include/sigframe.h,v 1.3 2003/10/24 14:10:45 daver Exp $ + * $DragonFly: src/sys/cpu/i386/include/sigframe.h,v 1.4 2006/05/20 02:42:06 dillon Exp $ */ #ifndef _MACHINE_SIGFRAME_H_ #define _MACHINE_SIGFRAME_H_ +#ifndef _MACHINE_TYPES_H_ +#include +#endif +#ifndef _SYS_SIGNAL_H_ +#include +#endif +#ifndef _SYS_UCONTEXT_H_ +#include +#endif + /* * Signal frames, arguments passed to application signal handlers. */ diff --git a/sys/cpu/i386/include/signal.h b/sys/cpu/i386/include/signal.h index 7cedfd147d..ad4933efd9 100644 --- a/sys/cpu/i386/include/signal.h +++ b/sys/cpu/i386/include/signal.h @@ -32,7 +32,7 @@ * * @(#)signal.h 8.1 (Berkeley) 6/11/93 * $FreeBSD: src/sys/i386/include/signal.h,v 1.12 1999/11/12 13:52:11 marcel Exp $ - * $DragonFly: src/sys/cpu/i386/include/signal.h,v 1.5 2003/10/24 14:10:45 daver Exp $ + * $DragonFly: src/sys/cpu/i386/include/signal.h,v 1.6 2006/05/20 02:42:06 dillon Exp $ */ #ifndef _MACHINE_SIGNAL_H_ @@ -52,7 +52,13 @@ typedef int sig_atomic_t; * be banned, or the option should be fixed to not screw up relative-path * includes. */ + +#ifndef _SYS_SIGNAL_H_ +#include +#endif +#ifndef _MACHINE_TRAP_H_ #include /* codes for SIGILL, SIGFPE */ +#endif /* * Information pushed on stack when a signal is delivered. diff --git a/sys/cpu/i386/include/specialreg.h b/sys/cpu/i386/include/specialreg.h index 879436ae6e..2394f1aebc 100644 --- a/sys/cpu/i386/include/specialreg.h +++ b/sys/cpu/i386/include/specialreg.h @@ -32,7 +32,7 @@ * * from: @(#)specialreg.h 7.1 (Berkeley) 5/9/91 * $FreeBSD: src/sys/i386/include/specialreg.h,v 1.19.2.3 2003/01/22 17:24:28 jhb Exp $ - * $DragonFly: src/sys/cpu/i386/include/specialreg.h,v 1.3 2004/07/27 08:09:56 asmodai Exp $ + * $DragonFly: src/sys/cpu/i386/include/specialreg.h,v 1.4 2006/05/20 02:42:06 dillon Exp $ */ #ifndef _MACHINE_SPECIALREG_H_ @@ -352,8 +352,15 @@ #define AMD_WT_ALLOC_PRE 0x20000 /* programmable range enable */ #define AMD_WT_ALLOC_FRE 0x10000 /* fixed (A0000-FFFFF) range enable */ - #ifndef LOCORE + +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _MACHINE_CPUFUNC_H_ +#include "cpufunc.h" +#endif + static __inline u_char read_cyrix_reg(u_char reg) { diff --git a/sys/cpu/i386/include/tls.h b/sys/cpu/i386/include/tls.h index 63b95e1151..334e55f6a9 100644 --- a/sys/cpu/i386/include/tls.h +++ b/sys/cpu/i386/include/tls.h @@ -28,14 +28,18 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $DragonFly: src/sys/cpu/i386/include/tls.h,v 1.7 2005/06/03 17:14:50 dillon Exp $ + * $DragonFly: src/sys/cpu/i386/include/tls.h,v 1.8 2006/05/20 02:42:06 dillon Exp $ */ #ifndef _MACHINE_TLS_H_ #define _MACHINE_TLS_H_ +#ifndef _SYS_TYPES_H_ #include +#endif +#ifndef _SYS_TLS_H_ #include +#endif /* * NOTE: the tcb_{self,dtv,pthread,errno) fields must be declared @@ -65,6 +69,8 @@ struct tls_dtv { #define RTLD_STATIC_TLS_EXTRA 256 #define RTLD_STATIC_TLS_VARIANT_II +#ifndef _KERNEL + /* Get the current TCB. */ static __inline struct tls_tcb * tls_get_tcb(void) @@ -111,4 +117,6 @@ void _rtld_call_init(void); struct tls_tcb *_libc_init_tls(void); struct tls_tcb *_init_tls(void); +#endif + #endif /* !_MACHINE_TLS_H_ */ diff --git a/sys/cpu/i386/include/tss.h b/sys/cpu/i386/include/tss.h index 58a12532d0..ad89ac0650 100644 --- a/sys/cpu/i386/include/tss.h +++ b/sys/cpu/i386/include/tss.h @@ -35,11 +35,11 @@ * * from: @(#)tss.h 5.4 (Berkeley) 1/18/91 * $FreeBSD: src/sys/i386/include/tss.h,v 1.11 1999/12/29 04:33:09 peter Exp $ - * $DragonFly: src/sys/cpu/i386/include/tss.h,v 1.3 2003/06/28 04:16:03 dillon Exp $ + * $DragonFly: src/sys/cpu/i386/include/tss.h,v 1.4 2006/05/20 02:42:06 dillon Exp $ */ #ifndef _MACHINE_TSS_H_ -#define _MACHINE_TSS_H_ 1 +#define _MACHINE_TSS_H_ /* * Intel 386 Context Data Type diff --git a/sys/cpu/i386/include/types.h b/sys/cpu/i386/include/types.h index d956242cd9..327a2b0a43 100644 --- a/sys/cpu/i386/include/types.h +++ b/sys/cpu/i386/include/types.h @@ -32,12 +32,16 @@ * * @(#)types.h 8.3 (Berkeley) 1/5/94 * $FreeBSD: src/sys/i386/include/types.h,v 1.19.2.1 2001/03/21 10:50:58 peter Exp $ - * $DragonFly: src/sys/cpu/i386/include/types.h,v 1.9 2004/02/14 20:34:28 dillon Exp $ + * $DragonFly: src/sys/cpu/i386/include/types.h,v 1.10 2006/05/20 02:42:06 dillon Exp $ */ #ifndef _MACHINE_TYPES_H_ #define _MACHINE_TYPES_H_ +#ifndef _MACHINE_STDINT_H_ +#include +#endif + #if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE) typedef struct _physadr { int r[1]; diff --git a/sys/cpu/i386/include/vm86.h b/sys/cpu/i386/include/vm86.h index d2e7f920bd..9024f253ea 100644 --- a/sys/cpu/i386/include/vm86.h +++ b/sys/cpu/i386/include/vm86.h @@ -27,11 +27,15 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/include/vm86.h,v 1.13 1999/09/02 20:59:50 luoqi Exp $ - * $DragonFly: src/sys/cpu/i386/include/vm86.h,v 1.6 2005/11/22 08:41:02 dillon Exp $ + * $DragonFly: src/sys/cpu/i386/include/vm86.h,v 1.7 2006/05/20 02:42:06 dillon Exp $ */ #ifndef _MACHINE_VM86_H_ -#define _MACHINE_VM86_H_ 1 +#define _MACHINE_VM86_H_ + +#ifndef _SYS_TYPES_H_ +#include +#endif /* standard register representation */ typedef union { @@ -148,7 +152,8 @@ struct vm86_intcall_args { extern int in_vm86call; extern pt_entry_t *vm86paddr; -struct proc; +struct lwp; + extern int vm86_emulate (struct vm86frame *); extern int vm86_sysarch (struct lwp *, char *); extern void vm86_trap (struct vm86frame *, int); diff --git a/sys/ddb/db_access.h b/sys/ddb/db_access.h index 4cc8993c3f..ff3b424ea1 100644 --- a/sys/ddb/db_access.h +++ b/sys/ddb/db_access.h @@ -24,12 +24,18 @@ * rights to redistribute these changes. * * $FreeBSD: src/sys/ddb/db_access.h,v 1.9 1999/08/28 00:41:05 peter Exp $ - * $DragonFly: src/sys/ddb/db_access.h,v 1.3 2003/08/27 10:47:13 rob Exp $ + * $DragonFly: src/sys/ddb/db_access.h,v 1.4 2006/05/20 02:42:01 dillon Exp $ */ #ifndef _DDB_DB_ACCESS_H_ #define _DDB_DB_ACCESS_H_ +#ifdef _KERNEL + +#ifndef _DDB_DDB_H_ +#include +#endif + /* * Author: David B. Golub, Carnegie Mellon University * Date: 7/90 @@ -41,4 +47,6 @@ db_expr_t db_get_value (db_addr_t addr, int size, boolean_t is_signed); void db_put_value (db_addr_t addr, int size, db_expr_t value); +#endif + #endif /* !_DDB_DB_ACCESS_H_ */ diff --git a/sys/ddb/db_break.h b/sys/ddb/db_break.h index fc78b60e54..c2959673c2 100644 --- a/sys/ddb/db_break.h +++ b/sys/ddb/db_break.h @@ -24,16 +24,24 @@ * rights to redistribute these changes. * * $FreeBSD: src/sys/ddb/db_break.h,v 1.12 1999/08/28 00:41:06 peter Exp $ - * $DragonFly: src/sys/ddb/db_break.h,v 1.3 2003/08/27 10:47:13 rob Exp $ + * $DragonFly: src/sys/ddb/db_break.h,v 1.4 2006/05/20 02:42:01 dillon Exp $ */ /* * Author: David B. Golub, Carnegie Mellon University * Date: 7/90 */ + #ifndef _DDB_DB_BREAK_H_ #define _DDB_DB_BREAK_H_ +#ifndef _DDB_DDB_H_ +#include +#endif +#ifndef _VM_VM_MAP_H_ +#include +#endif + /* * Breakpoint. */ @@ -51,6 +59,8 @@ struct db_breakpoint { }; typedef struct db_breakpoint *db_breakpoint_t; +#ifdef _KERNEL + void db_clear_breakpoints (void); #ifdef SOFTWARE_SSTEP void db_delete_temp_breakpoint (db_breakpoint_t); @@ -61,4 +71,6 @@ void db_set_breakpoints (void); db_breakpoint_t db_set_temp_breakpoint (db_addr_t); #endif +#endif + #endif /* !_DDB_DB_BREAK_H_ */ diff --git a/sys/ddb/db_command.h b/sys/ddb/db_command.h index f8f5c6648b..0b904a30b0 100644 --- a/sys/ddb/db_command.h +++ b/sys/ddb/db_command.h @@ -24,12 +24,16 @@ * rights to redistribute these changes. * * $FreeBSD: src/sys/ddb/db_command.h,v 1.11 1999/08/28 00:41:06 peter Exp $ - * $DragonFly: src/sys/ddb/db_command.h,v 1.3 2003/08/27 10:47:13 rob Exp $ + * $DragonFly: src/sys/ddb/db_command.h,v 1.4 2006/05/20 02:42:01 dillon Exp $ */ #ifndef _DDB_DB_COMMAND_H_ #define _DDB_DB_COMMAND_H_ +#ifndef _DDB_DDB_H_ +#include +#endif + /* * Author: David B. Golub, Carnegie Mellon University * Date: 7/90 @@ -38,8 +42,6 @@ * Command loop declarations. */ -void db_command_loop (void); - extern db_addr_t db_dot; /* current location */ extern db_addr_t db_last_addr; /* last explicit address typed */ extern db_addr_t db_prev; /* last address examined @@ -47,4 +49,10 @@ extern db_addr_t db_prev; /* last address examined extern db_addr_t db_next; /* next address to be examined or written */ +#ifdef _KERNEL + +void db_command_loop (void); + +#endif + #endif /* !_DDB_DB_COMMAND_H_ */ diff --git a/sys/ddb/db_lex.h b/sys/ddb/db_lex.h index a4e5ab2c6c..247b8710fd 100644 --- a/sys/ddb/db_lex.h +++ b/sys/ddb/db_lex.h @@ -24,27 +24,22 @@ * rights to redistribute these changes. * * $FreeBSD: src/sys/ddb/db_lex.h,v 1.12 1999/08/28 00:41:08 peter Exp $ - * $DragonFly: src/sys/ddb/db_lex.h,v 1.3 2003/08/27 10:47:13 rob Exp $ + * $DragonFly: src/sys/ddb/db_lex.h,v 1.4 2006/05/20 02:42:01 dillon Exp $ */ #ifndef _DDB_DB_LEX_H_ #define _DDB_DB_LEX_H_ +#ifndef _DDB_DDB_H_ +#include +#endif + /* * Author: David B. Golub, Carnegie Mellon University * Date: 7/90 */ -/* - * Lexical analyzer. - */ -void db_flush_lex (void); -int db_read_line (void); -int db_read_token (void); -void db_unread_token (int t); -extern db_expr_t db_tok_number; #define TOK_STRING_SIZE 120 -extern char db_tok_string[TOK_STRING_SIZE]; #define tEOF (-1) #define tEOL 1 @@ -68,4 +63,19 @@ extern char db_tok_string[TOK_STRING_SIZE]; #define tSHIFT_R 19 #define tDOTDOT 20 +#ifdef _KERNEL + +/* + * Lexical analyzer. + */ +void db_flush_lex (void); +int db_read_line (void); +int db_read_token (void); +void db_unread_token (int t); + +extern db_expr_t db_tok_number; +extern char db_tok_string[TOK_STRING_SIZE]; + +#endif + #endif /* !_DDB_DB_LEX_H_ */ diff --git a/sys/ddb/db_sym.h b/sys/ddb/db_sym.h index d07743940a..a40b90b529 100644 --- a/sys/ddb/db_sym.h +++ b/sys/ddb/db_sym.h @@ -24,12 +24,16 @@ * rights to redistribute these changes. * * $FreeBSD: src/sys/ddb/db_sym.h,v 1.19 1999/08/28 00:41:10 peter Exp $ - * $DragonFly: src/sys/ddb/db_sym.h,v 1.3 2003/08/27 10:47:13 rob Exp $ + * $DragonFly: src/sys/ddb/db_sym.h,v 1.4 2006/05/20 02:42:01 dillon Exp $ */ #ifndef _DDB_DB_SYM_H_ #define _DDB_DB_SYM_H_ +#ifndef _DDB_DDB_H_ +#include +#endif + /* * Author: Alessandro Forin, Carnegie Mellon University * Date: 8/90 diff --git a/sys/ddb/db_variables.h b/sys/ddb/db_variables.h index 4b2a7150d3..4af60171ff 100644 --- a/sys/ddb/db_variables.h +++ b/sys/ddb/db_variables.h @@ -24,7 +24,7 @@ * rights to redistribute these changes. * * $FreeBSD: src/sys/ddb/db_variables.h,v 1.11 1999/08/28 00:41:11 peter Exp $ - * $DragonFly: src/sys/ddb/db_variables.h,v 1.3 2003/08/27 10:47:13 rob Exp $ + * $DragonFly: src/sys/ddb/db_variables.h,v 1.4 2006/05/20 02:42:01 dillon Exp $ */ /* @@ -35,25 +35,36 @@ #ifndef _DDB_DB_VARIABLES_H_ #define _DDB_DB_VARIABLES_H_ +#ifndef _DDB_DDB_H_ +#include +#endif + /* * Debugger variables. */ struct db_variable; -typedef int db_varfcn_t (struct db_variable *vp, db_expr_t *valuep, - int op); + +typedef int db_varfcn_t (struct db_variable *vp, db_expr_t *valuep, int op); + struct db_variable { char *name; /* Name of variable */ db_expr_t *valuep; /* value of variable */ /* function to call when reading/writing */ db_varfcn_t *fcn; +}; + #define DB_VAR_GET 0 #define DB_VAR_SET 1 -}; + #define FCN_NULL ((db_varfcn_t *)0) +#ifdef _KERNEL + extern struct db_variable db_regs[]; /* machine registers */ extern struct db_variable *db_eregs; void db_read_variable (struct db_variable *, db_expr_t *); +#endif + #endif /* _!DDB_DB_VARIABLES_H_ */ diff --git a/sys/ddb/db_watch.h b/sys/ddb/db_watch.h index 595b231840..92b88073e2 100644 --- a/sys/ddb/db_watch.h +++ b/sys/ddb/db_watch.h @@ -24,7 +24,7 @@ * rights to redistribute these changes. * * $FreeBSD: src/sys/ddb/db_watch.h,v 1.11 1999/08/28 00:41:12 peter Exp $ - * $DragonFly: src/sys/ddb/db_watch.h,v 1.2 2003/06/17 04:28:20 dillon Exp $ + * $DragonFly: src/sys/ddb/db_watch.h,v 1.3 2006/05/20 02:42:01 dillon Exp $ */ /* @@ -35,6 +35,13 @@ #ifndef _DDB_DB_WATCH_H_ #define _DDB_DB_WATCH_H_ +#ifndef _DDB_DDB_H_ +#include +#endif +#ifndef _VM_VM_MAP_H_ +#include +#endif + /* * Watchpoint. */ diff --git a/sys/ddb/ddb.h b/sys/ddb/ddb.h index c7f6ace55f..46061e5ea4 100644 --- a/sys/ddb/ddb.h +++ b/sys/ddb/ddb.h @@ -28,7 +28,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/ddb/ddb.h,v 1.24.2.2 2002/08/30 22:27:49 gibbs Exp $ - * $DragonFly: src/sys/ddb/ddb.h,v 1.8 2005/12/23 21:35:44 swildner Exp $ + * $DragonFly: src/sys/ddb/ddb.h,v 1.9 2006/05/20 02:42:01 dillon Exp $ */ /* @@ -38,8 +38,13 @@ #ifndef _DDB_DDB_H_ #define _DDB_DDB_H_ +#ifndef _SYS_QUEUE_H_ #include +#endif + +#ifndef _MACHINE_DB_MACHDEP_H_ #include /* type definitions */ +#endif typedef void db_cmdfcn_t (db_expr_t addr, boolean_t have_addr, db_expr_t count, char *modif); diff --git a/sys/dev/disk/ncv/dvcfg.h b/sys/dev/disk/ncv/dvcfg.h index be04abed75..0e6113e6ef 100644 --- a/sys/dev/disk/ncv/dvcfg.h +++ b/sys/dev/disk/ncv/dvcfg.h @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/i386/include/dvcfg.h,v 1.2.6.1 2000/08/03 01:01:19 peter Exp $ */ -/* $DragonFly: src/sys/dev/disk/ncv/dvcfg.h,v 1.5 2005/12/24 20:34:04 swildner Exp $ */ +/* $DragonFly: src/sys/dev/disk/ncv/dvcfg.h,v 1.6 2006/05/20 02:42:06 dillon Exp $ */ /* $NetBSD$ */ /* * [NetBSD for NEC PC98 series] @@ -36,6 +36,10 @@ #ifndef _MACHINE_DVCFG_H_ #define _MACHINE_DVCFG_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif + typedef void *dvcfg_hw_t; struct dvcfg_hwsel { diff --git a/sys/emulation/svr4/svr4_ioctl.c b/sys/emulation/svr4/svr4_ioctl.c index 80fb7b9d6c..cea3bfbe17 100644 --- a/sys/emulation/svr4/svr4_ioctl.c +++ b/sys/emulation/svr4/svr4_ioctl.c @@ -26,7 +26,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/svr4/svr4_ioctl.c,v 1.6 1999/12/08 12:00:48 newton Exp $ - * $DragonFly: src/sys/emulation/svr4/Attic/svr4_ioctl.c,v 1.13 2006/05/19 07:33:44 dillon Exp $ + * $DragonFly: src/sys/emulation/svr4/Attic/svr4_ioctl.c,v 1.14 2006/05/20 02:42:05 dillon Exp $ */ #include @@ -90,12 +90,12 @@ svr4_sys_ioctl(struct svr4_sys_ioctl_args *uap) u_long cmd; int (*fun) (struct file *, struct thread *, register_t *, int, u_long, caddr_t); + int error; #ifdef DEBUG_SVR4 char dir[4]; char c; int num; int argsiz; - int error; KKASSERT(p); diff --git a/sys/i386/include/acpica_machdep.h b/sys/i386/include/acpica_machdep.h index 0e411559d3..0711207ad3 100644 --- a/sys/i386/include/acpica_machdep.h +++ b/sys/i386/include/acpica_machdep.h @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/include/acpica_machdep.h,v 1.5 2003/09/10 01:14:42 jhb Exp $ - * $DragonFly: src/sys/i386/include/Attic/acpica_machdep.h,v 1.2 2004/06/27 08:52:46 dillon Exp $ + * $DragonFly: src/sys/i386/include/Attic/acpica_machdep.h,v 1.3 2006/05/20 02:42:06 dillon Exp $ */ /****************************************************************************** @@ -34,8 +34,8 @@ * *****************************************************************************/ -#ifndef __ACPICA_MACHDEP_H__ -#define __ACPICA_MACHDEP_H__ +#ifndef _MACHINE_ACPICA_MACHDEP_H__ +#define _MACHINE_ACPICA_MACHDEP_H__ #ifdef _KERNEL /* @@ -123,4 +123,4 @@ void acpi_SetDefaultIntrModel(int model); -#endif /* __ACPICA_MACHDEP_H__ */ +#endif /* _MACHINE_ACPICA_MACHDEP_H__ */ diff --git a/sys/i386/include/apm_bios.h b/sys/i386/include/apm_bios.h index cca1a3ebf2..0d1593931c 100644 --- a/sys/i386/include/apm_bios.h +++ b/sys/i386/include/apm_bios.h @@ -13,16 +13,18 @@ * Aug, 1994 Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD) * * $FreeBSD: src/sys/i386/include/apm_bios.h,v 1.27.2.2 2002/04/12 16:47:00 bmah Exp $ - * $DragonFly: src/sys/i386/include/Attic/apm_bios.h,v 1.4 2005/06/12 20:55:14 swildner Exp $ + * $DragonFly: src/sys/i386/include/Attic/apm_bios.h,v 1.5 2006/05/20 02:42:06 dillon Exp $ */ #ifndef _MACHINE_APM_BIOS_H_ #define _MACHINE_APM_BIOS_H_ -#ifndef _KERNEL +#ifndef _SYS_TYPES_H_ #include #endif +#ifndef _SYS_IOCCOM_H_ #include +#endif /* BIOS id */ #define APM_BIOS 0x53 diff --git a/sys/i386/include/asmacros.h b/sys/i386/include/asmacros.h index 2ef48bdf1a..4ad8a18a81 100644 --- a/sys/i386/include/asmacros.h +++ b/sys/i386/include/asmacros.h @@ -31,13 +31,15 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/include/asmacros.h,v 1.18 1999/08/28 00:44:06 peter Exp $ - * $DragonFly: src/sys/i386/include/Attic/asmacros.h,v 1.9 2005/11/02 09:35:09 dillon Exp $ + * $DragonFly: src/sys/i386/include/Attic/asmacros.h,v 1.10 2006/05/20 02:42:06 dillon Exp $ */ #ifndef _MACHINE_ASMACROS_H_ #define _MACHINE_ASMACROS_H_ +#ifndef _SYS_CDEFS_H_ #include +#endif #ifdef _KERNEL diff --git a/sys/i386/include/atomic.h b/sys/i386/include/atomic.h index 52dce26513..ffa0a1eac7 100644 --- a/sys/i386/include/atomic.h +++ b/sys/i386/include/atomic.h @@ -24,11 +24,15 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/include/atomic.h,v 1.9.2.1 2000/07/07 00:38:47 obrien Exp $ - * $DragonFly: src/sys/i386/include/Attic/atomic.h,v 1.17 2006/05/16 14:24:06 sephe Exp $ + * $DragonFly: src/sys/i386/include/Attic/atomic.h,v 1.18 2006/05/20 02:42:06 dillon Exp $ */ #ifndef _MACHINE_ATOMIC_H_ #define _MACHINE_ATOMIC_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif + /* * Various simple arithmetic on memory which is atomic in the presence * of interrupts and multiple processors. diff --git a/sys/i386/include/bootinfo.h b/sys/i386/include/bootinfo.h index 6309abdce6..16c2128893 100644 --- a/sys/i386/include/bootinfo.h +++ b/sys/i386/include/bootinfo.h @@ -30,12 +30,16 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/include/bootinfo.h,v 1.14 1999/12/29 04:32:57 peter Exp $ - * $DragonFly: src/sys/i386/include/Attic/bootinfo.h,v 1.4 2004/03/04 01:37:53 dillon Exp $ + * $DragonFly: src/sys/i386/include/Attic/bootinfo.h,v 1.5 2006/05/20 02:42:06 dillon Exp $ */ #ifndef _MACHINE_BOOTINFO_H_ #define _MACHINE_BOOTINFO_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif + /* Only change the version number if you break compatibility. */ #define BOOTINFO_VERSION 1 diff --git a/sys/i386/include/bus_dma.h b/sys/i386/include/bus_dma.h index dd5d5b80f7..2787467913 100644 --- a/sys/i386/include/bus_dma.h +++ b/sys/i386/include/bus_dma.h @@ -68,11 +68,15 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* $FreeBSD: src/sys/i386/include/bus_dma.h,v 1.15.2.2 2002/11/21 23:36:01 sam Exp $ */ -/* $DragonFly: src/sys/i386/include/Attic/bus_dma.h,v 1.4 2004/02/16 19:35:53 joerg Exp $ */ +/* $DragonFly: src/sys/i386/include/Attic/bus_dma.h,v 1.5 2006/05/20 02:42:06 dillon Exp $ */ #ifndef _I386_BUS_DMA_H_ #define _I386_BUS_DMA_H_ +#ifndef _MACHINE_BUS_AT386_H_ +#include +#endif + /* * Flags used in various bus DMA methods. */ diff --git a/sys/i386/include/clock.h b/sys/i386/include/clock.h index 2651734540..3b53b575ad 100644 --- a/sys/i386/include/clock.h +++ b/sys/i386/include/clock.h @@ -4,13 +4,18 @@ * This file is in the public domain. * * $FreeBSD: src/sys/i386/include/clock.h,v 1.38.2.1 2002/11/02 04:41:50 iwasaki Exp $ - * $DragonFly: src/sys/i386/include/Attic/clock.h,v 1.7 2006/01/25 19:56:18 dillon Exp $ + * $DragonFly: src/sys/i386/include/Attic/clock.h,v 1.8 2006/05/20 02:42:06 dillon Exp $ */ #ifndef _MACHINE_CLOCK_H_ #define _MACHINE_CLOCK_H_ #ifdef _KERNEL + +#ifndef _SYS_TYPES_H_ +#include +#endif + /* * i386 to clock driver interface. * XXX large parts of the driver and its interface are misplaced. diff --git a/sys/i386/include/cpu.h b/sys/i386/include/cpu.h index cbf3cad62b..6b1aa2981c 100644 --- a/sys/i386/include/cpu.h +++ b/sys/i386/include/cpu.h @@ -35,7 +35,7 @@ * * from: @(#)cpu.h 5.4 (Berkeley) 5/9/91 * $FreeBSD: src/sys/i386/include/cpu.h,v 1.43.2.2 2001/06/15 09:37:57 scottl Exp $ - * $DragonFly: src/sys/i386/include/Attic/cpu.h,v 1.15 2004/03/30 19:14:06 dillon Exp $ + * $DragonFly: src/sys/i386/include/Attic/cpu.h,v 1.16 2006/05/20 02:42:06 dillon Exp $ */ #ifndef _MACHINE_CPU_H_ @@ -44,9 +44,15 @@ /* * Definitions unique to i386 cpu support. */ +#ifndef _MACHINE_PSL_H_ #include "psl.h" +#endif +#ifndef _MACHINE_FRAME_H_ #include "frame.h" +#endif +#ifndef _MACHINE_SEGMENTS_H_ #include "segments.h" +#endif /* * definitions of cpu-dependent requirements @@ -115,11 +121,15 @@ } #ifdef _KERNEL + +struct proc; + extern char btext[]; extern char etext[]; void fork_trampoline (void); void fork_return (struct proc *, struct trapframe); + #endif #endif /* !_MACHINE_CPU_H_ */ diff --git a/sys/i386/include/cpufunc.h b/sys/i386/include/cpufunc.h index ba06dd8a0e..c060d54ff0 100644 --- a/sys/i386/include/cpufunc.h +++ b/sys/i386/include/cpufunc.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/include/cpufunc.h,v 1.96.2.3 2002/04/28 22:50:54 dwmalone Exp $ - * $DragonFly: src/sys/i386/include/Attic/cpufunc.h,v 1.14 2005/08/28 15:27:05 hsu Exp $ + * $DragonFly: src/sys/i386/include/Attic/cpufunc.h,v 1.15 2006/05/20 02:42:06 dillon Exp $ */ /* @@ -41,7 +41,12 @@ #ifndef _MACHINE_CPUFUNC_H_ #define _MACHINE_CPUFUNC_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _SYS_CDEFS_H_ #include +#endif __BEGIN_DECLS #define readb(va) (*(volatile u_int8_t *) (va)) diff --git a/sys/i386/include/dvcfg.h b/sys/i386/include/dvcfg.h index 9dd3bd1a80..d26f322423 100644 --- a/sys/i386/include/dvcfg.h +++ b/sys/i386/include/dvcfg.h @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/i386/include/dvcfg.h,v 1.2.6.1 2000/08/03 01:01:19 peter Exp $ */ -/* $DragonFly: src/sys/i386/include/Attic/dvcfg.h,v 1.5 2005/12/24 20:34:04 swildner Exp $ */ +/* $DragonFly: src/sys/i386/include/Attic/dvcfg.h,v 1.6 2006/05/20 02:42:06 dillon Exp $ */ /* $NetBSD$ */ /* * [NetBSD for NEC PC98 series] @@ -36,6 +36,10 @@ #ifndef _MACHINE_DVCFG_H_ #define _MACHINE_DVCFG_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif + typedef void *dvcfg_hw_t; struct dvcfg_hwsel { diff --git a/sys/i386/include/iic.h b/sys/i386/include/iic.h index 0213353e58..7a733aa659 100644 --- a/sys/i386/include/iic.h +++ b/sys/i386/include/iic.h @@ -24,13 +24,18 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/include/iic.h,v 1.3 1999/08/28 00:44:16 peter Exp $ - * $DragonFly: src/sys/i386/include/Attic/iic.h,v 1.3 2003/06/28 04:16:03 dillon Exp $ + * $DragonFly: src/sys/i386/include/Attic/iic.h,v 1.4 2006/05/20 02:42:06 dillon Exp $ * */ #ifndef _MACHINE_IIC_H_ #define _MACHINE_IIC_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _SYS_IOCCOM_H_ #include +#endif struct iiccmd { u_char slave; diff --git a/sys/i386/include/ioctl_fd.h b/sys/i386/include/ioctl_fd.h index 6a35ccabf7..e93a6b6ae0 100644 --- a/sys/i386/include/ioctl_fd.h +++ b/sys/i386/include/ioctl_fd.h @@ -25,16 +25,18 @@ * DAMAGE. * * $FreeBSD: src/sys/i386/include/ioctl_fd.h,v 1.13.2.1 2001/07/19 13:16:54 joerg Exp $ - * $DragonFly: src/sys/i386/include/Attic/ioctl_fd.h,v 1.2 2003/06/17 04:28:35 dillon Exp $ + * $DragonFly: src/sys/i386/include/Attic/ioctl_fd.h,v 1.3 2006/05/20 02:42:06 dillon Exp $ */ #ifndef _MACHINE_IOCTL_FD_H_ #define _MACHINE_IOCTL_FD_H_ -#ifndef _KERNEL +#ifndef _SYS_TYPES_H_ #include #endif +#ifndef _SYS_IOCCOM_H_ #include +#endif #define FD_FORMAT_VERSION 110 /* used to validate before formatting */ #define FD_MAX_NSEC 36 /* highest known number of spt - allow for */ diff --git a/sys/i386/include/md_var.h b/sys/i386/include/md_var.h index c1271f96bf..32cd108e55 100644 --- a/sys/i386/include/md_var.h +++ b/sys/i386/include/md_var.h @@ -27,12 +27,16 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/include/md_var.h,v 1.35.2.4 2003/01/22 20:14:53 jhb Exp $ - * $DragonFly: src/sys/i386/include/Attic/md_var.h,v 1.17 2005/10/27 03:15:47 sephe Exp $ + * $DragonFly: src/sys/i386/include/Attic/md_var.h,v 1.18 2006/05/20 02:42:06 dillon Exp $ */ #ifndef _MACHINE_MD_VAR_H_ #define _MACHINE_MD_VAR_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif + /* * Miscellaneous machine-dependent declarations. */ diff --git a/sys/i386/include/nexusvar.h b/sys/i386/include/nexusvar.h index 744bf889d9..b428753826 100644 --- a/sys/i386/include/nexusvar.h +++ b/sys/i386/include/nexusvar.h @@ -24,11 +24,18 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/include/nexusvar.h,v 1.1 2000/09/28 00:37:31 peter Exp $ - * $DragonFly: src/sys/i386/include/Attic/nexusvar.h,v 1.1 2004/01/13 18:31:58 joerg Exp $ + * $DragonFly: src/sys/i386/include/Attic/nexusvar.h,v 1.2 2006/05/20 02:42:06 dillon Exp $ */ #ifndef _MACHINE_NEXUSVAR_H_ -#define _MACHINE_NEXUSVAR_H_ 1 +#define _MACHINE_NEXUSVAR_H_ + +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _SYS_CONF_H_ +#include +#endif enum nexus_device_ivars { NEXUS_IVAR_PCIBUS diff --git a/sys/i386/include/npx.h b/sys/i386/include/npx.h index ba8be7f1ad..7b69ae43cb 100644 --- a/sys/i386/include/npx.h +++ b/sys/i386/include/npx.h @@ -35,7 +35,7 @@ * * from: @(#)npx.h 5.3 (Berkeley) 1/18/91 * $FreeBSD: src/sys/i386/include/npx.h,v 1.18.2.1 2001/08/15 01:23:52 peter Exp $ - * $DragonFly: src/sys/i386/include/Attic/npx.h,v 1.7 2004/05/05 19:26:42 dillon Exp $ + * $DragonFly: src/sys/i386/include/Attic/npx.h,v 1.8 2006/05/20 02:42:06 dillon Exp $ */ /* @@ -46,6 +46,10 @@ #ifndef _MACHINE_NPX_H_ #define _MACHINE_NPX_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif + /* Environment information of floating point unit */ struct env87 { long en_cw; /* control word (16bits) */ @@ -143,6 +147,8 @@ union savefpu { #ifdef _KERNEL +struct proc; + int npxdna (void); void npxexit (struct proc *p); void npxinit (u_short control); diff --git a/sys/i386/include/pcb_ext.h b/sys/i386/include/pcb_ext.h index f5bc9f2f9b..821d7081fb 100644 --- a/sys/i386/include/pcb_ext.h +++ b/sys/i386/include/pcb_ext.h @@ -24,18 +24,28 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/include/pcb_ext.h,v 1.4 1999/12/29 04:33:04 peter Exp $ - * $DragonFly: src/sys/i386/include/Attic/pcb_ext.h,v 1.6 2005/02/21 21:40:55 dillon Exp $ + * $DragonFly: src/sys/i386/include/Attic/pcb_ext.h,v 1.7 2006/05/20 02:42:06 dillon Exp $ */ -#ifndef _I386_PCB_EXT_H_ -#define _I386_PCB_EXT_H_ +#ifndef _MACHINE_PCB_EXT_H_ +#define _MACHINE_PCB_EXT_H_ + +#ifndef _SYS_TYPES_H_ +#include +#endif /* * Extension to the 386 process control block */ +#ifndef _MACHINE_TSS_H_ #include "tss.h" +#endif +#ifndef _MACHINE_VM86_H_ #include "vm86.h" +#endif +#ifndef _MACHINE_SEGMENTS_H_ #include "segments.h" +#endif struct pcb_ext { struct segment_descriptor ext_tssd; /* tss descriptor */ @@ -54,6 +64,8 @@ struct pcb_ldt { #ifdef _KERNEL +struct pcb; + void set_user_ldt (struct pcb *); struct pcb_ldt *user_ldt_alloc (struct pcb *, int); void user_ldt_free (struct pcb *); diff --git a/sys/i386/include/pci_cfgreg.h b/sys/i386/include/pci_cfgreg.h index ad7540d935..f4817f4497 100644 --- a/sys/i386/include/pci_cfgreg.h +++ b/sys/i386/include/pci_cfgreg.h @@ -24,7 +24,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/i386/include/pci_cfgreg.h,v 1.4.2.1 2001/07/28 05:55:07 imp Exp $ - * $DragonFly: src/sys/i386/include/Attic/pci_cfgreg.h,v 1.4 2005/06/12 20:55:14 swildner Exp $ + * $DragonFly: src/sys/i386/include/Attic/pci_cfgreg.h,v 1.5 2006/05/20 02:42:06 dillon Exp $ * */ @@ -47,9 +47,17 @@ #define CONF2_ENABLE_CHK 0x0e #define CONF2_ENABLE_RES 0x0e +#ifdef _KERNEL + +#ifndef _SYS_TYPES_H_ +#include +#endif + extern int pci_cfgregopen(void); extern u_int32_t pci_cfgregread(int bus, int slot, int func, int reg, int bytes); extern void pci_cfgregwrite(int bus, int slot, int func, int reg, u_int32_t data, int bytes); extern int pci_cfgintr(int bus, int device, int pin); #endif + +#endif diff --git a/sys/i386/include/perfmon.h b/sys/i386/include/perfmon.h index 2d9e1d2769..b2af695b26 100644 --- a/sys/i386/include/perfmon.h +++ b/sys/i386/include/perfmon.h @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/include/perfmon.h,v 1.7 1999/12/29 04:33:04 peter Exp $ - * $DragonFly: src/sys/i386/include/Attic/perfmon.h,v 1.3 2003/08/26 21:42:18 rob Exp $ + * $DragonFly: src/sys/i386/include/Attic/perfmon.h,v 1.4 2006/05/20 02:42:06 dillon Exp $ */ /* @@ -37,11 +37,13 @@ #ifndef _MACHINE_PERFMON_H_ #define _MACHINE_PERFMON_H_ - -#ifndef _KERNEL + +#ifndef _SYS_TYPES_H_ #include #endif +#ifndef _SYS_IOCCOM_H_ #include +#endif #define NPMC 2 diff --git a/sys/i386/include/pmap.h b/sys/i386/include/pmap.h index ebf4799d6e..665953ef51 100644 --- a/sys/i386/include/pmap.h +++ b/sys/i386/include/pmap.h @@ -43,7 +43,7 @@ * from: hp300: @(#)pmap.h 7.2 (Berkeley) 12/16/90 * from: @(#)pmap.h 7.4 (Berkeley) 5/12/91 * $FreeBSD: src/sys/i386/include/pmap.h,v 1.65.2.3 2001/10/03 07:15:37 peter Exp $ - * $DragonFly: src/sys/i386/include/Attic/pmap.h,v 1.8 2005/08/12 00:25:10 hmp Exp $ + * $DragonFly: src/sys/i386/include/Attic/pmap.h,v 1.9 2006/05/20 02:42:06 dillon Exp $ */ #ifndef _MACHINE_PMAP_H_ @@ -130,7 +130,18 @@ #ifndef LOCORE +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _SYS_QUEUE_H_ #include +#endif +#ifndef _MACHINE_TYPES_H_ +#include +#endif +#ifndef _MACHINE_PARAM_H_ +#include +#endif /* * Address of current and alternate address space page table maps @@ -187,16 +198,30 @@ pmap_kextract(vm_offset_t va) /* * Pmap stuff */ -struct pv_entry; +struct pv_entry; +struct vm_page; +struct vm_object; struct md_page { int pv_list_count; TAILQ_HEAD(,pv_entry) pv_list; }; +/* + * Each machine dependent implementation is expected to + * keep certain statistics. They may do this anyway they + * so choose, but are expected to return the statistics + * in the following structure. + */ +struct pmap_statistics { + long resident_count; /* # of pages mapped (total) */ + long wired_count; /* # of pages wired */ +}; +typedef struct pmap_statistics *pmap_statistics_t; + struct pmap { pd_entry_t *pm_pdir; /* KVA of page directory */ - vm_object_t pm_pteobj; /* Container for pte's */ + struct vm_object *pm_pteobj; /* Container for pte's */ TAILQ_HEAD(,pv_entry) pm_pvlist; /* list of mappings in pmap */ int pm_count; /* reference count */ cpumask_t pm_active; /* active on cpus */ diff --git a/sys/i386/include/pmap_inval.h b/sys/i386/include/pmap_inval.h index 7ac35284a3..b664ed6640 100644 --- a/sys/i386/include/pmap_inval.h +++ b/sys/i386/include/pmap_inval.h @@ -31,12 +31,16 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $DragonFly: src/sys/i386/include/Attic/pmap_inval.h,v 1.2 2004/07/16 05:48:46 dillon Exp $ + * $DragonFly: src/sys/i386/include/Attic/pmap_inval.h,v 1.3 2006/05/20 02:42:06 dillon Exp $ */ #ifndef _MACHINE_PMAP_INVAL_H_ #define _MACHINE_PMAP_INVAL_H_ +#ifndef _SYS_THREAD_H_ +#include +#endif + typedef struct pmap_inval_info { int pir_flags; struct lwkt_cpusync pir_cpusync; @@ -50,6 +54,10 @@ typedef pmap_inval_info *pmap_inval_info_t; #ifdef _KERNEL +#ifndef _MACHINE_PMAP_H_ +#include +#endif + void pmap_inval_init(pmap_inval_info_t); void pmap_inval_add(pmap_inval_info_t, pmap_t, vm_offset_t); void pmap_inval_flush(pmap_inval_info_t); diff --git a/sys/i386/include/profile.h b/sys/i386/include/profile.h index 7aef7c822c..e185d15b74 100644 --- a/sys/i386/include/profile.h +++ b/sys/i386/include/profile.h @@ -32,12 +32,16 @@ * * @(#)profile.h 8.1 (Berkeley) 6/11/93 * $FreeBSD: src/sys/i386/include/profile.h,v 1.20 1999/12/29 04:33:05 peter Exp $ - * $DragonFly: src/sys/i386/include/Attic/profile.h,v 1.6 2005/12/24 20:34:04 swildner Exp $ + * $DragonFly: src/sys/i386/include/Attic/profile.h,v 1.7 2006/05/20 02:42:06 dillon Exp $ */ #ifndef _MACHINE_PROFILE_H_ #define _MACHINE_PROFILE_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif + #ifdef _KERNEL /* diff --git a/sys/i386/include/ptrace.h b/sys/i386/include/ptrace.h index e7fa616fbd..48af45abaf 100644 --- a/sys/i386/include/ptrace.h +++ b/sys/i386/include/ptrace.h @@ -32,7 +32,7 @@ * * @(#)ptrace.h 8.1 (Berkeley) 6/11/93 * $FreeBSD: src/sys/i386/include/ptrace.h,v 1.9 1999/12/29 04:33:06 peter Exp $ - * $DragonFly: src/sys/i386/include/Attic/ptrace.h,v 1.3 2003/08/26 21:42:18 rob Exp $ + * $DragonFly: src/sys/i386/include/Attic/ptrace.h,v 1.4 2006/05/20 02:42:06 dillon Exp $ */ #ifndef _MACHINE_PTRACE_H_ @@ -49,7 +49,15 @@ #define PT_SETDBREGS (PT_FIRSTMACH + 6) #ifdef _KERNEL + +#ifndef _SYS_TYPES_H_ +#include +#endif + +struct proc; + int ptrace_read_u_check (struct proc *p, vm_offset_t off, size_t len); + #endif #endif diff --git a/sys/i386/include/reg.h b/sys/i386/include/reg.h index ac30770c1f..ab223e5566 100644 --- a/sys/i386/include/reg.h +++ b/sys/i386/include/reg.h @@ -35,7 +35,7 @@ * * from: @(#)reg.h 5.5 (Berkeley) 1/18/91 * $FreeBSD: src/sys/i386/include/reg.h,v 1.22.2.2 2002/11/07 22:47:55 alfred Exp $ - * $DragonFly: src/sys/i386/include/Attic/reg.h,v 1.4 2005/10/27 03:15:47 sephe Exp $ + * $DragonFly: src/sys/i386/include/Attic/reg.h,v 1.5 2006/05/20 02:42:06 dillon Exp $ */ #ifndef _MACHINE_REG_H_ @@ -142,6 +142,10 @@ struct dbreg { #ifdef _KERNEL +#ifndef _SYS_TYPES_H_ +#include +#endif + struct proc; struct lwp; @@ -152,6 +156,7 @@ int set_fpregs (struct lwp *, struct fpreg *); int set_regs (struct lwp *lp, struct reg *regs); void setregs (struct proc *, u_long, u_long, u_long); int set_dbregs (struct lwp *lp, struct dbreg *dbregs); + #endif #endif /* !_MACHINE_REG_H_ */ diff --git a/sys/i386/include/segments.h b/sys/i386/include/segments.h index 7a48b8b69f..39365d61c5 100644 --- a/sys/i386/include/segments.h +++ b/sys/i386/include/segments.h @@ -36,7 +36,7 @@ * * from: @(#)segments.h 7.1 (Berkeley) 5/9/91 * $FreeBSD: src/sys/i386/include/segments.h,v 1.24 1999/12/29 04:33:07 peter Exp $ - * $DragonFly: src/sys/i386/include/Attic/segments.h,v 1.10 2005/11/04 08:57:29 dillon Exp $ + * $DragonFly: src/sys/i386/include/Attic/segments.h,v 1.11 2006/05/20 02:42:06 dillon Exp $ */ #ifndef _MACHINE_SEGMENTS_H_ @@ -251,6 +251,11 @@ struct region_descriptor { #define NLDT (LBSDICALLS_SEL + 1) #if defined(_KERNEL) && !defined(LOCORE) + +#ifndef _SYS_TYPES_H_ +#include +#endif + extern int _default_ldt; extern union descriptor gdt[]; extern struct soft_segment_descriptor gdt_segs[]; diff --git a/sys/i386/include/sigframe.h b/sys/i386/include/sigframe.h index d6ab62fddf..813de68a83 100644 --- a/sys/i386/include/sigframe.h +++ b/sys/i386/include/sigframe.h @@ -26,12 +26,22 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/i386/include/sigframe.h,v 1.5 1999/12/04 10:40:24 marcel Exp $ - * $DragonFly: src/sys/i386/include/Attic/sigframe.h,v 1.3 2003/10/24 14:10:45 daver Exp $ + * $DragonFly: src/sys/i386/include/Attic/sigframe.h,v 1.4 2006/05/20 02:42:06 dillon Exp $ */ #ifndef _MACHINE_SIGFRAME_H_ #define _MACHINE_SIGFRAME_H_ +#ifndef _MACHINE_TYPES_H_ +#include +#endif +#ifndef _SYS_SIGNAL_H_ +#include +#endif +#ifndef _SYS_UCONTEXT_H_ +#include +#endif + /* * Signal frames, arguments passed to application signal handlers. */ diff --git a/sys/i386/include/signal.h b/sys/i386/include/signal.h index 793e1749d3..1295ad1064 100644 --- a/sys/i386/include/signal.h +++ b/sys/i386/include/signal.h @@ -32,7 +32,7 @@ * * @(#)signal.h 8.1 (Berkeley) 6/11/93 * $FreeBSD: src/sys/i386/include/signal.h,v 1.12 1999/11/12 13:52:11 marcel Exp $ - * $DragonFly: src/sys/i386/include/Attic/signal.h,v 1.5 2003/10/24 14:10:45 daver Exp $ + * $DragonFly: src/sys/i386/include/Attic/signal.h,v 1.6 2006/05/20 02:42:06 dillon Exp $ */ #ifndef _MACHINE_SIGNAL_H_ @@ -52,7 +52,13 @@ typedef int sig_atomic_t; * be banned, or the option should be fixed to not screw up relative-path * includes. */ + +#ifndef _SYS_SIGNAL_H_ +#include +#endif +#ifndef _MACHINE_TRAP_H_ #include /* codes for SIGILL, SIGFPE */ +#endif /* * Information pushed on stack when a signal is delivered. diff --git a/sys/i386/include/smb.h b/sys/i386/include/smb.h index f1c82c8ae9..f786fee9f6 100644 --- a/sys/i386/include/smb.h +++ b/sys/i386/include/smb.h @@ -24,13 +24,18 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/include/smb.h,v 1.3 1999/08/28 00:44:24 peter Exp $ - * $DragonFly: src/sys/i386/include/Attic/smb.h,v 1.3 2003/06/28 04:16:03 dillon Exp $ + * $DragonFly: src/sys/i386/include/Attic/smb.h,v 1.4 2006/05/20 02:42:06 dillon Exp $ * */ #ifndef _MACHINE_SMB_H_ #define _MACHINE_SMB_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _SYS_IOCCOM_H_ #include +#endif struct smbcmd { char cmd; diff --git a/sys/i386/include/specialreg.h b/sys/i386/include/specialreg.h index 00666eaf20..1c64506365 100644 --- a/sys/i386/include/specialreg.h +++ b/sys/i386/include/specialreg.h @@ -32,7 +32,7 @@ * * from: @(#)specialreg.h 7.1 (Berkeley) 5/9/91 * $FreeBSD: src/sys/i386/include/specialreg.h,v 1.19.2.3 2003/01/22 17:24:28 jhb Exp $ - * $DragonFly: src/sys/i386/include/Attic/specialreg.h,v 1.3 2004/07/27 08:09:56 asmodai Exp $ + * $DragonFly: src/sys/i386/include/Attic/specialreg.h,v 1.4 2006/05/20 02:42:06 dillon Exp $ */ #ifndef _MACHINE_SPECIALREG_H_ @@ -352,8 +352,15 @@ #define AMD_WT_ALLOC_PRE 0x20000 /* programmable range enable */ #define AMD_WT_ALLOC_FRE 0x10000 /* fixed (A0000-FFFFF) range enable */ - #ifndef LOCORE + +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _MACHINE_CPUFUNC_H_ +#include "cpufunc.h" +#endif + static __inline u_char read_cyrix_reg(u_char reg) { diff --git a/sys/i386/include/thread.h b/sys/i386/include/thread.h index a58b7f2277..2a2ee6ff30 100644 --- a/sys/i386/include/thread.h +++ b/sys/i386/include/thread.h @@ -33,13 +33,15 @@ * * Machine independant code should not directly include this file. * - * $DragonFly: src/sys/i386/include/Attic/thread.h,v 1.14 2006/01/31 19:05:30 dillon Exp $ + * $DragonFly: src/sys/i386/include/Attic/thread.h,v 1.15 2006/05/20 02:42:06 dillon Exp $ */ #ifndef _MACHINE_THREAD_H_ #define _MACHINE_THREAD_H_ +#ifndef _MACHINE_SEGMENTS_H_ #include "segments.h" +#endif union savefpu; diff --git a/sys/i386/include/tls.h b/sys/i386/include/tls.h index 52a32ba503..d3aa3e1d0b 100644 --- a/sys/i386/include/tls.h +++ b/sys/i386/include/tls.h @@ -28,14 +28,18 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $DragonFly: src/sys/i386/include/Attic/tls.h,v 1.7 2005/06/03 17:14:50 dillon Exp $ + * $DragonFly: src/sys/i386/include/Attic/tls.h,v 1.8 2006/05/20 02:42:06 dillon Exp $ */ #ifndef _MACHINE_TLS_H_ #define _MACHINE_TLS_H_ +#ifndef _SYS_TYPES_H_ #include +#endif +#ifndef _SYS_TLS_H_ #include +#endif /* * NOTE: the tcb_{self,dtv,pthread,errno) fields must be declared @@ -65,6 +69,8 @@ struct tls_dtv { #define RTLD_STATIC_TLS_EXTRA 256 #define RTLD_STATIC_TLS_VARIANT_II +#ifndef _KERNEL + /* Get the current TCB. */ static __inline struct tls_tcb * tls_get_tcb(void) @@ -111,4 +117,6 @@ void _rtld_call_init(void); struct tls_tcb *_libc_init_tls(void); struct tls_tcb *_init_tls(void); +#endif + #endif /* !_MACHINE_TLS_H_ */ diff --git a/sys/i386/include/tss.h b/sys/i386/include/tss.h index 4c6d87c13c..acfbd90f79 100644 --- a/sys/i386/include/tss.h +++ b/sys/i386/include/tss.h @@ -35,11 +35,11 @@ * * from: @(#)tss.h 5.4 (Berkeley) 1/18/91 * $FreeBSD: src/sys/i386/include/tss.h,v 1.11 1999/12/29 04:33:09 peter Exp $ - * $DragonFly: src/sys/i386/include/Attic/tss.h,v 1.3 2003/06/28 04:16:03 dillon Exp $ + * $DragonFly: src/sys/i386/include/Attic/tss.h,v 1.4 2006/05/20 02:42:06 dillon Exp $ */ #ifndef _MACHINE_TSS_H_ -#define _MACHINE_TSS_H_ 1 +#define _MACHINE_TSS_H_ /* * Intel 386 Context Data Type diff --git a/sys/i386/include/types.h b/sys/i386/include/types.h index 44581add95..7a15c1baae 100644 --- a/sys/i386/include/types.h +++ b/sys/i386/include/types.h @@ -32,12 +32,16 @@ * * @(#)types.h 8.3 (Berkeley) 1/5/94 * $FreeBSD: src/sys/i386/include/types.h,v 1.19.2.1 2001/03/21 10:50:58 peter Exp $ - * $DragonFly: src/sys/i386/include/Attic/types.h,v 1.9 2004/02/14 20:34:28 dillon Exp $ + * $DragonFly: src/sys/i386/include/Attic/types.h,v 1.10 2006/05/20 02:42:06 dillon Exp $ */ #ifndef _MACHINE_TYPES_H_ #define _MACHINE_TYPES_H_ +#ifndef _MACHINE_STDINT_H_ +#include +#endif + #if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE) typedef struct _physadr { int r[1]; diff --git a/sys/i386/include/uc_device.h b/sys/i386/include/uc_device.h index e52e522f8b..f1a1bb7f00 100644 --- a/sys/i386/include/uc_device.h +++ b/sys/i386/include/uc_device.h @@ -47,12 +47,16 @@ ** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ** ** $FreeBSD: src/sys/i386/include/uc_device.h,v 1.1.2.1 2000/07/14 10:21:34 jhb Exp $ - ** $DragonFly: src/sys/i386/include/Attic/uc_device.h,v 1.2 2003/06/17 04:28:36 dillon Exp $ + ** $DragonFly: src/sys/i386/include/Attic/uc_device.h,v 1.3 2006/05/20 02:42:06 dillon Exp $ **/ #ifndef _I386_MACHINE_UC_DEVICE_H #define _I386_MACHINE_UC_DEVICE_H +#ifndef _SYS_TYPES_H_ +#include +#endif + /* * Per device structure. This just happens to resemble the old isa_device * but that is by accident. It is NOT the same. diff --git a/sys/i386/include/vm86.h b/sys/i386/include/vm86.h index 96073f97dd..d7094f91fb 100644 --- a/sys/i386/include/vm86.h +++ b/sys/i386/include/vm86.h @@ -27,11 +27,15 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/include/vm86.h,v 1.13 1999/09/02 20:59:50 luoqi Exp $ - * $DragonFly: src/sys/i386/include/Attic/vm86.h,v 1.6 2005/11/22 08:41:02 dillon Exp $ + * $DragonFly: src/sys/i386/include/Attic/vm86.h,v 1.7 2006/05/20 02:42:06 dillon Exp $ */ #ifndef _MACHINE_VM86_H_ -#define _MACHINE_VM86_H_ 1 +#define _MACHINE_VM86_H_ + +#ifndef _SYS_TYPES_H_ +#include +#endif /* standard register representation */ typedef union { @@ -148,7 +152,8 @@ struct vm86_intcall_args { extern int in_vm86call; extern pt_entry_t *vm86paddr; -struct proc; +struct lwp; + extern int vm86_emulate (struct vm86frame *); extern int vm86_sysarch (struct lwp *, char *); extern void vm86_trap (struct vm86frame *, int); diff --git a/sys/i386/include/vmparam.h b/sys/i386/include/vmparam.h index aa4d4673eb..c4ca3fc2c4 100644 --- a/sys/i386/include/vmparam.h +++ b/sys/i386/include/vmparam.h @@ -37,12 +37,12 @@ * * from: @(#)vmparam.h 5.9 (Berkeley) 5/12/91 * $FreeBSD: src/sys/i386/include/vmparam.h,v 1.32.2.1 2000/04/02 08:47:01 peter Exp $ - * $DragonFly: src/sys/i386/include/Attic/vmparam.h,v 1.6 2003/11/03 17:11:19 dillon Exp $ + * $DragonFly: src/sys/i386/include/Attic/vmparam.h,v 1.7 2006/05/20 02:42:06 dillon Exp $ */ #ifndef _MACHINE_VMPARAM_H_ -#define _MACHINE_VMPARAM_H_ 1 +#define _MACHINE_VMPARAM_H_ /* * Machine dependent constants for 386. diff --git a/sys/net/altq/if_altq.h b/sys/net/altq/if_altq.h index 76bd94a718..40c0027438 100644 --- a/sys/net/altq/if_altq.h +++ b/sys/net/altq/if_altq.h @@ -1,5 +1,5 @@ /* $KAME: if_altq.h,v 1.11 2003/07/10 12:07:50 kjc Exp $ */ -/* $DragonFly: src/sys/net/altq/if_altq.h,v 1.2 2005/11/22 00:24:35 dillon Exp $ */ +/* $DragonFly: src/sys/net/altq/if_altq.h,v 1.3 2006/05/20 02:42:09 dillon Exp $ */ /* * Copyright (C) 1997-2003 @@ -26,8 +26,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ -#ifndef _ALTQ_IF_ALTQ_H_ -#define _ALTQ_IF_ALTQ_H_ +#ifndef _NET_ALTQ_IF_ALTQ_H_ +#define _NET_ALTQ_IF_ALTQ_H_ struct altq_pktattr; @@ -132,4 +132,4 @@ struct mbuf *tbr_dequeue(struct ifaltq *, struct mbuf *, int); extern int (*altq_input)(struct mbuf *, int); #endif /* _KERNEL */ -#endif /* _ALTQ_IF_ALTQ_H_ */ +#endif /* _NET_ALTQ_IF_ALTQ_H_ */ diff --git a/sys/net/bpf.h b/sys/net/bpf.h index 9ca9f3320f..0802ba8233 100644 --- a/sys/net/bpf.h +++ b/sys/net/bpf.h @@ -39,12 +39,22 @@ * @(#)bpf.h 1.34 (LBL) 6/16/96 * * $FreeBSD: src/sys/net/bpf.h,v 1.21.2.4 2002/07/05 14:40:00 fenner Exp $ - * $DragonFly: src/sys/net/bpf.h,v 1.9 2005/04/20 10:22:44 hmp Exp $ + * $DragonFly: src/sys/net/bpf.h,v 1.10 2006/05/20 02:42:08 dillon Exp $ */ #ifndef _NET_BPF_H_ #define _NET_BPF_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _SYS_TIME_H_ +#include +#endif +#ifndef _SYS_MBUF_H_ +#include +#endif + /* BSD style release date */ #define BPF_RELEASE 199606 diff --git a/sys/net/ethernet.h b/sys/net/ethernet.h index ec8040c3da..2833feb8ba 100644 --- a/sys/net/ethernet.h +++ b/sys/net/ethernet.h @@ -2,13 +2,17 @@ * Fundamental constants relating to ethernet. * * $FreeBSD: src/sys/net/ethernet.h,v 1.12.2.8 2002/12/01 14:03:09 sobomax Exp $ - * $DragonFly: src/sys/net/ethernet.h,v 1.12 2006/05/18 13:51:45 sephe Exp $ + * $DragonFly: src/sys/net/ethernet.h,v 1.13 2006/05/20 02:42:08 dillon Exp $ * */ #ifndef _NET_ETHERNET_H_ #define _NET_ETHERNET_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif + /* * The number of bytes in an ethernet (MAC) address. */ diff --git a/sys/net/hostcache.h b/sys/net/hostcache.h index c367160fc2..9d9d67d693 100644 --- a/sys/net/hostcache.h +++ b/sys/net/hostcache.h @@ -27,11 +27,18 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/net/hostcache.h,v 1.4 1999/12/29 04:38:32 peter Exp $ - * $DragonFly: src/sys/net/Attic/hostcache.h,v 1.3 2004/12/21 02:54:14 hsu Exp $ + * $DragonFly: src/sys/net/Attic/hostcache.h,v 1.4 2006/05/20 02:42:08 dillon Exp $ */ -#ifndef _NET_HOSTCACHE_H -#define _NET_HOSTCACHE_H 1 +#ifndef _NET_HOSTCACHE_H_ +#define _NET_HOSTCACHE_H_ + +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _SYS_TIME_H_ +#include +#endif /* * This file defines the interface between network protocols and @@ -93,4 +100,4 @@ int hc_insert(struct hcentry *hc); int hc_delete(struct hcentry *hc); #endif -#endif /* _NET_HOSTCACHE_H */ +#endif /* _NET_HOSTCACHE_H_ */ diff --git a/sys/net/if.h b/sys/net/if.h index aca250ec95..1f9b860c1c 100644 --- a/sys/net/if.h +++ b/sys/net/if.h @@ -32,22 +32,28 @@ * * @(#)if.h 8.1 (Berkeley) 6/10/93 * $FreeBSD: src/sys/net/if.h,v 1.58.2.9 2002/08/30 14:23:38 sobomax Exp $ - * $DragonFly: src/sys/net/if.h,v 1.15 2006/05/06 02:43:12 dillon Exp $ + * $DragonFly: src/sys/net/if.h,v 1.16 2006/05/20 02:42:08 dillon Exp $ */ #ifndef _NET_IF_H_ #define _NET_IF_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _SYS_TIME_H_ +#include +#endif +#ifndef _SYS_SOCKET_H_ +#include +#endif + #ifdef _KERNEL + +#ifndef _SYS_QUEUE_H_ #include #endif -/* - * does not depend on on most other systems. This - * helps userland compatibility. (struct timeval ifi_lastchange) - */ -#ifndef _KERNEL -#include #endif struct ifnet; diff --git a/sys/net/if_arc.h b/sys/net/if_arc.h index fcd98cfa60..0ac42d81da 100644 --- a/sys/net/if_arc.h +++ b/sys/net/if_arc.h @@ -1,6 +1,6 @@ /* $NetBSD: if_arc.h,v 1.13 1999/11/19 20:41:19 thorpej Exp $ */ /* $FreeBSD: src/sys/net/if_arc.h,v 1.2.2.3 2003/01/28 11:19:05 fjoe Exp $ */ -/* $DragonFly: src/sys/net/Attic/if_arc.h,v 1.5 2005/11/28 17:13:45 dillon Exp $ */ +/* $DragonFly: src/sys/net/Attic/if_arc.h,v 1.6 2006/05/20 02:42:08 dillon Exp $ */ /* * Copyright (c) 1982, 1986, 1993 @@ -41,6 +41,13 @@ #ifndef _NET_IF_ARC_H_ #define _NET_IF_ARC_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _NET_IF_VAR_H_ +#include +#endif + /* * Arcnet address - 1 octets * don't know who uses this. diff --git a/sys/net/if_arp.h b/sys/net/if_arp.h index 20a679eca3..2c9b789dbe 100644 --- a/sys/net/if_arp.h +++ b/sys/net/if_arp.h @@ -32,12 +32,22 @@ * * @(#)if_arp.h 8.1 (Berkeley) 6/10/93 * $FreeBSD: src/sys/net/if_arp.h,v 1.14.2.3 2002/02/20 23:34:09 fjoe Exp $ - * $DragonFly: src/sys/net/if_arp.h,v 1.5 2004/12/21 02:54:14 hsu Exp $ + * $DragonFly: src/sys/net/if_arp.h,v 1.6 2006/05/20 02:42:08 dillon Exp $ */ #ifndef _NET_IF_ARP_H_ #define _NET_IF_ARP_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _SYS_SOCKET_H_ +#include +#endif +#ifndef _NET_IF_H_ +#include +#endif + /* * Address Resolution Protocol. * diff --git a/sys/net/if_atm.h b/sys/net/if_atm.h index 23c78c4064..71876b9f65 100644 --- a/sys/net/if_atm.h +++ b/sys/net/if_atm.h @@ -1,6 +1,6 @@ /* $NetBSD: if_atm.h,v 1.7 1996/11/09 23:02:27 chuck Exp $ */ /* $FreeBSD: src/sys/net/if_atm.h,v 1.4 1999/12/29 04:38:34 peter Exp $ */ -/* $DragonFly: src/sys/net/if_atm.h,v 1.7 2005/11/28 17:13:45 dillon Exp $ */ +/* $DragonFly: src/sys/net/if_atm.h,v 1.8 2006/05/20 02:42:08 dillon Exp $ */ /* * @@ -38,6 +38,17 @@ * net/if_atm.h */ +#ifndef _NET_IF_ATM_H_ +#define _NET_IF_ATM_H_ + +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _NET_IF_H_ +#include +#endif + + #if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__bsdi__) #define RTALLOC1(A,B) rtalloc1((A), (B)) #elif defined(__DragonFly__) @@ -111,3 +122,4 @@ int atm_output (struct ifnet *, struct mbuf *, struct sockaddr *, struct rtentry *); #endif +#endif /* _NET_IF_ATM_H_ */ diff --git a/sys/net/if_dl.h b/sys/net/if_dl.h index b99d651bda..a7f03d1524 100644 --- a/sys/net/if_dl.h +++ b/sys/net/if_dl.h @@ -32,12 +32,16 @@ * * @(#)if_dl.h 8.1 (Berkeley) 6/10/93 * $FreeBSD: src/sys/net/if_dl.h,v 1.10 2000/03/01 02:46:25 archie Exp $ - * $DragonFly: src/sys/net/if_dl.h,v 1.3 2003/08/26 20:49:47 rob Exp $ + * $DragonFly: src/sys/net/if_dl.h,v 1.4 2006/05/20 02:42:08 dillon Exp $ */ #ifndef _NET_IF_DL_H_ #define _NET_IF_DL_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif + /* * A Link-Level Sockaddr may specify the interface in one of two * ways: either by means of a system-provided index number (computed diff --git a/sys/net/if_llc.h b/sys/net/if_llc.h index 7152cce79d..714c95110e 100644 --- a/sys/net/if_llc.h +++ b/sys/net/if_llc.h @@ -32,12 +32,16 @@ * * @(#)if_llc.h 8.1 (Berkeley) 6/10/93 * $FreeBSD: src/sys/net/if_llc.h,v 1.7 1999/08/28 00:48:18 peter Exp $ - * $DragonFly: src/sys/net/if_llc.h,v 1.4 2005/12/21 16:37:15 corecode Exp $ + * $DragonFly: src/sys/net/if_llc.h,v 1.5 2006/05/20 02:42:08 dillon Exp $ */ #ifndef _NET_IF_LLC_H_ #define _NET_IF_LLC_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif + /* * IEEE 802.2 Link Level Control headers, for use in conjunction with * 802.{3,4,5} media access control methods. diff --git a/sys/net/if_media.h b/sys/net/if_media.h index 460c9f68fc..e1a98ac41e 100644 --- a/sys/net/if_media.h +++ b/sys/net/if_media.h @@ -1,6 +1,6 @@ /* $NetBSD: if_media.h,v 1.3 1997/03/26 01:19:27 thorpej Exp $ */ /* $FreeBSD: src/sys/net/if_media.h,v 1.9.2.4 2002/07/30 06:22:40 imp Exp $ */ -/* $DragonFly: src/sys/net/if_media.h,v 1.9 2006/04/02 03:33:59 sephe Exp $ */ +/* $DragonFly: src/sys/net/if_media.h,v 1.10 2006/05/20 02:42:08 dillon Exp $ */ /* * Copyright (c) 1997 @@ -39,6 +39,10 @@ #ifndef _NET_IF_MEDIA_H_ #define _NET_IF_MEDIA_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif + /* * Prototypes and definitions for BSD/OS-compatible network interface * media selection. @@ -53,7 +57,13 @@ #ifdef _KERNEL +#ifndef _SYS_QUEUE_H_ #include +#endif + +struct ifnet; +struct ifreq; +struct ifmediareq; /* * Driver callbacks for media status and change requests. diff --git a/sys/net/if_mib.h b/sys/net/if_mib.h index 8327c2394e..adfef4a85a 100644 --- a/sys/net/if_mib.h +++ b/sys/net/if_mib.h @@ -27,11 +27,15 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/net/if_mib.h,v 1.6 1999/08/28 00:48:19 peter Exp $ - * $DragonFly: src/sys/net/if_mib.h,v 1.2 2003/06/17 04:28:48 dillon Exp $ + * $DragonFly: src/sys/net/if_mib.h,v 1.3 2006/05/20 02:42:08 dillon Exp $ */ -#ifndef _NET_IF_MIB_H -#define _NET_IF_MIB_H 1 +#ifndef _NET_IF_MIB_H_ +#define _NET_IF_MIB_H_ + +#ifndef _NET_IF_H_ +#include +#endif struct ifmibdata { char ifmd_name[IFNAMSIZ]; /* name of interface */ @@ -168,4 +172,4 @@ enum { * Put other types of interface MIBs here, or in interface-specific * header files if convenient ones already exist. */ -#endif /* _NET_IF_MIB_H */ +#endif /* _NET_IF_MIB_H_ */ diff --git a/sys/net/if_var.h b/sys/net/if_var.h index 04a4b9a309..1a9526e0bf 100644 --- a/sys/net/if_var.h +++ b/sys/net/if_var.h @@ -32,7 +32,7 @@ * * From: @(#)if.h 8.1 (Berkeley) 6/10/93 * $FreeBSD: src/sys/net/if_var.h,v 1.18.2.16 2003/04/15 18:11:19 fjoe Exp $ - * $DragonFly: src/sys/net/if_var.h,v 1.34 2006/05/06 02:43:12 dillon Exp $ + * $DragonFly: src/sys/net/if_var.h,v 1.35 2006/05/20 02:42:08 dillon Exp $ */ #ifndef _NET_IF_VAR_H_ @@ -41,6 +41,9 @@ #ifndef _SYS_SERIALIZE_H_ #include #endif +#ifndef _NET_IF_H_ +#include +#endif /* * Structures defining a network interface, providing a packet diff --git a/sys/net/ifq_var.h b/sys/net/ifq_var.h index 1b5d852193..1adb6a3a3c 100644 --- a/sys/net/ifq_var.h +++ b/sys/net/ifq_var.h @@ -28,7 +28,7 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $DragonFly: src/sys/net/ifq_var.h,v 1.6 2005/11/28 17:13:45 dillon Exp $ + * $DragonFly: src/sys/net/ifq_var.h,v 1.7 2006/05/20 02:42:08 dillon Exp $ */ /* * NOTE ON MPSAFE access. Routines which manipulate the packet queue must @@ -38,10 +38,29 @@ * section will no longer be required. */ -#ifndef _NET_IFQ_VAR_H -#define _NET_IFQ_VAR_H +#ifndef _NET_IFQ_VAR_H_ +#define _NET_IFQ_VAR_H_ +#if defined(_KERNEL) && !defined(_SYS_SYSTM_H_) +#include +#endif +#ifndef _SYS_THREAD2_H_ #include +#endif +#ifndef _SYS_SERIALIZE_H_ +#include +#endif +#ifndef _SYS_MBUF_H_ +#include +#endif +#ifndef _NET_IF_VAR_H_ +#include +#endif +#ifndef _NET_ALTQ_IF_ALTQ_H_ +#include +#endif + +struct ifaltq; #ifdef ALTQ static __inline int diff --git a/sys/net/intrq.h b/sys/net/intrq.h index ba0ab4d581..1a2f7a917f 100644 --- a/sys/net/intrq.h +++ b/sys/net/intrq.h @@ -24,14 +24,22 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/net/intrq.h,v 1.2 2000/01/27 23:37:39 brian Exp $ - * $DragonFly: src/sys/net/Attic/intrq.h,v 1.3 2003/08/26 20:49:47 rob Exp $ + * $DragonFly: src/sys/net/Attic/intrq.h,v 1.4 2006/05/20 02:42:08 dillon Exp $ */ #ifndef _NET_INTRQ_H_ #define _NET_INTRQ_H_ #ifdef _KERNEL + +#ifndef _SYS_SOCKET_H_ +#include +#endif + +struct mbuf; + extern int family_enqueue (sa_family_t, struct mbuf *); + #endif #endif /* _NET_INTRQ_H_ */ diff --git a/sys/net/iso88025.h b/sys/net/iso88025.h index 21334357de..659984a14e 100644 --- a/sys/net/iso88025.h +++ b/sys/net/iso88025.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/net/iso88025.h,v 1.3.2.2 2002/06/18 00:15:31 kbyanc Exp $ - * $DragonFly: src/sys/net/Attic/iso88025.h,v 1.5 2005/11/28 17:13:45 dillon Exp $ + * $DragonFly: src/sys/net/Attic/iso88025.h,v 1.6 2006/05/20 02:42:08 dillon Exp $ * * Information gathered from tokenring@freebsd, /sys/net/ethernet.h and * the Mach token ring driver. @@ -44,6 +44,10 @@ #ifndef _NET_ISO88025_H_ #define _NET_ISO88025_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif + /* * General ISO 802.5 definitions */ @@ -127,6 +131,7 @@ struct iso88025_addr { #define senderr(e) { error = (e); goto bad;} struct lwkt_serialize; +struct ifnet; void iso88025_ifattach (struct ifnet *, struct lwkt_serialize *); int iso88025_ioctl (struct ifnet *, int , caddr_t ); diff --git a/sys/net/net_osdep.h b/sys/net/net_osdep.h index b2f4ae515f..fde399479f 100644 --- a/sys/net/net_osdep.h +++ b/sys/net/net_osdep.h @@ -1,7 +1,7 @@ /* * $KAME: net_osdep.h,v 1.68 2001/12/21 08:14:58 itojun Exp $ * $FreeBSD: src/sys/net/net_osdep.h,v 1.1.2.3 2002/04/28 05:40:25 suz Exp $ - * $DragonFly: src/sys/net/net_osdep.h,v 1.6 2004/12/21 02:54:14 hsu Exp $ + * $DragonFly: src/sys/net/net_osdep.h,v 1.7 2006/05/20 02:42:08 dillon Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -282,8 +282,8 @@ * others: M_COPY_PKTHDR is available as usual. */ -#ifndef __NET_NET_OSDEP_H_DEFINED_ -#define __NET_NET_OSDEP_H_DEFINED_ +#ifndef _NET_NET_OSDEP_H_ +#define _NET_NET_OSDEP_H_ #ifdef _KERNEL struct ifnet; @@ -302,4 +302,4 @@ extern const char *if_name (struct ifnet *); #endif #endif /*_KERNEL*/ -#endif /*__NET_NET_OSDEP_H_DEFINED_ */ +#endif /*_NET_NET_OSDEP_H_*/ diff --git a/sys/net/netmsg.h b/sys/net/netmsg.h index e9c2094f16..2b29294a6e 100644 --- a/sys/net/netmsg.h +++ b/sys/net/netmsg.h @@ -27,11 +27,18 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $DragonFly: src/sys/net/netmsg.h,v 1.2 2004/04/20 01:52:26 dillon Exp $ + * $DragonFly: src/sys/net/netmsg.h,v 1.3 2006/05/20 02:42:08 dillon Exp $ */ -#ifndef _NETMSG_H_ -#define _NETMSG_H_ +#ifndef _NET_NETMSG_H_ +#define _NET_NETMSG_H_ + +#ifndef _SYS_THREAD_H_ +#include +#endif +#ifndef _SYS_PROTOSW_H_ +#include +#endif /* * User protocol requests messages. diff --git a/sys/net/pfil.h b/sys/net/pfil.h index b649ceb4c7..8687a2b242 100644 --- a/sys/net/pfil.h +++ b/sys/net/pfil.h @@ -1,5 +1,5 @@ /* $NetBSD: pfil.h,v 1.22 2003/06/23 12:57:08 martin Exp $ */ -/* $DragonFly: src/sys/net/pfil.h,v 1.4 2004/07/14 08:01:16 asmodai Exp $ */ +/* $DragonFly: src/sys/net/pfil.h,v 1.5 2006/05/20 02:42:08 dillon Exp $ */ /* * Copyright (c) 1996 Matthew R. Green @@ -32,7 +32,15 @@ #ifndef _NET_PFIL_H_ #define _NET_PFIL_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _SYS_PARAM_H_ +#include +#endif +#ifndef _SYS_QUEUE_H_ #include +#endif struct mbuf; struct ifnet; diff --git a/sys/net/pfkeyv2.h b/sys/net/pfkeyv2.h index 265f5c721a..f1d24dcaea 100644 --- a/sys/net/pfkeyv2.h +++ b/sys/net/pfkeyv2.h @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/net/pfkeyv2.h,v 1.4.2.5 2003/01/31 23:21:01 sam Exp $ */ -/* $DragonFly: src/sys/net/pfkeyv2.h,v 1.2 2003/06/17 04:28:48 dillon Exp $ */ +/* $DragonFly: src/sys/net/pfkeyv2.h,v 1.3 2006/05/20 02:42:08 dillon Exp $ */ /* $KAME: pfkeyv2.h,v 1.26 2001/06/27 10:49:49 sakane Exp $ */ /* @@ -40,6 +40,10 @@ #ifndef _NET_PFKEYV2_H_ #define _NET_PFKEYV2_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif + /* This file defines structures and symbols for the PF_KEY Version 2 key management interface. It was written at the U.S. Naval Research diff --git a/sys/net/radix.h b/sys/net/radix.h index 5fece5d98c..1cc8ff7646 100644 --- a/sys/net/radix.h +++ b/sys/net/radix.h @@ -32,11 +32,15 @@ * * @(#)radix.h 8.2 (Berkeley) 10/31/94 * $FreeBSD: src/sys/net/radix.h,v 1.16.2.1 2000/05/03 19:17:11 wollman Exp $ - * $DragonFly: src/sys/net/radix.h,v 1.9 2005/02/28 11:31:20 hsu Exp $ + * $DragonFly: src/sys/net/radix.h,v 1.10 2006/05/20 02:42:08 dillon Exp $ */ -#ifndef _RADIX_H_ -#define _RADIX_H_ +#ifndef _NET_RADIX_H_ +#define _NET_RADIX_H_ + +#ifndef _SYS_TYPES_H_ +#include +#endif #ifdef MALLOC_DECLARE MALLOC_DECLARE(M_RTABLE); @@ -177,4 +181,4 @@ struct radix_node *rn_addmask (char *, boolean_t, int), struct radix_node_head *head), *rn_match (char *, struct radix_node_head *); -#endif /* _RADIX_H_ */ +#endif /* _NET_RADIX_H_ */ diff --git a/sys/net/raw_cb.h b/sys/net/raw_cb.h index dd873805a1..2e67590295 100644 --- a/sys/net/raw_cb.h +++ b/sys/net/raw_cb.h @@ -32,13 +32,24 @@ * * @(#)raw_cb.h 8.1 (Berkeley) 6/10/93 * $FreeBSD: src/sys/net/raw_cb.h,v 1.12 1999/12/29 04:38:37 peter Exp $ - * $DragonFly: src/sys/net/raw_cb.h,v 1.5 2005/01/26 23:09:57 hsu Exp $ + * $DragonFly: src/sys/net/raw_cb.h,v 1.6 2006/05/20 02:42:08 dillon Exp $ */ #ifndef _NET_RAW_CB_H_ #define _NET_RAW_CB_H_ +#ifndef _SYS_QUEUE_H_ #include +#endif +#ifndef _SYS_RESOURCE_H_ +#include +#endif +#ifndef _SYS_MBUF_H_ +#include +#endif +#ifndef _SYS_SOCKET_H_ +#include +#endif /* * Raw protocol interface control block. Used diff --git a/sys/net/route.h b/sys/net/route.h index c48fc52305..c30358f096 100644 --- a/sys/net/route.h +++ b/sys/net/route.h @@ -82,12 +82,23 @@ * * @(#)route.h 8.4 (Berkeley) 1/9/95 * $FreeBSD: src/sys/net/route.h,v 1.36.2.5 2002/02/01 11:48:01 ru Exp $ - * $DragonFly: src/sys/net/route.h,v 1.18 2006/05/18 13:51:45 sephe Exp $ + * $DragonFly: src/sys/net/route.h,v 1.19 2006/05/20 02:42:08 dillon Exp $ */ #ifndef _NET_ROUTE_H_ #define _NET_ROUTE_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _SYS_PARAM_H_ +#include +#endif +#ifndef _SYS_SOCKET_H_ +#include +#endif + + /* * Kernel resident routing tables. * diff --git a/sys/net/slcompress.h b/sys/net/slcompress.h index 869797d3ef..4bf32142b0 100644 --- a/sys/net/slcompress.h +++ b/sys/net/slcompress.h @@ -35,12 +35,19 @@ * Van Jacobson (van@helios.ee.lbl.gov), Dec 31, 1989: * - Initial distribution. * $FreeBSD: src/sys/net/slcompress.h,v 1.14.2.1 2000/05/05 13:37:06 jlemon Exp $ - * $DragonFly: src/sys/net/slcompress.h,v 1.3 2003/08/26 20:49:47 rob Exp $ + * $DragonFly: src/sys/net/slcompress.h,v 1.4 2006/05/20 02:42:08 dillon Exp $ */ #ifndef _NET_SLCOMPRESS_H_ #define _NET_SLCOMPRESS_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _NETINET_IP_H_ +#include +#endif + #define MAX_STATES 16 /* must be > 2 and < 256 */ #define MAX_HDR 128 diff --git a/sys/net/zlib.h b/sys/net/zlib.h index 7d6be0904a..51b8343de7 100644 --- a/sys/net/zlib.h +++ b/sys/net/zlib.h @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/net/zlib.h,v 1.7.2.1 2002/07/31 14:13:05 rwatson Exp $ */ -/* $DragonFly: src/sys/net/zlib.h,v 1.4 2004/12/21 02:54:14 hsu Exp $ */ +/* $DragonFly: src/sys/net/zlib.h,v 1.5 2006/05/20 02:42:08 dillon Exp $ */ /* * This file is derived from zlib.h and zconf.h from the zlib-1.0.4 @@ -47,8 +47,8 @@ (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format). */ -#ifndef _ZLIB_H -#define _ZLIB_H +#ifndef _NET_ZLIB_H_ +#define _NET_ZLIB_H_ #ifdef __cplusplus extern "C" { @@ -1014,5 +1014,5 @@ uLongf *get_crc_table OF((void)); /* can be used by asm versions of crc32() */ } #endif -#endif /* _ZLIB_H */ +#endif /* _NET_ZLIB_H_ */ /* --- zlib.h */ diff --git a/sys/netgraph/netgraph.h b/sys/netgraph/netgraph.h index 729f38a365..026ea8a049 100644 --- a/sys/netgraph/netgraph.h +++ b/sys/netgraph/netgraph.h @@ -37,16 +37,28 @@ * Author: Julian Elischer * * $FreeBSD: src/sys/netgraph/netgraph.h,v 1.6.2.7 2002/04/14 23:31:08 julian Exp $ - * $DragonFly: src/sys/netgraph/netgraph.h,v 1.2 2003/06/17 04:28:49 dillon Exp $ + * $DragonFly: src/sys/netgraph/netgraph.h,v 1.3 2006/05/20 02:42:11 dillon Exp $ * $Whistle: netgraph.h,v 1.29 1999/11/01 07:56:13 julian Exp $ */ #ifndef _NETGRAPH_NETGRAPH_H_ -#define _NETGRAPH_NETGRAPH_H_ 1 +#define _NETGRAPH_NETGRAPH_H_ +#ifndef _SYS_QUEUE_H_ #include +#endif +#ifndef _SYS_MALLOC_H_ #include +#endif +#ifndef _SYS_MODULE_H_ #include +#endif +#ifndef _SYS_MBUF_H_ +#include +#endif +#ifndef _NETGRAPH_NG_MESSAGE_H_ +#include +#endif #ifndef _KERNEL #error "This file should not be included in user level programs" diff --git a/sys/netgraph/ng_message.h b/sys/netgraph/ng_message.h index 9adf07ac78..fac9a2063b 100644 --- a/sys/netgraph/ng_message.h +++ b/sys/netgraph/ng_message.h @@ -37,12 +37,16 @@ * Author: Julian Elischer * * $FreeBSD: src/sys/netgraph/ng_message.h,v 1.4.2.5 2002/07/02 23:44:02 archie Exp $ - * $DragonFly: src/sys/netgraph/ng_message.h,v 1.3 2005/02/03 20:48:08 joerg Exp $ + * $DragonFly: src/sys/netgraph/ng_message.h,v 1.4 2006/05/20 02:42:11 dillon Exp $ * $Whistle: ng_message.h,v 1.12 1999/01/25 01:17:44 archie Exp $ */ #ifndef _NETGRAPH_NG_MESSAGE_H_ -#define _NETGRAPH_NG_MESSAGE_H_ 1 +#define _NETGRAPH_NG_MESSAGE_H_ + +#ifndef _SYS_TYPES_H_ +#include +#endif /* ASCII string size limits */ #define NG_TYPELEN 15 /* max type name len (16 with null) */ diff --git a/sys/netgraph/ng_parse.h b/sys/netgraph/ng_parse.h index 316bda8adf..74804d7ad9 100644 --- a/sys/netgraph/ng_parse.h +++ b/sys/netgraph/ng_parse.h @@ -38,12 +38,16 @@ * * $Whistle: ng_parse.h,v 1.2 1999/11/29 01:43:48 archie Exp $ * $FreeBSD: src/sys/netgraph/ng_parse.h,v 1.2.4.4 2002/07/02 23:44:03 archie Exp $ - * $DragonFly: src/sys/netgraph/ng_parse.h,v 1.2 2003/06/17 04:28:51 dillon Exp $ + * $DragonFly: src/sys/netgraph/ng_parse.h,v 1.3 2006/05/20 02:42:11 dillon Exp $ */ #ifndef _NETGRAPH_PARSE_H_ #define _NETGRAPH_PARSE_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif + /* This defines a library of routines for converting between various C diff --git a/sys/netgraph/ng_sample.h b/sys/netgraph/ng_sample.h index c8241a3286..a662e8f42e 100644 --- a/sys/netgraph/ng_sample.h +++ b/sys/netgraph/ng_sample.h @@ -37,13 +37,17 @@ * Author: Julian Elischer * * $FreeBSD: src/sys/netgraph/ng_sample.h,v 1.2.2.3 2002/07/02 23:44:03 archie Exp $ - * $DragonFly: src/sys/netgraph/ng_sample.h,v 1.2 2003/06/17 04:28:51 dillon Exp $ + * $DragonFly: src/sys/netgraph/ng_sample.h,v 1.3 2006/05/20 02:42:11 dillon Exp $ * $Whistle: ng_sample.h,v 1.3 1999/01/20 00:22:14 archie Exp $ */ #ifndef _NETGRAPH_SAMPLE_H_ #define _NETGRAPH_SAMPLE_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif + /* Node type name. This should be unique among all netgraph node types */ #define NG_XXX_NODE_TYPE "sample" diff --git a/sys/netinet/icmp6.h b/sys/netinet/icmp6.h index 09c454d640..e1dc9116f8 100644 --- a/sys/netinet/icmp6.h +++ b/sys/netinet/icmp6.h @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/netinet/icmp6.h,v 1.2.2.5 2002/06/29 18:31:11 ume Exp $ */ -/* $DragonFly: src/sys/netinet/icmp6.h,v 1.6 2005/02/01 16:09:37 hrs Exp $ */ +/* $DragonFly: src/sys/netinet/icmp6.h,v 1.7 2006/05/20 02:42:12 dillon Exp $ */ /* $KAME: icmp6.h,v 1.46 2001/04/27 15:09:48 itojun Exp $ */ /* @@ -69,6 +69,16 @@ #ifndef _NETINET_ICMP6_H_ #define _NETINET_ICMP6_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _NETINET6_IN6_H_ +#include +#endif +#ifndef _MACHINE_ENDIAN_H_ +#include +#endif + #define ICMPV6_PLD_MAXLEN 1232 /* IPV6_MMTU - sizeof(struct ip6_hdr) - sizeof(struct icmp6_hdr) */ diff --git a/sys/netinet/icmp_var.h b/sys/netinet/icmp_var.h index 1d8369a16b..16908fc171 100644 --- a/sys/netinet/icmp_var.h +++ b/sys/netinet/icmp_var.h @@ -32,12 +32,22 @@ * * @(#)icmp_var.h 8.1 (Berkeley) 6/10/93 * $FreeBSD: src/sys/netinet/icmp_var.h,v 1.15.2.2 2001/12/07 09:23:11 ru Exp $ - * $DragonFly: src/sys/netinet/icmp_var.h,v 1.5 2004/12/21 02:54:15 hsu Exp $ + * $DragonFly: src/sys/netinet/icmp_var.h,v 1.6 2006/05/20 02:42:12 dillon Exp $ */ #ifndef _NETINET_ICMP_VAR_H_ #define _NETINET_ICMP_VAR_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _SYS_SYSCTL_H_ +#include +#endif +#ifndef _NETINET_IP_ICMP_H_ +#include +#endif + #ifdef _KERNEL #include "opt_icmp_bandlim.h" /* for ICMP_BANDLIM */ #endif diff --git a/sys/netinet/if_atm.h b/sys/netinet/if_atm.h index 115573bca3..981239b836 100644 --- a/sys/netinet/if_atm.h +++ b/sys/netinet/if_atm.h @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/netinet/if_atm.h,v 1.2.6.2 2001/12/20 10:30:18 ru Exp $ */ -/* $DragonFly: src/sys/netinet/if_atm.h,v 1.4 2004/12/21 02:54:15 hsu Exp $ */ +/* $DragonFly: src/sys/netinet/if_atm.h,v 1.5 2006/05/20 02:42:12 dillon Exp $ */ /* $NetBSD: if_atm.h,v 1.2 1996/07/03 17:17:17 chuck Exp $ */ /* @@ -37,12 +37,17 @@ /* * if_atm.h */ +#ifndef _NETINET_IF_ATM_H_ +#define _NETINET_IF_ATM_H_ struct atm_pseudohdr; struct mbuf; struct rtentry; +struct rt_addrinfo; struct sockaddr; void atm_rtrequest (int, struct rtentry *, struct rt_addrinfo *); int atmresolve (struct rtentry *, struct mbuf *, struct sockaddr *, struct atm_pseudohdr *); + +#endif diff --git a/sys/netinet/if_ether.h b/sys/netinet/if_ether.h index 9e987da571..6a2a65aa5a 100644 --- a/sys/netinet/if_ether.h +++ b/sys/netinet/if_ether.h @@ -32,14 +32,21 @@ * * @(#)if_ether.h 8.3 (Berkeley) 5/2/95 * $FreeBSD: src/sys/netinet/if_ether.h,v 1.24.2.1 2002/02/13 21:38:56 fjoe Exp $ - * $DragonFly: src/sys/netinet/if_ether.h,v 1.5 2004/12/21 02:54:15 hsu Exp $ + * $DragonFly: src/sys/netinet/if_ether.h,v 1.6 2006/05/20 02:42:12 dillon Exp $ */ #ifndef _NETINET_IF_ETHER_H_ #define _NETINET_IF_ETHER_H_ +#ifndef _NET_ETHERNET_H_ #include +#endif +#ifndef _NET_IF_ARP_H_ #include +#endif +#ifndef _NETINET_IN_H_ +#include +#endif /* * Macro to map an IP multicast address to an Ethernet multicast address. diff --git a/sys/netinet/if_fddi.h b/sys/netinet/if_fddi.h index 0bec395f1c..dc8cbc13db 100644 --- a/sys/netinet/if_fddi.h +++ b/sys/netinet/if_fddi.h @@ -34,12 +34,16 @@ * * @(#)if_fddi.h 8.1 (Berkeley) 6/10/93 * $FreeBSD: src/sys/netinet/if_fddi.h,v 1.8 1999/12/29 04:40:58 peter Exp $ - * $DragonFly: src/sys/netinet/Attic/if_fddi.h,v 1.6 2005/11/28 17:13:46 dillon Exp $ + * $DragonFly: src/sys/netinet/Attic/if_fddi.h,v 1.7 2006/05/20 02:42:12 dillon Exp $ */ #ifndef _NETINET_IF_FDDI_H_ #define _NETINET_IF_FDDI_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif + /* * Structure of an 100Mb/s FDDI header. */ @@ -79,6 +83,7 @@ struct fddi_header { #define fddi_sprintf ether_sprintf struct lwkt_serialize; +struct ifnet; void fddi_ifattach (struct ifnet *, struct lwkt_serialize *); diff --git a/sys/netinet/igmp.h b/sys/netinet/igmp.h index b1a538621b..dce9ef1aea 100644 --- a/sys/netinet/igmp.h +++ b/sys/netinet/igmp.h @@ -36,12 +36,19 @@ * * @(#)igmp.h 8.1 (Berkeley) 6/10/93 * $FreeBSD: src/sys/netinet/igmp.h,v 1.10 1999/08/28 00:49:15 peter Exp $ - * $DragonFly: src/sys/netinet/igmp.h,v 1.3 2004/12/21 02:54:15 hsu Exp $ + * $DragonFly: src/sys/netinet/igmp.h,v 1.4 2006/05/20 02:42:12 dillon Exp $ */ #ifndef _NETINET_IGMP_H_ #define _NETINET_IGMP_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _NETINET_IN_H_ +#include +#endif + /* * Internet Group Management Protocol (IGMP) definitions. * diff --git a/sys/netinet/igmp_var.h b/sys/netinet/igmp_var.h index 5415bb4371..d47da86240 100644 --- a/sys/netinet/igmp_var.h +++ b/sys/netinet/igmp_var.h @@ -36,12 +36,24 @@ * * from: @(#)igmp_var.h 8.1 (Berkeley) 7/19/93 * $FreeBSD: src/sys/netinet/igmp_var.h,v 1.17 1999/12/29 04:40:59 peter Exp $ - * $DragonFly: src/sys/netinet/igmp_var.h,v 1.4 2004/06/03 18:30:03 joerg Exp $ + * $DragonFly: src/sys/netinet/igmp_var.h,v 1.5 2006/05/20 02:42:12 dillon Exp $ */ #ifndef _NETINET_IGMP_VAR_H_ #define _NETINET_IGMP_VAR_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif + +#ifdef _KERNEL + +#ifndef _SYS_SYSCTL_H_ +#include +#endif + +#endif + /* * Internet Group Management Protocol (IGMP), * implementation-specific definitions. @@ -86,6 +98,9 @@ struct igmpstat { */ #define IGMP_AGE_THRESHOLD 540 +struct mbuf; +struct in_multi; + void igmp_init (void); void igmp_input (struct mbuf *, ...); void igmp_joingroup (struct in_multi *); diff --git a/sys/netinet/in_gif.h b/sys/netinet/in_gif.h index 736a746255..83973d2594 100644 --- a/sys/netinet/in_gif.h +++ b/sys/netinet/in_gif.h @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/netinet/in_gif.h,v 1.3.2.4 2002/11/08 16:57:13 ume Exp $ */ -/* $DragonFly: src/sys/netinet/in_gif.h,v 1.4 2004/06/03 18:30:03 joerg Exp $ */ +/* $DragonFly: src/sys/netinet/in_gif.h,v 1.5 2006/05/20 02:42:12 dillon Exp $ */ /* $KAME: in_gif.h,v 1.5 2000/04/14 08:36:02 itojun Exp $ */ /* @@ -39,6 +39,9 @@ extern int ip_gif_ttl; struct gif_softc; +struct mbuf; +struct ifnet; + void in_gif_input (struct mbuf *, ...); int in_gif_output (struct ifnet *, int, struct mbuf *); int gif_encapcheck4 (const struct mbuf *, int, int, void *); diff --git a/sys/netinet/in_hostcache.h b/sys/netinet/in_hostcache.h index 1f0385983b..c10890dba7 100644 --- a/sys/netinet/in_hostcache.h +++ b/sys/netinet/in_hostcache.h @@ -27,11 +27,15 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/netinet/in_hostcache.h,v 1.3 1999/12/29 04:40:59 peter Exp $ - * $DragonFly: src/sys/netinet/Attic/in_hostcache.h,v 1.3 2004/12/21 02:54:15 hsu Exp $ + * $DragonFly: src/sys/netinet/Attic/in_hostcache.h,v 1.4 2006/05/20 02:42:12 dillon Exp $ */ #ifndef _NETINET_IN_HOSTCACHE_H -#define _NETINET_IN_HOSTCACHE_H 1 +#define _NETINET_IN_HOSTCACHE_H + +#ifndef _NET_HOSTCACHE_H_ +#include +#endif /* * This file defines the particular structures contained in the host cache @@ -60,6 +64,8 @@ struct in_hcentry { u_short inhc_mssopt; }; +struct sockaddr_in; + #define inhc_addr(inhc) ((struct sockaddr_in *)(inhc)->inhc_hc.hc_host) /* Flags for inhc_flags... */ diff --git a/sys/netinet/in_pcb.h b/sys/netinet/in_pcb.h index effeb88d77..cfb922b008 100644 --- a/sys/netinet/in_pcb.h +++ b/sys/netinet/in_pcb.h @@ -82,16 +82,24 @@ * * @(#)in_pcb.h 8.1 (Berkeley) 6/10/93 * $FreeBSD: src/sys/netinet/in_pcb.h,v 1.32.2.7 2003/01/24 05:11:34 sam Exp $ - * $DragonFly: src/sys/netinet/in_pcb.h,v 1.19 2004/12/21 02:54:15 hsu Exp $ + * $DragonFly: src/sys/netinet/in_pcb.h,v 1.20 2006/05/20 02:42:12 dillon Exp $ */ #ifndef _NETINET_IN_PCB_H_ #define _NETINET_IN_PCB_H_ +#ifndef _SYS_QUEUE_H_ #include +#endif +#ifndef _SYS_SYSCTL_H_ #include - +#endif +#ifndef _NETINET_IN_H_ +#include +#endif +#ifndef _NET_ROUTE_H_ #include +#endif #define in6pcb inpcb /* for KAME src sync over BSD*'s */ #define in6p_sp inp_sp /* for KAME src sync over BSD*'s */ diff --git a/sys/netinet/in_systm.h b/sys/netinet/in_systm.h index ce41d4fa29..af0d3f6f81 100644 --- a/sys/netinet/in_systm.h +++ b/sys/netinet/in_systm.h @@ -32,12 +32,16 @@ * * @(#)in_systm.h 8.1 (Berkeley) 6/10/93 * $FreeBSD: src/sys/netinet/in_systm.h,v 1.9 1999/12/29 04:41:00 peter Exp $ - * $DragonFly: src/sys/netinet/in_systm.h,v 1.3 2003/08/23 11:18:00 rob Exp $ + * $DragonFly: src/sys/netinet/in_systm.h,v 1.4 2006/05/20 02:42:12 dillon Exp $ */ #ifndef _NETINET_IN_SYSTM_H_ #define _NETINET_IN_SYSTM_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif + /* * Miscellaneous internetwork * definitions for kernel. diff --git a/sys/netinet/in_var.h b/sys/netinet/in_var.h index 05760de045..a9d665f05a 100644 --- a/sys/netinet/in_var.h +++ b/sys/netinet/in_var.h @@ -32,14 +32,24 @@ * * @(#)in_var.h 8.2 (Berkeley) 1/9/95 * $FreeBSD: src/sys/netinet/in_var.h,v 1.33.2.3 2001/12/14 20:09:34 jlemon Exp $ - * $DragonFly: src/sys/netinet/in_var.h,v 1.10 2005/11/28 17:13:46 dillon Exp $ + * $DragonFly: src/sys/netinet/in_var.h,v 1.11 2006/05/20 02:42:12 dillon Exp $ */ #ifndef _NETINET_IN_VAR_H_ #define _NETINET_IN_VAR_H_ +#ifndef _SYS_QUEUE_H_ #include +#endif +#ifndef _SYS_FNV_HASH_H_ #include +#endif +#ifndef _NET_IF_VAR_H_ +#include +#endif +#ifndef _NETINET_IN_H_ +#include +#endif /* * Interface address, Internet version. One of these structures diff --git a/sys/netinet/ip.h b/sys/netinet/ip.h index b34ea33f12..06b8686f21 100644 --- a/sys/netinet/ip.h +++ b/sys/netinet/ip.h @@ -32,12 +32,25 @@ * * @(#)ip.h 8.2 (Berkeley) 6/1/94 * $FreeBSD: src/sys/netinet/ip.h,v 1.17 1999/12/22 19:13:20 shin Exp $ - * $DragonFly: src/sys/netinet/ip.h,v 1.4 2005/02/11 22:25:57 joerg Exp $ + * $DragonFly: src/sys/netinet/ip.h,v 1.5 2006/05/20 02:42:12 dillon Exp $ */ #ifndef _NETINET_IP_H_ #define _NETINET_IP_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _NETINET_IN_H_ +#include +#endif +#ifndef _NETINET_IN_SYSTM_H_ +#include +#endif +#ifndef _MACHINE_ENDIAN_H_ +#include +#endif + /* * Definitions for internet protocol version 4. * Per RFC 791, September 1981. diff --git a/sys/netinet/ip6.h b/sys/netinet/ip6.h index bef8c3e417..3b505de4d9 100644 --- a/sys/netinet/ip6.h +++ b/sys/netinet/ip6.h @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/netinet/ip6.h,v 1.2.2.2 2001/07/03 11:01:46 ume Exp $ */ -/* $DragonFly: src/sys/netinet/ip6.h,v 1.5 2004/12/21 02:54:15 hsu Exp $ */ +/* $DragonFly: src/sys/netinet/ip6.h,v 1.6 2006/05/20 02:42:12 dillon Exp $ */ /* $KAME: ip6.h,v 1.18 2001/03/29 05:34:30 itojun Exp $ */ /* @@ -69,6 +69,17 @@ #ifndef _NETINET_IP6_H_ #define _NETINET_IP6_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _NETINET_IN_H_ +#include +#endif +#ifndef _MACHINE_ENDIAN_H_ +#include +#endif + + /* * Definition for internet protocol version 6. * RFC 2460 diff --git a/sys/netinet/ip_ecn.h b/sys/netinet/ip_ecn.h index 0478430aa3..ebf8e27d9b 100644 --- a/sys/netinet/ip_ecn.h +++ b/sys/netinet/ip_ecn.h @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/netinet/ip_ecn.h,v 1.2.2.2 2001/07/03 11:01:46 ume Exp $ */ -/* $DragonFly: src/sys/netinet/ip_ecn.h,v 1.3 2003/08/23 11:18:00 rob Exp $ */ +/* $DragonFly: src/sys/netinet/ip_ecn.h,v 1.4 2006/05/20 02:42:12 dillon Exp $ */ /* $KAME: ip_ecn.h,v 1.6 2001/05/03 14:51:48 itojun Exp $ */ /* @@ -36,6 +36,13 @@ * http://www.aciri.org/floyd/papers/draft-ipsec-ecn-00.txt */ +#ifndef _NETINET_IP_ECN_H_ +#define _NETINET_IP_ECN_H_ + +#ifndef _SYS_TYPES_H_ +#include +#endif + #if defined(_KERNEL) && !defined(_LKM) #include "opt_inet.h" #endif @@ -48,3 +55,5 @@ extern void ip_ecn_ingress (int, u_int8_t *, const u_int8_t *); extern void ip_ecn_egress (int, const u_int8_t *, u_int8_t *); #endif + +#endif diff --git a/sys/netinet/ip_encap.h b/sys/netinet/ip_encap.h index 64ba56070b..86e149fb0e 100644 --- a/sys/netinet/ip_encap.h +++ b/sys/netinet/ip_encap.h @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/netinet/ip_encap.h,v 1.1.2.2 2002/11/20 23:20:54 luigi Exp $ */ -/* $DragonFly: src/sys/netinet/ip_encap.h,v 1.3 2004/06/03 18:30:03 joerg Exp $ */ +/* $DragonFly: src/sys/netinet/ip_encap.h,v 1.4 2006/05/20 02:42:12 dillon Exp $ */ /* $KAME: ip_encap.h,v 1.7 2000/03/25 07:23:37 sumikawa Exp $ */ /* @@ -34,7 +34,16 @@ #ifndef _NETINET_IP_ENCAP_H_ #define _NETINET_IP_ENCAP_H_ -#ifdef _KERNEL +#if defined(_KERNEL) || defined(_KERNEL_STRUCTURES) + +#ifndef _SYS_QUEUE_H_ +#include +#endif +#ifndef _SYS_SOCKET_H_ +#include +#endif + +struct mbuf; struct encaptab { LIST_ENTRY(encaptab) chain; @@ -49,6 +58,10 @@ struct encaptab { void *arg; /* passed via m->m_pkthdr.aux */ }; +#endif + +#ifdef _KERNEL + void encap_init(void); void encap4_input(struct mbuf *, ...); int encap6_input(struct mbuf **, int *, int); @@ -60,6 +73,7 @@ const struct encaptab *encap_attach_func(int, int, const struct protosw *, void *); int encap_detach(const struct encaptab *); void *encap_getarg(struct mbuf *); + #endif #endif /*_NETINET_IP_ENCAP_H_*/ diff --git a/sys/netinet/ip_flow.h b/sys/netinet/ip_flow.h index 72910bcdea..f625f635bc 100644 --- a/sys/netinet/ip_flow.h +++ b/sys/netinet/ip_flow.h @@ -34,12 +34,25 @@ * POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/netinet/ip_flow.h,v 1.2 1999/08/28 00:49:22 peter Exp $ - * $DragonFly: src/sys/netinet/ip_flow.h,v 1.2 2003/06/17 04:28:51 dillon Exp $ + * $DragonFly: src/sys/netinet/ip_flow.h,v 1.3 2006/05/20 02:42:12 dillon Exp $ */ #ifndef _NETINET_IP_FLOW_H #define _NETINET_IP_FLOW_H +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _SYS_QUEUE_H_ +#include +#endif +#ifndef _NETINET_IN_H_ +#include +#endif +#ifndef _NET_ROUTE_H_ +#include +#endif + struct ipflow { LIST_ENTRY(ipflow) ipf_next; /* next ipflow in bucket */ struct in_addr ipf_dst; /* destination address */ diff --git a/sys/netinet/ip_gre.h b/sys/netinet/ip_gre.h index 02ca259cc7..6883047d21 100644 --- a/sys/netinet/ip_gre.h +++ b/sys/netinet/ip_gre.h @@ -1,6 +1,6 @@ /* * $NetBSD: ip_gre.h,v 1.5 2002/06/09 16:33:40 itojun Exp $ - * $DragonFly: src/sys/netinet/ip_gre.h,v 1.4 2004/12/21 02:54:15 hsu Exp $ + * $DragonFly: src/sys/netinet/ip_gre.h,v 1.5 2006/05/20 02:42:12 dillon Exp $ * * Copyright (c) 1998 The NetBSD Foundation, Inc. * All rights reserved. @@ -37,7 +37,16 @@ * POSSIBILITY OF SUCH DAMAGE. */ +#ifndef _NETINET_IP_GRE_H_ +#define _NETINET_IP_GRE_H_ + #ifdef _KERNEL + +struct mbuf; + void gre_input(struct mbuf *, ...); void gre_mobile_input(struct mbuf *, ...); + #endif /* _KERNEL */ + +#endif diff --git a/sys/netinet/ip_icmp.h b/sys/netinet/ip_icmp.h index 0181756a05..dc204a1f16 100644 --- a/sys/netinet/ip_icmp.h +++ b/sys/netinet/ip_icmp.h @@ -32,12 +32,25 @@ * * @(#)ip_icmp.h 8.1 (Berkeley) 6/10/93 * $FreeBSD: src/sys/netinet/ip_icmp.h,v 1.16 1999/12/29 04:41:01 peter Exp $ - * $DragonFly: src/sys/netinet/ip_icmp.h,v 1.7 2005/10/28 15:56:47 liamfoy Exp $ + * $DragonFly: src/sys/netinet/ip_icmp.h,v 1.8 2006/05/20 02:42:12 dillon Exp $ */ #ifndef _NETINET_IP_ICMP_H_ #define _NETINET_IP_ICMP_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _NETINET_IN_SYSTM_H_ +#include +#endif +#ifndef _NETINET_IN_H_ +#include +#endif +#ifndef _NETINET_IP_H_ +#include +#endif + /* * Interface Control Message Protocol Definitions. * Per RFC 792, September 1981. diff --git a/sys/netinet/ip_var.h b/sys/netinet/ip_var.h index ebb9db4621..cdba3a3a64 100644 --- a/sys/netinet/ip_var.h +++ b/sys/netinet/ip_var.h @@ -32,13 +32,32 @@ * * @(#)ip_var.h 8.2 (Berkeley) 1/9/95 * $FreeBSD: src/sys/netinet/ip_var.h,v 1.50.2.13 2003/08/24 08:24:38 hsu Exp $ - * $DragonFly: src/sys/netinet/ip_var.h,v 1.18 2006/01/31 19:05:40 dillon Exp $ + * $DragonFly: src/sys/netinet/ip_var.h,v 1.19 2006/05/20 02:42:12 dillon Exp $ */ #ifndef _NETINET_IP_VAR_H_ #define _NETINET_IP_VAR_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _SYS_QUEUE_H_ #include +#endif +#ifndef _NETINET_IN_H_ +#include +#endif + +#ifdef _KERNEL + +#ifndef _MACHINE_ENDIAN_H_ +#include +#endif +#ifndef _MACHINE_PARAM_H_ +#include +#endif + +#endif /* * Overlay for ip header used by other protocols (tcp, udp). @@ -107,6 +126,7 @@ struct ip_moptions { struct ip_stats; extern struct ip_stats ipstats_percpu[MAXCPU]; + #endif /* @@ -227,7 +247,7 @@ ip_newid(void) if (ip_do_randomid) return ip_randomid(); else - return htons(ip_id++); + return __htons(ip_id++); } #endif /* _KERNEL */ diff --git a/sys/netinet/pim.h b/sys/netinet/pim.h index 21304ed739..c9054444ab 100644 --- a/sys/netinet/pim.h +++ b/sys/netinet/pim.h @@ -28,7 +28,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/netinet/pim.h,v 1.1.2.1 2003/08/24 17:04:44 hsu Exp $ - * $DragonFly: src/sys/netinet/pim.h,v 1.3 2004/09/23 16:44:32 joerg Exp $ + * $DragonFly: src/sys/netinet/pim.h,v 1.4 2006/05/20 02:42:12 dillon Exp $ */ #ifndef _NETINET_PIM_H_ @@ -43,7 +43,13 @@ * Modified by Pavlin Radoslavov, USC/ISI, May 1998, October 2000. */ +#ifndef _SYS_TYPES_H_ #include +#endif +#ifndef _MACHINE_ENDIAN_H_ +#include +#endif + /* * PIM packet header diff --git a/sys/netinet/pim_var.h b/sys/netinet/pim_var.h index 26adebebf9..2684e1a7a2 100644 --- a/sys/netinet/pim_var.h +++ b/sys/netinet/pim_var.h @@ -28,12 +28,24 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/netinet/pim_var.h,v 1.1.2.1 2003/08/24 17:04:44 hsu Exp $ - * $DragonFly: src/sys/netinet/pim_var.h,v 1.2 2004/06/03 18:30:03 joerg Exp $ + * $DragonFly: src/sys/netinet/pim_var.h,v 1.3 2006/05/20 02:42:12 dillon Exp $ */ #ifndef _NETINET_PIM_VAR_H_ #define _NETINET_PIM_VAR_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif + +#ifdef _KERNEL + +#ifndef _SYS_SYSCTL_H_ +#include +#endif + +#endif + /* * Protocol Independent Multicast (PIM), * kernel variables and implementation-specific definitions. @@ -72,8 +84,11 @@ struct pimstat { } #ifdef _KERNEL + extern struct pimstat pimstat; +struct mbuf; + void pim_input(struct mbuf *, ...); SYSCTL_DECL(_net_inet_pim); #endif diff --git a/sys/netinet/sctp.h b/sys/netinet/sctp.h index 52db65b8dc..e8ded4187b 100644 --- a/sys/netinet/sctp.h +++ b/sys/netinet/sctp.h @@ -1,5 +1,5 @@ /* $KAME: sctp.h,v 1.17 2004/08/17 04:06:15 itojun Exp $ */ -/* $DragonFly: src/sys/netinet/sctp.h,v 1.1 2005/07/15 14:46:16 eirikn Exp $ */ +/* $DragonFly: src/sys/netinet/sctp.h,v 1.2 2006/05/20 02:42:12 dillon Exp $ */ #ifndef _NETINET_SCTP_H_ #define _NETINET_SCTP_H_ @@ -35,7 +35,9 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ +#ifndef _SYS_TYPES_H_ #include +#endif /* * SCTP protocol - RFC2960. diff --git a/sys/netinet/sctp_asconf.h b/sys/netinet/sctp_asconf.h index 505194f7db..519f28d3cb 100644 --- a/sys/netinet/sctp_asconf.h +++ b/sys/netinet/sctp_asconf.h @@ -1,9 +1,13 @@ /* $KAME: sctp_asconf.h,v 1.7 2004/08/17 04:06:16 itojun Exp $ */ -/* $DragonFly: src/sys/netinet/sctp_asconf.h,v 1.1 2005/07/15 14:46:16 eirikn Exp $ */ +/* $DragonFly: src/sys/netinet/sctp_asconf.h,v 1.2 2006/05/20 02:42:12 dillon Exp $ */ #ifndef _NETINET_SCTP_ASCONF_H_ #define _NETINET_SCTP_ASCONF_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif + /* * Copyright (c) 2001, 2002, 2003, 2004 Cisco Systems, Inc. * All rights reserved. @@ -32,10 +36,18 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ -#include #if defined(_KERNEL) || (defined(__APPLE__) && defined(KERNEL)) +struct mbuf; +struct sockaddr; +struct sctp_inpcb; +struct sctp_asconf_ack_chunk; +struct sctp_asconf_chunk; +struct sctp_tcb; +struct sctp_nets; +struct ifaddr; + extern void sctp_asconf_cleanup(struct sctp_tcb *, struct sctp_nets *); extern struct mbuf *sctp_compose_asconf(struct sctp_tcb *); diff --git a/sys/netinet/sctp_callout.h b/sys/netinet/sctp_callout.h index 816934f845..60305071f1 100644 --- a/sys/netinet/sctp_callout.h +++ b/sys/netinet/sctp_callout.h @@ -1,8 +1,12 @@ /* $KAME: sctp_callout.h,v 1.8 2005/01/25 07:35:42 itojun Exp $ */ -/* $DragonFly: src/sys/netinet/sctp_callout.h,v 1.2 2006/01/14 11:33:50 swildner Exp $ */ +/* $DragonFly: src/sys/netinet/sctp_callout.h,v 1.3 2006/05/20 02:42:12 dillon Exp $ */ -#ifndef __SCTP_CALLOUT__ -#define __SCTP_CALLOUT__ +#ifndef _NETINET_SCTP_CALLOUT_H_ +#define _NETINET_SCTP_CALLOUT_H_ + +#ifndef _SYS_QUEUE_H_ +#include +#endif /* * Copyright (C) 2002, 2003, 2004 Cisco Systems Inc, diff --git a/sys/netinet/sctp_constants.h b/sys/netinet/sctp_constants.h index 48dffb1ff7..bb971192cc 100644 --- a/sys/netinet/sctp_constants.h +++ b/sys/netinet/sctp_constants.h @@ -1,8 +1,8 @@ /* $KAME: sctp_constants.h,v 1.16 2004/08/17 04:06:16 itojun Exp $ */ -/* $DragonFly: src/sys/netinet/sctp_constants.h,v 1.2 2005/07/15 15:02:02 eirikn Exp $ */ +/* $DragonFly: src/sys/netinet/sctp_constants.h,v 1.3 2006/05/20 02:42:12 dillon Exp $ */ -#ifndef __sctp_constants_h__ -#define __sctp_constants_h__ +#ifndef _NETINET_SCTP_CONSTANTS_H_ +#define _NETINET_SCTP_CONSTANTS_H_ /* * Copyright (c) 2001, 2002, 2003, 2004 Cisco Systems, Inc. diff --git a/sys/netinet/sctp_crc32.h b/sys/netinet/sctp_crc32.h index e38703e631..97830c7556 100644 --- a/sys/netinet/sctp_crc32.h +++ b/sys/netinet/sctp_crc32.h @@ -1,8 +1,8 @@ /* $KAME: sctp_crc32.h,v 1.4 2003/11/25 06:40:52 ono Exp $ */ -/* $DragonFly: src/sys/netinet/sctp_crc32.h,v 1.1 2005/07/15 14:46:16 eirikn Exp $ */ +/* $DragonFly: src/sys/netinet/sctp_crc32.h,v 1.2 2006/05/20 02:42:12 dillon Exp $ */ -#ifndef __crc32c_h__ -#define __crc32c_h__ +#ifndef _NETINET_SCTP_CRC32_H_ +#define _NETINET_SCTP_CRC32_H_ /* * Copyright (c) 2001, 2002, 2004 Cisco Systems, Inc. @@ -36,7 +36,9 @@ * SUCH DAMAGE. */ +#ifndef _SYS_TYPES_H_ #include +#endif #ifndef SCTP_USE_ADLER32 #if defined(_KERNEL) || (defined(__APPLE__) && defined(KERNEL)) @@ -46,4 +48,4 @@ u_int32_t sctp_csum_finalize(u_int32_t); #endif /* _KERNEL */ #endif /* !SCTP_USE_ADLER32 */ -#endif /* __crc32c_h__ */ +#endif /* _NETINET_SCTP_CRC32_H_ */ diff --git a/sys/netinet/sctp_hashdriver.h b/sys/netinet/sctp_hashdriver.h index 412f041d7e..e59af264d1 100644 --- a/sys/netinet/sctp_hashdriver.h +++ b/sys/netinet/sctp_hashdriver.h @@ -1,8 +1,8 @@ /* $KAME: sctp_hashdriver.h,v 1.3 2002/10/09 18:01:21 itojun Exp $ */ -/* $DragonFly: src/sys/netinet/sctp_hashdriver.h,v 1.1 2005/07/15 14:46:16 eirikn Exp $ */ +/* $DragonFly: src/sys/netinet/sctp_hashdriver.h,v 1.2 2006/05/20 02:42:12 dillon Exp $ */ -#ifndef __sctp_hashdriver_h__ -#define __sctp_hashdriver_h__ +#ifndef _NETINET_SCTP_HASHDRIVER_H_ +#define _NETINET_SCTP_HASHDRIVER_H_ /* * Copyright (c) 2001, 2002 Cisco Systems, Inc. @@ -36,8 +36,9 @@ * SUCH DAMAGE. */ -void sctp_hash_digest(char *, int, char *, int, unsigned char *); +struct mbuf; +void sctp_hash_digest(char *, int, char *, int, unsigned char *); void sctp_hash_digest_m(char *, int, struct mbuf *, int, unsigned char *); #endif diff --git a/sys/netinet/sctp_header.h b/sys/netinet/sctp_header.h index ddc26794d6..77928e2951 100644 --- a/sys/netinet/sctp_header.h +++ b/sys/netinet/sctp_header.h @@ -1,8 +1,8 @@ /* $KAME: sctp_header.h,v 1.13 2004/08/17 04:06:16 itojun Exp $ */ -/* $DragonFly: src/sys/netinet/sctp_header.h,v 1.1 2005/07/15 14:46:16 eirikn Exp $ */ +/* $DragonFly: src/sys/netinet/sctp_header.h,v 1.2 2006/05/20 02:42:12 dillon Exp $ */ -#ifndef __sctp_header_h__ -#define __sctp_header_h__ +#ifndef _NETINET_SCTP_HEADER_H_ +#define _NETINET_SCTP_HEADER_H_ /* * Copyright (c) 2001, 2002, 2003, 2004 Cisco Systems, Inc. @@ -36,9 +36,18 @@ * SUCH DAMAGE. */ +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _SYS_TIME_H_ #include +#endif +#ifndef _NETINET_SCTP_H_ #include +#endif +#ifndef _NETINET_SCTP_CONSTANTS_H_ #include +#endif /* * Parameter structures @@ -486,4 +495,4 @@ struct sctp_stream_reset_resp { #define SCTP_MIN_V4_OVERHEAD (sizeof(struct ip) + \ sizeof(struct sctphdr)) -#endif /* !__sctp_header_h__ */ +#endif /* _NETINET_SCTP_HEADER_H_ */ diff --git a/sys/netinet/sctp_indata.h b/sys/netinet/sctp_indata.h index 265314c80d..e31ddf5a34 100644 --- a/sys/netinet/sctp_indata.h +++ b/sys/netinet/sctp_indata.h @@ -1,8 +1,8 @@ /* $KAME: sctp_indata.h,v 1.8 2004/08/17 04:06:17 itojun Exp $ */ -/* $DragonFly: src/sys/netinet/sctp_indata.h,v 1.1 2005/07/15 14:46:16 eirikn Exp $ */ +/* $DragonFly: src/sys/netinet/sctp_indata.h,v 1.2 2006/05/20 02:42:12 dillon Exp $ */ -#ifndef __sctp_indata_h__ -#define __sctp_indata_h__ +#ifndef _NEINET_SCTP_INDATA_H_ +#define _NEINET_SCTP_INDATA_H_ /* * Copyright (C) 2002, 2003, 2004 Cisco Systems Inc, @@ -35,6 +35,22 @@ #if defined(_KERNEL) || (defined(__APPLE__) && defined(KERNEL)) + +#ifndef _SYS_TYPES_H_ +#include +#endif + +struct mbuf; +struct sctp_tcb; +struct sctp_inpcb; +struct sctp_association; +struct sctp_tmit_chunk; +struct sctp_sack_chunk; +struct sctp_nets; +struct sctp_forward_tsn_chunk; +struct sctp_shutdown_chunk; +struct sctphdr; + int sctp_deliver_data(struct sctp_tcb *, struct sctp_association *, struct sctp_tmit_chunk *, int); @@ -59,5 +75,6 @@ int sctp_process_data(struct mbuf **, int, int *, int, struct sctphdr *, struct sctp_inpcb *, struct sctp_tcb *, struct sctp_nets *, u_int32_t *); void sctp_sack_check(struct sctp_tcb *, int, int, int *); + #endif #endif diff --git a/sys/netinet/sctp_input.h b/sys/netinet/sctp_input.h index 6d2216fa77..6691127850 100644 --- a/sys/netinet/sctp_input.h +++ b/sys/netinet/sctp_input.h @@ -1,8 +1,8 @@ /* $KAME: sctp_input.h,v 1.5 2004/08/17 04:06:17 itojun Exp $ */ -/* $DragonFly: src/sys/netinet/sctp_input.h,v 1.1 2005/07/15 14:46:17 eirikn Exp $ */ +/* $DragonFly: src/sys/netinet/sctp_input.h,v 1.2 2006/05/20 02:42:12 dillon Exp $ */ -#ifndef __sctp_input_h__ -#define __sctp_input_h__ +#ifndef _NETINET_SCTP_INPUT_H_ +#define _NETINET_SCTP_INPUT_H_ /* * Copyright (C) 2002 Cisco Systems Inc, @@ -34,12 +34,25 @@ */ #if defined(_KERNEL) || defined(KERNEL) + +#ifndef _SYS_TYPES_H_ +#include +#endif + +struct mbuf; +struct sctp_inpcb; +struct sctphdr; +struct sctp_chunkhdr; +struct sctp_tcb; +struct sctp_nets; +struct sctp_stream_reset_response; + int sctp_common_input_processing(struct mbuf **, int, int, int, struct sctphdr *, struct sctp_chunkhdr *, struct sctp_inpcb *, struct sctp_tcb *, struct sctp_nets *, u_int8_t); -void -sctp_handle_stream_reset_response(struct sctp_tcb *, struct sctp_stream_reset_response *resp); +void sctp_handle_stream_reset_response(struct sctp_tcb *, + struct sctp_stream_reset_response *resp); #endif #endif diff --git a/sys/netinet/sctp_output.h b/sys/netinet/sctp_output.h index a6016b0667..99df77019b 100644 --- a/sys/netinet/sctp_output.h +++ b/sys/netinet/sctp_output.h @@ -1,8 +1,8 @@ /* $KAME: sctp_output.h,v 1.13 2004/08/17 04:06:18 itojun Exp $ */ -/* $DragonFly: src/sys/netinet/sctp_output.h,v 1.2 2005/07/15 15:02:02 eirikn Exp $ */ +/* $DragonFly: src/sys/netinet/sctp_output.h,v 1.3 2006/05/20 02:42:12 dillon Exp $ */ -#ifndef __sctp_output_h__ -#define __sctp_output_h__ +#ifndef _NETINET_SCTP_OUTPUT_H_ +#define _NETINET_SCTP_OUTPUT_H_ /* * Copyright (C) 2002, 2003, 2004 Cisco Systems Inc, @@ -33,10 +33,19 @@ * SUCH DAMAGE. */ - - +#ifndef _NETINET_SCTP_HEADER_H_ #include +#endif + #if defined(_KERNEL) || (defined(__APPLE__) && defined(KERNEL)) + +struct mbuf; +struct route; +struct socket; +struct sctp_tcb; +struct sctp_inpcb; +struct sctp_association; + void sctp_send_initiate(struct sctp_inpcb *, struct sctp_tcb *); void sctp_send_initiate_ack(struct sctp_inpcb *, struct sctp_tcb *, diff --git a/sys/netinet/sctp_pcb.h b/sys/netinet/sctp_pcb.h index 4d74ec40b3..495d8a577f 100644 --- a/sys/netinet/sctp_pcb.h +++ b/sys/netinet/sctp_pcb.h @@ -1,8 +1,5 @@ /* $KAME: sctp_pcb.h,v 1.19 2004/08/17 06:28:02 t-momose Exp $ */ -/* $DragonFly: src/sys/netinet/sctp_pcb.h,v 1.2 2005/07/15 15:02:02 eirikn Exp $ */ - -#ifndef __sctp_pcb_h__ -#define __sctp_pcb_h__ +/* $DragonFly: src/sys/netinet/sctp_pcb.h,v 1.3 2006/05/20 02:42:12 dillon Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Cisco Systems, Inc. @@ -36,6 +33,13 @@ * SUCH DAMAGE. */ +#ifndef _NETINET_SCTP_PCB_H_ +#define _NETINET_SCTP_PCB_H_ + +#ifndef _NETINET_IN_PCB_H_ +#include +#endif + /* * We must have V6 so the size of the proto can be calculated. Otherwise * we would not allocate enough for Net/Open BSD :-< @@ -69,7 +73,6 @@ LIST_HEAD(sctppcbhead, sctp_inpcb); LIST_HEAD(sctpasochead, sctp_tcb); TAILQ_HEAD(sctpsocketq, sctp_socket_q_list); -LIST_HEAD(sctpladdr, sctp_laddr); LIST_HEAD(sctpvtaghead, sctp_tagblock); #include @@ -704,4 +707,4 @@ extern void in6_sin6_2_sin (struct sockaddr_in *, #endif #endif /* _KERNEL */ -#endif /* !__sctp_pcb_h__ */ +#endif /* _NETINET_SCTP_PCB_H_ */ diff --git a/sys/netinet/sctp_peeloff.h b/sys/netinet/sctp_peeloff.h index aa860ba9c5..5fca512f69 100644 --- a/sys/netinet/sctp_peeloff.h +++ b/sys/netinet/sctp_peeloff.h @@ -1,8 +1,8 @@ /* $KAME: sctp_peeloff.h,v 1.5 2004/08/17 04:06:19 itojun Exp $ */ -/* $DragonFly: src/sys/netinet/sctp_peeloff.h,v 1.1 2005/07/15 14:46:17 eirikn Exp $ */ +/* $DragonFly: src/sys/netinet/sctp_peeloff.h,v 1.2 2006/05/20 02:42:12 dillon Exp $ */ -#ifndef __sctp_peeloff_h__ -#define __sctp_peeloff_h__ +#ifndef _NETINET_SCTP_PEELOFF_H_ +#define _NETINET_SCTP_PEELOFF_H_ /* * Copyright (C) 2002, 2004 Cisco Systems Inc, diff --git a/sys/netinet/sctp_sha1.h b/sys/netinet/sctp_sha1.h index 2f5f81615c..205bb81a3a 100644 --- a/sys/netinet/sctp_sha1.h +++ b/sys/netinet/sctp_sha1.h @@ -1,8 +1,9 @@ /* $KAME: sctp_sha1.h,v 1.4 2002/10/09 18:01:22 itojun Exp $ */ -/* $DragonFly: src/sys/netinet/sctp_sha1.h,v 1.1 2005/07/15 14:46:17 eirikn Exp $ */ +/* $DragonFly: src/sys/netinet/sctp_sha1.h,v 1.2 2006/05/20 02:42:12 dillon Exp $ */ + +#ifndef _NETINET_SCTP_SHA1_H_ +#define _NETINET_SCTP_SHA1_H_ -#ifndef __SCTP_SLA1_h__ -#define __SCTP_SLA1_h__ /* * Copyright (c) 2001, 2002, 2004 Cisco Systems, Inc. * All rights reserved. diff --git a/sys/netinet/sctp_structs.h b/sys/netinet/sctp_structs.h index 6cda5310fc..8b471bde22 100644 --- a/sys/netinet/sctp_structs.h +++ b/sys/netinet/sctp_structs.h @@ -1,8 +1,8 @@ /* $KAME: sctp_structs.h,v 1.12 2004/08/17 04:06:19 itojun Exp $ */ -/* $DragonFly: src/sys/netinet/sctp_structs.h,v 1.1 2005/07/15 14:46:17 eirikn Exp $ */ +/* $DragonFly: src/sys/netinet/sctp_structs.h,v 1.2 2006/05/20 02:42:12 dillon Exp $ */ -#ifndef __sctp_structs_h__ -#define __sctp_structs_h__ +#ifndef _NETINET_SCTP_STRUCTS_H_ +#define _NETINET_SCTP_STRUCTS_H_ /* * Copyright (c) 2001, 2002, 2003, 2004 Cisco Systems, Inc. @@ -35,7 +35,16 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ + +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _SYS_QUEUE_H_ #include +#endif +#ifndef _NETINET_IN_H_ +#include +#endif #if defined(__APPLE__) #include @@ -55,6 +64,9 @@ #include #include +struct sctp_tcb; +struct sctp_inpcb; + struct sctp_timer { #if defined(__OpenBSD__) struct timeout timer; @@ -286,6 +298,8 @@ struct sctp_asconf_addr { uint8_t sent; /* has this been sent yet? */ }; +struct sctp_laddr; +LIST_HEAD(sctpladdr, sctp_laddr); /* * Here we have information about each individual association that we diff --git a/sys/netinet/sctp_timer.h b/sys/netinet/sctp_timer.h index 206de44b9d..a93355df91 100644 --- a/sys/netinet/sctp_timer.h +++ b/sys/netinet/sctp_timer.h @@ -1,8 +1,8 @@ /* $KAME: sctp_timer.h,v 1.5 2004/08/17 04:06:20 itojun Exp $ */ -/* $DragonFly: src/sys/netinet/sctp_timer.h,v 1.1 2005/07/15 14:46:17 eirikn Exp $ */ +/* $DragonFly: src/sys/netinet/sctp_timer.h,v 1.2 2006/05/20 02:42:12 dillon Exp $ */ -#ifndef __sctp_timer_h__ -#define __sctp_timer_h__ +#ifndef _NETINET_SCTP_TIMER_H_ +#define _NETINET_SCTP_TIMER_H_ /* * Copyright (C) 2002, 2004 Cisco Systems Inc, @@ -34,6 +34,17 @@ */ #if defined(_KERNEL) || (defined(__APPLE__) && defined(KERNEL)) + +#ifndef _SYS_TYPES_H_ +#include +#endif + +struct sctp_nets; +struct sctp_tcb; +struct sctp_inpcb; +struct sctp_association; +struct sctp_iterator; + struct sctp_nets *sctp_find_alternate_net(struct sctp_tcb *, struct sctp_nets *); diff --git a/sys/netinet/sctp_uio.h b/sys/netinet/sctp_uio.h index 61f65aca6c..0bd5f22823 100644 --- a/sys/netinet/sctp_uio.h +++ b/sys/netinet/sctp_uio.h @@ -1,8 +1,8 @@ /* $KAME: sctp_uio.h,v 1.10 2004/08/17 04:06:20 itojun Exp $ */ -/* $DragonFly: src/sys/netinet/sctp_uio.h,v 1.2 2006/01/14 11:33:50 swildner Exp $ */ +/* $DragonFly: src/sys/netinet/sctp_uio.h,v 1.3 2006/05/20 02:42:12 dillon Exp $ */ -#ifndef __sctp_uio_h__ -#define __sctp_uio_h__ +#ifndef _NETINET_SCTP_UIO_H_ +#define _NETINET_SCTP_UIO_H_ /* * Copyright (c) 2001, 2002, 2003, 2004 Cisco Systems, Inc. @@ -521,4 +521,4 @@ ssize_t sctp_recvmsg (int, void *, size_t, struct sockaddr *, __END_DECLS #endif /* !_KERNEL */ -#endif /* !__sctp_uio_h__ */ +#endif /* _NETINET_SCTP_UIO_H_ */ diff --git a/sys/netinet/sctputil.h b/sys/netinet/sctputil.h index 6e8b9058e7..b52ed464a2 100644 --- a/sys/netinet/sctputil.h +++ b/sys/netinet/sctputil.h @@ -1,8 +1,8 @@ /* $KAME: sctputil.h,v 1.14 2004/08/17 04:06:21 itojun Exp $ */ -/* $DragonFly: src/sys/netinet/sctputil.h,v 1.3 2006/01/14 11:33:50 swildner Exp $ */ +/* $DragonFly: src/sys/netinet/sctputil.h,v 1.4 2006/05/20 02:42:12 dillon Exp $ */ -#ifndef __sctputil_h__ -#define __sctputil_h__ +#ifndef _NETINET_SCTPUTIL_H_ +#define _NETINET_SCTPUTIL_H_ /* * Copyright (C) 2002, 2003, 2004 Cisco Systems Inc, @@ -33,6 +33,13 @@ * SUCH DAMAGE. */ +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _SYS_SOCKET_H_ +#include +#endif + #if defined(_KERNEL) || (defined(__APPLE__) && defined(KERNEL)) #ifdef SCTP_MBUF_DEBUG @@ -143,6 +150,21 @@ struct mbuf *sctp_m_copym(struct mbuf *m, int off, int len, int wait); /* * Function prototypes */ + +struct mbuf; +struct ip; +struct sockbuf; +struct socket; +struct sockaddr_in6; +struct sctp_pcb; +struct sctp_tcb; +struct sctp_tmit_chunk; +struct sctpchunk_listhead; +struct sctphdr; +struct sctp_inpcb; +struct sctp_association; +struct sctp_nets; + struct ifaddr *sctp_find_ifa_by_addr(struct sockaddr *sa); u_int32_t sctp_select_initial_TSN(struct sctp_pcb *); diff --git a/sys/netinet/tcp.h b/sys/netinet/tcp.h index 1ac48f3597..a534ef9e5d 100644 --- a/sys/netinet/tcp.h +++ b/sys/netinet/tcp.h @@ -32,12 +32,19 @@ * * @(#)tcp.h 8.1 (Berkeley) 6/10/93 * $FreeBSD: src/sys/netinet/tcp.h,v 1.13.2.3 2001/03/01 22:08:42 jlemon Exp $ - * $DragonFly: src/sys/netinet/tcp.h,v 1.6 2005/01/08 09:50:17 hsu Exp $ + * $DragonFly: src/sys/netinet/tcp.h,v 1.7 2006/05/20 02:42:12 dillon Exp $ */ #ifndef _NETINET_TCP_H_ #define _NETINET_TCP_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _MACHINE_ENDIAN_H_ +#include +#endif + typedef u_int32_t tcp_seq; typedef int32_t tcp_seq_diff_t; typedef u_int32_t tcp_cc; /* connection count per rfc1644 */ diff --git a/sys/netinet/tcp_debug.h b/sys/netinet/tcp_debug.h index 63eb3d7d26..81fc6fd1af 100644 --- a/sys/netinet/tcp_debug.h +++ b/sys/netinet/tcp_debug.h @@ -32,12 +32,28 @@ * * @(#)tcp_debug.h 8.1 (Berkeley) 6/10/93 * $FreeBSD: src/sys/netinet/tcp_debug.h,v 1.11 2000/01/29 11:49:05 shin Exp $ - * $DragonFly: src/sys/netinet/tcp_debug.h,v 1.3 2004/12/21 02:54:15 hsu Exp $ + * $DragonFly: src/sys/netinet/tcp_debug.h,v 1.4 2006/05/20 02:42:12 dillon Exp $ */ #ifndef _NETINET_TCP_DEBUG_H_ #define _NETINET_TCP_DEBUG_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _NETINET_IN_SYSTM_H_ +#include +#endif +#ifndef _NETINET_TCPIP_H_ +#include +#endif +#ifndef _NETINET_TCP_H_ +#include +#endif +#ifndef _NETINET_TCP_VAR_H_ +#include +#endif + struct tcp_debug { n_time td_time; short td_act; diff --git a/sys/netinet/tcp_seq.h b/sys/netinet/tcp_seq.h index cddb6fcc73..5962f3f2a9 100644 --- a/sys/netinet/tcp_seq.h +++ b/sys/netinet/tcp_seq.h @@ -82,11 +82,16 @@ * * @(#)tcp_seq.h 8.3 (Berkeley) 6/21/95 * $FreeBSD: src/sys/netinet/tcp_seq.h,v 1.11.2.7 2003/02/03 02:33:10 hsu Exp $ - * $DragonFly: src/sys/netinet/tcp_seq.h,v 1.8 2005/08/29 10:24:10 demizu Exp $ + * $DragonFly: src/sys/netinet/tcp_seq.h,v 1.9 2006/05/20 02:42:12 dillon Exp $ */ #ifndef _NETINET_TCP_SEQ_H_ #define _NETINET_TCP_SEQ_H_ + +#ifndef _NETINET_TCP_H_ +#include +#endif + /* * TCP sequence numbers are 32 bit integers operated * on with modular arithmetic. These macros can be diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index 1e13ae08bb..a9e55fa0bd 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -82,13 +82,18 @@ * * @(#)tcp_var.h 8.4 (Berkeley) 5/24/95 * $FreeBSD: src/sys/netinet/tcp_var.h,v 1.56.2.13 2003/02/03 02:34:07 hsu Exp $ - * $DragonFly: src/sys/netinet/tcp_var.h,v 1.36 2006/01/14 11:33:50 swildner Exp $ + * $DragonFly: src/sys/netinet/tcp_var.h,v 1.37 2006/05/20 02:42:12 dillon Exp $ */ #ifndef _NETINET_TCP_VAR_H_ #define _NETINET_TCP_VAR_H_ +#ifndef _NETINET_IN_PCB_H_ #include /* needed for in_conninfo, inp_gen_t */ +#endif +#ifndef _NETINET_TCP_H_ +#include +#endif /* * Kernel variables for tcp. @@ -288,6 +293,8 @@ struct tcpcb { #endif struct tcp_stats; +struct sockopt; + extern struct tcp_stats tcpstats_percpu[MAXCPU]; static const int tcprexmtthresh = 3; diff --git a/sys/netinet/tcpip.h b/sys/netinet/tcpip.h index 475d7af91b..e7e84d8623 100644 --- a/sys/netinet/tcpip.h +++ b/sys/netinet/tcpip.h @@ -32,12 +32,19 @@ * * @(#)tcpip.h 8.1 (Berkeley) 6/10/93 * $FreeBSD: src/sys/netinet/tcpip.h,v 1.8 1999/08/28 00:49:34 peter Exp $ - * $DragonFly: src/sys/netinet/tcpip.h,v 1.3 2004/12/21 02:54:15 hsu Exp $ + * $DragonFly: src/sys/netinet/tcpip.h,v 1.4 2006/05/20 02:42:12 dillon Exp $ */ #ifndef _NETINET_TCPIP_H_ #define _NETINET_TCPIP_H_ +#ifndef _NETINET_TCP_H_ +#include +#endif +#ifndef _NETINET_IP_VAR_H_ +#include +#endif + /* * Tcp+ip header, after ip options removed. */ diff --git a/sys/netinet/udp.h b/sys/netinet/udp.h index 8757de69c1..11986dc60d 100644 --- a/sys/netinet/udp.h +++ b/sys/netinet/udp.h @@ -32,12 +32,16 @@ * * @(#)udp.h 8.1 (Berkeley) 6/10/93 * $FreeBSD: src/sys/netinet/udp.h,v 1.7 1999/08/28 00:49:34 peter Exp $ - * $DragonFly: src/sys/netinet/udp.h,v 1.2 2003/06/17 04:28:51 dillon Exp $ + * $DragonFly: src/sys/netinet/udp.h,v 1.3 2006/05/20 02:42:12 dillon Exp $ */ #ifndef _NETINET_UDP_H_ #define _NETINET_UDP_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif + /* * Udp protocol header. * Per RFC 768, September, 1981. diff --git a/sys/netinet/udp_var.h b/sys/netinet/udp_var.h index be489b0072..b817391351 100644 --- a/sys/netinet/udp_var.h +++ b/sys/netinet/udp_var.h @@ -82,12 +82,19 @@ * * @(#)udp_var.h 8.1 (Berkeley) 6/10/93 * $FreeBSD: src/sys/netinet/udp_var.h,v 1.22.2.1 2001/02/18 07:12:25 luigi Exp $ - * $DragonFly: src/sys/netinet/udp_var.h,v 1.13 2004/12/21 02:54:15 hsu Exp $ + * $DragonFly: src/sys/netinet/udp_var.h,v 1.14 2006/05/20 02:42:12 dillon Exp $ */ #ifndef _NETINET_UDP_VAR_H_ #define _NETINET_UDP_VAR_H_ +#ifndef _NETINET_IP_VAR_H_ +#include +#endif +#ifndef _NETINET_UDP_H_ +#include +#endif + /* * UDP kernel structures and variables. */ diff --git a/sys/netinet6/ah.h b/sys/netinet6/ah.h index c3bebf732e..7b5ea4e13e 100644 --- a/sys/netinet6/ah.h +++ b/sys/netinet6/ah.h @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/netinet6/ah.h,v 1.3.2.3 2002/04/28 05:40:26 suz Exp $ */ -/* $DragonFly: src/sys/netinet6/ah.h,v 1.5 2004/06/03 18:30:04 joerg Exp $ */ +/* $DragonFly: src/sys/netinet6/ah.h,v 1.6 2006/05/20 02:42:12 dillon Exp $ */ /* $KAME: ah.h,v 1.16 2001/09/04 08:43:19 itojun Exp $ */ /* @@ -38,6 +38,10 @@ #ifndef _NETINET6_AH_H_ #define _NETINET6_AH_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif + #if defined(_KERNEL) && !defined(_LKM) #include "opt_inet.h" #endif @@ -60,7 +64,10 @@ struct newah { }; #ifdef _KERNEL + struct secasvar; +struct ipsecrequest; +struct mbuf; struct ah_algorithm_state { struct secasvar *sav; diff --git a/sys/netinet6/ah6.h b/sys/netinet6/ah6.h index 00903b14fc..5e5fdf8ac0 100644 --- a/sys/netinet6/ah6.h +++ b/sys/netinet6/ah6.h @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/netinet6/ah6.h,v 1.2.2.2 2001/07/03 11:01:49 ume Exp $ */ -/* $DragonFly: src/sys/netinet6/ah6.h,v 1.3 2003/08/23 11:02:45 rob Exp $ */ +/* $DragonFly: src/sys/netinet6/ah6.h,v 1.4 2006/05/20 02:42:12 dillon Exp $ */ /* $KAME: ah.h,v 1.13 2000/10/18 21:28:00 itojun Exp $ */ /* @@ -39,7 +39,16 @@ #define _NETINET6_AH6_H_ #ifdef _KERNEL + +#ifndef _SYS_TYPES_H_ +#include +#endif + +struct mbuf; struct secasvar; +struct sockaddr; +struct ah_algorithm; +struct ipsecrequest; extern int ah6_input (struct mbuf **, int *, int); extern int ah6_output (struct mbuf *, u_char *, struct mbuf *, @@ -48,6 +57,7 @@ extern int ah6_calccksum (struct mbuf *, caddr_t, size_t, const struct ah_algorithm *, struct secasvar *); extern void ah6_ctlinput (int, struct sockaddr *, void *); + #endif #endif /*_NETINET6_AH6_H_*/ diff --git a/sys/netinet6/esp.h b/sys/netinet6/esp.h index 3907fd24db..e797e3ddca 100644 --- a/sys/netinet6/esp.h +++ b/sys/netinet6/esp.h @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/netinet6/esp.h,v 1.2.2.3 2002/04/28 05:40:26 suz Exp $ */ -/* $DragonFly: src/sys/netinet6/esp.h,v 1.6 2004/10/16 23:24:24 hsu Exp $ */ +/* $DragonFly: src/sys/netinet6/esp.h,v 1.7 2006/05/20 02:42:12 dillon Exp $ */ /* $KAME: esp.h,v 1.19 2001/09/04 08:43:19 itojun Exp $ */ /* @@ -38,6 +38,10 @@ #ifndef _NETINET6_ESP_H_ #define _NETINET6_ESP_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif + #if defined(_KERNEL) && !defined(_LKM) #include "opt_inet.h" #endif @@ -69,7 +73,10 @@ struct esptail { }; #ifdef _KERNEL + +struct mbuf; struct secasvar; +struct ipsecrequest; struct esp_algorithm { size_t padbound; /* pad boundary, in byte */ diff --git a/sys/netinet6/esp6.h b/sys/netinet6/esp6.h index 94892ac93e..3b549410f6 100644 --- a/sys/netinet6/esp6.h +++ b/sys/netinet6/esp6.h @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/netinet6/esp6.h,v 1.2.2.2 2001/07/03 11:01:49 ume Exp $ */ -/* $DragonFly: src/sys/netinet6/esp6.h,v 1.3 2003/08/23 11:02:45 rob Exp $ */ +/* $DragonFly: src/sys/netinet6/esp6.h,v 1.4 2006/05/20 02:42:12 dillon Exp $ */ /* $KAME: esp.h,v 1.16 2000/10/18 21:28:00 itojun Exp $ */ /* @@ -39,11 +39,21 @@ #define _NETINET6_ESP6_H_ #ifdef _KERNEL + +#ifndef _SYS_TYPES_H_ +#include +#endif + +struct mbuf; +struct ipsecrequest; +struct sockaddr; + extern int esp6_output (struct mbuf *, u_char *, struct mbuf *, struct ipsecrequest *); extern int esp6_input (struct mbuf **, int *, int); extern void esp6_ctlinput (int, struct sockaddr *, void *); + #endif /*_KERNEL*/ #endif /*_NETINET6_ESP6_H_*/ diff --git a/sys/netinet6/esp_rijndael.h b/sys/netinet6/esp_rijndael.h index 49c32cda90..13dffa721f 100644 --- a/sys/netinet6/esp_rijndael.h +++ b/sys/netinet6/esp_rijndael.h @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/netinet6/esp_rijndael.h,v 1.1.2.1 2001/07/03 11:01:50 ume Exp $ */ -/* $DragonFly: src/sys/netinet6/esp_rijndael.h,v 1.3 2003/08/23 11:02:45 rob Exp $ */ +/* $DragonFly: src/sys/netinet6/esp_rijndael.h,v 1.4 2006/05/20 02:42:12 dillon Exp $ */ /* $KAME: esp_rijndael.h,v 1.1 2000/09/20 18:15:22 itojun Exp $ */ /* @@ -31,6 +31,18 @@ * SUCH DAMAGE. */ +#ifndef _NETINET6_ESP_RIJNDAEL_H_ +#define _NETINET6_ESP_RIJNDAEL_H_ + +#ifdef _KERNEL + +#ifndef _SYS_TYPES_H_ +#include +#endif + +struct secasvar; +struct esp_algorithm; + int esp_rijndael_schedlen (const struct esp_algorithm *); int esp_rijndael_schedule (const struct esp_algorithm *, struct secasvar *); @@ -38,3 +50,8 @@ int esp_rijndael_blockdecrypt (const struct esp_algorithm *, struct secasvar *, u_int8_t *, u_int8_t *); int esp_rijndael_blockencrypt (const struct esp_algorithm *, struct secasvar *, u_int8_t *, u_int8_t *); + +#endif + +#endif + diff --git a/sys/netinet6/in6.h b/sys/netinet6/in6.h index 099d11c361..123bbf4c76 100644 --- a/sys/netinet6/in6.h +++ b/sys/netinet6/in6.h @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/netinet6/in6.h,v 1.7.2.7 2002/08/01 19:38:50 ume Exp $ */ -/* $DragonFly: src/sys/netinet6/in6.h,v 1.3 2003/08/23 11:02:45 rob Exp $ */ +/* $DragonFly: src/sys/netinet6/in6.h,v 1.4 2006/05/20 02:42:12 dillon Exp $ */ /* $KAME: in6.h,v 1.89 2001/05/27 13:28:35 itojun Exp $ */ /* @@ -73,6 +73,10 @@ #ifndef _NETINET6_IN6_H_ #define _NETINET6_IN6_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif + /* * Identification of the network protocol stack * for *BSD-current/release: http://www.kame.net/dev/cvsweb.cgi/kame/COVERAGE @@ -581,7 +585,13 @@ struct in6_pktinfo { #define M_AUTHIPDGM M_PROTO5 #ifdef _KERNEL + +struct mbuf; +struct ifnet; struct cmsghdr; +struct sockaddr; +struct sockaddr_in; +struct sockaddr_in6; int in6_cksum (struct mbuf *, u_int8_t, u_int32_t, u_int32_t); int in6_localaddr (struct in6_addr *); diff --git a/sys/netinet6/in6_gif.h b/sys/netinet6/in6_gif.h index 95db63b21e..df3a14229e 100644 --- a/sys/netinet6/in6_gif.h +++ b/sys/netinet6/in6_gif.h @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/netinet6/in6_gif.h,v 1.2.2.3 2002/11/08 16:57:13 ume Exp $ */ -/* $DragonFly: src/sys/netinet6/in6_gif.h,v 1.3 2003/08/23 11:02:45 rob Exp $ */ +/* $DragonFly: src/sys/netinet6/in6_gif.h,v 1.4 2006/05/20 02:42:12 dillon Exp $ */ /* $KAME: in6_gif.h,v 1.5 2000/04/14 08:36:03 itojun Exp $ */ /* @@ -36,11 +36,18 @@ #define GIF_HLIM 30 +#ifdef _KERNEL + +struct mbuf; +struct ifnet; struct gif_softc; + int in6_gif_input (struct mbuf **, int *, int); int in6_gif_output (struct ifnet *, int, struct mbuf *); int gif_encapcheck6 (const struct mbuf *, int, int, void *); int in6_gif_attach (struct gif_softc *); int in6_gif_detach (struct gif_softc *); +#endif + #endif /*_NETINET6_IN6_GIF_H_*/ diff --git a/sys/netinet6/in6_ifattach.h b/sys/netinet6/in6_ifattach.h index c715c4ff44..579cb56925 100644 --- a/sys/netinet6/in6_ifattach.h +++ b/sys/netinet6/in6_ifattach.h @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/netinet6/in6_ifattach.h,v 1.1.2.2 2001/07/03 11:01:52 ume Exp $ */ -/* $DragonFly: src/sys/netinet6/in6_ifattach.h,v 1.3 2003/08/23 11:02:45 rob Exp $ */ +/* $DragonFly: src/sys/netinet6/in6_ifattach.h,v 1.4 2006/05/20 02:42:12 dillon Exp $ */ /* $KAME: in6_ifattach.h,v 1.14 2001/02/08 12:48:39 jinmei Exp $ */ /* @@ -35,6 +35,14 @@ #define _NETINET6_IN6_IFATTACH_H_ #ifdef _KERNEL + +#ifndef _SYS_TYPES_H_ +#include +#endif + +struct ifnet; +struct in6_addr; + void in6_nigroup_attach (const char *, int); void in6_nigroup_detach (const char *, int); void in6_ifattach (struct ifnet *, struct ifnet *); @@ -42,6 +50,7 @@ void in6_ifdetach (struct ifnet *); void in6_get_tmpifid (struct ifnet *, u_int8_t *, const u_int8_t *, int); void in6_tmpaddrtimer (void *); int in6_nigroup (struct ifnet *, const char *, int, struct in6_addr *); + #endif /* _KERNEL */ #endif /* _NETINET6_IN6_IFATTACH_H_ */ diff --git a/sys/netinet6/in6_pcb.h b/sys/netinet6/in6_pcb.h index bd42f47459..b6460c92da 100644 --- a/sys/netinet6/in6_pcb.h +++ b/sys/netinet6/in6_pcb.h @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/netinet6/in6_pcb.h,v 1.2.2.3 2001/08/13 16:26:17 ume Exp $ */ -/* $DragonFly: src/sys/netinet6/in6_pcb.h,v 1.7 2005/03/06 05:09:25 hsu Exp $ */ +/* $DragonFly: src/sys/netinet6/in6_pcb.h,v 1.8 2006/05/20 02:42:12 dillon Exp $ */ /* $KAME: in6_pcb.h,v 1.13 2001/02/06 09:16:53 itojun Exp $ */ /* @@ -71,15 +71,29 @@ #define _NETINET6_IN6_PCB_H_ #ifdef _KERNEL + +#ifndef _SYS_TYPES_H_ +#include +#endif + #define satosin6(sa) ((struct sockaddr_in6 *)(sa)) #define sin6tosa(sin6) ((struct sockaddr *)(sin6)) #define ifatoia6(ifa) ((struct in6_ifaddr *)(ifa)) +struct mbuf; +struct ifnet; +struct thread; +struct socket; +struct sockaddr; +struct inpcb; struct in6pcb; struct inpcbinfo; struct inpcbhead; struct ip6_moptions; struct ip6_pktopts; +struct in6_addr; +struct route_in6; +struct sockaddr_in6; void in6_pcbpurgeif0 (struct in6pcb *, struct ifnet *); void in6_losing (struct inpcb *); @@ -113,6 +127,7 @@ struct in6_addr *in6_selectsrc (struct sockaddr_in6 *, int in6_selecthlim (struct in6pcb *, struct ifnet *); int in6_pcbsetport (struct in6_addr *, struct inpcb *, struct thread *); void init_sin6 (struct sockaddr_in6 *sin6, struct mbuf *m); + #endif /* _KERNEL */ #endif /* !_NETINET6_IN6_PCB_H_ */ diff --git a/sys/netinet6/in6_prefix.h b/sys/netinet6/in6_prefix.h index 7e125a47c9..842b67f9b5 100644 --- a/sys/netinet6/in6_prefix.h +++ b/sys/netinet6/in6_prefix.h @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/netinet6/in6_prefix.h,v 1.1.2.2 2001/07/03 11:01:52 ume Exp $ */ -/* $DragonFly: src/sys/netinet6/in6_prefix.h,v 1.3 2003/08/23 11:02:45 rob Exp $ */ +/* $DragonFly: src/sys/netinet6/in6_prefix.h,v 1.4 2006/05/20 02:42:12 dillon Exp $ */ /* $KAME: in6_prefix.h,v 1.10 2001/02/08 16:30:30 itojun Exp $ */ /* @@ -31,7 +31,24 @@ * SUCH DAMAGE. */ +#ifndef NETINET6_IN6_PREFIX_H_ +#define NETINET6_IN6_PREFIX_H_ + +#ifndef _SYS_CALLOUT_H_ #include +#endif +#ifndef _SYS_QUEUE_H_ +#include +#endif +#ifndef _NET_IF_VAR_H_ +#include +#endif +#ifndef _NETINET_IN_H_ +#include +#endif +#ifndef _NETINET6_IN6_VAR_H_ +#include +#endif struct rr_prefix { struct ifprefix rp_ifpr; @@ -90,3 +107,5 @@ extern struct rr_prhead rr_prefix; void in6_rr_timer (void *); extern struct callout in6_rr_timer_ch; int delete_each_prefix (struct rr_prefix *rpp, u_char origin); + +#endif diff --git a/sys/netinet6/in6_var.h b/sys/netinet6/in6_var.h index 012cc15b45..642063434e 100644 --- a/sys/netinet6/in6_var.h +++ b/sys/netinet6/in6_var.h @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/netinet6/in6_var.h,v 1.3.2.3 2002/04/28 05:40:27 suz Exp $ */ -/* $DragonFly: src/sys/netinet6/in6_var.h,v 1.6 2005/02/01 16:09:37 hrs Exp $ */ +/* $DragonFly: src/sys/netinet6/in6_var.h,v 1.7 2006/05/20 02:42:12 dillon Exp $ */ /* $KAME: in6_var.h,v 1.56 2001/03/29 05:34:31 itojun Exp $ */ /* @@ -69,6 +69,19 @@ #ifndef _NETINET6_IN6_VAR_H_ #define _NETINET6_IN6_VAR_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _SYS_TIME_H_ +#include +#endif +#ifndef _NET_IF_VAR_H_ +#include +#endif +#ifndef _NETINET_IN_H_ +#include +#endif + /* * Interface address, Internet version. One of these structures * is allocated for each interface with an Internet address. @@ -93,6 +106,7 @@ struct in6_addrlifetime { struct nd_ifinfo; struct scope6_id; + struct in6_ifextra { struct in6_ifstat *in6_ifstat; struct icmp6_ifstat *icmp6_ifstat; diff --git a/sys/netinet6/ip6_ecn.h b/sys/netinet6/ip6_ecn.h index 11708a854c..b370af6830 100644 --- a/sys/netinet6/ip6_ecn.h +++ b/sys/netinet6/ip6_ecn.h @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/netinet6/ip6_ecn.h,v 1.2.2.2 2001/07/03 11:01:53 ume Exp $ */ -/* $DragonFly: src/sys/netinet6/ip6_ecn.h,v 1.3 2003/08/23 11:02:45 rob Exp $ */ +/* $DragonFly: src/sys/netinet6/ip6_ecn.h,v 1.4 2006/05/20 02:42:12 dillon Exp $ */ /* $KAME: ip_ecn.h,v 1.5 2000/03/27 04:58:38 sumikawa Exp $ */ /* @@ -37,6 +37,12 @@ */ #ifdef _KERNEL + +#ifndef _SYS_TYPES_H_ +#include +#endif + extern void ip6_ecn_ingress (int, u_int32_t *, const u_int32_t *); extern void ip6_ecn_egress (int, const u_int32_t *, u_int32_t *); + #endif diff --git a/sys/netinet6/ip6_mroute.h b/sys/netinet6/ip6_mroute.h index 3cded676c3..64222ae1fa 100644 --- a/sys/netinet6/ip6_mroute.h +++ b/sys/netinet6/ip6_mroute.h @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/netinet6/ip6_mroute.h,v 1.2.2.3 2002/04/28 05:40:27 suz Exp $ */ -/* $DragonFly: src/sys/netinet6/ip6_mroute.h,v 1.3 2003/08/23 11:02:45 rob Exp $ */ +/* $DragonFly: src/sys/netinet6/ip6_mroute.h,v 1.4 2006/05/20 02:42:12 dillon Exp $ */ /* $KAME: ip6_mroute.h,v 1.19 2001/06/14 06:12:55 suz Exp $ */ /* @@ -48,6 +48,19 @@ #ifndef _NETINET6_IP6_MROUTE_H_ #define _NETINET6_IP6_MROUTE_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _SYS_TIME_H_ +#include +#endif +#ifndef _SYS_SOCKET_H_ +#include +#endif +#ifndef _NETINET_IN_H_ +#include +#endif + /* * Multicast Routing set/getsockopt commands. */ @@ -269,6 +282,9 @@ struct rtdetq { /* XXX: rtdetq is also defined in ip_mroute.h */ #define MAX_UPQ6 4 /* max. no of pkts in upcall Q */ +struct sockopt; +struct socket; + int ip6_mrouter_set (struct socket *so, struct sockopt *sopt); int ip6_mrouter_get (struct socket *so, struct sockopt *sopt); int ip6_mrouter_done (void); diff --git a/sys/netinet6/ip6_var.h b/sys/netinet6/ip6_var.h index b72c2d47b0..4009b24c6c 100644 --- a/sys/netinet6/ip6_var.h +++ b/sys/netinet6/ip6_var.h @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/netinet6/ip6_var.h,v 1.2.2.4 2003/01/23 21:06:47 sam Exp $ */ -/* $DragonFly: src/sys/netinet6/ip6_var.h,v 1.9 2004/08/25 01:53:36 dillon Exp $ */ +/* $DragonFly: src/sys/netinet6/ip6_var.h,v 1.10 2006/05/20 02:42:12 dillon Exp $ */ /* $KAME: ip6_var.h,v 1.62 2001/05/03 14:51:48 itojun Exp $ */ /* @@ -69,6 +69,16 @@ #ifndef _NETINET6_IP6_VAR_H_ #define _NETINET6_IP6_VAR_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _SYS_QUEUE_H_ +#include +#endif +#ifndef _NETINET_IN_H_ +#include +#endif + /* * IP6 reassembly queue structure. Each fragment * being reassembled is attached to one of these structures. @@ -289,16 +299,18 @@ extern int ip6_use_tempaddr; /* whether to use temporary addresses. */ extern struct pfil_head inet6_pfil_hook; extern struct pr_usrreqs rip6_usrreqs; -struct sockopt; +struct proc; struct inpcb; +struct sockopt; +struct in6_ifaddr; +struct ip6_hdr; +struct netmsg; int icmp6_ctloutput (struct socket *, struct sockopt *sopt); -struct in6_ifaddr; void ip6_init (void); void ip6intr (void); -struct netmsg; struct in6_ifaddr *ip6_getdstifaddr (struct mbuf *); void ip6_freepcbopts (struct ip6_pktopts *); void ip6_freemoptions (struct ip6_moptions *); diff --git a/sys/netinet6/ip6protosw.h b/sys/netinet6/ip6protosw.h index 955d6560b6..8238f80868 100644 --- a/sys/netinet6/ip6protosw.h +++ b/sys/netinet6/ip6protosw.h @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/netinet6/ip6protosw.h,v 1.2.2.4 2002/04/28 05:40:27 suz Exp $ */ -/* $DragonFly: src/sys/netinet6/ip6protosw.h,v 1.6 2004/06/03 16:21:22 joerg Exp $ */ +/* $DragonFly: src/sys/netinet6/ip6protosw.h,v 1.7 2006/05/20 02:42:12 dillon Exp $ */ /* $KAME: ip6protosw.h,v 1.25 2001/09/26 06:13:03 keiichi Exp $ */ /* @@ -72,6 +72,10 @@ #ifndef _NETINET6_IP6PROTOSW_H_ #define _NETINET6_IP6PROTOSW_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif + /* * Protocol switch table for IPv6. * All other definitions should refer to sys/protosw.h @@ -80,6 +84,7 @@ struct mbuf; struct sockaddr; struct socket; +struct sockopt; struct domain; struct proc; struct ip6_hdr; diff --git a/sys/netinet6/ipcomp.h b/sys/netinet6/ipcomp.h index 57fcad2268..adddc62963 100644 --- a/sys/netinet6/ipcomp.h +++ b/sys/netinet6/ipcomp.h @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/netinet6/ipcomp.h,v 1.1.2.3 2002/04/28 05:40:27 suz Exp $ */ -/* $DragonFly: src/sys/netinet6/ipcomp.h,v 1.5 2004/06/03 18:30:04 joerg Exp $ */ +/* $DragonFly: src/sys/netinet6/ipcomp.h,v 1.6 2006/05/20 02:42:12 dillon Exp $ */ /* $KAME: ipcomp.h,v 1.11 2001/09/04 08:43:19 itojun Exp $ */ /* @@ -38,6 +38,10 @@ #ifndef _NETINET6_IPCOMP_H_ #define _NETINET6_IPCOMP_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif + #if defined(_KERNEL) && !defined(_LKM) #include "opt_inet.h" #endif @@ -57,13 +61,16 @@ struct ipcomp { #define IPCOMP_CPI_NEGOTIATE_MIN 256 #ifdef _KERNEL + +struct mbuf; +struct ipsecrequest; + struct ipcomp_algorithm { int (*compress) (struct mbuf *, struct mbuf *, size_t *); int (*decompress) (struct mbuf *, struct mbuf *, size_t *); size_t minplen; /* minimum required length for compression */ }; -struct ipsecrequest; extern const struct ipcomp_algorithm *ipcomp_algorithm_lookup (int); extern void ipcomp4_input (struct mbuf *, ...); extern int ipcomp4_output (struct mbuf *, struct ipsecrequest *); diff --git a/sys/netinet6/ipcomp6.h b/sys/netinet6/ipcomp6.h index 8bdd0fc808..2b4b1b522d 100644 --- a/sys/netinet6/ipcomp6.h +++ b/sys/netinet6/ipcomp6.h @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/netinet6/ipcomp6.h,v 1.1.2.2 2001/07/03 11:01:54 ume Exp $ */ -/* $DragonFly: src/sys/netinet6/ipcomp6.h,v 1.3 2003/08/23 11:02:45 rob Exp $ */ +/* $DragonFly: src/sys/netinet6/ipcomp6.h,v 1.4 2006/05/20 02:42:12 dillon Exp $ */ /* $KAME: ipcomp.h,v 1.8 2000/09/26 07:55:14 itojun Exp $ */ /* @@ -39,9 +39,18 @@ #define _NETINET6_IPCOMP6_H_ #ifdef _KERNEL + +#ifndef _SYS_TYPES_H_ +#include +#endif + +struct mbuf; +struct ipsecrequest; + extern int ipcomp6_input (struct mbuf **, int *, int); extern int ipcomp6_output (struct mbuf *, u_char *, struct mbuf *, struct ipsecrequest *); + #endif /*KERNEL*/ #endif /*_NETINET6_IPCOMP6_H_*/ diff --git a/sys/netinet6/ipsec6.h b/sys/netinet6/ipsec6.h index 33bbfd588e..da740edcf9 100644 --- a/sys/netinet6/ipsec6.h +++ b/sys/netinet6/ipsec6.h @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/netinet6/ipsec6.h,v 1.3.2.2 2001/07/03 11:01:54 ume Exp $ */ -/* $DragonFly: src/sys/netinet6/ipsec6.h,v 1.4 2003/08/23 11:02:45 rob Exp $ */ +/* $DragonFly: src/sys/netinet6/ipsec6.h,v 1.5 2006/05/20 02:42:12 dillon Exp $ */ /* $KAME: ipsec.h,v 1.44 2001/03/23 08:08:47 itojun Exp $ */ /* @@ -42,6 +42,14 @@ #include #ifdef _KERNEL + +struct mbuf; +struct inpcb; +struct tcp6cb; +struct ip6_hdr; +struct secasvar; +struct ipsec_output_state; + extern struct ipsecstat ipsec6stat; extern struct secpolicy ip6_def_policy; extern int ip6_esp_trans_deflev; @@ -56,8 +64,6 @@ extern struct secpolicy *ipsec6_getpolicybysock extern struct secpolicy *ipsec6_getpolicybyaddr (struct mbuf *, u_int, int, int *); -struct inpcb; - extern int ipsec6_in_reject_so (struct mbuf *, struct socket *); extern int ipsec6_delete_pcbpolicy (struct inpcb *); extern int ipsec6_set_policy (struct inpcb *inp, int optname, @@ -66,11 +72,8 @@ extern int ipsec6_get_policy (struct inpcb *inp, caddr_t request, size_t len, struct mbuf **mp); extern int ipsec6_in_reject (struct mbuf *, struct inpcb *); -struct tcp6cb; - extern size_t ipsec6_hdrsiz (struct mbuf *, u_int, struct inpcb *); -struct ip6_hdr; extern const char *ipsec6_logpacketstr (struct ip6_hdr *, u_int32_t); extern int ipsec6_output_trans (struct ipsec_output_state *, u_char *, @@ -79,6 +82,7 @@ extern int ipsec6_output_tunnel (struct ipsec_output_state *, struct secpolicy *, int); extern int ipsec6_tunnel_validate (struct mbuf *, int, u_int, struct secasvar *); + #endif /*_KERNEL*/ #endif /*_NETINET6_IPSEC6_H_*/ diff --git a/sys/netinet6/mld6_var.h b/sys/netinet6/mld6_var.h index 6c63730c20..7c61b777ca 100644 --- a/sys/netinet6/mld6_var.h +++ b/sys/netinet6/mld6_var.h @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/netinet6/mld6_var.h,v 1.1.2.1 2000/07/15 07:14:36 kris Exp $ */ -/* $DragonFly: src/sys/netinet6/mld6_var.h,v 1.3 2003/08/23 11:02:45 rob Exp $ */ +/* $DragonFly: src/sys/netinet6/mld6_var.h,v 1.4 2006/05/20 02:42:12 dillon Exp $ */ /* $KAME: mld6_var.h,v 1.4 2000/03/25 07:23:54 sumikawa Exp $ */ /* @@ -44,11 +44,15 @@ #define MLD6_OTHERLISTENER 0 #define MLD6_IREPORTEDLAST 1 +struct mbuf; +struct in6_multi; + void mld6_init (void); void mld6_input (struct mbuf *, int); void mld6_start_listening (struct in6_multi *); void mld6_stop_listening (struct in6_multi *); void mld6_fasttimeo (void); + #endif /* _KERNEL */ #endif /* _NETINET6_MLD6_VAR_H_ */ diff --git a/sys/netinet6/nd6.h b/sys/netinet6/nd6.h index 69a47a5a7a..12eb0680e7 100644 --- a/sys/netinet6/nd6.h +++ b/sys/netinet6/nd6.h @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/netinet6/nd6.h,v 1.2.2.5 2002/04/28 05:40:27 suz Exp $ */ -/* $DragonFly: src/sys/netinet6/nd6.h,v 1.6 2005/02/01 16:09:37 hrs Exp $ */ +/* $DragonFly: src/sys/netinet6/nd6.h,v 1.7 2006/05/20 02:42:12 dillon Exp $ */ /* $KAME: nd6.h,v 1.76 2001/12/18 02:10:31 itojun Exp $ */ /* @@ -39,8 +39,24 @@ #define RTF_ANNOUNCE RTF_PROTO2 #endif +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _SYS_QUEUE_H_ #include +#endif +#ifndef _SYS_CALLOUT_H_ #include +#endif +#ifndef _NET_IF_H_ +#include +#endif +#ifndef _NETINET_IN_H_ +#include +#endif +#ifndef _NETINET6_IN6_VAR_H_ +#include +#endif struct llinfo_nd6 { struct llinfo_nd6 *ln_next; diff --git a/sys/netinet6/pim6.h b/sys/netinet6/pim6.h index a25c13ec25..82ab217821 100644 --- a/sys/netinet6/pim6.h +++ b/sys/netinet6/pim6.h @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/netinet6/pim6.h,v 1.1.2.1 2000/07/15 07:14:36 kris Exp $ */ -/* $DragonFly: src/sys/netinet6/pim6.h,v 1.3 2004/09/23 16:46:02 joerg Exp $ */ +/* $DragonFly: src/sys/netinet6/pim6.h,v 1.4 2006/05/20 02:42:12 dillon Exp $ */ /* $KAME: pim6.h,v 1.3 2000/03/25 07:23:58 sumikawa Exp $ */ /* @@ -30,6 +30,17 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ + +#ifndef _NETINET6_PIM6_H_ +#define _NETINET6_PIM6_H_ + +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _MACHINE_ENDIAN_H_ +#include +#endif + /* * Protocol Independent Multicast (PIM) definitions * @@ -42,6 +53,7 @@ * PIM packet header */ #define PIM_VERSION 2 + struct pim { #if _BYTE_ORDER == _LITTLE_ENDIAN u_char pim_type:4, /* the PIM message type, currently they are: @@ -70,3 +82,5 @@ struct pim { /* second bit in reg_head is the null bit */ #define PIM_NULL_REGISTER 0x40000000 + +#endif diff --git a/sys/netinet6/pim6_var.h b/sys/netinet6/pim6_var.h index 85e075613c..d4ea22fe6c 100644 --- a/sys/netinet6/pim6_var.h +++ b/sys/netinet6/pim6_var.h @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/netinet6/pim6_var.h,v 1.2.2.1 2000/07/15 07:14:36 kris Exp $ */ -/* $DragonFly: src/sys/netinet6/pim6_var.h,v 1.3 2003/08/23 11:02:46 rob Exp $ */ +/* $DragonFly: src/sys/netinet6/pim6_var.h,v 1.4 2006/05/20 02:42:12 dillon Exp $ */ /* $KAME: pim6_var.h,v 1.8 2000/06/06 08:07:43 jinmei Exp $ */ /* @@ -34,6 +34,10 @@ #ifndef _NETINET6_PIM6_VAR_H_ #define _NETINET6_PIM6_VAR_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif + /* * Protocol Independent Multicast (PIM), * implementation-specific definitions. @@ -53,9 +57,13 @@ struct pim6stat { }; #if (defined(KERNEL)) || (defined(_KERNEL)) + extern struct pim6stat pim6stat; +struct mbuf; + int pim6_input (struct mbuf **, int*, int); + #endif /* KERNEL */ /* diff --git a/sys/netinet6/raw_ip6.h b/sys/netinet6/raw_ip6.h index 63348e0f8b..d932ee7980 100644 --- a/sys/netinet6/raw_ip6.h +++ b/sys/netinet6/raw_ip6.h @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/netinet6/raw_ip6.h,v 1.1.2.1 2001/07/03 11:01:55 ume Exp $ */ -/* $DragonFly: src/sys/netinet6/raw_ip6.h,v 1.2 2003/06/17 04:28:53 dillon Exp $ */ +/* $DragonFly: src/sys/netinet6/raw_ip6.h,v 1.3 2006/05/20 02:42:12 dillon Exp $ */ /* $KAME: raw_ip6.h,v 1.2 2001/05/27 13:28:35 itojun Exp $ */ /* @@ -34,6 +34,10 @@ #ifndef _NETINET6_RAW_IP6_H_ #define _NETINET6_RAW_IP6_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif + /* * ICMPv6 stat is counted separately. see netinet/icmp6.h */ diff --git a/sys/netinet6/scope6_var.h b/sys/netinet6/scope6_var.h index dd3d88d437..26ec3e4d54 100644 --- a/sys/netinet6/scope6_var.h +++ b/sys/netinet6/scope6_var.h @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/netinet6/scope6_var.h,v 1.1.2.1 2000/07/15 07:14:38 kris Exp $ */ -/* $DragonFly: src/sys/netinet6/scope6_var.h,v 1.4 2005/02/01 16:09:37 hrs Exp $ */ +/* $DragonFly: src/sys/netinet6/scope6_var.h,v 1.5 2006/05/20 02:42:12 dillon Exp $ */ /* $KAME: scope6_var.h,v 1.4 2000/05/18 15:03:27 jinmei Exp $ */ /* @@ -34,7 +34,12 @@ #ifndef _NETINET6_SCOPE6_VAR_H_ #define _NETINET6_SCOPE6_VAR_H_ -#ifdef _KERNEL +#if defined(_KERNEL) || defined(_KERNEL_STRUCTURES) + +#ifndef _SYS_TYPES_H_ +#include +#endif + struct scope6_id { /* * 16 is correspondent to 4bit multicast scope field. @@ -43,6 +48,14 @@ struct scope6_id { u_int32_t s6id_list[16]; }; +#endif + +#ifdef _KERNEL + +struct ifnet; +struct in6_addr; +struct scope6_id; + void scope6_init (void); struct scope6_id *scope6_ifattach (struct ifnet *); void scope6_ifdetach (struct scope6_id *); @@ -52,6 +65,7 @@ void scope6_setdefault (struct ifnet *); int scope6_get_default (struct scope6_id *); u_int32_t scope6_in6_addrscope (struct in6_addr *); u_int32_t scope6_addr2default (struct in6_addr *); + #endif /* _KERNEL */ #endif /* _NETINET6_SCOPE6_VAR_H_ */ diff --git a/sys/netinet6/sctp6_var.h b/sys/netinet6/sctp6_var.h index 72bf4edab9..219a29587f 100644 --- a/sys/netinet6/sctp6_var.h +++ b/sys/netinet6/sctp6_var.h @@ -1,5 +1,5 @@ /* $KAME: sctp6_var.h,v 1.6 2003/11/25 06:40:55 ono Exp $ */ -/* $DragonFly: src/sys/netinet6/sctp6_var.h,v 1.3 2006/01/14 11:44:25 swildner Exp $ */ +/* $DragonFly: src/sys/netinet6/sctp6_var.h,v 1.4 2006/05/20 02:42:12 dillon Exp $ */ /* * Copyright (c) 2001, 2002, 2004 Cisco Systems, Inc. @@ -37,6 +37,19 @@ #if defined(_KERNEL) || (defined(__APPLE__) && defined(KERNEL)) +#ifndef _SYS_SYSCTL_H_ +#include +#endif +#ifndef _SYS_PROTOSW_H_ +#include +#endif + +struct mbuf; +struct proc; +struct socket; +struct sockopt; +struct sctp_inpcb; + #if defined(__FreeBSD__) || (__APPLE__) || defined(__DragonFly__) SYSCTL_DECL(_net_inet6_sctp6); extern struct pr_usrreqs sctp6_usrreqs; diff --git a/sys/netinet6/tcp6_var.h b/sys/netinet6/tcp6_var.h index 70bffced19..14e1b2071e 100644 --- a/sys/netinet6/tcp6_var.h +++ b/sys/netinet6/tcp6_var.h @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/netinet6/tcp6_var.h,v 1.3.2.2 2001/12/14 20:21:11 jlemon Exp $ - * $DragonFly: src/sys/netinet6/tcp6_var.h,v 1.3 2003/08/23 11:02:46 rob Exp $ + * $DragonFly: src/sys/netinet6/tcp6_var.h,v 1.4 2006/05/20 02:42:12 dillon Exp $ */ /* @@ -76,7 +76,11 @@ SYSCTL_DECL(_net_inet6_tcp6); extern int tcp_v6mssdflt; /* XXX */ -struct ip6_hdr; +struct mbuf; +struct ip6_hdr; +struct sockaddr; +struct in_conninfo; + void tcp6_ctlinput (int, struct sockaddr *, void *); void tcp6_init (void); int tcp6_input (struct mbuf **, int *, int); diff --git a/sys/netinet6/udp6_var.h b/sys/netinet6/udp6_var.h index b86428ab73..b504fa4d71 100644 --- a/sys/netinet6/udp6_var.h +++ b/sys/netinet6/udp6_var.h @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/netinet6/udp6_var.h,v 1.3.2.1 2000/07/15 07:14:38 kris Exp $ - * $DragonFly: src/sys/netinet6/udp6_var.h,v 1.4 2003/08/23 11:02:46 rob Exp $ + * $DragonFly: src/sys/netinet6/udp6_var.h,v 1.5 2006/05/20 02:42:12 dillon Exp $ */ /* @@ -69,10 +69,20 @@ #define _NETINET6_UDP6_VAR_H_ #ifdef _KERNEL + +#ifndef _SYS_SYSCTL_H_ +#include +#endif + SYSCTL_DECL(_net_inet6_udp6); extern struct pr_usrreqs udp6_usrreqs; +struct thread; +struct mbuf; +struct inpcb; +struct sockaddr; + void udp6_ctlinput (int, struct sockaddr *, void *); int udp6_input (struct mbuf **, int *, int); int udp6_output (struct inpcb *inp, struct mbuf *m, diff --git a/sys/netproto/key/keydb.h b/sys/netproto/key/keydb.h index db1a2caa52..8701dcdf99 100644 --- a/sys/netproto/key/keydb.h +++ b/sys/netproto/key/keydb.h @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/netkey/keydb.h,v 1.2.2.3 2003/01/11 19:10:59 ume Exp $ */ -/* $DragonFly: src/sys/netproto/key/keydb.h,v 1.4 2003/08/23 10:06:24 rob Exp $ */ +/* $DragonFly: src/sys/netproto/key/keydb.h,v 1.5 2006/05/20 02:42:13 dillon Exp $ */ /* $KAME: keydb.h,v 1.14 2000/08/02 17:58:26 sakane Exp $ */ /* @@ -36,6 +36,22 @@ #ifdef _KERNEL +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _SYS_QUEUE_H_ +#include +#endif +#ifndef _SYS_SOCKET_H_ +#include +#endif +#ifndef _NET_ROUTE_H_ +#include +#endif +#ifndef _NETINET_IN_H_ +#include +#endif + #include "key_var.h" /* Security Assocciation Index */ diff --git a/sys/platform/pc32/include/acpica_machdep.h b/sys/platform/pc32/include/acpica_machdep.h index c9ee229e5a..cf9ac8ffb4 100644 --- a/sys/platform/pc32/include/acpica_machdep.h +++ b/sys/platform/pc32/include/acpica_machdep.h @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/include/acpica_machdep.h,v 1.5 2003/09/10 01:14:42 jhb Exp $ - * $DragonFly: src/sys/platform/pc32/include/acpica_machdep.h,v 1.2 2004/06/27 08:52:46 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/include/acpica_machdep.h,v 1.3 2006/05/20 02:42:06 dillon Exp $ */ /****************************************************************************** @@ -34,8 +34,8 @@ * *****************************************************************************/ -#ifndef __ACPICA_MACHDEP_H__ -#define __ACPICA_MACHDEP_H__ +#ifndef _MACHINE_ACPICA_MACHDEP_H__ +#define _MACHINE_ACPICA_MACHDEP_H__ #ifdef _KERNEL /* @@ -123,4 +123,4 @@ void acpi_SetDefaultIntrModel(int model); -#endif /* __ACPICA_MACHDEP_H__ */ +#endif /* _MACHINE_ACPICA_MACHDEP_H__ */ diff --git a/sys/platform/pc32/include/apm_bios.h b/sys/platform/pc32/include/apm_bios.h index 5366842026..a436ad7a67 100644 --- a/sys/platform/pc32/include/apm_bios.h +++ b/sys/platform/pc32/include/apm_bios.h @@ -13,16 +13,18 @@ * Aug, 1994 Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD) * * $FreeBSD: src/sys/i386/include/apm_bios.h,v 1.27.2.2 2002/04/12 16:47:00 bmah Exp $ - * $DragonFly: src/sys/platform/pc32/include/apm_bios.h,v 1.4 2005/06/12 20:55:14 swildner Exp $ + * $DragonFly: src/sys/platform/pc32/include/apm_bios.h,v 1.5 2006/05/20 02:42:06 dillon Exp $ */ #ifndef _MACHINE_APM_BIOS_H_ #define _MACHINE_APM_BIOS_H_ -#ifndef _KERNEL +#ifndef _SYS_TYPES_H_ #include #endif +#ifndef _SYS_IOCCOM_H_ #include +#endif /* BIOS id */ #define APM_BIOS 0x53 diff --git a/sys/platform/pc32/include/bootinfo.h b/sys/platform/pc32/include/bootinfo.h index b1bd18e5b0..937e3e9b6b 100644 --- a/sys/platform/pc32/include/bootinfo.h +++ b/sys/platform/pc32/include/bootinfo.h @@ -30,12 +30,16 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/include/bootinfo.h,v 1.14 1999/12/29 04:32:57 peter Exp $ - * $DragonFly: src/sys/platform/pc32/include/bootinfo.h,v 1.4 2004/03/04 01:37:53 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/include/bootinfo.h,v 1.5 2006/05/20 02:42:06 dillon Exp $ */ #ifndef _MACHINE_BOOTINFO_H_ #define _MACHINE_BOOTINFO_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif + /* Only change the version number if you break compatibility. */ #define BOOTINFO_VERSION 1 diff --git a/sys/platform/pc32/include/clock.h b/sys/platform/pc32/include/clock.h index e639979da9..d8dc0c9099 100644 --- a/sys/platform/pc32/include/clock.h +++ b/sys/platform/pc32/include/clock.h @@ -4,13 +4,18 @@ * This file is in the public domain. * * $FreeBSD: src/sys/i386/include/clock.h,v 1.38.2.1 2002/11/02 04:41:50 iwasaki Exp $ - * $DragonFly: src/sys/platform/pc32/include/clock.h,v 1.7 2006/01/25 19:56:18 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/include/clock.h,v 1.8 2006/05/20 02:42:06 dillon Exp $ */ #ifndef _MACHINE_CLOCK_H_ #define _MACHINE_CLOCK_H_ #ifdef _KERNEL + +#ifndef _SYS_TYPES_H_ +#include +#endif + /* * i386 to clock driver interface. * XXX large parts of the driver and its interface are misplaced. diff --git a/sys/platform/pc32/include/dvcfg.h b/sys/platform/pc32/include/dvcfg.h index e4507ecfc5..42a5282821 100644 --- a/sys/platform/pc32/include/dvcfg.h +++ b/sys/platform/pc32/include/dvcfg.h @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/i386/include/dvcfg.h,v 1.2.6.1 2000/08/03 01:01:19 peter Exp $ */ -/* $DragonFly: src/sys/platform/pc32/include/Attic/dvcfg.h,v 1.5 2005/12/24 20:34:04 swildner Exp $ */ +/* $DragonFly: src/sys/platform/pc32/include/Attic/dvcfg.h,v 1.6 2006/05/20 02:42:06 dillon Exp $ */ /* $NetBSD$ */ /* * [NetBSD for NEC PC98 series] @@ -36,6 +36,10 @@ #ifndef _MACHINE_DVCFG_H_ #define _MACHINE_DVCFG_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif + typedef void *dvcfg_hw_t; struct dvcfg_hwsel { diff --git a/sys/platform/pc32/include/iic.h b/sys/platform/pc32/include/iic.h index 6de43ee8c3..05e236517e 100644 --- a/sys/platform/pc32/include/iic.h +++ b/sys/platform/pc32/include/iic.h @@ -24,13 +24,18 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/include/iic.h,v 1.3 1999/08/28 00:44:16 peter Exp $ - * $DragonFly: src/sys/platform/pc32/include/iic.h,v 1.3 2003/06/28 04:16:03 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/include/iic.h,v 1.4 2006/05/20 02:42:06 dillon Exp $ * */ #ifndef _MACHINE_IIC_H_ #define _MACHINE_IIC_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _SYS_IOCCOM_H_ #include +#endif struct iiccmd { u_char slave; diff --git a/sys/platform/pc32/include/ioctl_fd.h b/sys/platform/pc32/include/ioctl_fd.h index cac127a1b5..d91a473501 100644 --- a/sys/platform/pc32/include/ioctl_fd.h +++ b/sys/platform/pc32/include/ioctl_fd.h @@ -25,16 +25,18 @@ * DAMAGE. * * $FreeBSD: src/sys/i386/include/ioctl_fd.h,v 1.13.2.1 2001/07/19 13:16:54 joerg Exp $ - * $DragonFly: src/sys/platform/pc32/include/ioctl_fd.h,v 1.2 2003/06/17 04:28:35 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/include/ioctl_fd.h,v 1.3 2006/05/20 02:42:06 dillon Exp $ */ #ifndef _MACHINE_IOCTL_FD_H_ #define _MACHINE_IOCTL_FD_H_ -#ifndef _KERNEL +#ifndef _SYS_TYPES_H_ #include #endif +#ifndef _SYS_IOCCOM_H_ #include +#endif #define FD_FORMAT_VERSION 110 /* used to validate before formatting */ #define FD_MAX_NSEC 36 /* highest known number of spt - allow for */ diff --git a/sys/platform/pc32/include/md_var.h b/sys/platform/pc32/include/md_var.h index 05ced6ec95..59078f5181 100644 --- a/sys/platform/pc32/include/md_var.h +++ b/sys/platform/pc32/include/md_var.h @@ -27,12 +27,16 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/include/md_var.h,v 1.35.2.4 2003/01/22 20:14:53 jhb Exp $ - * $DragonFly: src/sys/platform/pc32/include/md_var.h,v 1.17 2005/10/27 03:15:47 sephe Exp $ + * $DragonFly: src/sys/platform/pc32/include/md_var.h,v 1.18 2006/05/20 02:42:06 dillon Exp $ */ #ifndef _MACHINE_MD_VAR_H_ #define _MACHINE_MD_VAR_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif + /* * Miscellaneous machine-dependent declarations. */ diff --git a/sys/platform/pc32/include/nexusvar.h b/sys/platform/pc32/include/nexusvar.h index 8f6743831d..b0826d8ec1 100644 --- a/sys/platform/pc32/include/nexusvar.h +++ b/sys/platform/pc32/include/nexusvar.h @@ -24,11 +24,18 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/include/nexusvar.h,v 1.1 2000/09/28 00:37:31 peter Exp $ - * $DragonFly: src/sys/platform/pc32/include/nexusvar.h,v 1.1 2004/01/13 18:31:58 joerg Exp $ + * $DragonFly: src/sys/platform/pc32/include/nexusvar.h,v 1.2 2006/05/20 02:42:06 dillon Exp $ */ #ifndef _MACHINE_NEXUSVAR_H_ -#define _MACHINE_NEXUSVAR_H_ 1 +#define _MACHINE_NEXUSVAR_H_ + +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _SYS_CONF_H_ +#include +#endif enum nexus_device_ivars { NEXUS_IVAR_PCIBUS diff --git a/sys/platform/pc32/include/pcb_ext.h b/sys/platform/pc32/include/pcb_ext.h index 77c3a4c19f..6839ad5733 100644 --- a/sys/platform/pc32/include/pcb_ext.h +++ b/sys/platform/pc32/include/pcb_ext.h @@ -24,18 +24,28 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/include/pcb_ext.h,v 1.4 1999/12/29 04:33:04 peter Exp $ - * $DragonFly: src/sys/platform/pc32/include/pcb_ext.h,v 1.6 2005/02/21 21:40:55 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/include/pcb_ext.h,v 1.7 2006/05/20 02:42:06 dillon Exp $ */ -#ifndef _I386_PCB_EXT_H_ -#define _I386_PCB_EXT_H_ +#ifndef _MACHINE_PCB_EXT_H_ +#define _MACHINE_PCB_EXT_H_ + +#ifndef _SYS_TYPES_H_ +#include +#endif /* * Extension to the 386 process control block */ +#ifndef _MACHINE_TSS_H_ #include "tss.h" +#endif +#ifndef _MACHINE_VM86_H_ #include "vm86.h" +#endif +#ifndef _MACHINE_SEGMENTS_H_ #include "segments.h" +#endif struct pcb_ext { struct segment_descriptor ext_tssd; /* tss descriptor */ @@ -54,6 +64,8 @@ struct pcb_ldt { #ifdef _KERNEL +struct pcb; + void set_user_ldt (struct pcb *); struct pcb_ldt *user_ldt_alloc (struct pcb *, int); void user_ldt_free (struct pcb *); diff --git a/sys/platform/pc32/include/pci_cfgreg.h b/sys/platform/pc32/include/pci_cfgreg.h index b985503283..39ca09a0e2 100644 --- a/sys/platform/pc32/include/pci_cfgreg.h +++ b/sys/platform/pc32/include/pci_cfgreg.h @@ -24,7 +24,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/i386/include/pci_cfgreg.h,v 1.4.2.1 2001/07/28 05:55:07 imp Exp $ - * $DragonFly: src/sys/platform/pc32/include/Attic/pci_cfgreg.h,v 1.4 2005/06/12 20:55:14 swildner Exp $ + * $DragonFly: src/sys/platform/pc32/include/Attic/pci_cfgreg.h,v 1.5 2006/05/20 02:42:06 dillon Exp $ * */ @@ -47,9 +47,17 @@ #define CONF2_ENABLE_CHK 0x0e #define CONF2_ENABLE_RES 0x0e +#ifdef _KERNEL + +#ifndef _SYS_TYPES_H_ +#include +#endif + extern int pci_cfgregopen(void); extern u_int32_t pci_cfgregread(int bus, int slot, int func, int reg, int bytes); extern void pci_cfgregwrite(int bus, int slot, int func, int reg, u_int32_t data, int bytes); extern int pci_cfgintr(int bus, int device, int pin); #endif + +#endif diff --git a/sys/platform/pc32/include/pmap_inval.h b/sys/platform/pc32/include/pmap_inval.h index 02c7b09747..e8cd6689a2 100644 --- a/sys/platform/pc32/include/pmap_inval.h +++ b/sys/platform/pc32/include/pmap_inval.h @@ -31,12 +31,16 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $DragonFly: src/sys/platform/pc32/include/pmap_inval.h,v 1.2 2004/07/16 05:48:46 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/include/pmap_inval.h,v 1.3 2006/05/20 02:42:06 dillon Exp $ */ #ifndef _MACHINE_PMAP_INVAL_H_ #define _MACHINE_PMAP_INVAL_H_ +#ifndef _SYS_THREAD_H_ +#include +#endif + typedef struct pmap_inval_info { int pir_flags; struct lwkt_cpusync pir_cpusync; @@ -50,6 +54,10 @@ typedef pmap_inval_info *pmap_inval_info_t; #ifdef _KERNEL +#ifndef _MACHINE_PMAP_H_ +#include +#endif + void pmap_inval_init(pmap_inval_info_t); void pmap_inval_add(pmap_inval_info_t, pmap_t, vm_offset_t); void pmap_inval_flush(pmap_inval_info_t); diff --git a/sys/platform/pc32/include/ptrace.h b/sys/platform/pc32/include/ptrace.h index 3a15084b2b..59dd76694d 100644 --- a/sys/platform/pc32/include/ptrace.h +++ b/sys/platform/pc32/include/ptrace.h @@ -32,7 +32,7 @@ * * @(#)ptrace.h 8.1 (Berkeley) 6/11/93 * $FreeBSD: src/sys/i386/include/ptrace.h,v 1.9 1999/12/29 04:33:06 peter Exp $ - * $DragonFly: src/sys/platform/pc32/include/ptrace.h,v 1.3 2003/08/26 21:42:18 rob Exp $ + * $DragonFly: src/sys/platform/pc32/include/ptrace.h,v 1.4 2006/05/20 02:42:06 dillon Exp $ */ #ifndef _MACHINE_PTRACE_H_ @@ -49,7 +49,15 @@ #define PT_SETDBREGS (PT_FIRSTMACH + 6) #ifdef _KERNEL + +#ifndef _SYS_TYPES_H_ +#include +#endif + +struct proc; + int ptrace_read_u_check (struct proc *p, vm_offset_t off, size_t len); + #endif #endif diff --git a/sys/platform/pc32/include/smb.h b/sys/platform/pc32/include/smb.h index 9e3880e5fc..5542c17b73 100644 --- a/sys/platform/pc32/include/smb.h +++ b/sys/platform/pc32/include/smb.h @@ -24,13 +24,18 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/include/smb.h,v 1.3 1999/08/28 00:44:24 peter Exp $ - * $DragonFly: src/sys/platform/pc32/include/smb.h,v 1.3 2003/06/28 04:16:03 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/include/smb.h,v 1.4 2006/05/20 02:42:06 dillon Exp $ * */ #ifndef _MACHINE_SMB_H_ #define _MACHINE_SMB_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _SYS_IOCCOM_H_ #include +#endif struct smbcmd { char cmd; diff --git a/sys/platform/pc32/include/thread.h b/sys/platform/pc32/include/thread.h index 0410a867b4..c30fd01b03 100644 --- a/sys/platform/pc32/include/thread.h +++ b/sys/platform/pc32/include/thread.h @@ -33,13 +33,15 @@ * * Machine independant code should not directly include this file. * - * $DragonFly: src/sys/platform/pc32/include/thread.h,v 1.14 2006/01/31 19:05:30 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/include/thread.h,v 1.15 2006/05/20 02:42:06 dillon Exp $ */ #ifndef _MACHINE_THREAD_H_ #define _MACHINE_THREAD_H_ +#ifndef _MACHINE_SEGMENTS_H_ #include "segments.h" +#endif union savefpu; diff --git a/sys/platform/pc32/include/uc_device.h b/sys/platform/pc32/include/uc_device.h index 070984cdd0..7b402190d4 100644 --- a/sys/platform/pc32/include/uc_device.h +++ b/sys/platform/pc32/include/uc_device.h @@ -47,12 +47,16 @@ ** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ** ** $FreeBSD: src/sys/i386/include/uc_device.h,v 1.1.2.1 2000/07/14 10:21:34 jhb Exp $ - ** $DragonFly: src/sys/platform/pc32/include/uc_device.h,v 1.2 2003/06/17 04:28:36 dillon Exp $ + ** $DragonFly: src/sys/platform/pc32/include/uc_device.h,v 1.3 2006/05/20 02:42:06 dillon Exp $ **/ #ifndef _I386_MACHINE_UC_DEVICE_H #define _I386_MACHINE_UC_DEVICE_H +#ifndef _SYS_TYPES_H_ +#include +#endif + /* * Per device structure. This just happens to resemble the old isa_device * but that is by accident. It is NOT the same. diff --git a/sys/platform/pc32/include/vmparam.h b/sys/platform/pc32/include/vmparam.h index ce7b8a799e..c7b7a0c15e 100644 --- a/sys/platform/pc32/include/vmparam.h +++ b/sys/platform/pc32/include/vmparam.h @@ -37,12 +37,12 @@ * * from: @(#)vmparam.h 5.9 (Berkeley) 5/12/91 * $FreeBSD: src/sys/i386/include/vmparam.h,v 1.32.2.1 2000/04/02 08:47:01 peter Exp $ - * $DragonFly: src/sys/platform/pc32/include/vmparam.h,v 1.6 2003/11/03 17:11:19 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/include/vmparam.h,v 1.7 2006/05/20 02:42:06 dillon Exp $ */ #ifndef _MACHINE_VMPARAM_H_ -#define _MACHINE_VMPARAM_H_ 1 +#define _MACHINE_VMPARAM_H_ /* * Machine dependent constants for 386. diff --git a/sys/sys/acct.h b/sys/sys/acct.h index 499e6778ac..bf5f067c5c 100644 --- a/sys/sys/acct.h +++ b/sys/sys/acct.h @@ -37,12 +37,16 @@ * * @(#)acct.h 8.4 (Berkeley) 1/9/95 * $FreeBSD: src/sys/sys/acct.h,v 1.12 1999/12/29 04:24:36 peter Exp $ - * $DragonFly: src/sys/sys/acct.h,v 1.3 2003/08/20 07:31:21 rob Exp $ + * $DragonFly: src/sys/sys/acct.h,v 1.4 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_ACCT_H_ #define _SYS_ACCT_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif + /* * Accounting structures; these use a comp_t type which is a 3 bits base 8 * exponent, 13 bit fraction ``floating point'' number. Units are 1/AHZ diff --git a/sys/sys/acl.h b/sys/sys/acl.h index 75de7216ee..1f3ec75e9d 100644 --- a/sys/sys/acl.h +++ b/sys/sys/acl.h @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/sys/acl.h,v 1.8 2000/01/28 15:22:51 rwatson Exp $ - * $DragonFly: src/sys/sys/acl.h,v 1.3 2004/02/25 17:38:51 joerg Exp $ + * $DragonFly: src/sys/sys/acl.h,v 1.4 2006/05/20 02:42:13 dillon Exp $ */ /* @@ -34,8 +34,12 @@ * http://www.watson.org/fbsd-hardening/posix1e/ */ -#ifndef _SYS_ACL_H -#define _SYS_ACL_H +#ifndef _SYS_ACL_H_ +#define _SYS_ACL_H_ + +#ifndef _SYS_TYPES_H_ +#include +#endif /* * POSIX.1e ACL types and related constants @@ -146,4 +150,4 @@ __END_DECLS #endif /* !_KERNEL */ -#endif /* !_SYS_ACL_H */ +#endif /* !_SYS_ACL_H_ */ diff --git a/sys/sys/agpio.h b/sys/sys/agpio.h index 4e2aabbb72..398f3dc35d 100644 --- a/sys/sys/agpio.h +++ b/sys/sys/agpio.h @@ -24,12 +24,16 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/sys/agpio.h,v 1.1.2.2 2001/12/20 10:36:57 ru Exp $ - * $DragonFly: src/sys/sys/agpio.h,v 1.3 2003/12/09 23:43:36 drhodus Exp $ + * $DragonFly: src/sys/sys/agpio.h,v 1.4 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_AGPIO_H_ #define _SYS_AGPIO_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif + /* * The AGP gatt uses 4k pages irrespective of the host page size. */ diff --git a/sys/sys/aio.h b/sys/sys/aio.h index 8f37996790..a7d9517bc1 100644 --- a/sys/sys/aio.h +++ b/sys/sys/aio.h @@ -14,15 +14,30 @@ * of the author. This software is distributed AS-IS. * * $FreeBSD: src/sys/sys/aio.h,v 1.13.2.8 2002/08/31 03:18:23 alc Exp $ - * $DragonFly: src/sys/sys/aio.h,v 1.3 2004/09/16 04:42:55 dillon Exp $ + * $DragonFly: src/sys/sys/aio.h,v 1.4 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_AIO_H_ #define _SYS_AIO_H_ -#include +#ifndef _SYS_TYPES_H_ #include +#endif +#ifndef _SYS_TIME_H_ +#include +#endif +#ifndef _SYS_SIGNAL_H_ #include +#endif +#ifndef _SYS_QUEUE_H_ +#include +#endif +#ifndef _SYS_CALLOUT_H_ +#include +#endif +#ifndef _SYS_EVENT_H_ +#include +#endif /* * Returned by aio_cancel: diff --git a/sys/sys/ata.h b/sys/sys/ata.h index 39e8744e9d..52e5d5616b 100644 --- a/sys/sys/ata.h +++ b/sys/sys/ata.h @@ -26,13 +26,18 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/sys/ata.h,v 1.8.2.4 2002/04/02 14:47:35 sos Exp $ - * $DragonFly: src/sys/sys/ata.h,v 1.2 2003/06/17 04:28:58 dillon Exp $ + * $DragonFly: src/sys/sys/ata.h,v 1.3 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_ATA_H_ #define _SYS_ATA_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _SYS_IOCCOMM_H_ #include +#endif /* ATA/ATAPI device parameter information */ struct ata_params { diff --git a/sys/sys/bio.h b/sys/sys/bio.h index 93440226cb..876fb8126c 100644 --- a/sys/sys/bio.h +++ b/sys/sys/bio.h @@ -31,12 +31,15 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $DragonFly: src/sys/sys/bio.h,v 1.4 2006/03/24 18:35:33 dillon Exp $ + * $DragonFly: src/sys/sys/bio.h,v 1.5 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_BIO_H_ #define _SYS_BIO_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif #ifndef _SYS_QUEUE_H_ #include #endif diff --git a/sys/sys/blist.h b/sys/sys/blist.h index 8afa484864..0ff995f9dc 100644 --- a/sys/sys/blist.h +++ b/sys/sys/blist.h @@ -54,12 +54,16 @@ * eats around 32 KBytes of memory. * * $FreeBSD: src/sys/sys/blist.h,v 1.2.2.1 2003/01/12 09:23:12 dillon Exp $ - * $DragonFly: src/sys/sys/blist.h,v 1.5 2005/06/11 16:24:36 hmp Exp $ + * $DragonFly: src/sys/sys/blist.h,v 1.6 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_BLIST_H_ #define _SYS_BLIST_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif + /* * blmeta and bl_bitmap_t MUST be a power of 2 in size. */ diff --git a/sys/sys/buf2.h b/sys/sys/buf2.h index 9796a64d38..c482d06528 100644 --- a/sys/sys/buf2.h +++ b/sys/sys/buf2.h @@ -37,7 +37,7 @@ * * @(#)buf.h 8.9 (Berkeley) 3/30/95 * $FreeBSD: src/sys/sys/buf.h,v 1.88.2.10 2003/01/25 19:02:23 dillon Exp $ - * $DragonFly: src/sys/sys/buf2.h,v 1.17 2006/05/05 20:15:01 dillon Exp $ + * $DragonFly: src/sys/sys/buf2.h,v 1.18 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_BUF2_H_ @@ -45,6 +45,9 @@ #ifdef _KERNEL +#ifndef _SYS_BUF_H_ +#include /* crit_*() functions */ +#endif #ifndef _SYS_GLOBALDATA_H_ #include /* curthread */ #endif diff --git a/sys/sys/bus.h b/sys/sys/bus.h index 30b2dad3ce..94f2d8edba 100644 --- a/sys/sys/bus.h +++ b/sys/sys/bus.h @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/sys/bus.h,v 1.30.2.5 2004/03/17 17:54:25 njl Exp $ - * $DragonFly: src/sys/sys/bus.h,v 1.21 2006/01/25 19:56:23 dillon Exp $ + * $DragonFly: src/sys/sys/bus.h,v 1.22 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_BUS_H_ @@ -32,8 +32,15 @@ #if defined(_KERNEL) || defined(_KERNEL_STRUCTURES) +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _SYS_QUEUE_H_ #include +#endif +#ifndef _SYS_KOBJ_H_ #include +#endif #ifdef _KERNEL #include #endif diff --git a/sys/sys/camlib.h b/sys/sys/camlib.h index 6692349d5a..e7b19f8a69 100644 --- a/sys/sys/camlib.h +++ b/sys/sys/camlib.h @@ -23,7 +23,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/lib/libcam/camlib.h,v 1.2 1999/08/28 00:04:06 peter Exp $ - * $DragonFly: src/sys/sys/camlib.h,v 1.1 2003/08/07 21:17:40 dillon Exp $ + * $DragonFly: src/sys/sys/camlib.h,v 1.2 2006/05/20 02:42:13 dillon Exp $ */ /* * Buffer encoding/decoding routines taken from the original FreeBSD SCSI @@ -62,8 +62,8 @@ */ -#ifndef _SYS_CAMLIB_H -#define _SYS_CAMLIB_H +#ifndef _SYS_CAMLIB_H_ +#define _SYS_CAMLIB_H_ #include #include @@ -176,4 +176,4 @@ int csio_encode_visit(struct ccb_scsiio *csio, char *fmt, void *gethook); __END_DECLS -#endif /* _CAMLIB_H */ +#endif /* _SYS_CAMLIB_H_ */ diff --git a/sys/sys/caps.h b/sys/sys/caps.h index 92389163af..c5bd3e50bd 100644 --- a/sys/sys/caps.h +++ b/sys/sys/caps.h @@ -3,7 +3,7 @@ * * Implements an architecture independant Capability Service API * - * $DragonFly: src/sys/sys/caps.h,v 1.8 2004/04/25 18:54:32 cpressey Exp $ + * $DragonFly: src/sys/sys/caps.h,v 1.9 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_CAPS_H_ @@ -91,6 +91,7 @@ typedef struct caps_cred { #if defined(_KERNEL) || defined(_KERNEL_STRUCTURES) +struct proc; struct caps_kmsg; TAILQ_HEAD(caps_kmsg_queue, caps_kmsg); diff --git a/sys/sys/ccdvar.h b/sys/sys/ccdvar.h index 4b47dc2b38..d6653151ad 100644 --- a/sys/sys/ccdvar.h +++ b/sys/sys/ccdvar.h @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/sys/ccdvar.h,v 1.11.2.1 2001/09/11 09:49:54 kris Exp $ */ -/* $DragonFly: src/sys/sys/ccdvar.h,v 1.3 2006/03/24 18:35:33 dillon Exp $ */ +/* $DragonFly: src/sys/sys/ccdvar.h,v 1.4 2006/05/20 02:42:13 dillon Exp $ */ /* $NetBSD: ccdvar.h,v 1.7.2.1 1995/10/12 21:30:18 thorpej Exp $ */ @@ -77,6 +77,9 @@ * @(#)cdvar.h 8.1 (Berkeley) 6/10/93 */ +#ifndef _SYS_CCDVAR_H_ +#define _SYS_CCDVAR_H_ + /* * Dynamic configuration and disklabel support by: * Jason R. Thorpe @@ -86,6 +89,16 @@ * Moffett Field, CA 94035 */ +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _SYS_DEVICESTAT_H_ +#include +#endif +#ifndef _SYS_DISKLABEL_H_ +#include +#endif + /* * A concatenated disk is described at initialization time by this structure. */ @@ -212,3 +225,5 @@ struct ccd_softc { */ #define CCDIOCSET _IOWR('F', 16, struct ccd_ioctl) /* enable ccd */ #define CCDIOCCLR _IOW('F', 17, struct ccd_ioctl) /* disable ccd */ + +#endif diff --git a/sys/sys/cdio.h b/sys/sys/cdio.h index 504c1d16c6..cbedf43790 100644 --- a/sys/sys/cdio.h +++ b/sys/sys/cdio.h @@ -2,7 +2,7 @@ * 16 Feb 93 Julian Elischer (julian@dialix.oz.au) * * $FreeBSD: src/sys/sys/cdio.h,v 1.21 1999/12/29 04:24:38 peter Exp $ - * $DragonFly: src/sys/sys/cdio.h,v 1.2 2003/06/17 04:28:58 dillon Exp $ + * $DragonFly: src/sys/sys/cdio.h,v 1.3 2006/05/20 02:42:13 dillon Exp $ */ /* @@ -27,10 +27,12 @@ #ifndef _SYS_CDIO_H_ #define _SYS_CDIO_H_ -#ifndef _KERNEL +#ifndef _SYS_TYPES_H_ #include #endif +#ifndef _SYS_IOCCOM_H_ #include +#endif union msf_lba { struct { diff --git a/sys/sys/cdrio.h b/sys/sys/cdrio.h index 4eb48007b7..1046801f8e 100644 --- a/sys/sys/cdrio.h +++ b/sys/sys/cdrio.h @@ -26,13 +26,18 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/sys/cdrio.h,v 1.1.2.3 2002/11/20 00:26:18 njl Exp $ - * $DragonFly: src/sys/sys/cdrio.h,v 1.2 2003/06/17 04:28:58 dillon Exp $ + * $DragonFly: src/sys/sys/cdrio.h,v 1.3 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_CDRIO_H_ #define _SYS_CDRIO_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _SYS_IOCCOM_H_ #include +#endif struct cdr_track { int datablock_type; /* data type code */ diff --git a/sys/sys/checkpoint.h b/sys/sys/checkpoint.h index 1c7c128a01..66184669a2 100644 --- a/sys/sys/checkpoint.h +++ b/sys/sys/checkpoint.h @@ -22,12 +22,16 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $DragonFly: src/sys/sys/checkpoint.h,v 1.1 2004/11/23 06:32:34 dillon Exp $ + * $DragonFly: src/sys/sys/checkpoint.h,v 1.2 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_CHECKPOINT_H_ #define _SYS_CHECKPOINT_H_ +#ifndef _SYS_PROCFS_H_ +#include +#endif + #define CKPT_FREEZE 0x1 #define CKPT_THAW 0x2 #define CKPT_FREEZEPID 0x3 /* not yet supported */ diff --git a/sys/sys/chio.h b/sys/sys/chio.h index b38bc994af..327420a07c 100644 --- a/sys/sys/chio.h +++ b/sys/sys/chio.h @@ -30,16 +30,18 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/sys/chio.h,v 1.15 1999/12/29 04:24:38 peter Exp $ - * $DragonFly: src/sys/sys/chio.h,v 1.2 2003/06/17 04:28:58 dillon Exp $ + * $DragonFly: src/sys/sys/chio.h,v 1.3 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_CHIO_H_ #define _SYS_CHIO_H_ -#ifndef _KERNEL +#ifndef _SYS_TYPES_H_ #include #endif +#ifndef _SYS_IOCCOM_H_ #include +#endif /* * Element types. Used as "to" and "from" type indicators in move diff --git a/sys/sys/ckpt.h b/sys/sys/ckpt.h index d9ea83a314..51b870f689 100644 --- a/sys/sys/ckpt.h +++ b/sys/sys/ckpt.h @@ -22,11 +22,24 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $DragonFly: src/sys/sys/ckpt.h,v 1.6 2005/02/26 20:32:37 dillon Exp $ + * $DragonFly: src/sys/sys/ckpt.h,v 1.7 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_CKPT_H_ #define _SYS_CKPT_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _SYS_MOUNT_H_ +#include +#endif +#ifndef _SYS_PROC_H_ +#include +#endif +#ifndef _SYS_SIGNALVAR_H_ +#include +#endif + #define CKPT_MAXTHREADS 256 struct ckpt_filehdr { @@ -63,12 +76,21 @@ struct ckpt_siginfo { int csi_reserved[6]; }; +/* + * Elf_Phdr is based on the inclusion of elf32 or elf64. If neither was + * included, we don't know what to do with it. If the source needs the + * structure, generate a compile-time error. + */ +#ifdef __ELF_WORD_SIZE + struct vn_hdr { fhandle_t vnh_fh; Elf_Phdr vnh_phdr; int vnh_reserved[8]; }; +#endif + #ifdef _KERNEL #ifdef DEBUG #define TRACE_ENTER printf("entering %s at %s:%d\n", __func__, __FILE__, __LINE__) diff --git a/sys/sys/clist.h b/sys/sys/clist.h index 03a15c7b61..3031701ed6 100644 --- a/sys/sys/clist.h +++ b/sys/sys/clist.h @@ -32,12 +32,16 @@ * * @(#)clist.h 8.1 (Berkeley) 6/4/93 * $FreeBSD: src/sys/sys/clist.h,v 1.10 1999/12/29 04:24:38 peter Exp $ - * $DragonFly: src/sys/sys/clist.h,v 1.4 2004/10/07 01:33:31 dillon Exp $ + * $DragonFly: src/sys/sys/clist.h,v 1.5 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_CLIST_H_ #define _SYS_CLIST_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif + #define CBLOCK 128 /* Clist block size, must be a power of 2. */ #define CBQSIZE (CBLOCK/NBBY) /* Quote bytes/cblock - can do better. */ /* Data chars/clist. */ diff --git a/sys/sys/cons.h b/sys/sys/cons.h index cae1deb4c4..b2813198e1 100644 --- a/sys/sys/cons.h +++ b/sys/sys/cons.h @@ -37,13 +37,18 @@ * * from: @(#)cons.h 7.2 (Berkeley) 5/9/91 * $FreeBSD: src/sys/sys/cons.h,v 1.24 2000/01/11 14:54:01 yokota Exp $ - * $DragonFly: src/sys/sys/cons.h,v 1.4 2003/11/10 06:12:17 dillon Exp $ + * $DragonFly: src/sys/sys/cons.h,v 1.5 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _MACHINE_CONS_H_ #define _MACHINE_CONS_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif + struct consdev; + typedef void cn_probe_t (struct consdev *); typedef void cn_init_t (struct consdev *); typedef void cn_term_t (struct consdev *); diff --git a/sys/sys/consio.h b/sys/sys/consio.h index c427f91346..f861151e45 100644 --- a/sys/sys/consio.h +++ b/sys/sys/consio.h @@ -26,16 +26,18 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/sys/consio.h,v 1.5.2.7 2002/09/15 22:30:46 dd Exp $ - * $DragonFly: src/sys/sys/consio.h,v 1.3 2005/03/05 18:08:50 swildner Exp $ + * $DragonFly: src/sys/sys/consio.h,v 1.4 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_CONSIO_H_ #define _SYS_CONSIO_H_ -#ifndef _KERNEL +#ifndef _SYS_TYPES_H_ #include #endif +#ifndef _SYS_IOCCOM_H_ #include +#endif /* * Console ioctl commands. Some commands are named as KDXXXX, GIO_XXX, and diff --git a/sys/sys/device.h b/sys/sys/device.h index cff7597422..38ea7229a1 100644 --- a/sys/sys/device.h +++ b/sys/sys/device.h @@ -31,12 +31,15 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $DragonFly: src/sys/sys/device.h,v 1.4 2006/02/17 19:18:07 dillon Exp $ + * $DragonFly: src/sys/sys/device.h,v 1.5 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_DEVICE_H_ #define _SYS_DEVICE_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif #ifndef _SYS_MSGPORT_H_ #include #endif diff --git a/sys/sys/disklabel.h b/sys/sys/disklabel.h index 1b7a03cf30..07320dfdfa 100644 --- a/sys/sys/disklabel.h +++ b/sys/sys/disklabel.h @@ -32,17 +32,24 @@ * * @(#)disklabel.h 8.2 (Berkeley) 7/10/94 * $FreeBSD: src/sys/sys/disklabel.h,v 1.49.2.7 2001/05/27 05:58:26 jkh Exp $ - * $DragonFly: src/sys/sys/disklabel.h,v 1.13 2006/03/24 18:35:33 dillon Exp $ + * $DragonFly: src/sys/sys/disklabel.h,v 1.14 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_DISKLABEL_H_ #define _SYS_DISKLABEL_H_ -#ifndef _KERNEL +#ifndef _SYS_TYPES_H_ #include #endif +#if defined(_KERNEL) && !defined(_SYS_SYSTM_H_) +#include +#endif +#ifndef _SYS_IOCCOM_H_ #include +#endif +#ifndef _SYS_CONF_H_ #include +#endif /* * Disk description table, see disktab(5) diff --git a/sys/sys/disklabel32.h b/sys/sys/disklabel32.h index 8e605caed3..e0fc35ea3b 100644 --- a/sys/sys/disklabel32.h +++ b/sys/sys/disklabel32.h @@ -32,17 +32,24 @@ * * @(#)disklabel.h 8.2 (Berkeley) 7/10/94 * $FreeBSD: src/sys/sys/disklabel.h,v 1.49.2.7 2001/05/27 05:58:26 jkh Exp $ - * $DragonFly: src/sys/sys/disklabel32.h,v 1.13 2006/03/24 18:35:33 dillon Exp $ + * $DragonFly: src/sys/sys/disklabel32.h,v 1.14 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_DISKLABEL_H_ #define _SYS_DISKLABEL_H_ -#ifndef _KERNEL +#ifndef _SYS_TYPES_H_ #include #endif +#if defined(_KERNEL) && !defined(_SYS_SYSTM_H_) +#include +#endif +#ifndef _SYS_IOCCOM_H_ #include +#endif +#ifndef _SYS_CONF_H_ #include +#endif /* * Disk description table, see disktab(5) diff --git a/sys/sys/diskmbr.h b/sys/sys/diskmbr.h index 5d7f337c58..d6eb59784d 100644 --- a/sys/sys/diskmbr.h +++ b/sys/sys/diskmbr.h @@ -32,13 +32,18 @@ * * @(#)disklabel.h 8.2 (Berkeley) 7/10/94 * $FreeBSD$ - * $DragonFly: src/sys/sys/diskmbr.h,v 1.2 2004/04/21 02:32:41 cpressey Exp $ + * $DragonFly: src/sys/sys/diskmbr.h,v 1.3 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_DISKMBR_H_ #define _SYS_DISKMBR_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _SYS_IOCCOM_H_ #include +#endif #define DOSBBSECTOR 0 /* DOS boot block relative sector number */ #define DOSPARTOFF 446 diff --git a/sys/sys/diskslice.h b/sys/sys/diskslice.h index 644f74aa17..7078b14d70 100644 --- a/sys/sys/diskslice.h +++ b/sys/sys/diskslice.h @@ -24,16 +24,18 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/sys/diskslice.h,v 1.36.2.1 2001/01/29 01:50:50 ken Exp $ - * $DragonFly: src/sys/sys/diskslice.h,v 1.6 2006/02/17 19:18:07 dillon Exp $ + * $DragonFly: src/sys/sys/diskslice.h,v 1.7 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_DISKSLICE_H_ #define _SYS_DISKSLICE_H_ -#ifndef _KERNEL +#ifndef _SYS_TYPES_H_ #include #endif +#ifndef _SYS_IOCCOM_H_ #include +#endif #define BASE_SLICE 2 #define COMPATIBILITY_SLICE 0 diff --git a/sys/sys/dkstat.h b/sys/sys/dkstat.h index 23f37fc23c..4017daad69 100644 --- a/sys/sys/dkstat.h +++ b/sys/sys/dkstat.h @@ -37,12 +37,16 @@ * * @(#)dkstat.h 8.2 (Berkeley) 1/21/94 * $FreeBSD: src/sys/sys/dkstat.h,v 1.12.2.1 2000/09/22 08:01:00 des Exp $ - * $DragonFly: src/sys/sys/dkstat.h,v 1.4 2005/04/27 14:31:19 hmp Exp $ + * $DragonFly: src/sys/sys/dkstat.h,v 1.5 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_DKSTAT_H_ #define _SYS_DKSTAT_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif + #if !defined(_KERNEL) && !defined(_KERNEL_STRUCTURES) #error "This file should not be included by userland programs." #endif diff --git a/sys/sys/dmap.h b/sys/sys/dmap.h index 5eb0f323c9..ecc2fea8ae 100644 --- a/sys/sys/dmap.h +++ b/sys/sys/dmap.h @@ -32,12 +32,16 @@ * * @(#)dmap.h 8.2 (Berkeley) 1/4/94 * $FreeBSD: src/sys/sys/dmap.h,v 1.7 1999/12/29 04:24:40 peter Exp $ - * $DragonFly: src/sys/sys/dmap.h,v 1.2 2003/06/17 04:28:58 dillon Exp $ + * $DragonFly: src/sys/sys/dmap.h,v 1.3 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_DMAP_H_ #define _SYS_DMAP_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif + /* * Definitions for the mapping of vitual swap space to the physical swap * area - the disk map. diff --git a/sys/sys/dvdio.h b/sys/sys/dvdio.h index 335c55594d..041ab2aeb9 100644 --- a/sys/sys/dvdio.h +++ b/sys/sys/dvdio.h @@ -26,12 +26,16 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/sys/dvdio.h,v 1.2.2.2 2002/03/18 08:34:53 sos Exp $ - * $DragonFly: src/sys/sys/dvdio.h,v 1.3 2003/11/15 21:05:43 dillon Exp $ + * $DragonFly: src/sys/sys/dvdio.h,v 1.4 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_DVDIO_H_ #define _SYS_DVDIO_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif + struct dvd_layer { u_int8_t book_type :4; u_int8_t book_version :4; diff --git a/sys/sys/elf32.h b/sys/sys/elf32.h index 88000f9855..5d33621ce4 100644 --- a/sys/sys/elf32.h +++ b/sys/sys/elf32.h @@ -24,13 +24,18 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/sys/elf32.h,v 1.7 1999/08/28 00:51:41 peter Exp $ - * $DragonFly: src/sys/sys/elf32.h,v 1.3 2003/11/10 06:12:17 dillon Exp $ + * $DragonFly: src/sys/sys/elf32.h,v 1.4 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_ELF32_H_ #define _SYS_ELF32_H_ 1 +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _SYS_ELF_COMMON_H_ #include +#endif /* * ELF definitions common to all 32-bit architectures. diff --git a/sys/sys/elf64.h b/sys/sys/elf64.h index 2f7be1d1e1..617fe39a9f 100644 --- a/sys/sys/elf64.h +++ b/sys/sys/elf64.h @@ -24,13 +24,18 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/sys/elf64.h,v 1.9 1999/08/28 00:51:42 peter Exp $ - * $DragonFly: src/sys/sys/elf64.h,v 1.3 2003/11/10 06:12:17 dillon Exp $ + * $DragonFly: src/sys/sys/elf64.h,v 1.4 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_ELF64_H_ #define _SYS_ELF64_H_ 1 +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _SYS_ELF_COMMON_H_ #include +#endif /* * ELF definitions common to all 64-bit architectures. diff --git a/sys/sys/elf_common.h b/sys/sys/elf_common.h index 506a7cf5d8..b8b37e0eeb 100644 --- a/sys/sys/elf_common.h +++ b/sys/sys/elf_common.h @@ -24,12 +24,16 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/sys/elf_common.h,v 1.5.2.3 2001/02/28 02:30:46 obrien Exp $ - * $DragonFly: src/sys/sys/elf_common.h,v 1.18 2005/07/13 19:40:58 asmodai Exp $ + * $DragonFly: src/sys/sys/elf_common.h,v 1.19 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_ELF_COMMON_H_ #define _SYS_ELF_COMMON_H_ 1 +#ifndef _SYS_TYPES_H_ +#include +#endif + /* * ELF definitions that are independent of architecture or word size. */ diff --git a/sys/sys/elf_generic.h b/sys/sys/elf_generic.h index 7a4408b303..7d7bdba54e 100644 --- a/sys/sys/elf_generic.h +++ b/sys/sys/elf_generic.h @@ -24,18 +24,24 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/sys/elf_generic.h,v 1.4 1999/08/28 00:51:42 peter Exp $ - * $DragonFly: src/sys/sys/elf_generic.h,v 1.4 2004/09/23 16:11:47 joerg Exp $ + * $DragonFly: src/sys/sys/elf_generic.h,v 1.5 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_ELF_GENERIC_H_ #define _SYS_ELF_GENERIC_H_ 1 +#ifndef _SYS_CDEFS_H_ #include +#endif +#ifndef _MACHINE_ENDIAN_H_ +#include +#endif /* * Definitions of generic ELF names which relieve applications from * needing to know the word size. */ +#ifdef __ELF_WORD_SIZE #if __ELF_WORD_SIZE != 32 && __ELF_WORD_SIZE != 64 #error "__ELF_WORD_SIZE must be defined as 32 or 64" @@ -78,4 +84,10 @@ __ElfType(Sym); #define ELF_ST_TYPE __ELFN(ST_TYPE) #define ELF_ST_INFO __ELFN(ST_INFO) +#else + +#warning "must include sys/elf32.h or sy/elf64.h before sys/elf_generic.h" + +#endif /* __ELF_WORD_SIZE */ + #endif /* !_SYS_ELF_GENERIC_H_ */ diff --git a/sys/sys/endian.h b/sys/sys/endian.h index 91ad96e588..9d00b74289 100644 --- a/sys/sys/endian.h +++ b/sys/sys/endian.h @@ -26,13 +26,18 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/sys/endian.h,v 1.2.2.1 2002/09/09 05:45:04 imp Exp $ - * $DragonFly: src/sys/sys/endian.h,v 1.4 2004/08/24 06:10:57 joerg Exp $ + * $DragonFly: src/sys/sys/endian.h,v 1.5 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_ENDIAN_H_ #define _SYS_ENDIAN_H_ +#ifndef _SYS_TYPES_H_ #include +#endif +#ifndef _MACHINE_ENDIAN_H_ +#include +#endif /* * General byte order swapping functions. diff --git a/sys/sys/eui64.h b/sys/sys/eui64.h index 138f526de8..55e24a86aa 100644 --- a/sys/sys/eui64.h +++ b/sys/sys/eui64.h @@ -26,10 +26,14 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/sys/eui64.h,v 1.1 2004/05/26 22:58:06 brooks Exp $ - * $DragonFly: src/sys/sys/eui64.h,v 1.1 2004/09/23 06:33:04 simokawa Exp $ + * $DragonFly: src/sys/sys/eui64.h,v 1.2 2006/05/20 02:42:13 dillon Exp $ */ -#ifndef _SYS_EUI64_H -#define _SYS_EUI64_H +#ifndef _SYS_EUI64_H_ +#define _SYS_EUI64_H_ + +#ifndef _SYS_TYPES_H_ +#include +#endif /* * Size of the ASCII representation of an EUI-64. @@ -55,4 +59,4 @@ int eui64_ntohost(char *, size_t, const struct eui64 *); int eui64_hostton(const char *, struct eui64 *); #endif /* !_KERNEL */ -#endif /* !_SYS_EUI64_H */ +#endif /* !_SYS_EUI64_H_ */ diff --git a/sys/sys/event.h b/sys/sys/event.h index d308622ff2..139264d2b7 100644 --- a/sys/sys/event.h +++ b/sys/sys/event.h @@ -24,12 +24,16 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/sys/event.h,v 1.5.2.6 2003/02/09 15:28:13 nectar Exp $ - * $DragonFly: src/sys/sys/event.h,v 1.5 2004/02/25 17:38:51 joerg Exp $ + * $DragonFly: src/sys/sys/event.h,v 1.6 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_EVENT_H_ #define _SYS_EVENT_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif + #define EVFILT_READ (-1) #define EVFILT_WRITE (-2) #define EVFILT_AIO (-3) /* attached to aio requests */ diff --git a/sys/sys/eventvar.h b/sys/sys/eventvar.h index 3cccec1053..324f7c3f0e 100644 --- a/sys/sys/eventvar.h +++ b/sys/sys/eventvar.h @@ -24,12 +24,22 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/sys/eventvar.h,v 1.1.2.2 2000/07/18 21:49:12 jlemon Exp $ - * $DragonFly: src/sys/sys/eventvar.h,v 1.3 2004/12/30 07:01:52 cpressey Exp $ + * $DragonFly: src/sys/sys/eventvar.h,v 1.4 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_EVENTVAR_H_ #define _SYS_EVENTVAR_H_ +#ifndef _SYS_QUEUE_H_ +#include +#endif +#ifndef _SYS_EVENT_H_ +#include +#endif +#ifndef _SYS_SELECT_H_ +#include +#endif + #if !defined(_KERNEL) && !defined(_KERNEL_STRUCTURES) #error "This file should not be included by userland programs." #endif diff --git a/sys/sys/fbio.h b/sys/sys/fbio.h index ffd7e536a9..f4dc00f533 100644 --- a/sys/sys/fbio.h +++ b/sys/sys/fbio.h @@ -37,16 +37,18 @@ * @(#)fbio.h 8.2 (Berkeley) 10/30/93 * * $FreeBSD: src/sys/sys/fbio.h,v 1.9.2.1 2000/05/05 09:16:16 nyan Exp $ - * $DragonFly: src/sys/sys/fbio.h,v 1.4 2005/03/13 01:53:56 swildner Exp $ + * $DragonFly: src/sys/sys/fbio.h,v 1.5 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_FBIO_H_ #define _SYS_FBIO_H_ -#ifndef _KERNEL +#ifndef _SYS_TYPES_H_ #include #endif +#ifndef _SYS_IOCCOM_H_ #include +#endif /* * Frame buffer ioctls (from Sprite, trimmed to essentials for X11). diff --git a/sys/sys/fcntl.h b/sys/sys/fcntl.h index 073440e43b..c18edf8349 100644 --- a/sys/sys/fcntl.h +++ b/sys/sys/fcntl.h @@ -37,19 +37,13 @@ * * @(#)fcntl.h 8.3 (Berkeley) 1/21/94 * $FreeBSD: src/sys/sys/fcntl.h,v 1.9.2.2 2001/06/03 05:00:10 dillon Exp $ - * $DragonFly: src/sys/sys/fcntl.h,v 1.7 2006/05/07 19:17:15 dillon Exp $ + * $DragonFly: src/sys/sys/fcntl.h,v 1.8 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_FCNTL_H_ #define _SYS_FCNTL_H_ -/* - * This file includes the definitions for open and fcntl - * described by POSIX for ; it also includes - * related kernel definitions. - */ - -#ifndef _KERNEL +#ifndef _SYS_TYPES_H_ #include #endif diff --git a/sys/sys/file.h b/sys/sys/file.h index bd0ae199b3..1e0779beda 100644 --- a/sys/sys/file.h +++ b/sys/sys/file.h @@ -32,20 +32,27 @@ * * @(#)file.h 8.3 (Berkeley) 1/9/95 * $FreeBSD: src/sys/sys/file.h,v 1.22.2.7 2002/11/21 23:39:24 sam Exp $ - * $DragonFly: src/sys/sys/file.h,v 1.17 2006/05/06 06:38:39 dillon Exp $ + * $DragonFly: src/sys/sys/file.h,v 1.18 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_FILE_H_ #define _SYS_FILE_H_ -#ifndef _KERNEL +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _SYS_FCNTL_H_ #include +#endif +#ifndef _SYS_UNISTD_H_ #include #endif #if defined(_KERNEL) || defined(_KERNEL_STRUCTURES) +#ifndef _SYS_QUEUE_H_ #include +#endif struct stat; struct proc; diff --git a/sys/sys/file2.h b/sys/sys/file2.h index 3849aba303..c6c54b8751 100644 --- a/sys/sys/file2.h +++ b/sys/sys/file2.h @@ -32,7 +32,7 @@ * * @(#)file.h 8.3 (Berkeley) 1/9/95 * $FreeBSD: src/sys/sys/file.h,v 1.22.2.7 2002/11/21 23:39:24 sam Exp $ - * $DragonFly: src/sys/sys/file2.h,v 1.5 2006/05/06 06:38:39 dillon Exp $ + * $DragonFly: src/sys/sys/file2.h,v 1.6 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_FILE2_H_ @@ -40,6 +40,10 @@ #ifdef _KERNEL +#ifndef _SYS_TYPES_H_ +#include +#endif + static __inline void fhold(struct file *fp) { diff --git a/sys/sys/filedesc.h b/sys/sys/filedesc.h index 6fef3bed03..8cf9c8f169 100644 --- a/sys/sys/filedesc.h +++ b/sys/sys/filedesc.h @@ -32,13 +32,19 @@ * * @(#)filedesc.h 8.1 (Berkeley) 6/2/93 * $FreeBSD: src/sys/sys/filedesc.h,v 1.19.2.5 2003/06/06 20:21:32 tegge Exp $ - * $DragonFly: src/sys/sys/filedesc.h,v 1.14 2006/05/19 07:33:45 dillon Exp $ + * $DragonFly: src/sys/sys/filedesc.h,v 1.15 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_FILEDESC_H_ #define _SYS_FILEDESC_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif + +#ifndef _SYS_QUEUE_H_ #include +#endif /* * This structure is used for the management of descriptors. It may be diff --git a/sys/sys/firmware.h b/sys/sys/firmware.h index 7a8f5146e7..4afa0eaa35 100644 --- a/sys/sys/firmware.h +++ b/sys/sys/firmware.h @@ -30,11 +30,11 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $DragonFly: src/sys/sys/firmware.h,v 1.1 2005/03/19 14:54:50 joerg Exp $ + * $DragonFly: src/sys/sys/firmware.h,v 1.2 2006/05/20 02:42:13 dillon Exp $ */ -#ifndef _SYS_FIRMWARE_H -#define _SYS_FIRMWARE_H +#ifndef _SYS_FIRMWARE_H_ +#define _SYS_FIRMWARE_H_ #ifndef _KERNEL #error "No user-servicable parts inside" diff --git a/sys/sys/fnv_hash.h b/sys/sys/fnv_hash.h index 9980cb7195..4c3ad51d06 100644 --- a/sys/sys/fnv_hash.h +++ b/sys/sys/fnv_hash.h @@ -6,9 +6,16 @@ * This file is placed in the public domain by Peter Wemm. * * $FreeBSD: src/sys/sys/fnv_hash.h,v 1.2.2.1 2001/03/21 10:50:59 peter Exp $ - * $DragonFly: src/sys/sys/fnv_hash.h,v 1.2 2003/06/17 04:28:58 dillon Exp $ + * $DragonFly: src/sys/sys/fnv_hash.h,v 1.3 2006/05/20 02:42:13 dillon Exp $ */ +#ifndef _SYS_FNV_HASH_H_ +#define _SYS_FNV_HASH_H_ + +#ifndef _SYS_TYPES_H_ +#include +#endif + typedef u_int32_t Fnv32_t; typedef u_int64_t Fnv64_t; @@ -67,3 +74,5 @@ fnv_64_str(const char *str, Fnv64_t hval) } return hval; } + +#endif diff --git a/sys/sys/iconv.h b/sys/sys/iconv.h index 54be92a835..50b6afdcb7 100644 --- a/sys/sys/iconv.h +++ b/sys/sys/iconv.h @@ -30,11 +30,15 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/sys/iconv.h,v 1.1.2.1 2001/05/21 08:28:07 bp Exp $ - * $DragonFly: src/sys/sys/iconv.h,v 1.3 2005/02/17 14:00:09 joerg Exp $ + * $DragonFly: src/sys/sys/iconv.h,v 1.4 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_ICONV_H_ #define _SYS_ICONV_H_ +#ifndef _SYS_MODULE_H_ +#include +#endif + #define ICONV_CSNMAXLEN 31 /* maximum length of charset name */ #define ICONV_CNVNMAXLEN 31 /* maximum length of converter name */ #define ICONV_CSMAXDATALEN 1024 /* maximum size of data associated with cs pair */ diff --git a/sys/sys/ieee754.h b/sys/sys/ieee754.h index 68d72ee52e..2443bb8dfd 100644 --- a/sys/sys/ieee754.h +++ b/sys/sys/ieee754.h @@ -1,5 +1,5 @@ /* $NetBSD: ieee754.h,v 1.3 2003/10/27 01:11:47 kleink Exp $ */ -/* $DragonFly: src/sys/sys/ieee754.h,v 1.2 2004/12/30 15:53:35 asmodai Exp $ */ +/* $DragonFly: src/sys/sys/ieee754.h,v 1.3 2006/05/20 02:42:13 dillon Exp $ */ /* * Copyright (c) 1992, 1993 @@ -46,8 +46,13 @@ * your port's ieee.h header. */ +#ifndef _SYS_TYPES_H_ #include +#endif +#ifndef _MACHINE_ENDIAN_H_ #include +#endif + /* * defines the layout of IEEE 754 floating point types. diff --git a/sys/sys/imgact_aout.h b/sys/sys/imgact_aout.h index 96887946b3..69ab82c3a9 100644 --- a/sys/sys/imgact_aout.h +++ b/sys/sys/imgact_aout.h @@ -32,12 +32,16 @@ * * from: @(#)exec.h 8.1 (Berkeley) 6/11/93 * $FreeBSD: src/sys/sys/imgact_aout.h,v 1.13 1999/12/29 04:24:41 peter Exp $ - * $DragonFly: src/sys/sys/imgact_aout.h,v 1.4 2004/10/25 08:57:50 dillon Exp $ + * $DragonFly: src/sys/sys/imgact_aout.h,v 1.5 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _IMGACT_AOUT_H_ #define _IMGACT_AOUT_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif + #define N_GETMAGIC(ex) \ ( (ex).a_midmag & 0xffff ) #define N_GETMID(ex) \ diff --git a/sys/sys/in_cksum.h b/sys/sys/in_cksum.h index 42084ee23f..88c79b1a66 100644 --- a/sys/sys/in_cksum.h +++ b/sys/sys/in_cksum.h @@ -37,12 +37,19 @@ * from: @(#)in_cksum.c 1.3 (Berkeley) 1/19/91 * from: Id: in_cksum.c,v 1.8 1995/12/03 18:35:19 bde Exp * $FreeBSD: src/sys/i386/include/in_cksum.h,v 1.7.2.2 2002/07/02 04:03:04 jdp Exp $ - * $DragonFly: src/sys/sys/in_cksum.h,v 1.3 2004/09/19 22:32:48 joerg Exp $ + * $DragonFly: src/sys/sys/in_cksum.h,v 1.4 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_IN_CKSUM_H_ #define _SYS_IN_CKSUM_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _MACHINE_STDINT_H_ +#include +#endif + #ifdef _KERNEL struct ip; diff --git a/sys/sys/inflate.h b/sys/sys/inflate.h index 1472782f59..b204461fda 100644 --- a/sys/sys/inflate.h +++ b/sys/sys/inflate.h @@ -7,7 +7,7 @@ * ---------------------------------------------------------------------------- * * $FreeBSD: src/sys/sys/inflate.h,v 1.11 1999/12/29 04:24:42 peter Exp $ - * $DragonFly: src/sys/sys/inflate.h,v 1.3 2003/08/20 07:31:21 rob Exp $ + * $DragonFly: src/sys/sys/inflate.h,v 1.4 2006/05/20 02:42:13 dillon Exp $ * */ #ifndef _SYS_INFLATE_H_ @@ -15,6 +15,10 @@ #if defined(_KERNEL) || defined(KZIP) +#ifndef _SYS_TYPES_H_ +#include +#endif + #define GZ_EOF -1 #define GZ_WSIZE 0x8000 diff --git a/sys/sys/ipc.h b/sys/sys/ipc.h index 25e7336e10..8381849d44 100644 --- a/sys/sys/ipc.h +++ b/sys/sys/ipc.h @@ -42,7 +42,7 @@ * * @(#)ipc.h 8.4 (Berkeley) 2/19/95 * $FreeBSD: src/sys/sys/ipc.h,v 1.15 1999/12/29 04:24:43 peter Exp $ - * $DragonFly: src/sys/sys/ipc.h,v 1.4 2003/08/27 02:03:22 dillon Exp $ + * $DragonFly: src/sys/sys/ipc.h,v 1.5 2006/05/20 02:42:13 dillon Exp $ */ /* @@ -51,6 +51,10 @@ #ifndef _SYS_IPC_H_ #define _SYS_IPC_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif + struct ipc_perm { ushort cuid; /* creator user id */ ushort cgid; /* creator group id */ diff --git a/sys/sys/jail.h b/sys/sys/jail.h index 9f5feaa79c..48e1ac0793 100644 --- a/sys/sys/jail.h +++ b/sys/sys/jail.h @@ -7,13 +7,23 @@ * ---------------------------------------------------------------------------- * * $FreeBSD: src/sys/sys/jail.h,v 1.8.2.2 2000/11/01 17:58:06 rwatson Exp $ - * $DragonFly: src/sys/sys/jail.h,v 1.6 2005/07/20 20:31:19 dillon Exp $ + * $DragonFly: src/sys/sys/jail.h,v 1.7 2006/05/20 02:42:13 dillon Exp $ * */ #ifndef _SYS_JAIL_H_ #define _SYS_JAIL_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _SYS_PARAM_H_ +#include +#endif +#ifndef _SYS_UCRED_H_ +#include +#endif + struct jail { uint32_t version; char *path; diff --git a/sys/sys/journal.h b/sys/sys/journal.h index 733c2ef1e2..147e162ec0 100644 --- a/sys/sys/journal.h +++ b/sys/sys/journal.h @@ -31,12 +31,19 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $DragonFly: src/sys/sys/journal.h,v 1.11 2006/05/07 00:24:58 dillon Exp $ + * $DragonFly: src/sys/sys/journal.h,v 1.12 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_JOURNAL_H_ #define _SYS_JOURNAL_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _SYS_TIME_H_ +#include +#endif + /* * Physical file format (binary) * diff --git a/sys/sys/kbio.h b/sys/sys/kbio.h index 42d3e73226..b5ee14fcc5 100644 --- a/sys/sys/kbio.h +++ b/sys/sys/kbio.h @@ -1,15 +1,17 @@ /*- * $FreeBSD: src/sys/sys/kbio.h,v 1.5.2.1 2000/10/29 16:59:32 dwmalone Exp $ - * $DragonFly: src/sys/sys/kbio.h,v 1.2 2003/06/17 04:28:58 dillon Exp $ + * $DragonFly: src/sys/sys/kbio.h,v 1.3 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_KBIO_H_ #define _SYS_KBIO_H_ -#ifndef _KERNEL +#ifndef _SYS_TYPES_H_ #include #endif +#ifndef _SYS_IOCCOM_H_ #include +#endif /* get/set keyboard I/O mode */ #define K_RAW 0 /* keyboard returns scancodes */ diff --git a/sys/sys/kcore.h b/sys/sys/kcore.h index 3b22b3aea2..5a32a2f746 100644 --- a/sys/sys/kcore.h +++ b/sys/sys/kcore.h @@ -31,11 +31,15 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $DragonFly: src/sys/sys/kcore.h,v 1.1 2004/11/24 22:51:01 joerg Exp $ + * $DragonFly: src/sys/sys/kcore.h,v 1.2 2006/05/20 02:42:13 dillon Exp $ */ -#ifndef _SYS_KCORE_H -#define _SYS_KCORE_H +#ifndef _SYS_KCORE_H_ +#define _SYS_KCORE_H_ + +#ifndef _SYS_TYPES_H_ +#include +#endif struct kinfo_file; struct file; diff --git a/sys/sys/kernel.h b/sys/sys/kernel.h index d31dff3e72..e400cf0759 100644 --- a/sys/sys/kernel.h +++ b/sys/sys/kernel.h @@ -40,13 +40,18 @@ * * @(#)kernel.h 8.3 (Berkeley) 1/21/94 * $FreeBSD: src/sys/sys/kernel.h,v 1.63.2.9 2002/07/02 23:00:30 archie Exp $ - * $DragonFly: src/sys/sys/kernel.h,v 1.19 2006/01/25 19:56:23 dillon Exp $ + * $DragonFly: src/sys/sys/kernel.h,v 1.20 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_KERNEL_H_ #define _SYS_KERNEL_H_ +#ifndef _SYS_PARAM_H_ +#include +#endif +#ifndef _SYS_LINKER_SET_H_ #include +#endif #ifdef _KERNEL diff --git a/sys/sys/kinfo.h b/sys/sys/kinfo.h index 046db3ba19..2fec8a55b3 100644 --- a/sys/sys/kinfo.h +++ b/sys/sys/kinfo.h @@ -31,12 +31,19 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $DragonFly: src/sys/sys/kinfo.h,v 1.5 2005/04/27 14:31:19 hmp Exp $ + * $DragonFly: src/sys/sys/kinfo.h,v 1.6 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_KINFO_H_ #define _SYS_KINFO_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _SYS_PARAM_H_ +#include +#endif + struct kinfo_file { size_t f_size; /* size of struct kinfo_file */ pid_t f_pid; /* owning process */ diff --git a/sys/sys/kobj.h b/sys/sys/kobj.h index 9a823b5cf4..7a6cf1537b 100644 --- a/sys/sys/kobj.h +++ b/sys/sys/kobj.h @@ -24,12 +24,16 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/sys/kobj.h,v 1.8 2003/09/22 21:32:49 peter Exp $ - * $DragonFly: src/sys/sys/kobj.h,v 1.9 2005/03/08 17:43:33 joerg Exp $ + * $DragonFly: src/sys/sys/kobj.h,v 1.10 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_KOBJ_H_ #define _SYS_KOBJ_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif + #if !defined(_KERNEL) && !defined(_KERNEL_STRUCTURES) #error "This file should not be included by userland programs." #endif diff --git a/sys/sys/kthread.h b/sys/sys/kthread.h index b70ae40c08..04fd650263 100644 --- a/sys/sys/kthread.h +++ b/sys/sys/kthread.h @@ -24,12 +24,16 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/sys/kthread.h,v 1.2 2000/01/07 08:36:44 luoqi Exp $ - * $DragonFly: src/sys/sys/kthread.h,v 1.8 2004/12/30 07:01:52 cpressey Exp $ + * $DragonFly: src/sys/sys/kthread.h,v 1.9 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_KTHREAD_H_ #define _SYS_KTHREAD_H_ +#ifndef _SYS_CDEFS_H_ +#include +#endif + #if !defined(_KERNEL) && !defined(_KERNEL_STRUCTURES) #error "This file should not be included by userland programs." #endif diff --git a/sys/sys/ktr.h b/sys/sys/ktr.h index 4a02d67baa..4b03c8b10e 100644 --- a/sys/sys/ktr.h +++ b/sys/sys/ktr.h @@ -31,7 +31,7 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $DragonFly: src/sys/sys/ktr.h,v 1.8 2005/12/06 23:37:55 dillon Exp $ + * $DragonFly: src/sys/sys/ktr.h,v 1.9 2006/05/20 02:42:13 dillon Exp $ */ /* * Generic Kernel trace buffer support. @@ -41,6 +41,10 @@ #ifndef _SYS_KTR_H_ #define _SYS_KTR_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif + #ifdef _KERNEL #include "opt_ktr.h" #endif diff --git a/sys/sys/ktrace.h b/sys/sys/ktrace.h index bdc0b8781b..e7b7106f86 100644 --- a/sys/sys/ktrace.h +++ b/sys/sys/ktrace.h @@ -32,15 +32,23 @@ * * @(#)ktrace.h 8.1 (Berkeley) 6/2/93 * $FreeBSD: src/sys/sys/ktrace.h,v 1.19.2.3 2001/01/06 09:58:23 alfred Exp $ - * $DragonFly: src/sys/sys/ktrace.h,v 1.6 2006/05/17 20:20:55 dillon Exp $ + * $DragonFly: src/sys/sys/ktrace.h,v 1.7 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_KTRACE_H_ #define _SYS_KTRACE_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif #ifndef _SYS_UIO_H_ #include #endif +#ifndef _SYS_SIGNAL_H_ +#include +#endif + +struct proc; struct ktrace_node { struct vnode *kn_vp; diff --git a/sys/sys/linker.h b/sys/sys/linker.h index 636b4514c0..5cac50906f 100644 --- a/sys/sys/linker.h +++ b/sys/sys/linker.h @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/sys/linker.h,v 1.17.2.1 2002/03/11 01:13:53 dd Exp $ - * $DragonFly: src/sys/sys/linker.h,v 1.7 2005/02/28 16:23:55 joerg Exp $ + * $DragonFly: src/sys/sys/linker.h,v 1.8 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_LINKER_H_ @@ -32,7 +32,18 @@ #ifdef _KERNEL +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _SYS_PARAM_H_ +#include +#endif +#ifndef _SYS_QUEUE_H_ +#include +#endif +#ifndef _MACHINE_ELF_H_ #include +#endif #ifdef MALLOC_DECLARE MALLOC_DECLARE(M_LINKER); diff --git a/sys/sys/lockf.h b/sys/sys/lockf.h index fab8a0d069..28961a4384 100644 --- a/sys/sys/lockf.h +++ b/sys/sys/lockf.h @@ -35,7 +35,7 @@ * * @(#)lockf.h 8.1 (Berkeley) 6/11/93 * $FreeBSD: src/sys/sys/lockf.h,v 1.10 1999/08/28 00:51:51 peter Exp $ - * $DragonFly: src/sys/sys/lockf.h,v 1.8 2006/05/08 00:38:59 dillon Exp $ + * $DragonFly: src/sys/sys/lockf.h,v 1.9 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_LOCKF_H_ @@ -45,7 +45,12 @@ #error "This file should not be included by userland programs." #endif +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _SYS_QUEUE_H_ #include +#endif struct vop_advlock_args; diff --git a/sys/sys/mapped_ioctl.h b/sys/sys/mapped_ioctl.h index c253cb57fa..810e6a5f0a 100644 --- a/sys/sys/mapped_ioctl.h +++ b/sys/sys/mapped_ioctl.h @@ -31,12 +31,17 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $DragonFly: src/sys/sys/mapped_ioctl.h,v 1.3 2006/05/06 02:43:13 dillon Exp $ + * $DragonFly: src/sys/sys/mapped_ioctl.h,v 1.4 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_MAPPED_IOCTL_H_ #define _SYS_MAPPED_IOCTL_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _SYS_QUEUE_H_ #include +#endif struct file; struct thread; diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h index dfca6cab72..5e391b51e5 100644 --- a/sys/sys/mbuf.h +++ b/sys/sys/mbuf.h @@ -34,13 +34,21 @@ * * @(#)mbuf.h 8.5 (Berkeley) 2/19/95 * $FreeBSD: src/sys/sys/mbuf.h,v 1.44.2.17 2003/04/15 06:15:02 silby Exp $ - * $DragonFly: src/sys/sys/mbuf.h,v 1.32 2005/07/15 17:54:48 eirikn Exp $ + * $DragonFly: src/sys/sys/mbuf.h,v 1.33 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_MBUF_H_ #define _SYS_MBUF_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _SYS_PARAM_H_ +#include +#endif +#ifndef _SYS_QUEUE_H_ #include +#endif /* * Mbufs are of a single size, MSIZE (machine/param.h), which diff --git a/sys/sys/mchain.h b/sys/sys/mchain.h index d2e61c5825..0456259721 100644 --- a/sys/sys/mchain.h +++ b/sys/sys/mchain.h @@ -30,12 +30,17 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/sys/mchain.h,v 1.1.2.1 2001/05/18 11:01:23 bp Exp $ - * $DragonFly: src/sys/sys/mchain.h,v 1.3 2004/09/23 16:11:47 joerg Exp $ + * $DragonFly: src/sys/sys/mchain.h,v 1.4 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_MCHAIN_H_ #define _SYS_MCHAIN_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _MACHINE_ENDIAN_H_ #include +#endif /* * This macros probably belongs to the endian.h @@ -49,23 +54,23 @@ #define htoleq(x) ((int64_t)(x)) #define letohq(x) ((int64_t)(x)) -#define htobes(x) (htons(x)) -#define betohs(x) (ntohs(x)) -#define htobel(x) (htonl(x)) -#define betohl(x) (ntohl(x)) +#define htobes(x) (__htons(x)) +#define betohs(x) (__ntohs(x)) +#define htobel(x) (__htonl(x)) +#define betohl(x) (__ntohl(x)) static __inline int64_t htobeq(int64_t x) { - return (int64_t)htonl((u_int32_t)(x >> 32)) | - (int64_t)htonl((u_int32_t)(x & 0xffffffff)) << 32; + return (int64_t)__htonl((u_int32_t)(x >> 32)) | + (int64_t)__htonl((u_int32_t)(x & 0xffffffff)) << 32; } static __inline int64_t betohq(int64_t x) { - return (int64_t)ntohl((u_int32_t)(x >> 32)) | - (int64_t)ntohl((u_int32_t)(x & 0xffffffff)) << 32; + return (int64_t)__ntohl((u_int32_t)(x >> 32)) | + (int64_t)__ntohl((u_int32_t)(x & 0xffffffff)) << 32; } #else /* (BYTE_ORDER == LITTLE_ENDIAN) */ @@ -94,6 +99,7 @@ betohq(int64_t x) struct mbuf; struct mbchain; +struct uio; typedef int mb_copy_t(struct mbchain *mbp, c_caddr_t src, caddr_t dst, int len); diff --git a/sys/sys/md4.h b/sys/sys/md4.h index 11e833bf9f..cdd34bb657 100644 --- a/sys/sys/md4.h +++ b/sys/sys/md4.h @@ -1,6 +1,6 @@ /* MD4.H - header file for MD4C.C * $FreeBSD: src/sys/sys/md4.h,v 1.1.2.1 2001/05/22 08:32:34 bp Exp $ - * $DragonFly: src/sys/sys/md4.h,v 1.2 2003/06/17 04:28:58 dillon Exp $ + * $DragonFly: src/sys/sys/md4.h,v 1.3 2006/05/20 02:42:13 dillon Exp $ */ /* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All @@ -24,8 +24,16 @@ documentation and/or software. */ -#ifndef _MD4_H_ -#define _MD4_H_ +#ifndef _SYS_MD4_H_ +#define _SYS_MD4_H_ + +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _SYS_CDEFS_H_ +#include +#endif + /* MD4 context. */ typedef struct MD4Context { u_int32_t state[4]; /* state (ABCD) */ @@ -33,8 +41,6 @@ typedef struct MD4Context { unsigned char buffer[64]; /* input buffer */ } MD4_CTX; -#include - __BEGIN_DECLS void MD4Init(MD4_CTX *); void MD4Update(MD4_CTX *, const unsigned char *, unsigned int); diff --git a/sys/sys/md5.h b/sys/sys/md5.h index 36646b7b3f..cafc5542b3 100644 --- a/sys/sys/md5.h +++ b/sys/sys/md5.h @@ -1,6 +1,6 @@ /* MD5.H - header file for MD5C.C * $FreeBSD: src/sys/sys/md5.h,v 1.13 1999/12/29 04:24:44 peter Exp $ - * $DragonFly: src/sys/sys/md5.h,v 1.3 2003/08/20 07:31:21 rob Exp $ + * $DragonFly: src/sys/sys/md5.h,v 1.4 2006/05/20 02:42:13 dillon Exp $ */ /* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All @@ -27,6 +27,11 @@ documentation and/or software. #ifndef _SYS_MD5_H_ #define _SYS_MD5_H_ + +#ifndef _SYS_TYPES_H_ +#include +#endif + /* MD5 context. */ typedef struct MD5Context { u_int32_t state[4]; /* state (ABCD) */ @@ -48,4 +53,5 @@ char * MD5Data(const unsigned char *, unsigned int, char *); void MD5Transform (u_int32_t [4], const unsigned char [64]); #endif __END_DECLS + #endif /* _SYS_MD5_H_ */ diff --git a/sys/sys/memrange.h b/sys/sys/memrange.h index 964456c444..5b2db78518 100644 --- a/sys/sys/memrange.h +++ b/sys/sys/memrange.h @@ -1,10 +1,26 @@ + /* * Memory range attribute operations, peformed on /dev/mem * * $FreeBSD: src/sys/sys/memrange.h,v 1.4.2.2 2002/09/16 21:58:37 dwmalone Exp $ - * $DragonFly: src/sys/sys/memrange.h,v 1.2 2003/06/17 04:28:58 dillon Exp $ + * $DragonFly: src/sys/sys/memrange.h,v 1.3 2006/05/20 02:42:13 dillon Exp $ */ +#ifndef _SYS_MEMRANGE_H_ +#define _SYS_MEMRANGE_H_ + +#ifndef _SYS_TYPES_H_ +#include +#endif + +#ifdef _KERNEL + +#ifndef _SYS_MALLOC_H_ +#include +#endif + +#endif + /* Memory range attributes */ #define MDF_UNCACHEABLE (1<<0) /* region not cached */ #define MDF_WRITECOMBINE (1<<1) /* region supports "write combine" action */ @@ -70,3 +86,4 @@ extern int mem_range_attr_set(struct mem_range_desc *mrd, int *arg); extern void mem_range_AP_init(void); #endif +#endif diff --git a/sys/sys/module.h b/sys/sys/module.h index 4cc6ee433f..77a1e6fff2 100644 --- a/sys/sys/module.h +++ b/sys/sys/module.h @@ -24,12 +24,16 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/sys/module.h,v 1.14.2.3 2002/03/17 11:07:45 alfred Exp $ - * $DragonFly: src/sys/sys/module.h,v 1.9 2005/03/30 04:29:32 swildner Exp $ + * $DragonFly: src/sys/sys/module.h,v 1.10 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_MODULE_H_ #define _SYS_MODULE_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif + /* * Module metadata types */ diff --git a/sys/sys/mountctl.h b/sys/sys/mountctl.h index 59df9762b2..303f7c3b7c 100644 --- a/sys/sys/mountctl.h +++ b/sys/sys/mountctl.h @@ -31,11 +31,33 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $DragonFly: src/sys/sys/mountctl.h,v 1.12 2006/05/08 18:45:53 dillon Exp $ + * $DragonFly: src/sys/sys/mountctl.h,v 1.13 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_MOUNTCTL_H_ #define _SYS_MOUNTCTL_H_ + +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _SYS_TIME_H_ +#include +#endif +#ifndef _SYS_QUEUE_H_ +#include +#endif +#ifndef _SYS_THREAD_H_ +#include +#endif + +#ifdef _KERNEL + +#ifndef _SYS_MALLOC_H_ +#include +#endif + +#endif + /* * General constants */ @@ -196,10 +218,12 @@ struct jrecord_list { #if defined(_KERNEL) +struct namecache; +struct ucred; +struct uio; struct vnode; struct vattr; struct vm_page; -struct uio; void journal_create_threads(struct journal *jo); void journal_destroy_threads(struct journal *jo, int flags); diff --git a/sys/sys/msgbuf.h b/sys/sys/msgbuf.h index ee21b4bb3f..d6b2e8ef4f 100644 --- a/sys/sys/msgbuf.h +++ b/sys/sys/msgbuf.h @@ -32,12 +32,16 @@ * * @(#)msgbuf.h 8.1 (Berkeley) 6/2/93 * $FreeBSD: src/sys/sys/msgbuf.h,v 1.14.2.1 2001/01/16 12:26:21 phk Exp $ - * $DragonFly: src/sys/sys/msgbuf.h,v 1.4 2005/10/27 00:07:17 dillon Exp $ + * $DragonFly: src/sys/sys/msgbuf.h,v 1.5 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_MSGBUF_H_ #define _SYS_MSGBUF_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif + struct msgbuf { #define MSG_MAGIC 0x063062 unsigned int msg_magic; diff --git a/sys/sys/mtio.h b/sys/sys/mtio.h index c09e6c84b0..3f184c2b46 100644 --- a/sys/sys/mtio.h +++ b/sys/sys/mtio.h @@ -32,16 +32,18 @@ * * @(#)mtio.h 8.1 (Berkeley) 6/2/93 * $FreeBSD: src/sys/sys/mtio.h,v 1.20.2.2 2001/01/22 18:02:47 mjacob Exp $ - * $DragonFly: src/sys/sys/mtio.h,v 1.3 2004/02/06 03:20:47 rob Exp $ + * $DragonFly: src/sys/sys/mtio.h,v 1.4 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_MTIO_H_ #define _SYS_MTIO_H_ -#ifndef _KERNEL +#ifndef _SYS_TYPES_H_ #include #endif +#ifndef _SYS_IOCCOM_H_ #include +#endif /* * Structures and definitions for mag tape io control commands diff --git a/sys/sys/namecache.h b/sys/sys/namecache.h index e635cfde8d..df310bd0e4 100644 --- a/sys/sys/namecache.h +++ b/sys/sys/namecache.h @@ -62,13 +62,22 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $DragonFly: src/sys/sys/namecache.h,v 1.24 2006/04/25 22:11:29 dillon Exp $ + * $DragonFly: src/sys/sys/namecache.h,v 1.25 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_NAMECACHE_H_ #define _SYS_NAMECACHE_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _SYS_QUEUE_H_ +#include +#endif + struct vnode; +struct ucred; +struct proc; TAILQ_HEAD(namecache_list, namecache); diff --git a/sys/sys/objcache.h b/sys/sys/objcache.h index 68e1cc1295..d71cae0a8a 100644 --- a/sys/sys/objcache.h +++ b/sys/sys/objcache.h @@ -29,19 +29,27 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $DragonFly: src/sys/sys/objcache.h,v 1.3 2005/07/05 20:26:50 hmp Exp $ + * $DragonFly: src/sys/sys/objcache.h,v 1.4 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _OBJCACHE_H_ #define _OBJCACHE_H_ -#ifdef _KERNEL +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _SYS_MALLOC_H_ +#include +#endif + #define OC_MFLAGS 0x0000ffff /* same as malloc flags */ typedef boolean_t (objcache_ctor_fn)(void *obj, void *private, int ocflags); typedef void (objcache_dtor_fn)(void *obj, void *private); +#ifdef _KERNEL extern objcache_dtor_fn null_dtor; +#endif /* * Underlying allocator. @@ -49,6 +57,8 @@ extern objcache_dtor_fn null_dtor; typedef void *(objcache_alloc_fn)(void *allocator_args, int ocflags); typedef void (objcache_free_fn)(void *obj, void *allocator_args); +#ifdef _KERNEL + struct objcache; struct objcache @@ -65,6 +75,8 @@ void objcache_populate_linear(struct objcache *oc, void *elts, int nelts, boolean_t objcache_reclaimlist(struct objcache *oc[], int nlist, int ocflags); void objcache_destroy(struct objcache *oc); +#endif + /* * Common underlying allocators. */ @@ -72,6 +84,9 @@ struct objcache_malloc_args { size_t objsize; malloc_type_t mtype; }; + +#ifdef _KERNEL + void *objcache_malloc_alloc(void *allocator_args, int ocflags); void objcache_malloc_free(void *obj, void *allocator_args); diff --git a/sys/sys/odisklabel.h b/sys/sys/odisklabel.h index 69b82196ce..94d08f8ac4 100644 --- a/sys/sys/odisklabel.h +++ b/sys/sys/odisklabel.h @@ -32,17 +32,24 @@ * * @(#)disklabel.h 8.2 (Berkeley) 7/10/94 * $FreeBSD: src/sys/sys/disklabel.h,v 1.49.2.7 2001/05/27 05:58:26 jkh Exp $ - * $DragonFly: src/sys/sys/Attic/odisklabel.h,v 1.13 2006/03/24 18:35:33 dillon Exp $ + * $DragonFly: src/sys/sys/Attic/odisklabel.h,v 1.14 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_DISKLABEL_H_ #define _SYS_DISKLABEL_H_ -#ifndef _KERNEL +#ifndef _SYS_TYPES_H_ #include #endif +#if defined(_KERNEL) && !defined(_SYS_SYSTM_H_) +#include +#endif +#ifndef _SYS_IOCCOM_H_ #include +#endif +#ifndef _SYS_CONF_H_ #include +#endif /* * Disk description table, see disktab(5) diff --git a/sys/sys/pciio.h b/sys/sys/pciio.h index 48a231e3a1..22ce2bf543 100644 --- a/sys/sys/pciio.h +++ b/sys/sys/pciio.h @@ -25,14 +25,19 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/sys/pciio.h,v 1.5 1999/12/08 17:44:04 ken Exp $ - * $DragonFly: src/sys/sys/pciio.h,v 1.2 2003/06/17 04:28:58 dillon Exp $ + * $DragonFly: src/sys/sys/pciio.h,v 1.3 2006/05/20 02:42:13 dillon Exp $ * */ #ifndef _SYS_PCIIO_H_ #define _SYS_PCIIO_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _SYS_IOCCOM_H_ #include +#endif #define PCI_MAXNAMELEN 16 diff --git a/sys/sys/pioctl.h b/sys/sys/pioctl.h index 54ca67628d..f0c23f6d71 100644 --- a/sys/sys/pioctl.h +++ b/sys/sys/pioctl.h @@ -34,11 +34,11 @@ * procfs ioctl definitions. * * $FreeBSD: src/sys/sys/pioctl.h,v 1.8 1999/08/28 00:51:55 peter Exp $ - * $DragonFly: src/sys/sys/pioctl.h,v 1.2 2003/06/17 04:28:58 dillon Exp $ + * $DragonFly: src/sys/sys/pioctl.h,v 1.3 2006/05/20 02:42:13 dillon Exp $ */ -#ifndef _SYS_PIOCTL_H -# define _SYS_PIOCTL_H +#ifndef _SYS_PIOCTL_H_ +#define _SYS_PIOCTL_H_ # include @@ -75,4 +75,5 @@ struct procfs_status { # define PF_LINGER 0x01 /* Keep stops around after last close */ # define PF_ISUGID 0x02 /* Ignore UID/GID changes */ + #endif diff --git a/sys/sys/pipe.h b/sys/sys/pipe.h index 344f574ec6..4004311856 100644 --- a/sys/sys/pipe.h +++ b/sys/sys/pipe.h @@ -19,21 +19,27 @@ * are met. * * $FreeBSD: src/sys/sys/pipe.h,v 1.16 1999/12/29 04:24:45 peter Exp $ - * $DragonFly: src/sys/sys/pipe.h,v 1.7 2005/03/01 23:35:16 dillon Exp $ + * $DragonFly: src/sys/sys/pipe.h,v 1.8 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_PIPE_H_ #define _SYS_PIPE_H_ -#ifndef _KERNEL +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _SYS_TIME_H_ #include /* for struct timespec */ +#endif +#ifndef _SYS_SELECT_H_ #include /* for struct selinfo */ -#include /* for PAGE_SIZE */ #endif - -#if !defined(_SYS_XIO_H_) +#ifndef _SYS_XIO_H_ #include /* for struct xio */ #endif +#ifndef _MACHINE_PARAM_H_ +#include /* for PAGE_SIZE */ +#endif /* * Pipe buffer size, keep moderate in value, pipes take kva space. diff --git a/sys/sys/power.h b/sys/sys/power.h index 1fe28a58ea..24e945d6bc 100644 --- a/sys/sys/power.h +++ b/sys/sys/power.h @@ -24,13 +24,18 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/sys/power.h,v 1.3.6.1 2003/08/18 20:22:23 jhb Exp $ - * $DragonFly: src/sys/sys/power.h,v 1.1 2003/09/24 03:32:17 drhodus Exp $ + * $DragonFly: src/sys/sys/power.h,v 1.2 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_POWER_H_ #define _SYS_POWER_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _SYS_EVENTHANDLER_H_ #include +#endif /* Power management system type */ #define POWER_PM_TYPE_APM 0x00 diff --git a/sys/sys/protosw.h b/sys/sys/protosw.h index 32596f9080..ffd7a74540 100644 --- a/sys/sys/protosw.h +++ b/sys/sys/protosw.h @@ -32,12 +32,16 @@ * * @(#)protosw.h 8.1 (Berkeley) 6/2/93 * $FreeBSD: src/sys/sys/protosw.h,v 1.28.2.2 2001/07/03 11:02:01 ume Exp $ - * $DragonFly: src/sys/sys/protosw.h,v 1.15 2005/07/15 17:54:48 eirikn Exp $ + * $DragonFly: src/sys/sys/protosw.h,v 1.16 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_PROTOSW_H_ #define _SYS_PROTOSW_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif + /* Forward declare these structures referenced from prototypes below. */ struct mbuf; struct thread; diff --git a/sys/sys/ptrace.h b/sys/sys/ptrace.h index af73eff35e..8caa654c63 100644 --- a/sys/sys/ptrace.h +++ b/sys/sys/ptrace.h @@ -32,12 +32,16 @@ * * @(#)ptrace.h 8.2 (Berkeley) 1/4/94 * $FreeBSD: src/sys/sys/ptrace.h,v 1.10.2.2 2003/01/02 20:39:13 kan Exp $ - * $DragonFly: src/sys/sys/ptrace.h,v 1.6 2005/10/27 03:15:47 sephe Exp $ + * $DragonFly: src/sys/sys/ptrace.h,v 1.7 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_PTRACE_H_ #define _SYS_PTRACE_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif + #define PT_TRACE_ME 0 /* child declares it's being traced */ #define PT_READ_I 1 /* read word in child's I space */ #define PT_READ_D 2 /* read word in child's D space */ @@ -54,7 +58,10 @@ #define PT_IO 12 /* do I/O to/from stopped process. */ #define PT_FIRSTMACH 32 /* for machine-specific requests */ + +#ifndef _MACHINE_PTRACE_H_ #include /* machine-specific requests, if any */ +#endif struct ptrace_io_desc { int piod_op; /* I/O operation */ @@ -64,23 +71,30 @@ struct ptrace_io_desc { }; /* - * * Operations in piod_op. - * */ + * Operations in piod_op. + */ #define PIOD_READ_D 1 /* Read from D space */ #define PIOD_WRITE_D 2 /* Write to D space */ #define PIOD_READ_I 3 /* Read from I space */ #define PIOD_WRITE_I 4 /* Write to I space */ #ifdef _KERNEL + +struct proc; +struct lwp; + void proc_reparent (struct proc *child, struct proc *newparent); int ptrace_set_pc (struct proc *p, unsigned long addr); int ptrace_single_step (struct lwp *lp); int ptrace_write_u (struct proc *p, vm_offset_t off, long data); int kern_ptrace (struct proc *p, int req, pid_t pid, void *addr, int data, int *res); + #else /* !_KERNEL */ +#ifndef _SYS_CDEFS_H_ #include +#endif __BEGIN_DECLS int ptrace (int, pid_t, caddr_t, int); diff --git a/sys/sys/random.h b/sys/sys/random.h index 974fbb590f..3aac6beda9 100644 --- a/sys/sys/random.h +++ b/sys/sys/random.h @@ -2,7 +2,7 @@ * random.h -- A strong random number generator * * $FreeBSD: src/sys/sys/random.h,v 1.19.2.2 2002/09/17 17:11:54 sam Exp $ - * $DragonFly: src/sys/sys/random.h,v 1.6 2005/11/02 22:59:49 dillon Exp $ + * $DragonFly: src/sys/sys/random.h,v 1.7 2006/05/20 02:42:13 dillon Exp $ * * Version 0.95, last modified 18-Oct-95 * @@ -51,11 +51,15 @@ #ifndef _SYS_RANDOM_H_ #define _SYS_RANDOM_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif #ifndef _SYS_INTERRUPT_H_ #include #endif - +#ifndef _SYS_IOCCOM_H_ #include +#endif #define MEM_SETIRQ _IOW('r', 1, u_int16_t) /* set interrupt */ #define MEM_CLEARIRQ _IOW('r', 2, u_int16_t) /* clear interrupt */ diff --git a/sys/sys/resident.h b/sys/sys/resident.h index 41fd04f464..5b79bcca48 100644 --- a/sys/sys/resident.h +++ b/sys/sys/resident.h @@ -3,12 +3,22 @@ * * Userland system calls for resident executable support. * - * $DragonFly: src/sys/sys/resident.h,v 1.3 2004/06/03 16:28:15 hmp Exp $ + * $DragonFly: src/sys/sys/resident.h,v 1.4 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_RESIDENT_H_ #define _SYS_RESIDENT_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _SYS_PARAM_H_ +#include +#endif +#ifndef _SYS_STAT_H_ +#include +#endif + #if !defined(_KERNEL) int exec_sys_register(void *); @@ -24,5 +34,5 @@ struct xresident { char res_file[MAXPATHLEN]; struct stat res_stat; }; -#endif +#endif diff --git a/sys/sys/resource.h b/sys/sys/resource.h index 46cec39ba0..5af84b4ab2 100644 --- a/sys/sys/resource.h +++ b/sys/sys/resource.h @@ -32,12 +32,19 @@ * * @(#)resource.h 8.4 (Berkeley) 1/9/95 * $FreeBSD: src/sys/sys/resource.h,v 1.12.2.2 2002/08/20 18:42:20 dillon Exp $ - * $DragonFly: src/sys/sys/resource.h,v 1.8 2004/07/27 19:18:50 drhodus Exp $ + * $DragonFly: src/sys/sys/resource.h,v 1.9 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_RESOURCE_H_ #define _SYS_RESOURCE_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _SYS_TIME_H_ +#include +#endif + /* * Process priority specifications to get/setpriority. */ diff --git a/sys/sys/resourcevar.h b/sys/sys/resourcevar.h index 9255bf23db..fa1e22399e 100644 --- a/sys/sys/resourcevar.h +++ b/sys/sys/resourcevar.h @@ -32,18 +32,27 @@ * * @(#)resourcevar.h 8.4 (Berkeley) 1/9/95 * $FreeBSD: src/sys/sys/resourcevar.h,v 1.16.2.1 2000/09/07 19:13:55 truckman Exp $ - * $DragonFly: src/sys/sys/resourcevar.h,v 1.11 2005/10/08 12:24:26 corecode Exp $ + * $DragonFly: src/sys/sys/resourcevar.h,v 1.12 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_RESOURCEVAR_H_ #define _SYS_RESOURCEVAR_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _SYS_RESOURCE_H_ #include +#endif +#ifndef _SYS_QUEUE_H_ #include - +#endif #ifndef _SYS_VARSYM_H_ #include #endif +#ifndef _SYS_TIME_H_ +#include +#endif /* * Kernel per-process accounting / statistics diff --git a/sys/sys/rman.h b/sys/sys/rman.h index 74675162e3..0c7830c284 100644 --- a/sys/sys/rman.h +++ b/sys/sys/rman.h @@ -27,13 +27,16 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/sys/rman.h,v 1.5.2.1 2001/06/05 08:06:07 imp Exp $ - * $DragonFly: src/sys/sys/rman.h,v 1.8 2005/08/07 00:31:31 joerg Exp $ + * $DragonFly: src/sys/sys/rman.h,v 1.9 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_RMAN_H_ -#define _SYS_RMAN_H_ 1 +#define _SYS_RMAN_H_ -#ifndef _KERNEL +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _SYS_QUEUE_H_ #include #endif #ifndef _MACHINE_BUS_H_ diff --git a/sys/sys/rtprio.h b/sys/sys/rtprio.h index 9ed32a44c9..a85baae35e 100644 --- a/sys/sys/rtprio.h +++ b/sys/sys/rtprio.h @@ -29,12 +29,16 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/sys/rtprio.h,v 1.9 1999/12/29 04:24:46 peter Exp $ - * $DragonFly: src/sys/sys/rtprio.h,v 1.4 2003/08/20 07:31:21 rob Exp $ + * $DragonFly: src/sys/sys/rtprio.h,v 1.5 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_RTPRIO_H_ #define _SYS_RTPRIO_H_ +#if !defined(_SYS_TYPES_H_) && !defined(LOCORE) +#include +#endif + /* * Process realtime-priority specifications to rtprio. */ diff --git a/sys/sys/sbuf.h b/sys/sys/sbuf.h index 133a1753b1..910f12dd51 100644 --- a/sys/sys/sbuf.h +++ b/sys/sys/sbuf.h @@ -26,12 +26,15 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/sys/sbuf.h,v 1.7.2.2 2002/03/12 01:00:28 archie Exp $ - * $DragonFly: src/sys/sys/sbuf.h,v 1.3 2003/11/09 02:22:37 dillon Exp $ + * $DragonFly: src/sys/sys/sbuf.h,v 1.4 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_SBUF_H_ #define _SYS_SBUF_H_ +#ifndef _SYS_CDEFS_H_ +#include +#endif #ifndef _MACHINE_STDINT_H_ #include #endif diff --git a/sys/sys/sfbuf.h b/sys/sys/sfbuf.h index d0ed4a8609..b13f3b1bb0 100644 --- a/sys/sys/sfbuf.h +++ b/sys/sys/sfbuf.h @@ -23,12 +23,20 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $DragonFly: src/sys/sys/sfbuf.h,v 1.8 2005/03/02 18:42:09 hmp Exp $ + * $DragonFly: src/sys/sys/sfbuf.h,v 1.9 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SFBUF_H_ #define _SFBUF_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _SYS_QUEUE_H_ +#include +#endif + + #if !defined(_KERNEL) && !defined(_KERNEL_STRUCTURES) #error "This file should not be included by userland programs." #endif diff --git a/sys/sys/soundcard.h b/sys/sys/soundcard.h index be4153a3a0..aee6f2b9c7 100644 --- a/sys/sys/soundcard.h +++ b/sys/sys/soundcard.h @@ -28,7 +28,7 @@ * POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/sys/soundcard.h,v 1.33.2.4 2003/06/07 21:31:56 mbr Exp $ - * $DragonFly: src/sys/sys/soundcard.h,v 1.5 2004/09/23 16:13:21 joerg Exp $ + * $DragonFly: src/sys/sys/soundcard.h,v 1.6 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_SOUNDCARD_H_ @@ -95,11 +95,15 @@ #define SNDCARD_UART16550 27 #define SNDCARD_OPL 28 +#ifndef _SYS_TYPES_H_ #include +#endif +#ifndef _MACHINE_ENDIAN_H_ #include -#ifndef _IOWR +#endif +#if !defined(_IOWR) && !defined(_SYS_IOCCOM_H_) #include -#endif /* !_IOWR */ +#endif /* * The first part of this file contains the new FreeBSD sound ioctl diff --git a/sys/sys/stat.h b/sys/sys/stat.h index 417c0be0cb..1af07cc809 100644 --- a/sys/sys/stat.h +++ b/sys/sys/stat.h @@ -33,19 +33,21 @@ * * @(#)stat.h 8.12 (Berkeley) 6/16/95 * $FreeBSD: src/sys/sys/stat.h,v 1.20 1999/12/29 04:24:47 peter Exp $ - * $DragonFly: src/sys/sys/stat.h,v 1.8 2005/08/25 18:34:17 dillon Exp $ + * $DragonFly: src/sys/sys/stat.h,v 1.9 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_STAT_H_ #define _SYS_STAT_H_ -#if !defined(_KERNEL) && !defined(_POSIX_SOURCE) +#if !defined(_POSIX_SOURCE) /* * XXX we need this for struct timespec. We get miscellaneous namespace * pollution with it. */ +#ifndef _SYS_TIME_H_ #include #endif +#endif /* _POSIX_SOURCE */ #ifdef _KERNEL #define __dev_t udev_t diff --git a/sys/sys/sysctl.h b/sys/sys/sysctl.h index 0877164cbf..5db276360f 100644 --- a/sys/sys/sysctl.h +++ b/sys/sys/sysctl.h @@ -35,14 +35,21 @@ * * @(#)sysctl.h 8.1 (Berkeley) 6/2/93 * $FreeBSD: src/sys/sys/sysctl.h,v 1.81.2.10 2003/05/01 22:48:09 trhodes Exp $ - * $DragonFly: src/sys/sys/sysctl.h,v 1.16 2005/08/07 03:17:37 hmp Exp $ + * $DragonFly: src/sys/sys/sysctl.h,v 1.17 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_SYSCTL_H_ #define _SYS_SYSCTL_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _SYS__POSIX_H_ #include +#endif +#ifndef _SYS_QUEUE_H_ #include +#endif /* * Definitions for sysctl call. The sysctl call uses a hierarchical name diff --git a/sys/sys/sysent.h b/sys/sys/sysent.h index 314da29bba..27111d1121 100644 --- a/sys/sys/sysent.h +++ b/sys/sys/sysent.h @@ -31,12 +31,16 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/sys/sysent.h,v 1.27.2.5 2002/03/17 11:08:38 alfred Exp $ - * $DragonFly: src/sys/sys/sysent.h,v 1.9 2005/11/21 21:59:52 dillon Exp $ + * $DragonFly: src/sys/sys/sysent.h,v 1.10 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_SYSENT_H_ #define _SYS_SYSENT_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif + struct proc; typedef int sy_call_t (void *); diff --git a/sys/sys/sysmsg.h b/sys/sys/sysmsg.h index 789e1b6d02..7b9e2f3bf9 100644 --- a/sys/sys/sysmsg.h +++ b/sys/sys/sysmsg.h @@ -1,7 +1,7 @@ /* * SYS/SYSMSG.H * - * $DragonFly: src/sys/sys/sysmsg.h,v 1.7 2005/10/09 21:38:04 corecode Exp $ + * $DragonFly: src/sys/sys/sysmsg.h,v 1.8 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_SYSMSG_H_ @@ -9,6 +9,9 @@ #ifdef _KERNEL +#ifndef _SYS_MSGPORT_H_ +#include +#endif #ifndef _SYS_CALLOUT_H_ #include /* for struct callout */ #endif diff --git a/sys/sys/systimer.h b/sys/sys/systimer.h index 8fccfe4c80..cf21e92fbc 100644 --- a/sys/sys/systimer.h +++ b/sys/sys/systimer.h @@ -33,12 +33,19 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $DragonFly: src/sys/sys/systimer.h,v 1.10 2005/10/25 17:26:58 dillon Exp $ + * $DragonFly: src/sys/sys/systimer.h,v 1.11 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_SYSTIMER_H_ #define _SYS_SYSTIMER_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _SYS_QUEUE_H_ +#include +#endif + struct intrframe; typedef __uint32_t sysclock_t; diff --git a/sys/sys/thread.h b/sys/sys/thread.h index bd801e0f3b..c68fc7086a 100644 --- a/sys/sys/thread.h +++ b/sys/sys/thread.h @@ -7,7 +7,7 @@ * Types which must already be defined when this header is included by * userland: struct md_thread * - * $DragonFly: src/sys/sys/thread.h,v 1.79 2006/05/19 18:26:29 dillon Exp $ + * $DragonFly: src/sys/sys/thread.h,v 1.80 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_THREAD_H_ @@ -31,6 +31,9 @@ #ifndef _SYS_SPINLOCK_H_ #include #endif +#ifndef _MACHINE_THREAD_H_ +#include +#endif struct globaldata; struct lwp; diff --git a/sys/sys/timeb.h b/sys/sys/timeb.h index 6dec7981c1..abc3648c14 100644 --- a/sys/sys/timeb.h +++ b/sys/sys/timeb.h @@ -37,12 +37,16 @@ * * @(#)timeb.h 8.2 (Berkeley) 1/21/94 * $FreeBSD: src/sys/sys/timeb.h,v 1.6.2.1 2001/12/10 20:33:59 dwmalone Exp $ - * $DragonFly: src/sys/sys/timeb.h,v 1.3 2003/08/20 07:31:21 rob Exp $ + * $DragonFly: src/sys/sys/timeb.h,v 1.4 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_TIMEB_H_ #define _SYS_TIMEB_H_ +#ifndef _SYS_TIME_H_ +#include +#endif + /* The ftime(2) system call structure -- deprecated. */ struct timeb { time_t time; /* seconds since the Epoch */ @@ -52,7 +56,10 @@ struct timeb { }; #ifndef _KERNEL + +#ifndef _SYS_CDEFS_H_ #include +#endif __BEGIN_DECLS int ftime (struct timeb *); diff --git a/sys/sys/timepps.h b/sys/sys/timepps.h index 312417a2a2..e5dcb53cc7 100644 --- a/sys/sys/timepps.h +++ b/sys/sys/timepps.h @@ -7,7 +7,7 @@ * ---------------------------------------------------------------------------- * * $FreeBSD: src/sys/sys/timepps.h,v 1.12 1999/12/29 04:24:48 peter Exp $ - * $DragonFly: src/sys/sys/timepps.h,v 1.5 2004/12/30 07:01:52 cpressey Exp $ + * $DragonFly: src/sys/sys/timepps.h,v 1.6 2006/05/20 02:42:13 dillon Exp $ * * The is a FreeBSD protype version of the "draft-mogul-pps-api-05.txt" * specification for Pulse Per Second timing interfaces. @@ -16,7 +16,12 @@ #ifndef _SYS_TIMEPPS_H_ #define _SYS_TIMEPPS_H_ +#ifndef _SYS_IOCCOM_H_ #include +#endif +#ifndef _SYS_TIME_H_ +#include +#endif #define PPS_API_VERS_1 1 diff --git a/sys/sys/timex.h b/sys/sys/timex.h index 0a020c6c15..93b9e7050c 100644 --- a/sys/sys/timex.h +++ b/sys/sys/timex.h @@ -45,7 +45,7 @@ * Created file * * $FreeBSD: src/sys/sys/timex.h,v 1.12.2.1 2001/04/22 11:19:39 jhay Exp $ - * $DragonFly: src/sys/sys/timex.h,v 1.5 2004/02/06 03:20:47 rob Exp $ + * $DragonFly: src/sys/sys/timex.h,v 1.6 2006/05/20 02:42:13 dillon Exp $ */ /* * This header file defines the Network Time Protocol (NTP) interfaces @@ -95,11 +95,15 @@ */ #ifndef _SYS_TIMEX_H_ #define _SYS_TIMEX_H_ 1 + #define NTP_API 4 /* NTP API version */ -#ifndef MSDOS /* Microsoft specific */ +#ifndef _SYS_SYSCALL_H_ #include -#endif /* MSDOS */ +#endif +#ifndef _SYS_TIME_H_ +#include +#endif /* * The following defines establish the performance envelope of the diff --git a/sys/sys/tprintf.h b/sys/sys/tprintf.h index 282198d323..b7c5969d05 100644 --- a/sys/sys/tprintf.h +++ b/sys/sys/tprintf.h @@ -32,12 +32,16 @@ * * @(#)tprintf.h 8.1 (Berkeley) 6/2/93 * $FreeBSD: src/sys/sys/tprintf.h,v 1.9 1999/08/28 00:52:06 peter Exp $ - * $DragonFly: src/sys/sys/tprintf.h,v 1.4 2004/12/30 07:01:52 cpressey Exp $ + * $DragonFly: src/sys/sys/tprintf.h,v 1.5 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_TPRINTF_H_ #define _SYS_TPRINTF_H_ +#ifndef _SYS_CDEFS_H_ +#include +#endif + #if !defined(_KERNEL) #error "This file should not be included by userland programs." #endif diff --git a/sys/sys/ucontext.h b/sys/sys/ucontext.h index 83ed58e655..bca0136cb7 100644 --- a/sys/sys/ucontext.h +++ b/sys/sys/ucontext.h @@ -26,13 +26,18 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/sys/ucontext.h,v 1.4 1999/10/11 20:33:17 luoqi Exp $ - * $DragonFly: src/sys/sys/ucontext.h,v 1.2 2003/06/17 04:28:59 dillon Exp $ + * $DragonFly: src/sys/sys/ucontext.h,v 1.3 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_UCONTEXT_H_ #define _SYS_UCONTEXT_H_ +#ifndef _SYS_SIGNAL_H_ +#include +#endif +#ifndef _MACHINE_UCONTEXT_H_ #include +#endif typedef struct __ucontext { /* diff --git a/sys/sys/ucred.h b/sys/sys/ucred.h index c66f96b7c9..441e6ba4f4 100644 --- a/sys/sys/ucred.h +++ b/sys/sys/ucred.h @@ -32,12 +32,19 @@ * * @(#)ucred.h 8.4 (Berkeley) 1/9/95 * $FreeBSD: src/sys/sys/ucred.h,v 1.14.2.5 2002/03/09 05:20:25 dd Exp $ - * $DragonFly: src/sys/sys/ucred.h,v 1.6 2003/08/20 07:31:22 rob Exp $ + * $DragonFly: src/sys/sys/ucred.h,v 1.7 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_UCRED_H_ #define _SYS_UCRED_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _SYS_PARAM_H_ +#include +#endif + struct prison; /* diff --git a/sys/sys/uio.h b/sys/sys/uio.h index cc32a3b633..e6f425eb98 100644 --- a/sys/sys/uio.h +++ b/sys/sys/uio.h @@ -32,13 +32,21 @@ * * @(#)uio.h 8.5 (Berkeley) 2/22/94 * $FreeBSD: src/sys/sys/uio.h,v 1.11.2.1 2001/09/28 16:58:35 dillon Exp $ - * $DragonFly: src/sys/sys/uio.h,v 1.11 2006/04/26 17:42:55 dillon Exp $ + * $DragonFly: src/sys/sys/uio.h,v 1.12 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_UIO_H_ #define _SYS_UIO_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _SYS_PARAM_H_ +#include +#endif +#ifndef _SYS_MALLOC_H_ #include /* Needed to inline iovec_free(). */ +#endif /* * XXX diff --git a/sys/sys/un.h b/sys/sys/un.h index dc4e5c7b61..3389b5112d 100644 --- a/sys/sys/un.h +++ b/sys/sys/un.h @@ -32,12 +32,16 @@ * * @(#)un.h 8.3 (Berkeley) 2/19/95 * $FreeBSD: src/sys/sys/un.h,v 1.17.2.1 2002/03/09 05:22:23 dd Exp $ - * $DragonFly: src/sys/sys/un.h,v 1.4 2003/08/20 07:31:22 rob Exp $ + * $DragonFly: src/sys/sys/un.h,v 1.5 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_UN_H_ #define _SYS_UN_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif + /* * Definitions for UNIX IPC domain. */ diff --git a/sys/sys/upcall.h b/sys/sys/upcall.h index 2579202492..78c9bc61c2 100644 --- a/sys/sys/upcall.h +++ b/sys/sys/upcall.h @@ -31,12 +31,15 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $DragonFly: src/sys/sys/upcall.h,v 1.9 2005/10/09 20:12:34 corecode Exp $ + * $DragonFly: src/sys/sys/upcall.h,v 1.10 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_UPCALL_H_ #define _SYS_UPCALL_H_ +struct thread; +struct lwp; + typedef void (*upcall_func_t)(void *); struct upcall { diff --git a/sys/sys/usched.h b/sys/sys/usched.h index e889bc3b3d..cba59b9ee9 100644 --- a/sys/sys/usched.h +++ b/sys/sys/usched.h @@ -3,7 +3,7 @@ * * Userland scheduler API * - * $DragonFly: src/sys/sys/usched.h,v 1.8 2006/03/23 14:04:24 drhodus Exp $ + * $DragonFly: src/sys/sys/usched.h,v 1.9 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_USCHED_H_ @@ -11,12 +11,19 @@ #if defined(_KERNEL) || defined(_KERNEL_STRUCTURES) +#ifndef _SYS_TYPES_H_ +#include +#endif #ifndef _SYS_QUEUE_H_ #include #endif +#ifndef _SYS_SYSTIMER_H_ +#include +#endif #define NAME_LENGTH 32 +struct lwp; struct proc; struct globaldata; diff --git a/sys/sys/user.h b/sys/sys/user.h index 73fb9db91f..7525cd2d53 100644 --- a/sys/sys/user.h +++ b/sys/sys/user.h @@ -32,14 +32,12 @@ * * @(#)user.h 8.2 (Berkeley) 9/23/93 * $FreeBSD: src/sys/sys/user.h,v 1.24.2.1 2001/10/11 08:20:18 peter Exp $ - * $DragonFly: src/sys/sys/user.h,v 1.13 2006/03/27 09:02:07 joerg Exp $ + * $DragonFly: src/sys/sys/user.h,v 1.14 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_USER_H_ #define _SYS_USER_H_ -#ifndef _KERNEL - /* * stuff that *used* to be included by user.h, or is now needed. The * expectation here is that the user program wants to mess with kernel @@ -52,27 +50,55 @@ #ifndef _KERNEL_STRUCTURES #define _KERNEL_STRUCTURES #endif + +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _SYS_ERRNO_H_ #include +#endif +#ifndef _SYS_TIME_H_ #include +#endif +#ifndef _SYS_RESOURCE_H_ #include +#endif +#ifndef _SYS_UCRED_H_ #include +#endif +#ifndef _SYS_UIO_H_ #include +#endif +#ifndef _SYS_PROC_H_ #include +#endif +#ifndef _SYS_LOCK_H_ #include /* XXX */ +#endif +#ifndef _VM_VM_H_ #include /* XXX */ +#endif +#ifndef _VM_PARAM_H_ #include /* XXX */ +#endif +#ifndef _VM_PMAP_H_ #include /* XXX */ +#endif +#ifndef _VM_MAP_H_ #include /* XXX */ -#endif /* !_KERNEL */ +#endif #ifndef _SYS_RESOURCEVAR_H_ #include #endif #ifndef _SYS_SIGNALVAR_H_ #include #endif - +#ifndef _MACHINE_PCB_H_ #include +#endif +#ifndef _MACHINE_COREDUMP_H_ #include +#endif /* * KERN_PROC subtype ops return arrays of augmented proc structures: diff --git a/sys/sys/utsname.h b/sys/sys/utsname.h index ece3c5c2c9..8ff4095c37 100644 --- a/sys/sys/utsname.h +++ b/sys/sys/utsname.h @@ -35,11 +35,11 @@ * * @(#)utsname.h 8.1 (Berkeley) 1/4/94 * $FreeBSD: src/sys/sys/utsname.h,v 1.7 1999/12/29 04:24:49 peter Exp $ - * $DragonFly: src/sys/sys/utsname.h,v 1.3 2003/08/20 07:31:22 rob Exp $ + * $DragonFly: src/sys/sys/utsname.h,v 1.4 2006/05/20 02:42:13 dillon Exp $ */ -#ifndef _SYS_UTSNAME_H -#define _SYS_UTSNAME_H +#ifndef _SYS_UTSNAME_H_ +#define _SYS_UTSNAME_H_ #define SYS_NMLN 32 @@ -67,4 +67,4 @@ extern int uname(); extern struct utsname utsname; #endif /* _KERNEL */ -#endif /* !_SYS_UTSNAME_H */ +#endif /* !_SYS_UTSNAME_H_ */ diff --git a/sys/sys/vfscache.h b/sys/sys/vfscache.h index f90865a5e4..462bb37e58 100644 --- a/sys/sys/vfscache.h +++ b/sys/sys/vfscache.h @@ -63,7 +63,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $DragonFly: src/sys/sys/vfscache.h,v 1.6 2006/05/14 18:07:29 swildner Exp $ + * $DragonFly: src/sys/sys/vfscache.h,v 1.7 2006/05/20 02:42:13 dillon Exp $ */ /* * This module serves as a focal point for virtually all filesystem and @@ -84,6 +84,12 @@ #ifndef _SYS_VFSCACHE_H_ #define _SYS_VFSCACHE_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _SYS_TIME_H_ +#include +#endif #ifndef _SYS_VFSOPS_H_ #include #endif diff --git a/sys/sys/vmmeter.h b/sys/sys/vmmeter.h index b85d9181d5..264e5ffe0d 100644 --- a/sys/sys/vmmeter.h +++ b/sys/sys/vmmeter.h @@ -32,12 +32,16 @@ * * @(#)vmmeter.h 8.2 (Berkeley) 7/10/94 * $FreeBSD: src/sys/sys/vmmeter.h,v 1.21.2.2 2002/10/10 19:28:21 dillon Exp $ - * $DragonFly: src/sys/sys/vmmeter.h,v 1.9 2004/08/12 19:59:30 eirikn Exp $ + * $DragonFly: src/sys/sys/vmmeter.h,v 1.10 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_VMMETER_H_ #define _SYS_VMMETER_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif + /* * System wide statistics counters. */ diff --git a/sys/sys/wait.h b/sys/sys/wait.h index 5e009d1dcc..6234fa4dd0 100644 --- a/sys/sys/wait.h +++ b/sys/sys/wait.h @@ -32,7 +32,7 @@ * * @(#)wait.h 8.2 (Berkeley) 7/10/94 * $FreeBSD: src/sys/sys/wait.h,v 1.11 1999/12/29 04:24:50 peter Exp $ - * $DragonFly: src/sys/sys/wait.h,v 1.4 2004/09/23 16:11:47 joerg Exp $ + * $DragonFly: src/sys/sys/wait.h,v 1.5 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_WAIT_H_ @@ -91,7 +91,9 @@ #define WAIT_ANY (-1) /* any process */ #define WAIT_MYPGRP 0 /* any process in my process group */ +#ifndef _MACHINE_ENDIAN_H_ #include +#endif /* * Deprecated: @@ -148,8 +150,12 @@ union wait { #endif /* _POSIX_SOURCE */ #ifndef _KERNEL +#ifndef _SYS_TYPES_H_ #include +#endif +#ifndef _SYS_CDEFS_H_ #include +#endif __BEGIN_DECLS struct rusage; /* forward declaration */ diff --git a/sys/sys/wormio.h b/sys/sys/wormio.h index fb301f4711..c8cc3044c3 100644 --- a/sys/sys/wormio.h +++ b/sys/sys/wormio.h @@ -1,11 +1,16 @@ /* Shared between kernel & process */ /* $FreeBSD: src/sys/sys/wormio.h,v 1.6 1999/10/01 14:10:50 peter Exp $ */ -/* $DragonFly: src/sys/sys/Attic/wormio.h,v 1.2 2003/06/17 04:28:59 dillon Exp $ */ +/* $DragonFly: src/sys/sys/Attic/wormio.h,v 1.3 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_WORMIO_H_ #define _SYS_WORMIO_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _SYS_IOCCOM_H_ #include +#endif /***************************************************************\ * Ioctls for the WORM drive * diff --git a/sys/sys/xio.h b/sys/sys/xio.h index 8f02b1fd02..42773b0069 100644 --- a/sys/sys/xio.h +++ b/sys/sys/xio.h @@ -31,7 +31,7 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $DragonFly: src/sys/sys/xio.h,v 1.6 2005/03/01 23:35:16 dillon Exp $ + * $DragonFly: src/sys/sys/xio.h,v 1.7 2006/05/20 02:42:13 dillon Exp $ */ /* @@ -52,9 +52,18 @@ #if defined(_KERNEL) || defined(_KERNEL_STRUCTURES) +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _SYS_UIO_H_ +#include +#endif #ifndef _SYS_MSGPORT_H_ #include #endif +#ifndef _MACHINE_PARAM_H_ +#include +#endif #define XIO_INTERNAL_PAGES btoc(MAXPHYS) #define XIO_INTERNAL_SIZE (XIO_INTERNAL_PAGES * PAGE_SIZE) diff --git a/sys/sys/xrpuio.h b/sys/sys/xrpuio.h index 0a53a98888..1e8e97de0c 100644 --- a/sys/sys/xrpuio.h +++ b/sys/sys/xrpuio.h @@ -7,14 +7,19 @@ * ---------------------------------------------------------------------------- * * $FreeBSD: src/sys/sys/xrpuio.h,v 1.2 1999/08/28 00:52:12 peter Exp $ - * $DragonFly: src/sys/sys/Attic/xrpuio.h,v 1.2 2003/06/17 04:28:59 dillon Exp $ + * $DragonFly: src/sys/sys/Attic/xrpuio.h,v 1.3 2006/05/20 02:42:13 dillon Exp $ * */ #ifndef _SYS_XRPUIO_H_ #define _SYS_XRPUIO_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _SYS_IOCCOM_H_ #include +#endif #define XRPU_MAX_PPS 16 struct xrpu_timecounting { diff --git a/sys/sys/xwait.h b/sys/sys/xwait.h index c12a5bf933..b392a0fd97 100644 --- a/sys/sys/xwait.h +++ b/sys/sys/xwait.h @@ -1,12 +1,16 @@ /* * SYS/XWAIT.H * - * $DragonFly: src/sys/sys/xwait.h,v 1.1 2003/06/21 07:54:57 dillon Exp $ + * $DragonFly: src/sys/sys/xwait.h,v 1.2 2006/05/20 02:42:13 dillon Exp $ */ #ifndef _SYS_XWAIT_H_ #define _SYS_XWAIT_H_ +#ifndef _SYS_QUEUE_H_ +#include +#endif + struct proc; /* diff --git a/sys/vm/pmap.h b/sys/vm/pmap.h index b0922c685a..77148a2008 100644 --- a/sys/vm/pmap.h +++ b/sys/vm/pmap.h @@ -62,7 +62,7 @@ * rights to redistribute these changes. * * $FreeBSD: src/sys/vm/pmap.h,v 1.33.2.4 2002/03/06 22:44:24 silby Exp $ - * $DragonFly: src/sys/vm/pmap.h,v 1.16 2005/11/14 18:50:15 dillon Exp $ + * $DragonFly: src/sys/vm/pmap.h,v 1.17 2006/05/20 02:42:15 dillon Exp $ */ /* @@ -70,25 +70,23 @@ * section. [For machine-dependent section, see "machine/pmap.h".] */ -#ifndef _PMAP_VM_ -#define _PMAP_VM_ +#ifndef _VM_PMAP_H_ +#define _VM_PMAP_H_ -/* - * Each machine dependent implementation is expected to - * keep certain statistics. They may do this anyway they - * so choose, but are expected to return the statistics - * in the following structure. - */ -struct pmap_statistics { - long resident_count; /* # of pages mapped (total) */ - long wired_count; /* # of pages wired */ -}; -typedef struct pmap_statistics *pmap_statistics_t; +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _MACHINE_PMAP_H_ #include +#endif #ifdef _KERNEL +#ifndef _VM_VM_H_ +#include +#endif + struct proc; struct thread; @@ -149,4 +147,4 @@ void pmap_init2 (void); #endif /* _KERNEL */ -#endif /* _PMAP_VM_ */ +#endif /* _VM_PMAP_H_ */ diff --git a/sys/vm/swap_pager.h b/sys/vm/swap_pager.h index 19a9c8cebb..4860aef236 100644 --- a/sys/vm/swap_pager.h +++ b/sys/vm/swap_pager.h @@ -37,7 +37,7 @@ * * from: @(#)swap_pager.h 7.1 (Berkeley) 12/5/90 * $FreeBSD: src/sys/vm/swap_pager.h,v 1.28.2.1 2000/10/13 07:13:23 dillon Exp $ - * $DragonFly: src/sys/vm/swap_pager.h,v 1.3 2003/08/20 08:03:01 rob Exp $ + * $DragonFly: src/sys/vm/swap_pager.h,v 1.4 2006/05/20 02:42:15 dillon Exp $ */ /* @@ -45,8 +45,15 @@ * 18 Dec 93. */ -#ifndef _SWAP_PAGER_ -#define _SWAP_PAGER_ 1 +#ifndef _VM_SWAP_PAGER_H_ +#define _VM_SWAP_PAGER_H_ + +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _VM_VM_OBJECT_H_ +#include +#endif /* * SWB_NPAGES must be a power of 2. It may be set to 1, 2, 4, 8, or 16 @@ -108,4 +115,4 @@ void swstrategy (struct buf *bp); /* probably needs to move elsewhere */ #endif -#endif /* _SWAP_PAGER_ */ +#endif /* _VM_SWAP_PAGER_H_ */ diff --git a/sys/vm/vm.h b/sys/vm/vm.h index 3f1f03793b..8fb591c5cd 100644 --- a/sys/vm/vm.h +++ b/sys/vm/vm.h @@ -60,11 +60,15 @@ * rights to redistribute these changes. * * $FreeBSD: src/sys/vm/vm.h,v 1.16.2.1 2002/12/28 19:49:41 dillon Exp $ - * $DragonFly: src/sys/vm/vm.h,v 1.4 2004/12/15 09:44:45 dillon Exp $ + * $DragonFly: src/sys/vm/vm.h,v 1.5 2006/05/20 02:42:15 dillon Exp $ */ -#ifndef VM_H -#define VM_H +#ifndef VM_VM_H_ +#define VM_VM_H_ + +#ifndef _SYS_TYPES_H_ +#include +#endif typedef char vm_inherit_t; /* inheritance codes */ @@ -110,4 +114,4 @@ struct vm_page; typedef struct vm_page *vm_page_t; #endif -#endif /* VM_H */ +#endif /* VM_VM_H_ */ diff --git a/sys/vm/vm_extern.h b/sys/vm/vm_extern.h index ed2f85edef..57995bb6e7 100644 --- a/sys/vm/vm_extern.h +++ b/sys/vm/vm_extern.h @@ -32,11 +32,21 @@ * * @(#)vm_extern.h 8.2 (Berkeley) 1/12/94 * $FreeBSD: src/sys/vm/vm_extern.h,v 1.46.2.3 2003/01/13 22:51:17 dillon Exp $ - * $DragonFly: src/sys/vm/vm_extern.h,v 1.15 2006/03/15 07:58:37 dillon Exp $ + * $DragonFly: src/sys/vm/vm_extern.h,v 1.16 2006/05/20 02:42:15 dillon Exp $ */ -#ifndef _VM_EXTERN_H_ -#define _VM_EXTERN_H_ +#ifndef _VM_VM_EXTERN_H_ +#define _VM_VM_EXTERN_H_ + +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _VM_VM_MAP_H_ +#include +#endif +#ifndef _MACHINE_TYPES_H_ +#include +#endif struct buf; struct proc; @@ -108,4 +118,4 @@ kmem_alloc (vm_map_t map, vm_size_t size) #endif /* _KERNEL */ -#endif /* !_VM_EXTERN_H_ */ +#endif /* !_VM_VM_EXTERN_H_ */ diff --git a/sys/vm/vm_kern.h b/sys/vm/vm_kern.h index 6f47d66a25..08b15482df 100644 --- a/sys/vm/vm_kern.h +++ b/sys/vm/vm_kern.h @@ -62,11 +62,18 @@ * rights to redistribute these changes. * * $FreeBSD: src/sys/vm/vm_kern.h,v 1.22 2000/02/16 21:11:31 dillon Exp $ - * $DragonFly: src/sys/vm/vm_kern.h,v 1.9 2004/07/31 07:52:51 dillon Exp $ + * $DragonFly: src/sys/vm/vm_kern.h,v 1.10 2006/05/20 02:42:15 dillon Exp $ */ #ifndef _VM_VM_KERN_H_ -#define _VM_VM_KERN_H_ 1 +#define _VM_VM_KERN_H_ + +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _VM_VM_MAP_H_ +#include +#endif /* * kmem_alloc3() flags diff --git a/sys/vm/vm_map.h b/sys/vm/vm_map.h index 84b3365880..8aa9053dbc 100644 --- a/sys/vm/vm_map.h +++ b/sys/vm/vm_map.h @@ -62,17 +62,32 @@ * rights to redistribute these changes. * * $FreeBSD: src/sys/vm/vm_map.h,v 1.54.2.5 2003/01/13 22:51:17 dillon Exp $ - * $DragonFly: src/sys/vm/vm_map.h,v 1.21 2006/05/17 17:47:58 dillon Exp $ + * $DragonFly: src/sys/vm/vm_map.h,v 1.22 2006/05/20 02:42:15 dillon Exp $ */ /* * Virtual memory map module definitions. */ -#ifndef _VM_MAP_ -#define _VM_MAP_ +#ifndef _VM_VM_MAP_H_ +#define _VM_VM_MAP_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _SYS_TREE_H_ #include +#endif +#ifndef _SYS_LOCK_H_ +#include +#endif +#ifndef _VM_VM_H_ +#include +#endif +#ifndef _MACHINE_PMAP_H_ +#include +#endif + struct vm_map_rb_tree; RB_PROTOTYPE(vm_map_rb_tree, vm_map_entry, rb_entry, rb_vm_map_compare); @@ -429,4 +444,4 @@ int vmspace_swap_count (struct vmspace *vmspace); void vm_map_set_wired_quick(vm_map_t map, vm_offset_t addr, vm_size_t size, int *); #endif -#endif /* _VM_MAP_ */ +#endif /* _VM_VM_MAP_H_ */ diff --git a/sys/vm/vm_object.h b/sys/vm/vm_object.h index 0a136366cd..9da954bb8d 100644 --- a/sys/vm/vm_object.h +++ b/sys/vm/vm_object.h @@ -62,22 +62,40 @@ * rights to redistribute these changes. * * $FreeBSD: src/sys/vm/vm_object.h,v 1.63.2.3 2003/05/26 19:17:56 alc Exp $ - * $DragonFly: src/sys/vm/vm_object.h,v 1.9 2006/05/17 17:47:58 dillon Exp $ + * $DragonFly: src/sys/vm/vm_object.h,v 1.10 2006/05/20 02:42:15 dillon Exp $ */ /* * Virtual memory object module definitions. */ -#ifndef _VM_OBJECT_ -#define _VM_OBJECT_ +#ifndef _VM_VM_OBJECT_H_ +#define _VM_VM_OBJECT_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif +#if defined(_KERNEL) && !defined(_SYS_SYSTM_H_) +#include +#endif +#ifndef _SYS_QUEUE_H_ #include +#endif +#ifndef _MACHINE_ATOMIC_H_ #include +#endif +#ifndef _VM_VM_H_ +#include +#endif + #ifdef _KERNEL + +#ifndef _SYS_THREAD2_H_ #include #endif +#endif + enum obj_type { OBJT_DEFAULT, OBJT_SWAP, /* object backed by swap blocks */ @@ -269,4 +287,4 @@ void vm_object_madvise (vm_object_t, vm_pindex_t, int, int); void vm_object_init2 (void); #endif /* _KERNEL */ -#endif /* _VM_OBJECT_ */ +#endif /* _VM_VM_OBJECT_H_ */ diff --git a/sys/vm/vm_page.h b/sys/vm/vm_page.h index ef44bf434f..cef109c873 100644 --- a/sys/vm/vm_page.h +++ b/sys/vm/vm_page.h @@ -62,26 +62,44 @@ * rights to redistribute these changes. * * $FreeBSD: src/sys/vm/vm_page.h,v 1.75.2.8 2002/03/06 01:07:09 dillon Exp $ - * $DragonFly: src/sys/vm/vm_page.h,v 1.22 2005/08/27 00:56:57 dillon Exp $ + * $DragonFly: src/sys/vm/vm_page.h,v 1.23 2006/05/20 02:42:15 dillon Exp $ */ /* * Resident memory system definitions. */ -#ifndef _VM_PAGE_H_ -#define _VM_PAGE_H_ +#ifndef _VM_VM_PAGE_H_ +#define _VM_VM_PAGE_H_ #if !defined(KLD_MODULE) && defined(_KERNEL) #include "opt_vmpage.h" #endif +#ifndef _SYS_TYPES_H_ +#include +#endif +#if defined(_KERNEL) && !defined(_SYS_SYSTM_H_) +#include +#endif +#ifndef _MACHINE_PMAP_H_ +#include +#endif +#ifndef _VM_PMAP_H_ #include +#endif +#ifndef _MACHINE_ATOMIC_H_ #include +#endif + #ifdef _KERNEL + +#ifndef _SYS_THREAD2_H_ #include #endif +#endif + /* * Management of resident (logical) pages. * @@ -583,4 +601,4 @@ vm_page_undirty(vm_page_t m) } #endif /* _KERNEL */ -#endif /* !_VM_PAGE_ */ +#endif /* !_VM_VM_PAGE_H_ */ diff --git a/sys/vm/vm_page2.h b/sys/vm/vm_page2.h index 8e5bdbe4ff..7fb1c71125 100644 --- a/sys/vm/vm_page2.h +++ b/sys/vm/vm_page2.h @@ -32,11 +32,11 @@ * * @(#)vmmeter.h 8.2 (Berkeley) 7/10/94 * $FreeBSD: src/sys/sys/vmmeter.h,v 1.21.2.2 2002/10/10 19:28:21 dillon Exp $ - * $DragonFly: src/sys/vm/vm_page2.h,v 1.1 2003/07/03 17:24:04 dillon Exp $ + * $DragonFly: src/sys/vm/vm_page2.h,v 1.2 2006/05/20 02:42:15 dillon Exp $ */ -#ifndef _VM_VMPAGE2_H_ -#define _VM_VMPAGE2_H_ +#ifndef _VM_VM_PAGE2_H_ +#define _VM_VM_PAGE2_H_ #ifndef _SYS_VMMETER_H_ #include @@ -132,5 +132,5 @@ vm_paging_needed(void) } #endif /* _KERNEL */ -#endif +#endif /* _VM_VM_PAGE2_H_ */ diff --git a/sys/vm/vm_pageout.h b/sys/vm/vm_pageout.h index 0bd24810fa..12ce8697da 100644 --- a/sys/vm/vm_pageout.h +++ b/sys/vm/vm_pageout.h @@ -62,12 +62,16 @@ * rights to redistribute these changes. * * $FreeBSD: src/sys/vm/vm_pageout.h,v 1.26.2.1 2002/02/26 05:49:28 silby Exp $ - * $DragonFly: src/sys/vm/vm_pageout.h,v 1.6 2006/03/15 07:58:37 dillon Exp $ + * $DragonFly: src/sys/vm/vm_pageout.h,v 1.7 2006/05/20 02:42:15 dillon Exp $ */ #ifndef _VM_VM_PAGEOUT_H_ #define _VM_VM_PAGEOUT_H_ +#ifndef _VM_VM_PAGE_H_ +#include +#endif + /* * Header file for pageout daemon. */ @@ -114,4 +118,4 @@ void vm_pageout_page_free (vm_page_t); #endif -#endif +#endif /* _VM_VM_PAGEOUT_H_ */ diff --git a/sys/vm/vm_pager.h b/sys/vm/vm_pager.h index 6d9a548f36..148b00ed5d 100644 --- a/sys/vm/vm_pager.h +++ b/sys/vm/vm_pager.h @@ -37,17 +37,25 @@ * * @(#)vm_pager.h 8.4 (Berkeley) 1/12/94 * $FreeBSD: src/sys/vm/vm_pager.h,v 1.24.2.2 2002/12/31 09:34:51 dillon Exp $ - * $DragonFly: src/sys/vm/vm_pager.h,v 1.7 2006/03/27 01:54:18 dillon Exp $ + * $DragonFly: src/sys/vm/vm_pager.h,v 1.8 2006/05/20 02:42:15 dillon Exp $ */ /* * Pager routine interface definition. */ -#ifndef _VM_PAGER_ -#define _VM_PAGER_ +#ifndef _VM_VM_PAGER_H_ +#define _VM_VM_PAGER_H_ +#ifndef _SYS_QUEUE_H_ #include +#endif +#ifndef _VM_VM_PAGE_H_ +#include +#endif +#ifndef _VM_VM_OBJECT_H_ +#include +#endif TAILQ_HEAD(pagerlst, vm_object); @@ -186,4 +194,4 @@ vm_pager_page_unswapped(vm_page_t m) #endif -#endif /* _VM_PAGER_ */ +#endif /* _VM_VM_PAGER_H_ */ diff --git a/sys/vm/vm_param.h b/sys/vm/vm_param.h index 92c48f879a..3009bd30af 100644 --- a/sys/vm/vm_param.h +++ b/sys/vm/vm_param.h @@ -62,17 +62,22 @@ * rights to redistribute these changes. * * $FreeBSD: src/sys/vm/vm_param.h,v 1.13.2.1 2001/11/03 01:41:10 ps Exp $ - * $DragonFly: src/sys/vm/vm_param.h,v 1.3 2006/04/01 22:20:19 dillon Exp $ + * $DragonFly: src/sys/vm/vm_param.h,v 1.4 2006/05/20 02:42:15 dillon Exp $ */ /* * Machine independent virtual memory parameters. */ -#ifndef _VM_PARAM_ -#define _VM_PARAM_ +#ifndef _VM_VM_PARAM_H_ +#define _VM_VM_PARAM_H_ +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _MACHINE_VMPARAM_H_ #include +#endif /* * CTL_VM identifiers @@ -128,4 +133,4 @@ extern u_quad_t maxssiz; extern u_quad_t sgrowsiz; #endif /* _KERNEL */ #endif /* ASSEMBLER */ -#endif /* _VM_PARAM_ */ +#endif /* _VM_VM_PARAM_H_ */ diff --git a/sys/vm/vm_zone.h b/sys/vm/vm_zone.h index 1ab6d08152..45f1040104 100644 --- a/sys/vm/vm_zone.h +++ b/sys/vm/vm_zone.h @@ -12,11 +12,11 @@ * John S. Dyson. * * $FreeBSD: src/sys/vm/vm_zone.h,v 1.13.2.2 2002/10/10 19:50:16 dillon Exp $ - * $DragonFly: src/sys/vm/vm_zone.h,v 1.7 2005/09/21 19:48:05 hsu Exp $ + * $DragonFly: src/sys/vm/vm_zone.h,v 1.8 2006/05/20 02:42:15 dillon Exp $ */ -#ifndef _SYS_ZONE_H -#define _SYS_ZONE_H +#ifndef _VM_VM_ZONE_H_ +#define _VM_VM_ZONE_H_ #define ZONE_INTERRUPT 0x0001 /* If you need to allocate at int time */ #define ZONE_PANICFAIL 0x0002 /* panic if the zalloc fails */ @@ -58,4 +58,4 @@ void zfree (vm_zone_t z, void *item); void zbootinit (vm_zone_t z, char *name, int size, void *item, int nitems); -#endif +#endif /* _VM_VM_ZONE_H_ */ diff --git a/sys/vm/vnode_pager.h b/sys/vm/vnode_pager.h index 723445c58d..969924448f 100644 --- a/sys/vm/vnode_pager.h +++ b/sys/vm/vnode_pager.h @@ -37,13 +37,21 @@ * * @(#)vnode_pager.h 8.1 (Berkeley) 6/11/93 * $FreeBSD: src/sys/vm/vnode_pager.h,v 1.14 1999/12/29 04:55:12 peter Exp $ - * $DragonFly: src/sys/vm/vnode_pager.h,v 1.5 2006/03/27 01:54:18 dillon Exp $ + * $DragonFly: src/sys/vm/vnode_pager.h,v 1.6 2006/05/20 02:42:15 dillon Exp $ */ -#ifndef _VNODE_PAGER_ -#define _VNODE_PAGER_ 1 +#ifndef _VM_VNODE_PAGER_H_ +#define _VM_VNODE_PAGER_H_ #ifdef _KERNEL + +#ifndef _SYS_TYPES_H_ +#include +#endif +#ifndef _VM_VM_OBJECT_H_ +#include +#endif + vm_object_t vnode_pager_alloc (void *, off_t, vm_prot_t, off_t); void vnode_pager_freepage (vm_page_t); struct vnode *vnode_pager_lock (vm_object_t); @@ -57,4 +65,4 @@ int vnode_pager_generic_putpages (struct vnode *, vm_page_t *, int, boolean_t, int *); #endif -#endif /* _VNODE_PAGER_ */ +#endif /* _VM_VNODE_PAGER_H_ */ -- 2.41.0