Date: Tue, 26 Feb 2008 10:44:31 -0800 From: "David O'Brien" <obrien@FreeBSD.org> To: Robert Watson <rwatson@FreeBSD.org> Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/fs/nullfs null_vfsops.c src/sys/fs/nwfs nwfs_vfsops.c src/sys/fs/smbfs smbfs_vfsops.c src/sys/kern vfs_default.c vfs_vnops.c src/sys/sys mount.h vnode.h src/sys/ufs/ufs quota.h ufs_quota.c ufs_vfsops.c Message-ID: <20080226184431.GA15264@dragon.NUXI.org> In-Reply-To: <20080226182149.D19847@fledge.watson.org> References: <200802261819.m1QIJnTO068648@repoman.freebsd.org> <20080226182149.D19847@fledge.watson.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Feb 26, 2008 at 06:25:51PM +0000, Robert Watson wrote: > To be specific, it's about code on the order of the following -- in the > include file: > vfs_quotactl_t nnpfs_quotactl; > > In the .c file here nnpfs_quotactl is implemented: > int > nnpfs_quotactl(struct mount *mp, int cmd, uid_t uid, caddr_t arg, > d_thread_t *p) > { .. > In another .c file where nnpfs_quotactl is used: > .vfs_quotactl = nnpfs_quotactl, This is one of the major warts I find with the C language. You cannot use the typedef'ed type used in the declaration in the definition - thus you always get these type mis-matches that a strongly typed language would barf on. > The compile keels over when it discovers that nnpfs_quotactl doesn't match > the implementation because it doesn't match the typedef. So it's actually > our typedef, not Arla's typedef. With C its just usually the types are based on the same thing. -- -- David (obrien@FreeBSD.org)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080226184431.GA15264>