[krbdev.mit.edu #2636] replace all calls to getenv()/setenv() with Get/SetEnvironmentVariable on Windows

"Jeffrey Altman [Kermit Project]" via RT rt-comment at krbdev.mit.edu
Wed Jul 14 15:57:23 EDT 2004


Ken Raeburn wrote:

> Can this be done with a macro in win-mac.h?

Unfortunately not.  GetEnvironmentVariable() requires that the user
provide the input buffer as well as a length.  The return value is the
length of the returned string.

The variable is undefined if (GetLastError() == ERROR_ENVVAR_NOT_FOUND)




More information about the krb5-bugs mailing list