Control auto-uppercasing of environment variables
Ernie Coskrey
Ernie.Coskrey@steeleye.com
Thu Jan 20 20:53:00 GMT 2005
> -----Original Message-----
> From: Larry Hall [mailto:no-personal-replies-please-lh@cygwin.com]
> Sent: Friday, January 14, 2005 11:31 PM
> To: Ernie Coskrey; cygwin-patches@cygwin.com
> Subject: RE: Control auto-uppercasing of environment variables
>
>
> At 03:28 PM 1/14/2005, you wrote:
> >Well, I suppose there are some similarities between what the
> uppercase_env and check_case options are used for, but
> check_case is specifically targeted at handling case
> sensitivity with regard to filenames, not environment
> variables. The subvalues of check_case are specified as
> "levels" (relaxed, adjust, and strict), so I don't think
> there's a clean way to use this unless we completely changed
> the meaning of what check_case is intended to do.
> >
> >You'd also have to be able to combine subvalues - for
> example, some users might want strict file checking and no
> environment variable uppercasing, others might want relaxed
> file checking and uppercasing of environment variables. A
> separate CYGWIN option seems cleaner.
>
>
> I agree.
>
> I only glanced quickly at your patch but the new behavior
> doesn't distinguish
> between 9x and NT platforms. As I recall, and I may be
> mistaken, 9x needed
> the environment upper-cased to work. Did you try your patch on a 9x
> platform?
>
>
>
> --
> Larry Hall http://www.rfk.com
> RFK Partners, Inc. (508) 893-9779 - RFK Office
> 838 Washington Street (508) 893-9889 - FAX
> Holliston, MA 01746
>
On a Windows 9X system, environment variables are commonly configured in AUTOEXEC.BAT using the "set" command. The set command automatically uppercases the variable name - so adding "set MyValue=5" to autoexec.bat will result in an environment variable whose name is MYVALUE (as will running the set command from the CMD prompt).
There are two variables - windir and winbootdir - that are lower-case on a Windows 98 system. Using my patch, I was able to run a shell and see that these variables remain lower-case in the shell environment, and that this didn't create any problems with any of the Cygwin utilities I tried. I could have written a program that would do a variety of SetEnvironmentVariable() calls using mixed-case variable names, and then would execute bash, but didn't go to those lengths. I don't believe this patch will have any adverse side-effects on a Win9X box.
Ernie Coskrey
SteelEye Technology, Inc.
More information about the Cygwin-patches
mailing list