From owner-freebsd-hackers Fri May 12 17:08:07 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id RAA14352 for hackers-outgoing; Fri, 12 May 1995 17:08:07 -0700 Received: from cs.weber.edu (cs.weber.edu [137.190.16.16]) by freefall.cdrom.com (8.6.10/8.6.6) with SMTP id RAA14346 for ; Fri, 12 May 1995 17:08:06 -0700 Received: by cs.weber.edu (4.1/SMI-4.1.1) id AA14847; Wed, 3 May 95 11:25:51 MDT From: terry@cs.weber.edu (Terry Lambert) Message-Id: <9505031725.AA14847@cs.weber.edu> Subject: Re: GNU cpp bug with pthreads To: bde@zeta.org.au (Bruce Evans) Date: Wed, 3 May 95 11:25:50 MDT Cc: j@uriah.heep.sax.de, rpt@miles.sso.loral.com, hackers@FreeBSD.org In-Reply-To: <199505030717.RAA31389@godzilla.zeta.org.au> from "Bruce Evans" at May 3, 95 05:17:33 pm X-Mailer: ELM [version 2.4dev PL52] Sender: hackers-owner@FreeBSD.org Precedence: bulk > >> #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.