Date: Sat, 23 Jan 1999 20:42:48 -0800 (PST) From: John Polstra <jdp@polstra.com> To: bde@zeta.org.au Cc: committers@FreeBSD.ORG Subject: Re: cvs commit: src/usr.bin/xlint/xlint xlint.c Message-ID: <199901240442.UAA16644@vashon.polstra.com> In-Reply-To: <199901240026.LAA24168@godzilla.zeta.org.au>
next in thread | previous in thread | raw e-mail | index | archive | help
In article <199901240026.LAA24168@godzilla.zeta.org.au>,
Bruce Evans <bde@zeta.org.au> wrote:
> >>
> >> Revision Changes Path
> >> 1.6 +8 -6 src/usr.bin/xlint/xlint/xlint.c
> >
> >I'm glad you put in this automatic solution. But please get
> >rid of your local STRINGIZE(x) and STRINGIZEINT(x) macros, and
> >use the FreeBSD-standard __XSTRING(x) instead. It is defined
>
> 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__))
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
is concerned. If there were a space after the "-D" then it wouldn't
come out right, because both "__FreeBSD__" macros would expand. I
think it's clearer as written, except that it should use __XSTRING
instead of the home-grown STRINGIZE.
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.
John
--
John Polstra jdp@polstra.com
John D. Polstra & Co., Inc. Seattle, Washington USA
"Nobody ever went broke underestimating the taste of the American public."
-- H. L. Mencken
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199901240442.UAA16644>
