Date: Thu, 4 May 1995 12:59:12 +1000 From: Bruce Evans <bde@zeta.org.au> To: bde@zeta.org.au, terry@cs.weber.edu Cc: hackers@FreeBSD.org, j@uriah.heep.sax.de, rpt@miles.sso.loral.com Subject: Re: GNU cpp bug with pthreads Message-ID: <199505040259.MAA31717@godzilla.zeta.org.au>
next in thread | raw e-mail | index | archive | help
>> 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. The FreeBSD headers user `#ifdef __STDC__' intentionally to attempt to handle kinda-sorta-STDC compilers that define __STDC__ as something other than 1. It's hard to tell whether such compilers have STDC features such as `const' and `volatile' and whether not using them would silently break something. It's probably best to assume the features so that things break noisily at compile time. >On the other hand, #if is not necessarily a valid directive in older >preprocessers. Older than K&R1 (1978)? FreeBSD doesn't attempt to support those. Bruce
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199505040259.MAA31717>