Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 1 Feb 1997 05:04:58 +1100 (EST)
From:      Julian Assange <proff@iq.org>
To:        FreeBSD-gnats-submit@freebsd.org, dyson@freebsd.org
Subject:   kern/2628: code clean up of sys/sys
Message-ID:  <199701311804.FAA02492@profane.iq.org>
Resent-Message-ID: <199701311810.KAA04318@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         2628
>Category:       kern
>Synopsis:       code clean up of sys/sys
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jan 31 10:10:01 PST 1997
>Last-Modified:
>Originator:     Julian Assange
>Organization:
>Release:        FreeBSD 3.0-CURRENT i386
>Environment:

	

>Description:

sys/sys (usr/include/sys) contains unresolved dependencies and sloppy use (or non-use)
of -DKERNEL. 

	

>How-To-Repeat:

	

>Fix:
	
	

(you also need to apply my vnode_if.sh fix.. see next pr)

Index: src/sys/sys/acct.h
diff -c src/sys/sys/acct.h:1.7 src/sys/sys/acct.h:1.7.2.1
*** src/sys/sys/acct.h:1.7	Tue Jan 14 17:54:32 1997
--- src/sys/sys/acct.h	Sat Feb  1 04:49:22 1997
***************
*** 42,47 ****
--- 42,51 ----
  #ifndef _SYS_ACCT_H_
  #define _SYS_ACCT_H_
  
+ #ifndef KERNEL
+ #include <sys/types.h>
+ #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
Index: src/sys/sys/buf.h
diff -c src/sys/sys/buf.h:1.37 src/sys/sys/buf.h:1.37.2.1
*** src/sys/sys/buf.h:1.37	Tue Jan 14 17:54:34 1997
--- src/sys/sys/buf.h	Sat Feb  1 04:49:22 1997
***************
*** 42,47 ****
--- 42,50 ----
  #ifndef _SYS_BUF_H_
  #define	_SYS_BUF_H_
  
+ #include <sys/cdefs.h>
+ #include <sys/types.h>
+ #include <sys/param.h>
  #include <sys/queue.h>
  
  #define NOLIST ((struct buf *)0x87654321)
Index: src/sys/sys/callout.h
diff -c src/sys/sys/callout.h:1.5 src/sys/sys/callout.h:1.5.2.1
*** src/sys/sys/callout.h:1.5	Tue Jan 14 17:54:35 1997
--- src/sys/sys/callout.h	Sat Feb  1 04:49:22 1997
***************
*** 42,47 ****
--- 42,49 ----
  #ifndef _SYS_CALLOUT_H_
  #define _SYS_CALLOUT_H_
  
