This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Enviroment always uppercased; Help me, please


No, it doesn't

When calling env.exe (compiled with cygwin1.dll), cygwin programs installed
in c:/usr/bin

starting cmd.exe:

C:\>set garfield=1234
C:\>c:\usr\bin\env.exe | c:\usr\bin\grep -i gar
GARFIELD=1234

env.exe (the cygwin program) has uppercased the environment.
(the set in the example was the set of cmd.exe, useally there is no set.exe
in /usr/bin)

The solution, to start a cygwin program "NOT" from another cygwin program is
impossible on Windows. B. Gates won't rebuild Windows with useage of
cygwin1.dll?

And this is not typical for Windows (as you see by using set from cmd.exe)
and it is not typical for UNIX and POSIX. 

To uppercase some Environment values can make sense.

When exporting them to a DOS (and some Windows programs), but this is not
done by cygwin.

And it could make sense to uppercase *some* variables, which come from
Windows programs, see MKS Toolkit, like PATH, instead of Path, and some
more, but this is optional. Else the use of cygwin is very restricted. I
solved this problem in a port of the pdksh very carefully... But all the
work is trash, if startupcode will change the environment - without
notification or option to stop it.

At the moment I am looking for a stable way (see thread Re: cygwin gcc DLLs
loaded by Visual C++ crashing) to call the pdksh.exe as a pdksh1.dll.

But the solution posted is not stable at the moment. After a while the
programs will hang.
But the environment is okay (startupcode of MSVC seems to be okay...).

At least. Using the original Environment in cygwin is impossible. (> As cfg
said: "Don't start the program from a non cygwin program")

The solution could be a user build cygwin1.dll without the Environment
hack?!? Anybody?

Markus
- Thread closed.


> -----Original Message-----
> From: Hack Kampbjørn [mailto:cygwin@hack.kampbjorn.com]
> Sent: Thursday, February 28, 2002 3:50 PM
> To: Markus K. E. Kommant
> Cc: cygwin@cygwin.com
> Subject: Re: Enviroment always uppercased; Help me, please
> 
> 
> "Markus K. E. Kommant" wrote:
> > 
> > Really???
> > 
> > > Don't start the program from a non cygwin program.
> > 
> > I am using Windows 2000/NT operating system as the base for 
> my cygwin
> > programs and not DOS and not Linux.
> > 
> > Do anyone know a good trick to use POSIX Environment (or 
> simply real Windows
> > Environment) without the cygwin-DOS changes.
> > 
> > Hopefully waiting for help, without real POSIX I have to 
> look for another
> > programming base, instead of cygwin...
> > 
> > Probably there has anybody build an own cygwin1.dll with 
> POSIX Environment
> > on Windows???
> > 
> > Markus
> 
> I don't know what you're asking for. Cygwin does provide case 
> sensitive
> environment variables.
> 
> In a cmd.exe window:
> 
> 	C:\>set env_var=lowercase
> 	C:\>set
> 	[...]
> 	env_var=lowercase
> 	[...]
> 	C:\>set ENV_VAR=UPPERCASE
> 	C:\>set
> 	[...]
> 	env_var=UPPERCASE
> 	[...]
> 	C:\>cygwin
> 	$ set | grep -i env_var
> 	ENV_VAR=UPPERCASE
> 	$ logout
> 	C:\cygwin\bin>exit
> 
> And in cygwin's bash:
> 	$ env_var=lowercase
> 	$ ENV_VAR=UPPERCASE
> 	$ set | grep -i env_var
> 	ENV_VAR=UPPERCASE
> 	env_var=lowercase
> 	$ bash
> 	$ set | grep -i env_var
> 	$ exit
> 	$ export env_var ENV_VAR
> 	$ bash
> 	$ set | grep -i env_var
> 	ENV_VAR=UPPERCASE
> 	env_var=lowercase
> 	$ exit
> 	$ cmd.exe
> 	Microsoft Windows 2000 [Version 5.00.2195]
> 	(C) Copyright 1985-2000 Microsoft Corp.
> 
> 	C:\>set
> 	[...]
> 	ENV_VAR=UPPERCASE
> 	[...]
> 	env_var=lowercase
> 	[...]
> 
> As cfg said: "Don't start the program from a non cygwin program"
> 
> -- 
> Med venlig hilsen / Kind regards
> 
> Hack Kampbjørn
> 

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]