delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/03/07/19:50:52

From: fjh AT cs DOT mu DOT OZ DOT AU (Fergus Henderson)
Subject: Re: bash export problem
7 Mar 1997 19:50:52 -0800 :
Approved: cygnus DOT gnu-win32 AT cygnus DOT com
Distribution: cygnus
Message-ID: <199703072114.IAA09578.cygnus.gnu-win32@murlibobo.cs.mu.OZ.AU>
Original-To: kuku AT gilberto DOT physik DOT rwth-aachen DOT de
Original-Cc: gnu-win32 AT cygnus DOT com (gnu-win32)
In-Reply-To: <199703070816.JAA13924@gilberto.physik.rwth-aachen.de> from "Christoph Kukulies" at Mar 7, 97 09:16:46 am
X-Mailer: ELM [version 2.4 PL24]
Original-Sender: owner-gnu-win32 AT cygnus DOT com

Christoph Kukulies, you wrote:
> 
> > Christoph Kukulies wrote:
> > 
> > > The escape strings are not exported to the environment, i.e., they are
> > > empty.
> > 
> > cygwin upcases all environment names.
> 
> Huh? Is this a DOS resp. NT mandate? 

Here's what the source code says (this is from `src/winsup/dcrt0.cc'):

    /* Amazingly, NT has a case sensitive environment name list,
       only sometimes.
       eg, it's normal to have NT set your "Path" to something.
       Later, you set "PATH" to something else.  This alters "Path".
       But if you try and do a naive getenv on "PATH" you'll get nothing. 
       
       So we upper case the labels here to prevent confusion later. */

I think a case-insensitive getenv() would be better.
The current approach breaks all code using lower-case environment
variables to communicate between processes, whereas a case-insensitive
getenv() would only break code that used both upper and lower case
versions of the same name.

-- 
Fergus Henderson <fjh AT cs DOT mu DOT oz DOT au>   |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>   |  of excellence is a lethal habit"
PGP: finger fjh AT 128 DOT 250 DOT 37 DOT 3         |     -- the last words of T. S. Garp.
-
For help on using this list, send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019