HEADS UP: UFS2 now the default creation type on 5.0-CURRENT

Terry Lambert tlambert2 at mindspring.com
Mon Apr 21 11:10:58 PDT 2003


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


More information about the freebsd-current mailing list