window_limits_test: setenv/unsetenv for MSVC (the Windows test build stopped on it)
This commit is contained in:
1 parent
32f0c44f08
commit
b119f40f08
1 file changed
+4
@@ -9,6 +9,10 @@
|
||||
#include <cstdlib>
|
||||
|
||||
namespace {
|
||||
#if defined(_WIN32)
|
||||
void setenv(const char* k, const char* v, int) { _putenv_s(k, v); } // MSVC has _putenv_s only; an empty value unsets it
|
||||
void unsetenv(const char* k) { _putenv_s(k, ""); }
|
||||
#endif
|
||||
int checks = 0;
|
||||
void check(bool ok, const char* label) {
|
||||
++checks;
|
||||
|
||||
Reference in new issue
Block a user