diff --git a/interface/wx/utils.h b/interface/wx/utils.h index 8bf3b1948f..c09df344ba 100644 --- a/interface/wx/utils.h +++ b/interface/wx/utils.h @@ -190,8 +190,9 @@ bool wxGetEnv(const wxString& var, wxString* value); environment. wxSetEnv() will always update the first copy, which means that wxGetEnv(), which uses it directly, will always return the expected value after this call. But wxSetEnv() only updates the second copy for some - compilers/CRT implementations (currently only MSVC) and so using wxGetenv() - (notice the difference in case) may not return the updated value. + compilers/CRT implementations (currently only MSVC and MinGW which uses the + same MSVC CRT) and so using wxGetenv() (notice the difference in case) may + not return the updated value. @param var The environment variable to be set, must not contain @c '=' character. diff --git a/src/msw/utils.cpp b/src/msw/utils.cpp index a456a3417a..e7445c3fcb 100644 --- a/src/msw/utils.cpp +++ b/src/msw/utils.cpp @@ -627,7 +627,7 @@ bool wxDoSetEnv(const wxString& var, const wxChar *value) // // TODO: add checks for the other compilers (and update wxSetEnv() // documentation in interface/wx/utils.h accordingly) -#if defined(__VISUALC__) +#if defined(__VISUALC__) || defined(__MINGW32__) // notice that Microsoft _putenv() has different semantics from POSIX // function with almost the same name: in particular it makes a copy of the // string instead of using it as part of environment so we can safely call