From owner-freebsd-current Thu Nov 8 8:32:48 2001 Delivered-To: freebsd-current@freebsd.org Received: from rover.village.org (rover.bsdimp.com [204.144.255.66]) by hub.freebsd.org (Postfix) with ESMTP id C993F37B419 for ; Thu, 8 Nov 2001 08:32:42 -0800 (PST) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.11.3/8.11.3) with ESMTP id fA8GWba14577; Thu, 8 Nov 2001 09:32:37 -0700 (MST) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost [127.0.0.1]) by harmony.village.org (8.11.6/8.11.6) with ESMTP id fA8GWZ743834; Thu, 8 Nov 2001 09:32:36 -0700 (MST) (envelope-from imp@harmony.village.org) Message-Id: <200111081632.fA8GWZ743834@harmony.village.org> To: clefevre@citeweb.net Subject: Re: malloc.h Cc: Joerg Wunsch , freebsd-current@FreeBSD.ORG In-reply-to: Your message of "Thu, 08 Nov 2001 10:50:18 +0100." <200111080950.fA89oIk21059@gits.dyndns.org> References: <200111080950.fA89oIk21059@gits.dyndns.org> Date: Thu, 08 Nov 2001 09:32:35 -0700 From: Warner Losh Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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