Commit 0c7012d6 authored by Andreas Schuh's avatar Andreas Schuh

fix: Build with MinGW version after Nov 2016

parent b051bace
......@@ -77,6 +77,7 @@ extern int GFLAGS_DLL_DECL safe_vsnprintf(char *str, size_t size,
# pragma warning(push)
# pragma warning(disable: 4996) // ignore getenv security warning
#endif
#if !defined(_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 200112L
inline void setenv(const char* name, const char* value, int) {
// In windows, it's impossible to set a variable to the empty string.
// We handle this by setting it to "0" and the NUL-ing out the \0.
......@@ -98,6 +99,7 @@ inline void setenv(const char* name, const char* value, int) {
*getenv(name) = '\0'; // works when putenv() copies nameval
}
}
#endif
#ifdef _MSC_VER
# pragma warning(pop)
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment