patch 8.0.0280: problem setting multi-byte environment var on MS-Windows
Problem: On MS-Windows setting an environment variable with multi-byte
strings does not work well.
Solution: Use wputenv when possible. (Taro Muraoka, Ken Takata)
diff --git a/src/os_win32.h b/src/os_win32.h
index f620d74..5017f53 100644
--- a/src/os_win32.h
+++ b/src/os_win32.h
@@ -202,7 +202,9 @@
#define ASSERT_NULL_OR_POINTER(p, type) \
ASSERT(((p) == NULL) || IsValidAddress((p), sizeof(type), FALSE))
-#define mch_setenv(name, val, x) setenv(name, val, x)
+#ifndef HAVE_SETENV
+# define HAVE_SETENV
+#endif
#define mch_getenv(x) (char_u *)getenv((char *)(x))
#ifdef __BORLANDC__
# define vim_mkdir(x, y) mkdir(x)