ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 40992] - ENV property of EXEC task must support case insensitive variable names on Windows, either by default or via an extra attribute
Date Fri, 17 Nov 2006 15:48:01 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40992>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40992





------- Additional Comments From seva_ostapenko@hotmail.com  2006-11-17 07:48 -------
(In reply to comment #3)
Yes, it looks like Win32 API does not provide "case insensitive" option for ::
(Set|Get)EnvironmentVariable() methods.
Yet, the shell and applications treat environment variables as case insensitive.
Which can be relatively easy achived by calling ::GetEnvironmentStrings() first 
and then iterating through the array of strings doing case insensitive 
substring match of the "variable_name"+"=".
I suppose converting the output from ::GetEnvironmentStrings() into a hash 
table ith an upper- or lower-case key is another option.

> (In reply to comment #1)
> > This may seem a silly question, but where in the Win32 API does it say that 
env
> > variables are case insenstive.
> > 
> > It isnt in 'environement variables':
> > http://msdn2.microsoft.com/en-us/library/ms682653.aspx
> > 
> > it isnt in ::SetEnvironmentVariable
> > http://msdn2.microsoft.com/en-us/library/ms686206.aspx
> > 
> > and it isnt in ::GetEnvironmentVariable 
> > http://msdn2.microsoft.com/en-us/library/ms683188.aspx
> > 
> Googling for: windows "environment variable" "case sensitive" yielded:
> http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-
us/ntcmds_shelloverview.mspx?mfr=true

(In reply to comment #1)
> This may seem a silly question, but where in the Win32 API does it say that 
env
> variables are case insenstive.
> It isnt in 'environement variables':
> http://msdn2.microsoft.com/en-us/library/ms682653.aspx
> it isnt in ::SetEnvironmentVariable
> http://msdn2.microsoft.com/en-us/library/ms686206.aspx
> and it isnt in ::GetEnvironmentVariable 
> http://msdn2.microsoft.com/en-us/library/ms683188.aspx
> Now, I can see that echo %PATH% is doing a case insensitive lookup, but unless
> some can show that ::SetEnvironmentVariable and ::GetEnvironmentVariable does
> case sensitive matching, we are left in a bit of a mess. We cannot be sure 
that
> the whole of windows is doing case insensitive matching.
> Why not set newenvironment=true in <exec> and have the old settings lost. You
> need to set up everything (including maybe PATH), but you wont get hurt by any
> existing values?



-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message