xfs
[Top] [All Lists]

Re: Conflicting Types Between .h and .c files

To: Danny Cox <DCox@xxxxxxxxxxxxxx>
Subject: Re: Conflicting Types Between .h and .c files
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Mon, 19 Aug 2002 19:47:35 +0100
Cc: XFS Mailing List <linux-xfs@xxxxxxxxxxx>
In-reply-to: <1029504550.1808.5.camel@wiley>; from DCox@SnapServer.com on Fri, Aug 16, 2002 at 09:29:09AM -0400
References: <1029504550.1808.5.camel@wiley>
Sender: owner-linux-xfs@xxxxxxxxxxx
User-agent: Mutt/1.2.5.1i
On Fri, Aug 16, 2002 at 09:29:09AM -0400, Danny Cox wrote:
> Howdy!
> 
>       I just updated from CVS this AM, and am having type conflicts between
> the xfs .h and .c files on the type of kmem_zone.  The .h file sez its:
> 
>       extern struct kmem_zone *<grump>;
> 
> while the .c file sez its:
> 
>       kmem_zone_t *<grump>;
> 
> While I know it's the same thing, the compiler (2.96 from RH) apparently

I don't think that's valid.  And at least gcc 3.2 doesn't complain..

> thinks they're different.  Further, I know that Linux likes the 'struct
> name' form, so that it's obvious that this var is a struct (or refers to
> a struct), rather than anything else.

In this case not, as the kmem_zone_t is an object opaque to it's user.
Compare it to kmem_cache_t in þhe core Linux code.


<Prev in Thread] Current Thread [Next in Thread>