From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28833 invoked by alias); 10 Dec 2012 16:09:34 -0000 Received: (qmail 28796 invoked by uid 22791); 10 Dec 2012 16:09:31 -0000 X-SWARE-Spam-Status: No, hits=-4.5 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_NO,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtaout23.012.net.il (HELO mtaout23.012.net.il) (80.179.55.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 10 Dec 2012 16:09:22 +0000 Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0MET00300OS5U400@a-mtaout23.012.net.il> for gdb-patches@sourceware.org; Mon, 10 Dec 2012 18:09:20 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MET003KYOVKLZA0@a-mtaout23.012.net.il> for gdb-patches@sourceware.org; Mon, 10 Dec 2012 18:09:20 +0200 (IST) Date: Mon, 10 Dec 2012 16:09:00 -0000 From: Eli Zaretskii Subject: Re: [RFA/mingw32] environment variables are case-insensitive on win32 In-reply-to: <20121210155752.GA16027@calimero.vinschen.de> To: gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: <83a9tlc2jb.fsf@gnu.org> References: <83wqx3t6r9.fsf@gnu.org> <20121130162852.GD32262@adacore.com> <50B902D0.6060809@redhat.com> <20121203113147.GB12055@adacore.com> <20121209235344.GA12152@ednor.casa.cgf.cx> <20121210105115.GB15147@adacore.com> <20121210110128.GA12570@calimero.vinschen.de> <20121210134935.GL31477@adacore.com> <20121210152408.GB11967@calimero.vinschen.de> <20121210154231.GC17188@adacore.com> <20121210155752.GA16027@calimero.vinschen.de> X-IsSubscribed: yes 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: 2012-12/txt/msg00245.txt.bz2 > Date: Mon, 10 Dec 2012 16:57:52 +0100 > From: Corinna Vinschen > > On Dec 10 16:42, Jerome Guitton wrote: > > Corinna Vinschen (vinschen@redhat.com): > > > > > Cygwin is not Windows. Cygwin is a UNIX-like system like Linux, > > > Solaris, OpenBSD, etc. The question you should ask is this: Would > > > you like to match environment variable names case-insensitive on Linux, > > > Solaris, OpenBSD? If the answer is "no", the answer for Cygwin is "no", > > > too. > > > > Something may be broken in Cygwin's GDB, or maybe my version of Cygwin > > is too old, because environment variables that have the same names are > > identified in the inferior: > > > > guitton@kerel ~ > > $ export TEST_GDB_V=1 > > guitton@kerel ~ > > $ export TEST_GDB_v=2 > > > > guitton@kerel ~ > > $ env | grep TEST_GDB > > TEST_GDB_V=1 > > TEST_GDB_v=2 > > > > guitton@kerel ~ > > $ /bin/gdb ./gdb/testsuite/gdb.base/testenv.exe > > [...] > > (gdb) r > > Starting program: /home/guitton/GIT/GDB/builds/obj.gdb-fsf.cygwin/gdb/testsuite/gdb.base/testenv.exe > > [New thread 12692.0x16ac] > > [New thread 12692.0x22b0] > > TEST_GDB_V=2 > > Program found 1 variables starting with TEST_GDB > > Probably an old Cygwin version. Older versions of Cygwin did not > honor the case of env vars, but rather converted them all to uppercase, > but this is pre-2008! > > I don't have GDB test environment set up, but this works for me with the > most recent Cygwin version 1.7.18: If some versions of Cygwin are case-insensitive in this context, while others aren't, then a run-time test of the kind coded by Jerome is _exactly_ the Right Thing.