From owner-freebsd-hackers Wed May 3 20:03:18 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id UAA14532 for hackers-outgoing; Wed, 3 May 1995 20:03:18 -0700 Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.34]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id UAA14487 for ; Wed, 3 May 1995 20:02:38 -0700 Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.9/8.6.9) id MAA31717; Thu, 4 May 1995 12:59:12 +1000 Date: Thu, 4 May 1995 12:59:12 +1000 From: Bruce Evans Message-Id: <199505040259.MAA31717@godzilla.zeta.org.au> To: bde@zeta.org.au, terry@cs.weber.edu Subject: Re: GNU cpp bug with pthreads Cc: hackers@FreeBSD.org, j@uriah.heep.sax.de, rpt@miles.sso.loral.com Sender: hackers-owner@FreeBSD.org Precedence: bulk >> 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