Win32: unify environment case-sensitivity
commit5f3cd494f2f18d2659717955bfbd13635a59fd88
authorKarsten Blees <blees@dcon.de>
Wed, 5 Oct 2011 17:47:17 +0000 (5 19:47 +0200)
committerKarsten Blees <blees@dcon.de>
Thu, 1 Dec 2011 14:57:59 +0000 (1 15:57 +0100)
treeb5e9055f88c57d2d31b359e714cfa6f3320d95f4
parentcb3936b1d2f101fdff88c951a40796ea9225c1ad
Win32: unify environment case-sensitivity

The environment on Windows is case-insensitive. Some environment functions
(such as unsetenv and make_augmented_environment) have always used case-
sensitive comparisons instead, while others (getenv, putenv) were case-
insensitive. Recently, getenv has been changed to do a case-sensitive
before case-insensitive lookup to fix a problem in git's envsubst
implementation.

Prevent potential inconsistencies by using the same algorithm (case-
sensitive before case-insensitive) for all environment functions. This can
be implemented in the now central lookup_env function.

The original MSVCRT getenv (and thus, #undef getenv) is no longer needed,
direct references to mingw_getenv are no longer necessary.

Signed-off-by: Karsten Blees <blees@dcon.de>
compat/mingw.c