6 extern "C" __declspec(dllimport) errno_t getenv_s(size_t *, char *, size_t, const char *);
13 static Mutex &env_mutex()
19 string getenv(const string &name)
21 MutexLock _lock(env_mutex());
24 if(!getenv_s(&result, buffer, sizeof(buffer), name.c_str()))
30 void setenv(const string &name, const string &value)
32 MutexLock _lock(env_mutex());
33 _putenv_s(name.c_str(), value.c_str());
36 void unsetenv(const string &name)
38 MutexLock _lock(env_mutex());
39 _putenv_s(name.c_str(), "");