+#else // !__WXWINCE__
+ // update the CRT environment if possible as people expect getenv() to also
+ // work and it is not affected by Win32 SetEnvironmentVariable() call (OTOH
+ // the CRT does use Win32 call to update the process environment block so
+ // there is no need to call it)
+ //
+ // TODO: add checks for the other compilers (and update wxSetEnv()
+ // documentation in interface/wx/utils.h accordingly)
+#if defined(__VISUALC__)
+ // 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
+ // it here without going through all the troubles with wxSetEnvModule as in
+ // src/unix/utilsunx.cpp
+ wxString envstr = var;
+ envstr += '=';
+ if ( value )
+ envstr += value;
+ _tputenv(envstr.t_str());
+#else // other compiler
+ if ( !::SetEnvironmentVariable(var.t_str(), value) )