I meant GetEnvironmentVariable{W,A} and any other function which deals
with environment variables.
I don't see how returning information from the cygwin environment would
affect you since any environment variables set in the windows
environment would also show up in cygwin's environment. So, an emulated
GetEnvironmentVariable would return the proper thing no matter how the
process was started.
If it does cause problems due to something like the initialization order
of the environment vs. when malloc_init is called, then that's something
that can be ironed out. Just a simple check of whether or not environ
is initialized should be adequate to cause any environment manipulating
function to revert to using the windows environment.