From owner-cvs-src@FreeBSD.ORG Tue Feb 26 18:44:33 2008 Return-Path: Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 225471065673; Tue, 26 Feb 2008 18:44:33 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (trang.nuxi.org [74.95.12.85]) by mx1.freebsd.org (Postfix) with ESMTP id EC57913C44B; Tue, 26 Feb 2008 18:44:32 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1]) by dragon.nuxi.org (8.14.1/8.14.1) with ESMTP id m1QIiVuW015318; Tue, 26 Feb 2008 10:44:31 -0800 (PST) (envelope-from obrien@dragon.nuxi.org) Received: (from obrien@localhost) by dragon.nuxi.org (8.14.2/8.14.1/Submit) id m1QIiV5N015317; Tue, 26 Feb 2008 10:44:31 -0800 (PST) (envelope-from obrien) Date: Tue, 26 Feb 2008 10:44:31 -0800 From: "David O'Brien" To: Robert Watson Message-ID: <20080226184431.GA15264@dragon.NUXI.org> References: <200802261819.m1QIJnTO068648@repoman.freebsd.org> <20080226182149.D19847@fledge.watson.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080226182149.D19847@fledge.watson.org> X-Operating-System: FreeBSD 8.0-CURRENT User-Agent: Mutt/1.5.16 (2007-06-09) 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 X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: obrien@FreeBSD.org List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Feb 2008 18:44:33 -0000 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)