mingw.c: move definition of mingw_getenv down
commit06bc4b796ad69ba93f0a8c451368602e0553c2d3
authorJohannes Sixt <j6t@kdbg.org>
Mon, 6 Jun 2011 07:06:02 +0000 (6 09:06 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 6 Jun 2011 18:35:06 +0000 (6 11:35 -0700)
treec3134457df1903f61b973273f0e0114f544afa83
parent8c92516f2dae4778e2b5a41196f7409823283e4b
mingw.c: move definition of mingw_getenv down

We want to use static lookup_env() in a subsequent change.

At first sight, this change looks innocent. But it is not due to the
#undef getenv. There is one caller of getenv between the old location and
the new location whose behavior could change. But as can be seen from the
defintion of mingw_getenv, the behavior for this caller does not change
substantially.

To ensure consistent behavior in the future, change all getenv callers
in mingw.c to use mingw_getenv.

With this patch, this is not a big deal, yet, but with the subsequent
change, where we teach getenv to do a case-sensitive lookup, the behavior
of all call sites is changed.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
compat/mingw.c