From owner-freebsd-current Thu Nov 8 0:40:26 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 A7C8B37B417 for ; Thu, 8 Nov 2001 00:40:21 -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 fA88eJa12974; Thu, 8 Nov 2001 01:40:20 -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 fA88dv740802; Thu, 8 Nov 2001 01:39:57 -0700 (MST) (envelope-from imp@harmony.village.org) Message-Id: <200111080839.fA88dv740802@harmony.village.org> To: Joerg Wunsch Subject: Re: malloc.h Cc: Cyrille Lefevre , freebsd-current@FreeBSD.ORG In-reply-to: Your message of "Thu, 08 Nov 2001 07:50:21 +0100." <20011108075021.P43204@uriah.heep.sax.de> References: <20011108075021.P43204@uriah.heep.sax.de> <200111072045.fA7KjLP70989@uriah.heep.sax.de> <200111080020.fA80Kpd99323@gits.dyndns.org> Date: Thu, 08 Nov 2001 01:39:57 -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 <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. It isn't different. Some people like to #define TRUE (1 == 1) too, which is bogus, imho. They like to trot out the fact that some whacked out compiler from the 1980's or earlier defined TRUE to be 255 or something like that. :-). I wouldn't worry about it #if __STDC__ is exactly right. Older, pre ANSI cpp would treat this correctly, unless they were very very very old and didn't have the #if directive, but only the #ifdef directive. That's so old, I've never seen one, but rumors about their existitance filled comp.lang.c in 1985-1989 when I still had time for netnews. Older cpp did what ansi enshrined as the standard in this respect. Except they might have treated a symbol not defined as 0, which is a suble difference, but doesn't matter here. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message