From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 338 invoked by alias); 11 Dec 2012 15:07:10 -0000 Received: (qmail 320 invoked by uid 22791); 11 Dec 2012 15:07:08 -0000 X-SWARE-Spam-Status: No, hits=-7.6 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 11 Dec 2012 15:06:57 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qBBF6vOd009951 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 11 Dec 2012 10:06:57 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id qBBF6tIl027923 for ; Tue, 11 Dec 2012 10:06:56 -0500 Message-ID: <50C74C0F.7040607@redhat.com> Date: Tue, 11 Dec 2012 15:07:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: gdb-patches@sourceware.org Subject: Re: [RFA/mingw32] environment variables are case-insensitive on win32 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> <20121210152408.GB11967@calimero.vinschen.de> <20121210154231.GC17188@adacore.com> <20121210155752.GA16027@calimero.vinschen.de> <50C74268.7090209@redhat.com> <20121211144043.GA19874@calimero.vinschen.de> In-Reply-To: <20121211144043.GA19874@calimero.vinschen.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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/msg00333.txt.bz2 On 12/11/2012 02:40 PM, Corinna Vinschen wrote: > I phrased my reply too simple, sorry! What happens is this: Thanks! This clarifies things for me. One follow-up FAOD-like question below. > Internally, Cygwin doesn't use the Windows environment, but rather a > POSIX equivalent. When a Cygwin process forks or executes another > Cygwin process, the environment is given to the child process in the > POSIXified layout, not using the CreateProcess environment pointer. > > However, when a Cygwin process gets started by a *non*-Cygwin process, > this internal mechanism can't work, and the POSIX environment is created > from the Windows environment. Up until 2008, all environment variables > in the Windows env were converted to uppercase when creating the POSIX > env. In 2008 we changed that mechanism to uppercase only a certain set > of env vars, and that's done up to today for compatibility reasons. The > list of still uppercased vars is this: > > ALLUSERSPROFILE > COMMONPROGRAMFILES > COMPUTERNAME > COMSPEC > HOME > HOMEDRIVE > HOMEPATH > NUMBER_OF_PROCESSORS > OS > PATH > PATHEXT > PROCESSOR_ARCHITECTURE > PROCESSOR_IDENTIFIER > PROCESSOR_LEVEL > PROCESSOR_REVISION > PROGRAMFILES > SYSTEMDRIVE > SYSTEMROOT > TEMP > TERM > TMP > TMPDIR > WINDIR Then, the situation of GDB (a Cygwin process) starting the inferior with CreateProcess ends up being the same as if GDB was not a Cygwin process, and that set of vars always ends up uppercased in the inferior, right? Or does Cygwin have some magic that detects the case, and avoids the uppercasing in this case? -- Pedro Alves