Add multiple inclusion protection for headers. Fix mismatched

variable declarations (missing const's) as needed.
This commit is contained in:
matt 2002-12-01 00:12:06 +00:00
parent d03ac2a783
commit 60db16d1ff
18 changed files with 97 additions and 33 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: ext2fs.h,v 1.10 2000/01/28 16:00:23 bouyer Exp $ */
/* $NetBSD: ext2fs.h,v 1.11 2002/12/01 00:12:06 matt Exp $ */
/*
* Copyright (c) 1997 Manuel Bouyer.
@ -37,6 +37,9 @@
* Modified for ext2fs by Manuel Bouyer.
*/
#ifndef _UFS_EXT2FS_EXT2FS_H_
#define _UFS_EXT2FS_EXT2FS_H_
#include <machine/bswap.h>
/*
@ -316,3 +319,5 @@ void e2fs_cg_bswap __P((struct ext2_gd *, struct ext2_gd *, int));
* Number of indirects in a file system block.
*/
#define NINDIR(fs) ((fs)->e2fs_bsize / sizeof(u_int32_t))
#endif /* !_UFS_EXT2FS_EXT2FS_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: ext2fs_dinode.h,v 1.6 2000/01/26 16:21:33 bouyer Exp $ */
/* $NetBSD: ext2fs_dinode.h,v 1.7 2002/12/01 00:12:06 matt Exp $ */
/*
* Copyright (c) 1997 Manuel Bouyer.
@ -42,6 +42,9 @@
* Modified for ext2fs by Manuel Bouyer.
*/
#ifndef _UFS_EXT2FS_EXT2FS_DINODE_H_
#define _UFS_EXT2FS_EXT2FS_DINODE_H_
#include <sys/stat.h>
/*
@ -143,3 +146,5 @@ void e2fs_i_bswap __P((struct ext2fs_dinode *, struct ext2fs_dinode *));
# define e2fs_iload(old, new) e2fs_i_bswap((old), (new))
# define e2fs_isave(old, new) e2fs_i_bswap((old), (new))
#endif
#endif /* !_UFS_EXT2FS_EXT2FS_DINODE_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: ext2fs_dir.h,v 1.4 2000/01/28 16:00:23 bouyer Exp $ */
/* $NetBSD: ext2fs_dir.h,v 1.5 2002/12/01 00:12:07 matt Exp $ */
/*
* Copyright (c) 1997 Manuel Bouyer.
@ -42,8 +42,8 @@
* Modified for ext2fs by Manuel Bouyer.
*/
#ifndef _EXT2FS_DIR_H_
#define _EXT2FS_DIR_H_
#ifndef _UFS_EXT2FS_EXT2FS_DIR_H_
#define _UFS_EXT2FS_EXT2FS_DIR_H_
/*
* Theoretically, directories can be more than 2Gb in length, however, in
@ -157,4 +157,4 @@ struct ext2fs_dirtemplate {
char dotdot_name[4]; /* ditto */
};
#endif /* !_EXT2FS_DIR_H_ */
#endif /* !_UFS_EXT2FS_EXT2FS_DIR_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: ext2fs_extern.h,v 1.12 2002/09/26 11:06:36 jdolecek Exp $ */
/* $NetBSD: ext2fs_extern.h,v 1.13 2002/12/01 00:12:07 matt Exp $ */
/*-
* Copyright (c) 1997 Manuel Bouyer.
@ -37,6 +37,9 @@
* Modified for ext2fs by Manuel Bouyer.
*/
#ifndef _UFS_EXT2FS_EXT2FS_EXTERN_H_
#define _UFS_EXT2FS_EXT2FS_EXTERN_H_
struct buf;
struct fid;
struct m_ext2fs;
@ -154,3 +157,4 @@ extern int (**ext2fs_vnodeop_p) __P((void *));
extern int (**ext2fs_specop_p) __P((void *));
extern int (**ext2fs_fifoop_p) __P((void *));
#endif /* !_UFS_EXT2FS_EXT2FS_EXTERN_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: ffs_extern.h,v 1.23 2002/09/28 20:11:08 dbj Exp $ */
/* $NetBSD: ffs_extern.h,v 1.24 2002/12/01 00:12:09 matt Exp $ */
/*-
* Copyright (c) 1991, 1993, 1994
@ -35,6 +35,9 @@
* @(#)ffs_extern.h 8.6 (Berkeley) 3/30/95
*/
#ifndef _UFS_FFS_FFS_EXTERN_H_
#define _UFS_FFS_FFS_EXTERN_H_
/*
* Sysctl values for the fast filesystem.
*/
@ -178,4 +181,4 @@ extern int (**ffs_vnodeop_p) __P((void *));
extern int (**ffs_specop_p) __P((void *));
extern int (**ffs_fifoop_p) __P((void *));
#endif /* !_UFS_FFS_FFS_EXTERN_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: ffs_subr.c,v 1.23 2002/07/06 15:39:07 fredette Exp $ */
/* $NetBSD: ffs_subr.c,v 1.24 2002/12/01 00:12:09 matt Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1993
@ -37,7 +37,7 @@
#include <sys/cdefs.h>
#if defined(__KERNEL_RCSID)
__KERNEL_RCSID(0, "$NetBSD: ffs_subr.c,v 1.23 2002/07/06 15:39:07 fredette Exp $");
__KERNEL_RCSID(0, "$NetBSD: ffs_subr.c,v 1.24 2002/12/01 00:12:09 matt Exp $");
#endif
#if HAVE_CONFIG_H
@ -47,8 +47,8 @@ __KERNEL_RCSID(0, "$NetBSD: ffs_subr.c,v 1.23 2002/07/06 15:39:07 fredette Exp $
#include <sys/param.h>
/* in ffs_tables.c */
extern int inside[], around[];
extern u_char *fragtbl[];
extern const int inside[], around[];
extern const u_char * const fragtbl[];
#ifndef _KERNEL
#include <ufs/ufs/dinode.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: ffs_vfsops.c,v 1.104 2002/11/24 11:09:13 scw Exp $ */
/* $NetBSD: ffs_vfsops.c,v 1.105 2002/12/01 00:12:09 matt Exp $ */
/*
* Copyright (c) 1989, 1991, 1993, 1994
@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.104 2002/11/24 11:09:13 scw Exp $");
__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.105 2002/12/01 00:12:09 matt Exp $");
#if defined(_KERNEL_OPT)
#include "opt_ffs.h"
@ -83,9 +83,9 @@ int ffs_initcount = 0;
extern struct lock ufs_hashlock;
extern struct vnodeopv_desc ffs_vnodeop_opv_desc;
extern struct vnodeopv_desc ffs_specop_opv_desc;
extern struct vnodeopv_desc ffs_fifoop_opv_desc;
extern const struct vnodeopv_desc ffs_vnodeop_opv_desc;
extern const struct vnodeopv_desc ffs_specop_opv_desc;
extern const struct vnodeopv_desc ffs_fifoop_opv_desc;
const struct vnodeopv_desc * const ffs_vnodeopv_descs[] = {
&ffs_vnodeop_opv_desc,

View File

@ -1,4 +1,4 @@
/* $NetBSD: softdep.h,v 1.4 2001/12/18 10:57:22 fvdl Exp $ */
/* $NetBSD: softdep.h,v 1.5 2002/12/01 00:12:10 matt Exp $ */
/*
* Copyright 1998 Marshall Kirk McKusick. All Rights Reserved.
@ -32,6 +32,9 @@
* from: @(#)softdep.h 9.6 (McKusick) 2/25/99
*/
#ifndef _UFS_FFS_SOFTDEP_H_
#define _UFS_FFS_SOFTDEP_H_
#include <sys/queue.h>
/*
@ -560,3 +563,5 @@ struct newdirblk {
# define db_state db_list.wk_state /* unused */
struct pagedep *db_pagedep; /* associated pagedep */
};
#endif /* !_UFS_FFS_SOFTDEP_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: lfs.h,v 1.41 2002/07/06 01:30:11 perseant Exp $ */
/* $NetBSD: lfs.h,v 1.42 2002/12/01 00:12:10 matt Exp $ */
/*-
* Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
@ -70,6 +70,9 @@
* @(#)lfs.h 8.9 (Berkeley) 5/8/95
*/
#ifndef _UFS_LFS_LFS_H_
#define _UFS_LFS_LFS_H_
/*
* Compile-time options for LFS.
*/
@ -830,4 +833,8 @@ struct lfs_stats {
u_int flush_invoked;
u_int vflush_invoked;
};
#ifdef _KERNEL
extern struct lfs_stats lfs_stats;
#endif
#endif /* !_UFS_LFS_LFS_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: lfs_extern.h,v 1.31 2002/06/16 00:13:15 perseant Exp $ */
/* $NetBSD: lfs_extern.h,v 1.32 2002/12/01 00:12:11 matt Exp $ */
/*-
* Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
@ -70,6 +70,9 @@
* @(#)lfs_extern.h 8.6 (Berkeley) 5/8/95
*/
#ifndef _UFS_LFS_LFS_EXTERN_H_
#define _UFS_LFS_LFS_EXTERN_H_
/* Copied from ext2fs for ITIMES. XXX This is a bogus use of v_tag. */
#define IS_LFS_VNODE(vp) (vp->v_tag == VT_LFS)
@ -239,3 +242,5 @@ extern int (**lfs_vnodeop_p)(void *);
extern int (**lfs_specop_p)(void *);
extern int (**lfs_fifoop_p)(void *);
extern struct genfs_ops lfs_genfsops;
#endif /* !_UFS_LFS_LFS_EXTERN_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: mfs_extern.h,v 1.12 2001/09/15 16:13:06 chs Exp $ */
/* $NetBSD: mfs_extern.h,v 1.13 2002/12/01 00:12:11 matt Exp $ */
/*-
* Copyright (c) 1991, 1993
@ -35,6 +35,9 @@
* @(#)mfs_extern.h 8.4 (Berkeley) 3/30/95
*/
#ifndef _UFS_MFS_MFS_EXTERN_H_
#define _UFS_MFS_MFS_EXTERN_H_
struct buf;
struct mount;
struct nameidata;
@ -71,3 +74,5 @@ int mfs_reclaim __P((void *));
int mfs_print __P((void *));
__END_DECLS
#endif /* !_UFS_MFS_MFS_EXTERN_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: mfsnode.h,v 1.12 2002/07/19 16:26:01 hannken Exp $ */
/* $NetBSD: mfsnode.h,v 1.13 2002/12/01 00:12:11 matt Exp $ */
/*
* Copyright (c) 1989, 1993
@ -35,6 +35,9 @@
* @(#)mfsnode.h 8.3 (Berkeley) 5/19/95
*/
#ifndef _UFS_MFS_MFSNODE_H_
#define _UFS_MFS_MFSNODE_H_
/*
* This structure defines the control data for the memory based file system.
*/
@ -88,3 +91,5 @@ struct mfsnode {
#define mfs_bwrite vn_bwrite
#define mfs_revoke genfs_revoke
#define mfs_putpages genfs_null_putpages
#endif /* !_UFS_MFS_MFSNODE_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: dir.h,v 1.14 2002/09/28 20:11:09 dbj Exp $ */
/* $NetBSD: dir.h,v 1.15 2002/12/01 00:12:11 matt Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1993
@ -40,8 +40,8 @@
* @(#)dir.h 8.5 (Berkeley) 4/27/95
*/
#ifndef _DIR_H_
#define _DIR_H_
#ifndef _UFS_UFS_DIR_H_
#define _UFS_UFS_DIR_H_
/*
* Theoretically, directories can be more than 2Gb in length, however, in
@ -161,4 +161,4 @@ struct odirtemplate {
u_int16_t dotdot_namlen;
char dotdot_name[4]; /* ditto */
};
#endif /* !_DIR_H_ */
#endif /* !_UFS_UFS_DIR_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: inode.h,v 1.30 2002/11/26 01:23:31 yamt Exp $ */
/* $NetBSD: inode.h,v 1.31 2002/12/01 00:12:12 matt Exp $ */
/*
* Copyright (c) 1982, 1989, 1993
@ -40,6 +40,9 @@
* @(#)inode.h 8.9 (Berkeley) 5/14/95
*/
#ifndef _UFS_UFS_INODE_H_
#define _UFS_UFS_INODE_H_
#include <sys/vnode.h>
#include <ufs/ufs/dinode.h>
#include <ufs/ufs/dir.h>
@ -251,3 +254,5 @@ struct ufid {
int32_t ufid_gen; /* Generation number. */
};
#endif /* _KERNEL */
#endif /* !_UFS_UFS_INODE_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: quota.h,v 1.12 2001/11/06 06:40:44 simonb Exp $ */
/* $NetBSD: quota.h,v 1.13 2002/12/01 00:12:12 matt Exp $ */
/*
* Copyright (c) 1982, 1986, 1993
@ -216,4 +216,4 @@ int quotactl __P((const char *, int , int, void *));
__END_DECLS
#endif /* _KERNEL */
#endif /* _UFS_UFS_QUOTA_H_ */
#endif /* !_UFS_UFS_QUOTA_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: ufs_bswap.h,v 1.10 2002/01/31 19:18:18 tv Exp $ */
/* $NetBSD: ufs_bswap.h,v 1.11 2002/12/01 00:12:12 matt Exp $ */
/*
* Copyright (c) 1998 Manuel Bouyer.
@ -32,6 +32,9 @@
*
*/
#ifndef _UFS_UFS_BSWAP_H_
#define _UFS_UFS_BSWAP_H_
#if defined(_KERNEL_OPT)
#include "opt_ffs.h"
#endif
@ -88,3 +91,5 @@ ufs_rw64(a, ns)
(a) = ufs_rw32(ufs_rw32((a), (ns)) + (b), (ns))
#define ufs_add64(a, b, ns) \
(a) = ufs_rw64(ufs_rw64((a), (ns)) + (b), (ns))
#endif /* !_UFS_UFS_BSWAP_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: ufs_extern.h,v 1.28 2001/12/18 10:57:23 fvdl Exp $ */
/* $NetBSD: ufs_extern.h,v 1.29 2002/12/01 00:12:12 matt Exp $ */
/*-
* Copyright (c) 1991, 1993, 1994
@ -35,6 +35,9 @@
* @(#)ufs_extern.h 8.10 (Berkeley) 5/14/95
*/
#ifndef _UFS_UFS_EXTERN_H_
#define _UFS_UFS_EXTERN_H_
struct buf;
struct componentname;
struct direct;
@ -180,3 +183,5 @@ void softdep_change_linkcnt __P((struct inode *));
void softdep_releasefile __P((struct inode *));
__END_DECLS
#endif /* !_UFS_UFS_EXTERN_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: ufsmount.h,v 1.9 2002/09/28 20:11:09 dbj Exp $ */
/* $NetBSD: ufsmount.h,v 1.10 2002/12/01 00:12:12 matt Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1993
@ -35,6 +35,9 @@
* @(#)ufsmount.h 8.6 (Berkeley) 3/30/95
*/
#ifndef _UFS_UFS_UFSMOUNT_H_
#define _UFS_UFS_UFSMOUNT_H_
/*
* Arguments to mount UFS-based filesystems
*/
@ -124,3 +127,5 @@ struct ufsmount {
#define blkptrtodb(ump, b) ((b) << (ump)->um_bptrtodb)
#define is_sequential(ump, a, b) ((b) == (a) + ump->um_seqinc)
#endif /* _KERNEL */
#endif /* !_UFS_UFS_UFSMOUNT_H_ */