From owner-freebsd-current@FreeBSD.ORG Mon Apr 21 11:10:58 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1A01337B404; Mon, 21 Apr 2003 11:10:58 -0700 (PDT) Received: from puffin.mail.pas.earthlink.net (puffin.mail.pas.earthlink.net [207.217.120.139]) by mx1.FreeBSD.org (Postfix) with ESMTP id C05E343FE3; Mon, 21 Apr 2003 11:10:56 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from pool0061.cvx22-bradley.dialup.earthlink.net ([209.179.198.61] helo=mindspring.com) by puffin.mail.pas.earthlink.net with asmtp (SSLv3:RC4-MD5:128) (Exim 3.33 #1) id 197fkg-0005ju-00; Mon, 21 Apr 2003 11:10:51 -0700 Message-ID: <3EA433CD.145ECB20@mindspring.com> Date: Mon, 21 Apr 2003 11:09:17 -0700 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Alexander Pohoyda References: <20030420192319.GB4963@HAL9000.homeunix.com> <87r87wawmx.fsf@oak.pohoyda.family> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-ELNK-Trace: b1a02af9316fbb217a47c185c03b154d40683398e744b8a4b2058e18f4be6dfb61e4c4996b5b5d1d667c3043c0873f7e350badd9bab72f9c350badd9bab72f9c cc: David Schultz cc: Robert Watson cc: current@FreeBSD.org cc: David O'Brien Subject: Re: HEADS UP: UFS2 now the default creation type on 5.0-CURRENT X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Apr 2003 18:10:58 -0000 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