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  ([EMAIL PROTECTED])
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to