Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 9 Nov 2001 23:02:58 +1100 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Garrett Wollman <wollman@khavrinen.lcs.mit.edu>
Cc:        Joerg Wunsch <joerg_wunsch@uriah.heep.sax.de>, <freebsd-current@FreeBSD.ORG>
Subject:   Re: malloc.h
Message-ID:  <20011109224852.N9783-100000@delplex.bde.org>
In-Reply-To: <200111082230.fA8MU5C40359@khavrinen.lcs.mit.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 8 Nov 2001, Garrett Wollman wrote:

> <<On Thu, 8 Nov 2001 22:59:15 +0100, Joerg Wunsch <j@uriah.heep.sax.de> said:
>
> > Well, no.  Solaris uses #if (__STDC__-1==0) only in connection with
> > other conditions in the same #if part.  Otherwise, they use a simple
> > #ifdef __STDC__ as well.

FreeBSD uses a simple `#ifdef __STDC__' (everywhere else in /usr/include)
too, despite this being wronger than `#if __STDC__' for non-conforming
implementations.  (A standard can't specify what non-conforming
implementations do.  It's not clear what __STDC__ == 0 means, but it
certainly means that C is not implemented.)

> (FOO - 1 == 0) is the traditional-cpp way of saying `defined(FOO)', in
> the restricted case of FOO is defined to be zero, one, or the empty
> string (parsed the same as zero).

(FOO + n) is also useful for standard-cpp when FOO is poorly specified to
be either numeric or undefined.  Some of the POSIX limits have fuzzy
specs like this (or worse, fuzzy specs that don't even say that FOO is
numeric if it is defined).

Bruce


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?20011109224852.N9783-100000>