1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
#include <config.h> #include <stdlib.h> #include <string> #ifdef _WIN32 int setenv(const char *name, const char *value, int overwrite) { std::string vv = name; vv += "="; vv += value; if (overwrite != 1) return false; return _putenv(vv.c_str()) == 0; } #endif