merge from dev-win

This commit is contained in:
daan 2019-08-10 15:19:04 -07:00
commit 2b9e3ed01b

View file

@ -209,6 +209,9 @@ static void mi_strlcat(char* dest, const char* src, size_t dest_size) {
} }
#if defined _WIN32 #if defined _WIN32
// On Windows use GetEnvironmentVariable instead of getenv to work
// reliably even when this is invoked before the C runtime is initialized.
// i.e. when `_mi_preloading() == true`.
#include <windows.h> #include <windows.h>
static bool mi_getenv(const char* name, char* result, size_t result_size) { static bool mi_getenv(const char* name, char* result, size_t result_size) {
result[0] = 0; result[0] = 0;