Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 May 1995 09:01:02 -0700
From:      patl@asimov.lashley.slip.netcom.com
To:        rpt@miles.sso.loral.com, joerg_wunsch@uriah.heep.sax.de
Cc:        hackers@FreeBSD.org
Subject:   Re: GNU cpp bug with pthreads
Message-ID:  <9505031601.AA00447@lashley.slip.netcom.com>

next in thread | raw e-mail | index | archive | help
|>  > #ifdef __STDC__
|>  
|>  Note: this should be ``#if __STDC__'' anyway.  Some preprocessors do
|>  define this macro to 0 when running in `traditional' mode.  ANSI says
|>  it is ``the constant 1'' in a standard-conforming environment.

Actually, if you really want to be safe, it should be:

	#if defined(__STDC__) && (__STDC__ == 1)

There is (or was) at least one non-conforming compiler that set
__STDC__ to 2.  (And at least one that would complain if you
tried '(__STDC__ == 1)' when __STDC__ hasn't been set at all...)



-Pat



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9505031601.AA00447>