From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29064 invoked by alias); 7 Oct 2011 12:26:01 -0000 Received: (qmail 29048 invoked by uid 22791); 7 Oct 2011 12:26:00 -0000 X-SWARE-Spam-Status: No, hits=-0.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,RCVD_IN_DNSWL_NONE,UNPARSEABLE_RELAY X-Spam-Check-By: sourceware.org Received: from nm30.access.bullet.mail.mud.yahoo.com (HELO nm30.access.bullet.mail.mud.yahoo.com) (66.94.237.95) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Fri, 07 Oct 2011 12:25:46 +0000 Received: from [66.94.237.197] by nm30.access.bullet.mail.mud.yahoo.com with NNFMP; 07 Oct 2011 12:25:46 -0000 Received: from [66.94.237.120] by tm8.access.bullet.mail.mud.yahoo.com with NNFMP; 07 Oct 2011 12:25:46 -0000 Received: from [127.0.0.1] by omp1025.access.mail.mud.yahoo.com with NNFMP; 07 Oct 2011 12:25:46 -0000 Received: (qmail 21107 invoked from network); 7 Oct 2011 12:25:45 -0000 X-Yahoo-SMTP: jenXL62swBAWhMTL3wnej93oaS0ClBQOAKs8jbEbx_o- Received: from cgf.cx (cgf@173.76.45.30 with login) by smtp101.vzn.mail.bf1.yahoo.com with SMTP; 07 Oct 2011 05:25:45 -0700 PDT Received: from localhost (ednor.casa.cgf.cx [192.168.187.5]) by cgf.cx (Postfix) with ESMTP id CB24113C0D3 for ; Fri, 7 Oct 2011 08:25:44 -0400 (EDT) Date: Fri, 07 Oct 2011 12:26:00 -0000 From: Christopher Faylor To: gdb-patches@sourceware.org Subject: Re: [RFA] testsuite: Add a test for passing of environment variables to inferior Message-ID: <20111007122544.GB9870@ednor.casa.cgf.cx> Mail-Followup-To: gdb-patches@sourceware.org References: <006301cc8292$367539b0$a35fad10$@muller@ics-cnrs.unistra.fr> <20111004134506.GB24369@calimero.vinschen.de> <000901cc82a4$dfba7cd0$9f2f7670$@muller@ics-cnrs.unistra.fr> <20111004151236.GC15757@calimero.vinschen.de> <003901cc82b0$471e3a00$d55aae00$@muller@ics-cnrs.unistra.fr> <20111005113941.GA13366@calimero.vinschen.de> <004401cc8357$74fd1c00$5ef75400$@muller@ics-cnrs.unistra.fr> <20111005125157.GA24105@calimero.vinschen.de> <20111006145106.GA21790@ednor.casa.cgf.cx> <20111006150256.GA26438@calimero.vinschen.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20111006150256.GA26438@calimero.vinschen.de> User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-10/txt/msg00195.txt.bz2 On Thu, Oct 06, 2011 at 05:02:56PM +0200, Corinna Vinschen wrote: >On Oct 6 10:51, Christopher Faylor wrote: >> Why not just check if CW_CVT_ENV_TO_WINENV is defined rather than checking >> specifically for a version number? Checking arbitrary versions like this >> should be a last resort. > >The CW_foo values are not macros, but enum values. You can't check >them for being defined. > >Possible workaround is to define them twice, once as enum and once >as macro, just as Linux does or just as some Cygwin headers do, >for instance : > > enum > { > IPPROTO_IP = 0, /* Dummy protocol for TCP */ > IPPROTO_HOPOPTS = 0, /* IPv6 Hop-by-Hop options */ > [...] > }; > > #define IPPROTO_IP IPPROTO_IP > #define IPPROTO_HOPOPTS IPPROTO_HOPOPTS > [...] > >If we do that in as well, I can change the test to >#ifdef CW_CVT_ENV_TO_WINENV. What do you think? Ok. cgf