bmxconverter/win32compat.h

16 lines
328 B
C
Raw Normal View History

#pragma once
#ifdef _WIN32
#include <stdlib.h>
inline void setenv(char const *variable, char const *value, bool replace) {
if (replace || getenv(variable) == NULL || getenv(variable) == "") {
if (value == NULL) {
_putenv_s(variable, "");
} else {
_putenv_s(variable, value);
}
}
}
#else
#include <unistd.h>
#endif