Date: Wed, 3 May 95 11:25:50 MDT From: terry@cs.weber.edu (Terry Lambert) To: bde@zeta.org.au (Bruce Evans) Cc: j@uriah.heep.sax.de, rpt@miles.sso.loral.com, hackers@FreeBSD.org Subject: Re: GNU cpp bug with pthreads Message-ID: <9505031725.AA14847@cs.weber.edu> In-Reply-To: <199505030717.RAA31389@godzilla.zeta.org.au> from "Bruce Evans" at May 3, 95 05:17:33 pm
next in thread | previous 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. > > The FreeBSD headers (include and sys) consistently use `#ifdef __STDC__' > It makes no difference in a standard conforming environment but `ifdef' > may be more likely to DTRT for quasi-standard environments. The Sun "transitional compiler" #defines __STDC__ as 0 in non-ANSI mode and as 1 in ANSI mode. The use of #if resolves the potential problems, while #ifdef does not. On the other hand, #if is not necessarily a valid directive in older preprocessers. So you end up doing weenie things, first looking for the definition then looking at the value. Terry Lambert terry@cs.weber.edu --- Any opinions in this posting are my own and not those of my present or previous employers.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9505031725.AA14847>