From owner-cvs-all Sat Jan 23 21:28:22 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id VAA13338 for cvs-all-outgoing; Sat, 23 Jan 1999 21:28:22 -0800 (PST) (envelope-from owner-cvs-all@FreeBSD.ORG) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.26.10.9]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id VAA13332 for ; Sat, 23 Jan 1999 21:28:18 -0800 (PST) (envelope-from bde@godzilla.zeta.org.au) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.7/8.8.7) id QAA11776; Sun, 24 Jan 1999 16:28:03 +1100 Date: Sun, 24 Jan 1999 16:28:03 +1100 From: Bruce Evans Message-Id: <199901240528.QAA11776@godzilla.zeta.org.au> To: bde@zeta.org.au, jdp@polstra.com Subject: Re: cvs commit: src/usr.bin/xlint/xlint xlint.c Cc: committers@FreeBSD.ORG Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk >> Also, use the FreeBSD-standard __CONCAT() macro if you don't want >> to break xlint's K&R support some more :-). > >Do you mean like this? > > __XSTRING(__CONCAT(D__FreeBSD__=,__FreeBSD__)) -D... > >Hrm, I'm not so sure that's advisable. It will work, but only because >the "-D" happens to be jammed up against the "__FreeBSD__", turning it >into a different identifier "D__FreeBSD__" as far as the preprocessor I didn't think about it enough, but I wouldn't worry about that. >Granted, two consecutive string literals get collapsed into one only >by an ANSI preprocessor. But __XSTRING also requires ANSI, so it's >a moot point. Concatenation could be handled by xlint's utility functions concat2() and concat3(). Stringizing the value of __FreeBSD__ seems to require dynamic evaluation in the K&R case (e.g., sprintf(buf, "\"%d\"", __FreeBSD__). This is more portable. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message