Date: Thu, 08 Nov 2001 09:32:35 -0700 From: Warner Losh <imp@harmony.village.org> To: clefevre@citeweb.net Cc: Joerg Wunsch <joerg_wunsch@uriah.heep.sax.de>, freebsd-current@FreeBSD.ORG Subject: Re: malloc.h Message-ID: <200111081632.fA8GWZ743834@harmony.village.org> In-Reply-To: Your message of "Thu, 08 Nov 2001 10:50:18 %2B0100." <200111080950.fA89oIk21059@gits.dyndns.org> References: <200111080950.fA89oIk21059@gits.dyndns.org>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <200111080950.fA89oIk21059@gits.dyndns.org> Cyrille Lefevre writes: : Warner Losh wrote: : > In message <20011108075021.P43204@uriah.heep.sax.de> Joerg Wunsch writes: : > : > #if (__STDC__-0) == 0 : > : : > : What is the difference to my version (except that it would fail for : > : __STDC__ being greater than 1)? I don't know how pre-ANSI cpps did : > : behave, but at least a standard-conformant cpp must replace any : > : identifier in an #if statement that remains after macro expansion by : > : 0L. : : the difference is that if __STDC__ isn't defined, #if (-0)==0 continue : to work. No. If __STDC__ isn't defined, the old K&R cpp will substitude 0. At least most unix, portable cc based ones do. But I do see the utility of the trick. : also, as I remember me, Solaris or HP uses the construction I post : in they headers. Right. But the solaris and HP compilers handled the #if __STDC__ properly. I've used it there several times since 1991 or so when I ported OI to about 50 different machines. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200111081632.fA8GWZ743834>