Date: Thu, 8 Nov 2001 05:04:17 +0100 (CET) From: Cyrille Lefevre <clefevre@citeweb.net> To: Garrett Wollman <wollman@khavrinen.lcs.mit.edu> Cc: freebsd-current@FreeBSD.ORG Subject: Re: malloc.h Message-ID: <200111080404.fA844Hl08636@gits.dyndns.org> In-Reply-To: <200111080237.fA82bGO28786@khavrinen.lcs.mit.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
Garrett Wollman wrote: > <<On Thu, 8 Nov 2001 01:20:50 +0100 (CET), Cyrille Lefevre <clefevre@citeweb.net> said: > > > Joerg Wunsch wrote: > >> Sheldon Hearn <sheldonh@starjuice.net> wrote: > >> > >> > This is how we've decided to encourage progress in this specific > >> > case of header misuse. > >> > >> IMHO the current version of <malloc.h> is wrong. This header > >> file used to be a legitimate header file prior to ANSI C. So > >> it should be > >> > >> #if __STDC__ > > > this statement is wrong. it should be > > > #ifdef __STDC__ > > > or > > > #if (__STDC__-0) == 0 > > No, it shouldn't. Leavinmg aside the correctness of the previous > suggestion, anyone who explicitly defines __STDC__ to be the empty > string should get what he deserves. In preprocessor expressions, any > identifiers left after macro substitution are considered to have a > value of zero. I haven't access to a Solaris or an HP box, but I'm not really sure that all compilers follow this rule in K&R mode. IMHO, you are lucky this works w/ gcc -traditional (I've just verified). Cyrille. -- Cyrille Lefevre mailto:clefevre@citeweb.net 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?200111080404.fA844Hl08636>