Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Apr 2003 11:09:17 -0700
From:      Terry Lambert <tlambert2@mindspring.com>
To:        Alexander Pohoyda <alexander.pohoyda@gmx.net>
Cc:        David O'Brien <obrien@FreeBSD.org>
Subject:   Re: HEADS UP: UFS2 now the default creation type on 5.0-CURRENT
Message-ID:  <3EA433CD.145ECB20@mindspring.com>
References:  <20030420192319.GB4963@HAL9000.homeunix.com> <Pine.NEB.3.96L.1030420174551.16891t-100000@fledge.watson.org> <87r87wawmx.fsf@oak.pohoyda.family>

next in thread | previous in thread | raw e-mail | index | archive | help
Alexander Pohoyda wrote:
> > +ufs2_daddr_t
> > +__cgbase(struct fs *fs, int32_t c)
> > +{
> > +     return cgbase(fs, c);
> > +}
> >  #undef cgbase
> > -#define cgbase(fs, c)   ((ufs2_daddr_t)((fs)->fs_fpg * (c)))
> > +#define      cgbase  __cgbase
> 
> Looks like recursion here.

It's not.  In the C language, "#define" values are only in
scope after their definition.  The effect of the above code
is to wrap the implicit cast of (ufs2_daddr_t).  The cgbase()
that gets called in __cgbase() is not the cgbase() #defined
later.

-- Terry



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3EA433CD.145ECB20>