This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA/mingw32] environment variables are case-insensitive on win32
Eli Zaretskii (eliz@gnu.org):
> This is Bash, not Cygwin. What happens if you define an environment
> variable outside of a Cygwin program, and then use getenv in a Cygwin
> program with different letter-case?
I tried something similar actually:
#include <stdio.h>
#include <stdlib.h>
int
main()
{
char *name;
#if defined(_WIN32) && !defined(__CYGWIN__)
_putenv ("foobar=set");
#else
setenv("foobar", "set", 1);
#endif
name = getenv("FooBar");
if (name && strcmp (name, "set") == 0)
printf ("not case sensitive\n");
else
printf ("case sensitive\n");
return 1;
}
Same result: case sensitive.