summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAdrian Perez de Castro <aperez@igalia.com>2019-08-05 15:53:04 +0300
committerRan Benita <ran234@gmail.com>2019-12-28 16:12:15 +0200
commitf1186acfd43b2da98f09e40e9aecf164ac17d9a5 (patch)
tree07a167a70d949b1a4b2778a9770913a617fbd96b /test
parentabb2f9d978230f2208bff0af1e7107caab2b4abd (diff)
downloadxorg-lib-libxkbcommon-f1186acfd43b2da98f09e40e9aecf164ac17d9a5.tar.gz
MSVC: Provide implementations of [un]setenv()
Reference: https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/putenv-s-wputenv-s
Diffstat (limited to 'test')
-rw-r--r--test/test.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/test.h b/test/test.h
index 297c062..031806f 100644
--- a/test/test.h
+++ b/test/test.h
@@ -95,3 +95,8 @@ test_disable_stdin_echo(void);
void
test_enable_stdin_echo(void);
+
+#ifdef _MSC_VER
+#define setenv(varname, value, overwrite) _putenv_s((varname), (value))
+#define unsetenv(varname) _putenv_s(varname, "")
+#endif