+ #include <sys/cdefs.h>
+ 
  struct callout {
  	struct	callout *c_next;		/* next callout in queue */
  	void	*c_arg;				/* function argument */
Index: src/sys/sys/ccdvar.h
diff -c src/sys/sys/ccdvar.h:1.5 src/sys/sys/ccdvar.h:1.5.2.1
*** src/sys/sys/ccdvar.h:1.5	Tue Jan 14 17:54:36 1997
--- src/sys/sys/ccdvar.h	Sat Feb  1 04:49:22 1997
***************
*** 85,90 ****
--- 85,93 ----
   *	Moffett Field, CA 94035
   */
  
+ #include <sys/types.h>
+ #include <sys/disk.h>
+ 
  /*
   * A concatenated disk is described at initialization time by this structure.
   */
Index: src/sys/sys/clist.h
diff -c src/sys/sys/clist.h:1.6 src/sys/sys/clist.h:1.6.2.1
*** src/sys/sys/clist.h:1.6	Tue Jan 14 17:54:39 1997
--- src/sys/sys/clist.h	Sat Feb  1 04:49:23 1997
***************
*** 37,42 ****
--- 37,44 ----
  #ifndef _SYS_CLIST_H_
  #define _SYS_CLIST_H_
  
+ #include <sys/param.h>
+ 
  struct cblock {
  	struct cblock *c_next;			/* next cblock in queue */
  	unsigned char c_quote[CBQSIZE];		/* quoted characters */
Index: src/sys/sys/conf.h
diff -c src/sys/sys/conf.h:1.32 src/sys/sys/conf.h:1.32.2.1
*** src/sys/sys/conf.h:1.32	Tue Jan 14 17:54:40 1997
--- src/sys/sys/conf.h	Sat Feb  1 04:49:23 1997
***************
*** 42,47 ****
--- 42,51 ----
  #ifndef _SYS_CONF_H_
  #define	_SYS_CONF_H_
  
+ #ifndef KERNEL
+ #include <sys/types.h>
+ #endif
+ 
  /*
   * Definitions of device driver entry switches
   */
Index: src/sys/sys/devfsext.h
diff -c src/sys/sys/devfsext.h:1.14 src/sys/sys/devfsext.h:1.14.2.1
*** src/sys/sys/devfsext.h:1.14	Tue Jan 14 17:54:41 1997
--- src/sys/sys/devfsext.h	Sat Feb  1 04:49:23 1997
***************
*** 7,12 ****
--- 7,13 ----
  #ifndef _SYS_DEVFSECT_H_
  #define _SYS_DEVFSECT_H_ 1
  
+ #ifdef KERNEL
  void *devfs_add_devswf(void *devsw,
  		int minor,
  		int chrblk,
***************
*** 22,27 ****
--- 23,29 ----
  
  /* remove the device the cookie represents */
  void devfs_remove_dev(void *devnmp);
+ #endif
  
  #define DV_CHR 0
  #define DV_BLK 1
Index: src/sys/sys/device.h
diff -c src/sys/sys/device.h:1.5 src/sys/sys/device.h:1.5.2.1
*** src/sys/sys/device.h:1.5	Tue Jan 14 17:54:42 1997
--- src/sys/sys/device.h	Sat Feb  1 04:49:23 1997
***************
*** 46,51 ****
--- 46,56 ----
  #ifndef _SYS_DEVICE_H_
  #define	_SYS_DEVICE_H_
  
+ #include <sys/cdefs.h>
+ #ifndef KERNEL
+ #include <sys/types.h>
+ #endif
+ 
  /*
   * Minimal device structures.
   * Note that all ``system'' device types are listed here.
***************
*** 133,138 ****
--- 138,144 ----
  	int	pdev_count;
  };
  
+ #ifdef KERNEL
  extern struct	device *alldevs;	/* head of list of all devices */
  extern struct	evcnt *allevents;	/* head of list of all events */
  
***************
*** 142,145 ****
--- 148,152 ----
  int config_rootfound __P((char *, void *));
  void config_attach __P((struct device *, struct cfdata *, void *, cfprint_t));
  void evcnt_attach __P((struct device *, const char *, struct evcnt *));
+ #endif
  #endif /* !_SYS_DEVICE_H_ */
Index: src/sys/sys/dirent.h
diff -c src/sys/sys/dirent.h:1.6 src/sys/sys/dirent.h:1.6.2.1
*** src/sys/sys/dirent.h:1.6	Tue Jan 14 17:54:44 1997
--- src/sys/sys/dirent.h	Sat Feb  1 04:49:24 1997
***************
*** 37,42 ****
--- 37,46 ----
  #ifndef _SYS_DIRENT_H_
  #define _SYS_DIRENT_H_
  
+ #ifndef KERNEL
+ #include <sys/types.h>
+ #endif
+ 
  /*
   * The dirent structure defines the format of directory entries returned by
   * the getdirentries(2) system call.
Index: src/sys/sys/disk.h
diff -c src/sys/sys/disk.h:1.6 src/sys/sys/disk.h:1.6.2.1
*** src/sys/sys/disk.h:1.6	Tue Jan 14 17:54:45 1997
--- src/sys/sys/disk.h	Sat Feb  1 04:49:24 1997
***************
*** 47,52 ****
--- 47,58 ----
  #ifndef _SYS_DISK_H_
  #define _SYS_DISK_H_
  
+ #ifndef KERNEL
+ #include <sys/types.h>
+ #endif
+ #include <sys/device.h>
+ #include <sys/disklabel.h>
+ 
  /*
   * Disk device structures.
   *
Index: src/sys/sys/dkbad.h
diff -c src/sys/sys/dkbad.h:1.8 src/sys/sys/dkbad.h:1.8.2.1
*** src/sys/sys/dkbad.h:1.8	Tue Jan 14 17:54:48 1997
--- src/sys/sys/dkbad.h	Sat Feb  1 04:49:24 1997
***************
*** 37,42 ****
--- 37,46 ----
  #ifndef _SYS_DKBAD_H_
  #define	_SYS_DKBAD_H_
  
+ #ifndef KERNEL
+ #include <sys/types.h>
+ #endif
+ 
  /*
   * Definitions needed to perform bad sector revectoring ala DEC STD 144.
   *
Index: src/sys/sys/dmap.h
diff -c src/sys/sys/dmap.h:1.4 src/sys/sys/dmap.h:1.4.2.1
*** src/sys/sys/dmap.h:1.4	Tue Jan 14 17:54:49 1997
--- src/sys/sys/dmap.h	Sat Feb  1 04:49:24 1997
***************
*** 37,42 ****
--- 37,46 ----
  #ifndef _SYS_DMAP_H_
  #define	_SYS_DMAP_H_
  
+ #ifndef KERNEL
+ #include <sys/types.h>
+ #endif
+ 
  /*
   * Definitions for the mapping of vitual swap space to the physical swap
   * area - the disk map.
Index: src/sys/sys/domain.h
diff -c src/sys/sys/domain.h:1.8 src/sys/sys/domain.h:1.8.2.1
*** src/sys/sys/domain.h:1.8	Tue Jan 14 17:54:50 1997
--- src/sys/sys/domain.h	Sat Feb  1 04:49:24 1997
***************
*** 37,42 ****
--- 37,44 ----
  #ifndef _SYS_DOMAIN_H_
  #define _SYS_DOMAIN_H_
  
+ #include <sys/cdefs.h>
+ 
  /*
   * Structure per communications domain.
   */
Index: src/sys/sys/fbio.h
diff -c src/sys/sys/fbio.h:1.4 src/sys/sys/fbio.h:1.4.2.1
*** src/sys/sys/fbio.h:1.4	Tue Jan 14 17:54:53 1997
--- src/sys/sys/fbio.h	Sat Feb  1 04:49:25 1997
***************
*** 42,47 ****
--- 42,51 ----
  #ifndef _SYS_FBIO_H_
  #define _SYS_FBIO_H_
  
+ #ifndef KERNEL
+ #include <sys/types.h>
+ #endif
+ 
  /*
   * Frame buffer ioctls (from Sprite, trimmed to essentials for X11).
   */
Index: src/sys/sys/filedesc.h
diff -c src/sys/sys/filedesc.h:1.10 src/sys/sys/filedesc.h:1.10.2.1
*** src/sys/sys/filedesc.h:1.10	Tue Jan 14 17:54:56 1997
--- src/sys/sys/filedesc.h	Sat Feb  1 04:49:25 1997
***************
*** 37,42 ****
--- 37,46 ----
  #ifndef _SYS_FILEDESC_H_
  #define _SYS_FILEDESC_H_
  
+ #ifndef KERNEL
+ #include <sys/types.h>
+ #endif
+ 
  /*
   * This structure is used for the management of descriptors.  It may be
   * shared by multiple processes.
Index: src/sys/sys/gmon.h
diff -c src/sys/sys/gmon.h:1.10 src/sys/sys/gmon.h:1.10.2.1
*** src/sys/sys/gmon.h:1.10	Tue Jan 14 17:54:58 1997
--- src/sys/sys/gmon.h	Sat Feb  1 04:49:25 1997
***************
*** 37,42 ****
--- 37,46 ----
  #ifndef _SYS_GMON_H_
  #define _SYS_GMON_H_
  
+ #ifndef KERNEL
+ #include <sys/types.h>
+ #endif
+ 
  #include <machine/profile.h>
  
  /*
Index: src/sys/sys/imgact_elf.h
diff -c src/sys/sys/imgact_elf.h:1.3 src/sys/sys/imgact_elf.h:1.3.2.1
*** src/sys/sys/imgact_elf.h:1.3	Tue Jan 14 17:55:01 1997
--- src/sys/sys/imgact_elf.h	Sat Feb  1 04:49:25 1997
***************
*** 31,43 ****
--- 31,49 ----
  #ifndef _IMGACT_ELF_H_
  #define _IMGACT_ELF_H_
  
+ #ifndef KERNEL
+ #include <sys/types.h>
+ #endif
+ 
  typedef u_int32_t Elf32_Addr;
  typedef u_int32_t Elf32_Off;
  typedef int32_t   Elf32_Sword;
  typedef u_int32_t Elf32_Word;
  typedef u_int16_t Elf32_Half;
   
+ #ifdef KERNEL
  extern int elf_trace;
+ #endif
  
  #define EI_NINDENT	16
  typedef struct {
***************
*** 210,216 ****
--- 216,224 ----
  
  #define MAX_BRANDS      8
  
+ #ifdef KERNEL
  int elf_insert_brand_entry __P((Elf32_Brandinfo *entry));
  int elf_remove_brand_entry __P((Elf32_Brandinfo *entry));
+ #endif
  
  #endif /* _IMGACT_ELF_H_ */
Index: src/sys/sys/ipc.h
diff -c src/sys/sys/ipc.h:1.9 src/sys/sys/ipc.h:1.9.2.1
*** src/sys/sys/ipc.h:1.9	Tue Jan 14 17:55:08 1997
--- src/sys/sys/ipc.h	Sat Feb  1 04:49:26 1997
***************
*** 50,55 ****
--- 50,59 ----
  #ifndef _SYS_IPC_H_
  #define _SYS_IPC_H_
  
+ #ifndef KERNEL
+ #include <sys/types.h>
+ #endif
+ 
  struct ipc_perm {
  	ushort	cuid;	/* creator user id */
  	ushort	cgid;	/* creator group id */
Index: src/sys/sys/kernel.h
diff -c src/sys/sys/kernel.h:1.24 src/sys/sys/kernel.h:1.24.2.1
*** src/sys/sys/kernel.h:1.24	Tue Jan 14 17:55:09 1997
--- src/sys/sys/kernel.h	Sat Feb  1 04:49:26 1997
***************
*** 45,50 ****
--- 45,54 ----
  #ifndef _SYS_KERNEL_H_
  #define _SYS_KERNEL_H_
  
+ #ifndef KERNEL
+ #include <sys/cdefs.h>
+ #endif
+ 
  /* Global variables for the kernel. */
  
  #ifdef KERNEL
Index: src/sys/sys/ktrace.h
diff -c src/sys/sys/ktrace.h:1.11 src/sys/sys/ktrace.h:1.11.2.1
*** src/sys/sys/ktrace.h:1.11	Tue Jan 14 17:55:10 1997
--- src/sys/sys/ktrace.h	Sat Feb  1 04:49:26 1997
***************
*** 37,42 ****
--- 37,49 ----
  #ifndef _SYS_KTRACE_H_
  #define _SYS_KTRACE_H_
  
+ #ifndef KERNEL
+ #include <sys/types.h>
+ #endif
+ #include <sys/param.h>
+ #include <sys/time.h>
+ #include <sys/uio.h>
+ 
  /*
   * operations to ktrace system call  (KTROP(op))
   */
Index: src/sys/sys/lkm.h
diff -c src/sys/sys/lkm.h:1.13 src/sys/sys/lkm.h:1.13.2.1
*** src/sys/sys/lkm.h:1.13	Tue Jan 14 17:55:12 1997
--- src/sys/sys/lkm.h	Sat Feb  1 04:49:26 1997
***************
*** 40,45 ****
--- 40,49 ----
  #ifndef _SYS_LKM_H_
  #define _SYS_LKM_H_
  
+ #ifndef KERNEL
+ #include <sys/types.h>
+ #endif
+ 
  /*
   * Supported module types
   */
Index: src/sys/sys/lockf.h
diff -c src/sys/sys/lockf.h:1.5 src/sys/sys/lockf.h:1.5.2.1
*** src/sys/sys/lockf.h:1.5	Tue Jan 14 17:55:13 1997
--- src/sys/sys/lockf.h	Sat Feb  1 04:49:27 1997
***************
*** 40,45 ****
--- 40,52 ----
  #ifndef _SYS_LOCKF_H_
  #define	_SYS_LOCKF_H_
  
+ #include <sys/cdefs.h>
+ #ifdef KERNEL
+ #include <sys/types.h>
+ #endif
+ #include <vnode_if.h>
+ 
+ 
  /*
   * The lockf structure is a kernel structure which contains the information
   * associated with a byte range lock.  The lockf structures are linked into
Index: src/sys/sys/malloc.h
diff -c src/sys/sys/malloc.h:1.18 src/sys/sys/malloc.h:1.18.2.1
*** src/sys/sys/malloc.h:1.18	Tue Jan 14 17:55:14 1997
--- src/sys/sys/malloc.h	Sat Feb  1 04:49:27 1997
***************
*** 37,42 ****
--- 37,47 ----
  #ifndef _SYS_MALLOC_H_
  #define	_SYS_MALLOC_H_
  
+ #ifdef KERNEL
+ #include <sys/types.h>
+ #endif
+ #include <sys/param.h>
+ 
  #define KMEMSTATS
  
  /*
Index: src/sys/sys/md5.h
diff -c src/sys/sys/md5.h:1.7 src/sys/sys/md5.h:1.7.2.1
*** src/sys/sys/md5.h:1.7	Tue Jan 14 17:55:16 1997
--- src/sys/sys/md5.h	Sat Feb  1 04:49:27 1997
***************
*** 26,31 ****
--- 26,34 ----
  
  #ifndef _SYS_MD5_H_
  #define _SYS_MD5_H_
+ #ifndef KERNEL
+ #include <sys/types.h>
+ #endif
  /* MD5 context. */
  typedef struct MD5Context {
    u_int32_t state[4];	/* state (ABCD) */
Index: src/sys/sys/mman.h
diff -c src/sys/sys/mman.h:1.16 src/sys/sys/mman.h:1.16.2.1
*** src/sys/sys/mman.h:1.16	Tue Jan 14 17:55:17 1997
--- src/sys/sys/mman.h	Sat Feb  1 04:49:27 1997
***************
*** 37,42 ****
--- 37,46 ----
  #ifndef _SYS_MMAN_H_
  #define _SYS_MMAN_H_
  
+ #ifndef KERNEL
+ #include <sys/types.h>
+ #endif
+ 
  /*
   * Protections are chosen from these bits, or-ed together
   */
Index: src/sys/sys/namei.h
diff -c src/sys/sys/namei.h:1.12 src/sys/sys/namei.h:1.12.2.1
*** src/sys/sys/namei.h:1.12	Tue Jan 14 17:55:22 1997
--- src/sys/sys/namei.h	Sat Feb  1 04:49:28 1997
***************
*** 37,43 ****
--- 37,47 ----
  #ifndef _SYS_NAMEI_H_
  #define	_SYS_NAMEI_H_
  
+ #ifndef KERNEL
+ #include <sys/types.h>
+ #endif
  #include <sys/queue.h>
+ #include <sys/uio.h>
  
  /*
   * Encapsulation of namei parameters.
Index: src/sys/sys/proc.h
diff -c src/sys/sys/proc.h:1.31 src/sys/sys/proc.h:1.31.2.1
*** src/sys/sys/proc.h:1.31	Tue Jan 14 17:55:25 1997
--- src/sys/sys/proc.h	Sat Feb  1 04:49:28 1997
***************
*** 43,48 ****
--- 43,51 ----
  #define	_SYS_PROC_H_
  
  #include <machine/proc.h>		/* Machine-dependent proc substruct. */
+ #ifndef KERNEL
+ #include <sys/types.h>
+ #endif
  #include <sys/rtprio.h>			/* For struct rtprio. */
  #include <sys/select.h>			/* For struct selinfo. */
  #include <sys/time.h>			/* For structs itimerval, timeval. */
Index: src/sys/sys/protosw.h
diff -c src/sys/sys/protosw.h:1.12 src/sys/sys/protosw.h:1.12.2.1
*** src/sys/sys/protosw.h:1.12	Tue Jan 14 17:55:26 1997
--- src/sys/sys/protosw.h	Sat Feb  1 04:49:28 1997
***************
*** 37,42 ****
--- 37,44 ----
  #ifndef _SYS_PROTOSW_H_
  #define _SYS_PROTOSW_H_
  
+ #include <sys/cdefs.h>
+ 
  struct mbuf;
  struct sockaddr;
  struct socket;
Index: src/sys/sys/ptrace.h
diff -c src/sys/sys/ptrace.h:1.6 src/sys/sys/ptrace.h:1.6.2.1
*** src/sys/sys/ptrace.h:1.6	Tue Jan 14 17:55:27 1997
--- src/sys/sys/ptrace.h	Sat Feb  1 04:49:28 1997
***************
*** 37,42 ****
--- 37,46 ----
  #ifndef	_SYS_PTRACE_H_
  #define	_SYS_PTRACE_H_
  
+ #ifndef KERNEL
+ #include <sys/types.h>
+ #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 */
Index: src/sys/sys/resource.h
diff -c src/sys/sys/resource.h:1.6 src/sys/sys/resource.h:1.6.2.1
*** src/sys/sys/resource.h:1.6	Tue Jan 14 17:55:30 1997
--- src/sys/sys/resource.h	Sat Feb  1 04:49:29 1997
***************
*** 37,42 ****
--- 37,44 ----
  #ifndef _SYS_RESOURCE_H_
  #define	_SYS_RESOURCE_H_
  
+ #include <sys/time.h>
+ 
  /*
   * Process priority specifications to get/setpriority.
   */
Index: src/sys/sys/rlist.h
diff -c src/sys/sys/rlist.h:1.10 src/sys/sys/rlist.h:1.10.2.1
*** src/sys/sys/rlist.h:1.10	Tue Jan 14 17:55:32 1997
--- src/sys/sys/rlist.h	Sat Feb  1 04:49:29 1997
***************
*** 22,27 ****
--- 22,29 ----
  #ifndef _SYS_RLIST_H_
  #define _SYS_RLIST_H_
  
+ #include <sys/cdefs.h>
+ 
  /* A resource list element. */
  struct rlist {
  	unsigned	rl_start;	/* boundaries of extent - inclusive */
***************
*** 39,47 ****
--- 41,51 ----
  
  /* extern struct rlisthdr swaplist; */
  
+ #ifdef KERNEL
  /* Functions to manipulate resource lists.  */
  extern void rlist_free __P((struct rlisthdr *, unsigned, unsigned));
  int rlist_alloc __P((struct rlisthdr *, unsigned, unsigned *));
  extern void rlist_destroy __P((struct rlisthdr *));
+ #endif
  
  #endif	/* _SYS_RLIST_H_ */
Index: src/sys/sys/rtprio.h
diff -c src/sys/sys/rtprio.h:1.3 src/sys/sys/rtprio.h:1.3.2.1
*** src/sys/sys/rtprio.h:1.3	Tue Jan 14 17:55:33 1997
--- src/sys/sys/rtprio.h	Sat Feb  1 04:49:29 1997
***************
*** 34,39 ****
--- 34,43 ----
  #ifndef _SYS_RTPRIO_H_
  #define _SYS_RTPRIO_H_
  
+ #ifndef KERNEL
+ #include <sys/types.h>
+ #endif
+ 
  /*
   * Process realtime-priority specifications to rtprio.
   */
Index: src/sys/sys/select.h
diff -c src/sys/sys/select.h:1.3 src/sys/sys/select.h:1.3.2.1
*** src/sys/sys/select.h:1.3	Tue Jan 14 17:55:35 1997
--- src/sys/sys/select.h	Sat Feb  1 04:49:29 1997
***************
*** 37,42 ****
--- 37,46 ----
  #ifndef _SYS_SELECT_H_
  #define	_SYS_SELECT_H_
  
+ #ifdef KERNEL
+ #include <sys/types.h>
+ #endif
+ 
  /*
   * Used to maintain information about processes that wish to be
   * notified when I/O becomes possible.
Index: src/sys/sys/signal.h
diff -c src/sys/sys/signal.h:1.10 src/sys/sys/signal.h:1.10.2.1
*** src/sys/sys/signal.h:1.10	Tue Jan 14 17:55:38 1997
--- src/sys/sys/signal.h	Sat Feb  1 04:49:30 1997
***************
*** 201,208 ****
--- 201,210 ----
   * For historical reasons; programs expect signal's return value to be
   * defined by <sys/signal.h>.
   */
+ #ifndef KERNEL
  __BEGIN_DECLS
  __sighandler_t *signal __P((int, __sighandler_t *));
  __END_DECLS
+ #endif
  
  #endif	/* !_SYS_SIGNAL_H_ */
Index: src/sys/sys/signalvar.h
diff -c src/sys/sys/signalvar.h:1.14 src/sys/sys/signalvar.h:1.14.2.1
*** src/sys/sys/signalvar.h:1.14	Tue Jan 14 17:55:39 1997
--- src/sys/sys/signalvar.h	Sat Feb  1 04:49:30 1997
***************
*** 37,42 ****
--- 37,47 ----
  #ifndef	_SYS_SIGNALVAR_H_		/* tmp for user.h */
  #define	_SYS_SIGNALVAR_H_
  
+ #ifndef KERNEL
+ #include <sys/types.h>
+ #include <signal.h>
+ #endif
+ 
  /*
   * Kernel signal definitions and data structures,
   * not exported to user programs.
Index: src/sys/sys/snoop.h
diff -c src/sys/sys/snoop.h:1.10 src/sys/sys/snoop.h:1.10.6.1
*** src/sys/sys/snoop.h:1.10	Thu Dec 14 19:32:35 1995
--- src/sys/sys/snoop.h	Sat Feb  1 04:49:30 1997
***************
*** 16,21 ****
--- 16,26 ----
  #ifndef _SNOOP_H_
  #define	_SNOOP_H_
  
+ #ifndef KERNEL
+ #include <sys/types.h>
+ #include <sys/select.h>
+ #endif
+ 
  #define SNOOP_MINLEN		(4*1024)	/* This should be power of 2.
  						 * 4K tested to be the minimum
  						 * for which on normal tty
Index: src/sys/sys/socket.h
diff -c src/sys/sys/socket.h:1.16 src/sys/sys/socket.h:1.16.2.1
*** src/sys/sys/socket.h:1.16	Tue Jan 14 17:55:41 1997
--- src/sys/sys/socket.h	Sat Feb  1 04:49:30 1997
***************
*** 37,42 ****
--- 37,46 ----
  #ifndef _SYS_SOCKET_H_
  #define	_SYS_SOCKET_H_
  
+ #ifndef KERNEL
+ #include <sys/types.h>
+ #endif
+ 
  /*
   * Definitions related to sockets: types, address families, options.
   */
Index: src/sys/sys/sysctl.h
diff -c src/sys/sys/sysctl.h:1.49 src/sys/sys/sysctl.h:1.49.2.1
*** src/sys/sys/sysctl.h:1.49	Tue Jan 14 17:55:45 1997
--- src/sys/sys/sysctl.h	Sat Feb  1 04:49:31 1997
***************
*** 40,45 ****
--- 40,49 ----
  #ifndef _SYS_SYSCTL_H_
  #define	_SYS_SYSCTL_H_
  
+ #ifndef KERNEL
+ #include <sys/types.h>
+ #endif
+ 
  /*
   * Definitions for sysctl call.  The sysctl call uses a hierarchical name
   * for objects that can be examined or modified.  The name is expressed as
Index: src/sys/sys/sysent.h
diff -c src/sys/sys/sysent.h:1.12 src/sys/sys/sysent.h:1.12.2.1
*** src/sys/sys/sysent.h:1.12	Tue Jan 14 17:55:45 1997
--- src/sys/sys/sysent.h	Sat Feb  1 04:49:31 1997
***************
*** 36,41 ****
--- 36,47 ----
  #ifndef _SYS_SYSENT_H_
  #define	_SYS_SYSENT_H_
  
+ #include <sys/cdefs.h>
+ #ifndef KERNEL
+ #include <sys/types.h>
+ #endif
+ #include <sys/proc.h>
+ 
  typedef	int	sy_call_t __P((struct proc *, void *, int *));
  
  struct sysent {		/* system call table */
Index: src/sys/sys/sysproto.h
diff -c src/sys/sys/sysproto.h:1.16 src/sys/sys/sysproto.h:1.16.2.1
*** src/sys/sys/sysproto.h:1.16	Fri Jan 17 02:59:31 1997
--- src/sys/sys/sysproto.h	Sat Feb  1 04:49:31 1997
***************
*** 7,14 ****
--- 7,18 ----
  
  #ifndef _SYS_SYSPROTO_H_
  #define	_SYS_SYSPROTO_H_
+ #ifndef KERNEL
+ #include <sys/types.h>
+ #endif
  
  #include <sys/signal.h>
+ #include <sys/proc.h>
  
  struct	nosys_args {
  	int dummy;
***************
*** 722,727 ****
--- 726,732 ----
  struct	rfork_args {
  	int flags;
  };
+ #ifdef KERNEL
  int	nosys __P((struct proc *, struct nosys_args *, int []));
  void	exit __P((struct proc *, struct rexit_args *, int [])) __dead2;
  int	fork __P((struct proc *, struct fork_args *, int []));
***************
*** 891,896 ****
--- 896,902 ----
  int	shmget __P((struct proc *, struct shmget_args *, int []));
  int	minherit __P((struct proc *, struct minherit_args *, int []));
  int	rfork __P((struct proc *, struct rfork_args *, int []));
+ #endif
  
  #ifdef COMPAT_43
  
***************
*** 1017,1022 ****
--- 1023,1029 ----
  #ifdef LFS
  #else
  #endif
+ #ifdef KERNEL
  int	ocreat __P((struct proc *, struct ocreat_args *, int []));
  int	olseek __P((struct proc *, struct olseek_args *, int []));
  int	ostat __P((struct proc *, struct ostat_args *, int []));
***************
*** 1049,1054 ****
--- 1056,1062 ----
  int	oquota __P((struct proc *, struct oquota_args *, int []));
  int	ogetsockname __P((struct proc *, struct getsockname_args *, int []));
  int	ogetdirentries __P((struct proc *, struct ogetdirentries_args *, int []));
+ #endif /* !KERNEL */
  
  #endif /* COMPAT_43 */
  
Index: src/sys/sys/systm.h
diff -c src/sys/sys/systm.h:1.49 src/sys/sys/systm.h:1.49.2.1
*** src/sys/sys/systm.h:1.49	Tue Jan 14 17:55:48 1997
--- src/sys/sys/systm.h	Sat Feb  1 04:49:32 1997
***************
*** 42,49 ****
--- 42,55 ----
  #ifndef _SYS_SYSTM_H_
  #define	_SYS_SYSTM_H_
  
+ #ifndef KERNEL
+ #include <sys/types.h>
+ #endif
  #include <machine/cpufunc.h>
+ #include <sys/proc.h>
+ #include <sys/uio.h>
  
+ #ifdef KERNEL
  extern int securelevel;		/* system security level (see init(8)) */
  
  extern int cold;		/* nonzero if we are doing a cold boot */
***************
*** 188,192 ****
--- 194,199 ----
   */
  int	tsleep __P((void *chan, int pri, char *wmesg, int timo));
  void	wakeup __P((void *chan));
+ #endif
  
  #endif /* !_SYS_SYSTM_H_ */
Index: src/sys/sys/time.h
diff -c src/sys/sys/time.h:1.10 src/sys/sys/time.h:1.10.2.1
*** src/sys/sys/time.h:1.10	Tue Jan 14 17:55:51 1997
--- src/sys/sys/time.h	Sat Feb  1 04:49:32 1997
***************
*** 37,43 ****
--- 37,45 ----
  #ifndef _SYS_TIME_H_
  #define _SYS_TIME_H_
  
+ #ifndef KERNEL
  #include <sys/types.h>
+ #endif
  
  /*
   * Structure returned by gettimeofday(2) system call,
Index: src/sys/sys/timeb.h
diff -c src/sys/sys/timeb.h:1.4 src/sys/sys/timeb.h:1.4.2.1
*** src/sys/sys/timeb.h:1.4	Tue Jan 14 17:55:52 1997
--- src/sys/sys/timeb.h	Sat Feb  1 04:49:32 1997
***************
*** 42,47 ****
--- 42,51 ----
  #ifndef _SYS_TIMEB_H_
  #define _SYS_TIMEB_H_
  
+ #ifndef KERNEL
+ #include <sys/types.h>
+ #endif
+ 
  /* The ftime(2) system call structure -- deprecated. */
  struct timeb {
  	time_t	time;			/* seconds since the Epoch */
Index: src/sys/sys/tprintf.h
diff -c src/sys/sys/tprintf.h:1.4 src/sys/sys/tprintf.h:1.4.2.1
*** src/sys/sys/tprintf.h:1.4	Tue Jan 14 17:55:54 1997
--- src/sys/sys/tprintf.h	Sat Feb  1 04:49:33 1997
***************
*** 37,47 ****
--- 37,52 ----
  #ifndef _SYS_TPRINTF_H_
  #define _SYS_TPRINTF_H_
  
+ #include <sys/cdefs.h>
+ #include <sys/proc.h>
+ 
  typedef struct session *tpr_t;
  
+ #ifndef KERNEL
  tpr_t	tprintf_open __P((struct proc *));
  void	tprintf_close __P((tpr_t));
  
  void	tprintf __P((tpr_t, const char *fmt, ...));
+ #endif
  
  #endif
Index: src/sys/sys/uio.h
diff -c src/sys/sys/uio.h:1.5 src/sys/sys/uio.h:1.5.2.1
*** src/sys/sys/uio.h:1.5	Tue Jan 14 17:56:01 1997
--- src/sys/sys/uio.h	Sat Feb  1 04:49:33 1997
***************
*** 37,42 ****
--- 37,46 ----
  #ifndef _SYS_UIO_H_
  #define	_SYS_UIO_H_
  
+ #ifndef KERNEL
+ #include <sys/types.h>
+ #endif
+ 
  /*
   * XXX
   * iov_base should be a void *.
Index: src/sys/sys/un.h
diff -c src/sys/sys/un.h:1.10 src/sys/sys/un.h:1.10.2.1
*** src/sys/sys/un.h:1.10	Tue Jan 14 17:56:03 1997
--- src/sys/sys/un.h	Sat Feb  1 04:49:33 1997
***************
*** 37,42 ****
--- 37,46 ----
  #ifndef _SYS_UN_H_
  #define _SYS_UN_H_
  
+ #ifndef KERNEL
+ #include <sys/types.h>
+ #endif
+ 
  #ifdef KERNEL
  #include <sys/unpcb.h>
  #endif /* KERNEL */
Index: src/sys/sys/unpcb.h
diff -c src/sys/sys/unpcb.h:1.4 src/sys/sys/unpcb.h:1.4.2.1
*** src/sys/sys/unpcb.h:1.4	Tue Jan 14 17:56:05 1997
--- src/sys/sys/unpcb.h	Sat Feb  1 04:49:34 1997
***************
*** 37,42 ****
--- 37,46 ----
  #ifndef _SYS_UNPCB_H_
  #define _SYS_UNPCB_H_
  
+ #ifndef KERNEL
+ #include <sys/types.h>
+ #endif
+ 
  /*
   * Protocol control block for an active
   * instance of a UNIX internal protocol.
Index: src/sys/sys/user.h
diff -c src/sys/sys/user.h:1.10 src/sys/sys/user.h:1.10.2.1
*** src/sys/sys/user.h:1.10	Tue Jan 14 17:56:06 1997
--- src/sys/sys/user.h	Sat Feb  1 04:49:34 1997
***************
*** 37,42 ****
--- 37,45 ----
  #ifndef _SYS_USER_H_
  #define _SYS_USER_H_
  
+ #ifndef KERNEL
+ #include <sys/types.h>
+ #endif
  #include <machine/pcb.h>
  #ifndef KERNEL
  /* stuff that *used* to be included by user.h, or is now needed */
Index: src/sys/sys/vnode.h
diff -c src/sys/sys/vnode.h:1.39 src/sys/sys/vnode.h:1.39.2.1
*** src/sys/sys/vnode.h:1.39	Fri Jan 17 00:16:10 1997
--- src/sys/sys/vnode.h	Sat Feb  1 04:49:35 1997
***************
*** 37,42 ****
--- 37,46 ----
  #ifndef _SYS_VNODE_H_
  #define	_SYS_VNODE_H_
  
+ #ifndef KERNEL
+ #include <sys/types.h>
+ #endif
+ #include <sys/time.h>
  #include <sys/queue.h>
  
  /*
Index: src/sys/sys/vsio.h
diff -c src/sys/sys/vsio.h:1.5 src/sys/sys/vsio.h:1.5.2.1
*** src/sys/sys/vsio.h:1.5	Tue Jan 14 17:56:13 1997
--- src/sys/sys/vsio.h	Sat Feb  1 04:49:35 1997
***************
*** 37,42 ****
--- 37,46 ----
  #ifndef _SYS_VSIO_H_
  #define _SYS_VSIO_H_
  
+ #ifndef KERNEL
+ #include <sys/types.h>
+ #endif
+ 
   /****************************************************************************
   *									    *
   *  Copyright (c) 1983, 1984 by						    *
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199701311804.FAA02492>