From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7549 invoked by alias); 10 Dec 2012 16:54:11 -0000 Received: (qmail 7467 invoked by uid 22791); 10 Dec 2012 16:53:55 -0000 X-Spam-Check-By: sourceware.org Received: from aquarius.hirmke.de (HELO calimero.vinschen.de) (217.91.18.234) by sourceware.org (qpsmtpd/0.83/v0.83-20-g38e4449) with ESMTP; Mon, 10 Dec 2012 16:53:47 +0000 Received: by calimero.vinschen.de (Postfix, from userid 500) id CD1E86A09CF; Mon, 10 Dec 2012 17:53:44 +0100 (CET) Date: Mon, 10 Dec 2012 16:54:00 -0000 From: Corinna Vinschen To: gdb-patches@sourceware.org Subject: Re: [RFA/mingw32] environment variables are case-insensitive on win32 Message-ID: <20121210165344.GC16027@calimero.vinschen.de> Reply-To: gdb-patches@sourceware.org Mail-Followup-To: gdb-patches@sourceware.org References: <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> <20121210153510.GB17188@adacore.com> <002401cdd6f0$c0b317b0$42194710$@muller@ics-cnrs.unistra.fr> <20121210161831.GH15147@adacore.com> <000001cdd6f3$2d12b490$87381db0$@muller@ics-cnrs.unistra.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <000001cdd6f3$2d12b490$87381db0$@muller@ics-cnrs.unistra.fr> User-Agent: Mutt/1.5.21 (2010-09-15) 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/msg00257.txt.bz2 On Dec 10 17:26, Pierre Muller wrote: > > > > -----Message d'origine----- > > De : gdb-patches-owner@sourceware.org [mailto:gdb-patches- > > owner@sourceware.org] De la part de 'Jerome Guitton' > > Envoyé : lundi 10 décembre 2012 17:19 > > À : Pierre Muller > > Cc : gdb-patches@sourceware.org > > Objet : Re: [RFA/mingw32] environment variables are case-insensitive on > > win32 > > > > Pierre Muller (pierre.muller@ics-cnrs.unistra.fr): > > > > > I am not sure, but I have the impression that the case_preserving > > > environment of Windows OS is more a shell issue than an OS issue. > > > > I don't think so, because I see the same problem by using "set env" > > from GDB. But it does not matter much. I am now convinced that my > > setup is to blame. So I'm happy to withdraw the Cygwin-specific part > > of my patch. > > But my email was not about the cygwin part, > it was really about the mingw executable: > Currently, you can set several separate environment variables > having the same upeercase'd name, which > can be passed correctly to the debuggee. Just as a data point: Only the Win32 function GetEnviromentVariable searches the environment case-insensitive, and SetEnviromentVariable overwrites the first occurence of a variable after a case-insensitive search. These functions are also used by CMD.EXE, so that it's case-insensitive as well. But that doesn't affect the ability to handle case-sensitive environments in applications NOT using GetEnviromentVariable/SetEnviromentVariable. If you give an environment to the CreateProcess function it will go unchanged to the inferior process. Fetching the complete environment with GetEnvironmentStrings in the inferior will show the full, unchanged, environment, with as much variables only differing by case as you like. Corinna -- Corinna Vinschen Cygwin Project Co-Leader Red Hat