From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18473 invoked by alias); 10 Dec 2012 18:35:08 -0000 Received: (qmail 17981 invoked by uid 22791); 10 Dec 2012 18:35:05 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,MSGID_MULTIPLE_AT X-Spam-Check-By: sourceware.org Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.200.154) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 10 Dec 2012 18:34:58 +0000 Received: from md13.u-strasbg.fr (md13.u-strasbg.fr [130.79.200.248]) by mailhost.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id qBAIYrLm080072 ; Mon, 10 Dec 2012 19:34:53 +0100 (CET) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from mailserver.u-strasbg.fr (ms11.u-strasbg.fr [130.79.204.111]) by md13.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id qBAIYrqX030373 ; Mon, 10 Dec 2012 19:34:53 +0100 (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from E6510Muller (lec67-4-82-230-53-140.fbx.proxad.net [82.230.53.140]) (user=mullerp mech=LOGIN) by mailserver.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id qBAIYp1n000627 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) ; Mon, 10 Dec 2012 19:34:52 +0100 (envelope-from pierre.muller@ics-cnrs.unistra.fr) From: "Pierre Muller" To: "'Jerome Guitton'" , References: <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> <20121210165344.GC16027@calimero.vinschen.de> <20121210182156.GF17188@adacore.com> In-Reply-To: <20121210182156.GF17188@adacore.com> Subject: RE: [RFA/mingw32] environment variables are case-insensitive on win32 Date: Mon, 10 Dec 2012 18:35:00 -0000 Message-ID: <002101cdd705$0cde8390$269b8ab0$@muller@ics-cnrs.unistra.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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/msg00266.txt.bz2 > -----Message d'origine----- > De=A0: gdb-patches-owner@sourceware.org [mailto:gdb-patches- > owner@sourceware.org] De la part de Jerome Guitton > Envoy=E9=A0: lundi 10 d=E9cembre 2012 19:22 > =C0=A0: gdb-patches@sourceware.org > Objet=A0: Re: [RFA/mingw32] environment variables are case-insensitive on > win32 >=20 > Corinna Vinschen (vinschen@redhat.com): >=20 > > 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. >=20 > Thank you very much for this clarification Corinna! >=20 > At this point I feel that the most sensible thing to do for mingw32 is > to have case-insensitive env vars, even though on certain > circonstances case-sensitivity would work. I have one other good > reason to think that: the path command does not work today in mingw32 > when running the debugger from CMD.EXE. That is caused by the fact the > corresponding environment variable has a different casing than PATH: > it's 'Path' (at least on my machine). So a case-sensitive lookup > fails, a new variable 'PATH' is created in the environment vector, and > the inferior ends up with a truncated environment. That is strange because when I start a mingw32 compiled GDB executable from a console=20 "show env" command does indeed display Path variable, but nonetheless GDB is perfectly able to use Path variable... (gdb) show env ALLUSERSPROFILE=3DC:\ProgramData <<<