20 int setenv(
const char* name,
const char* value,
int overwrite) {
23 int errcode = getenv_s(&envsize,
nullptr, 0, name);
24 if (errcode || envsize)
return errcode;
26 return _putenv_s(name, value);
30 #elif defined(__MINGW32__) 32 int setenv(
const char* name,
const char* value,
int overwrite) {
34 const char* current = getenv(name);
35 if (current)
return 0;
37 return _putenv_s(name, value);
42 int setenv(
const char* name,
const char* value,
int overwrite) {
int setenv(const char *name, const char *value, int overwrite)
setenv - change or add an environment variable.