From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27957 invoked by alias); 12 Jun 2002 20:01:39 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 27919 invoked from network); 12 Jun 2002 20:01:35 -0000 Received: from unknown (HELO hiauly1.hia.nrc.ca) (132.246.100.193) by sources.redhat.com with SMTP; 12 Jun 2002 20:01:35 -0000 Received: from hiauly1.hia.nrc.ca (localhost [127.0.0.1]) by hiauly1.hia.nrc.ca (8.12.0.Beta16/8.12.0.Beta16) with ESMTP id g5CK1XFN026910; Wed, 12 Jun 2002 16:01:33 -0400 (EDT) Received: (from dave@localhost) by hiauly1.hia.nrc.ca (8.12.0.Beta16/8.12.0.Beta16) id g5CK1WML026908; Wed, 12 Jun 2002 16:01:32 -0400 (EDT) Message-Id: <200206122001.g5CK1WML026908@hiauly1.hia.nrc.ca> Subject: Re: Patch: Use tm_defines to configure default scheduling model on PA To: dj@redhat.com (DJ Delorie) Date: Wed, 12 Jun 2002 13:01:00 -0000 From: "John David Anglin" Cc: gcc-patches@gcc.gnu.org, law@redhat.com, aoliva@redhat.com In-Reply-To: <200206121900.g5CJ0qs21856@greed.delorie.com> from "DJ Delorie" at Jun 12, 2002 03:00:52 pm MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-SW-Source: 2002-06/txt/msg01142.txt.bz2 > > I still think it better to put the defines first because the headers > > may contain secondary defines based on the identifier that you want > > to redefine. > > Consider, for example, this from i386/cygwin.h: > > /* For Win32 ABI compatibility */ > #undef DEFAULT_PCC_STRUCT_RETURN > #define DEFAULT_PCC_STRUCT_RETURN 0 > > To do this with defines before includes, you'd need to put a #ifdef > around *every single* define in *every* header file, because you won't > know which will be overridden by targets. Yes. However, it's not reasonable to define the entire cygwin configuration in configure. If configure checked how to define DEFAULT_PCC_STRUCT_RETURN then I would say it has a place in configure, and that there should be a way independent of include files to override the default define. I agree that in some cases putting the defines after the headers is simpler and avoids the ifdef burden, however you loose some flexibility in what the headers can do. Dave -- J. David Anglin dave.anglin@nrc.ca National Research Council of Canada (613) 990-0752 (FAX: 952-6605)