Forward declare more structs that are used in prototypes here - don't

depend on <sys/types.h> forward declaring common ones.
This commit is contained in:
bde 1998-02-01 20:08:39 +00:00
parent 0aa414f969
commit 4a96ad264b
13 changed files with 36 additions and 17 deletions

View File

@ -213,6 +213,7 @@ struct atapidrv { /* delayed attach info */
int attached; /* the drive is attached */
};
struct buf;
struct wcd;
typedef void atapi_callback_t(struct wcd *, struct buf *, int, struct atapires);

View File

@ -33,7 +33,7 @@
*
* @(#)ipx_var.h
*
* $Id: ipx_var.h,v 1.7 1997/06/26 19:35:59 jhay Exp $
* $Id: ipx_var.h,v 1.8 1997/08/16 19:15:46 wollman Exp $
*/
#ifndef _NETIPX_IPX_VAR_H_
@ -75,6 +75,7 @@ extern union ipx_host ipx_broadhost;
struct ifnet;
struct ipx_addr;
struct mbuf;
struct proc;
struct route;
struct sockaddr;
struct socket;

View File

@ -213,6 +213,7 @@ struct atapidrv { /* delayed attach info */
int attached; /* the drive is attached */
};
struct buf;
struct wcd;
typedef void atapi_callback_t(struct wcd *, struct buf *, int, struct atapires);

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)acct.h 8.4 (Berkeley) 1/9/95
* $Id$
* $Id: acct.h,v 1.8 1997/02/22 09:44:48 peter Exp $
*/
#ifndef _SYS_ACCT_H_
@ -77,6 +77,8 @@ struct acct {
#define AHZ 64
#ifdef KERNEL
struct proc;
int acct_process __P((struct proc *p));
#endif

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)disklabel.h 8.2 (Berkeley) 7/10/94
* $Id: disklabel.h,v 1.27 1997/02/22 09:45:05 peter Exp $
* $Id: disklabel.h,v 1.28 1997/09/21 22:09:07 gibbs Exp $
*/
#ifndef _SYS_DISKLABEL_H_
@ -422,6 +422,7 @@ struct dos_partition {
#ifdef KERNEL
struct buf;
struct buf_queue_head;
int bounds_check_with_label __P((struct buf *bp, struct disklabel *lp,

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)disklabel.h 8.2 (Berkeley) 7/10/94
* $Id: disklabel.h,v 1.27 1997/02/22 09:45:05 peter Exp $
* $Id: disklabel.h,v 1.28 1997/09/21 22:09:07 gibbs Exp $
*/
#ifndef _SYS_DISKLABEL_H_
@ -422,6 +422,7 @@ struct dos_partition {
#ifdef KERNEL
struct buf;
struct buf_queue_head;
int bounds_check_with_label __P((struct buf *bp, struct disklabel *lp,

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)disklabel.h 8.2 (Berkeley) 7/10/94
* $Id: disklabel.h,v 1.27 1997/02/22 09:45:05 peter Exp $
* $Id: disklabel.h,v 1.28 1997/09/21 22:09:07 gibbs Exp $
*/
#ifndef _SYS_DISKLABEL_H_
@ -422,6 +422,7 @@ struct dos_partition {
#ifdef KERNEL
struct buf;
struct buf_queue_head;
int bounds_check_with_label __P((struct buf *bp, struct disklabel *lp,

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)dkbad.h 8.2 (Berkeley) 7/10/94
* $Id$
* $Id: dkbad.h,v 1.9 1997/02/22 09:45:07 peter Exp $
*/
#ifndef _SYS_DKBAD_H_
@ -86,6 +86,7 @@ struct dkbad_intern {
long bi_bad[DKBAD_MAXBAD + 1]; /* actually usually less */
};
struct buf;
struct disklabel;
struct dkbad_intern *internbad144 __P((struct dkbad *btp,

View File

@ -41,7 +41,7 @@
* SUCH DAMAGE.
*
* @(#)ipc.h 8.4 (Berkeley) 2/19/95
* $Id$
* $Id: ipc.h,v 1.10 1997/02/22 09:45:24 peter Exp $
*/
/*
@ -82,7 +82,9 @@ struct ipc_perm {
#define IPCID_TO_SEQ(id) (((id) >> 16) & 0xffff)
#define IXSEQ_TO_IPCID(ix,perm) (((perm.seq) << 16) | (ix & 0xffff))
int ipcperm __P((struct ucred *,struct ipc_perm *,int));
struct ucred;
int ipcperm __P((struct ucred *, struct ipc_perm *, int));
#else /* ! KERNEL */
/* XXX doesn't really belong here, but has been historical practice in SysV. */

View File

@ -31,22 +31,17 @@
* SUCH DAMAGE.
*
* @(#)protosw.h 8.1 (Berkeley) 6/2/93
* $Id: protosw.h,v 1.21 1997/09/14 02:25:40 peter Exp $
* $Id: protosw.h,v 1.22 1997/12/21 16:35:10 bde Exp $
*/
#ifndef _SYS_PROTOSW_H_
#define _SYS_PROTOSW_H_
/* Forward declare these structures referenced from prototypes below. */
struct ifnet;
struct mbuf;
struct proc;
struct sockaddr;
struct socket;
struct sockproto;
struct stat;
struct uio;
struct proc;
/*#ifdef KERNEL*/
/*
@ -172,6 +167,11 @@ char *prurequests[] = {
#ifdef KERNEL /* users shouldn't see this decl */
struct ifnet;
struct stat;
struct ucred;
struct uio;
/*
* If the ordering here looks odd, that's because it's alphabetical.
* Having this structure separated out from the main protoswitch is allegedly

View File

@ -1,4 +1,4 @@
/* $Id$ */
/* $Id: shm.h,v 1.11 1997/02/22 09:45:52 peter Exp $ */
/* $NetBSD: shm.h,v 1.15 1994/06/29 06:45:17 cgd Exp $ */
/*
@ -79,6 +79,8 @@ struct shminfo {
extern struct shminfo shminfo;
extern struct shmid_ds *shmsegs;
struct proc;
void shmexit __P((struct proc *));
void shmfork __P((struct proc *, struct proc *));
#else /* !KERNEL */

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)socketvar.h 8.3 (Berkeley) 2/19/95
* $Id: socketvar.h,v 1.22 1997/09/14 02:25:41 peter Exp $
* $Id: socketvar.h,v 1.23 1997/12/21 16:35:11 bde Exp $
*/
#ifndef _SYS_SOCKETVAR_H_
@ -207,10 +207,13 @@ MALLOC_DECLARE(M_SONAME);
extern u_long sb_max;
struct file;
struct filedesc;
struct mbuf;
struct sockaddr;
struct stat;
struct ucred;
struct uio;
/*
* File operations on sockets.

View File

@ -61,7 +61,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
* $Id: pmap.h,v 1.25 1997/12/14 02:10:30 dyson Exp $
* $Id: pmap.h,v 1.26 1998/01/22 17:30:30 dyson Exp $
*/
/*
@ -87,6 +87,9 @@ typedef struct pmap_statistics *pmap_statistics_t;
#include <machine/pmap.h>
#ifdef KERNEL
struct proc;
void pmap_change_wiring __P((pmap_t, vm_offset_t, boolean_t));
void pmap_clear_modify __P((vm_offset_t pa));
void pmap_clear_reference __P((vm_offset_t pa));