summaryrefslogtreecommitdiff
path: root/tools/tools-common.h
diff options
context:
space:
mode:
authorRan Benita <ran@unusedvar.com>2023-04-11 23:24:47 +0300
committerRan Benita <ran@unusedvar.com>2023-04-11 23:29:25 +0300
commitbd79a960f596574e9c2ea59347f9afac469ef532 (patch)
tree77a5c458c1d2ce7d07a404a69f7575caad5196ed /tools/tools-common.h
parent13d4b7f6417795b9ec634a766d0bf6afbf82c946 (diff)
downloadxorg-lib-libxkbcommon-bd79a960f596574e9c2ea59347f9afac469ef532.tar.gz
Possible fix for non-MSVC windows compilers
`_MSC_VER` is specific to MSVC, but there can be other compilers targeting windows. Hopefully they do define `_WIN32`, so let's use that. Refs: https://github.com/xkbcommon/libxkbcommon/issues/305 Signed-off-by: Ran Benita <ran@unusedvar.com>
Diffstat (limited to 'tools/tools-common.h')
-rw-r--r--tools/tools-common.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/tools-common.h b/tools/tools-common.h
index 780720a..0c16505 100644
--- a/tools/tools-common.h
+++ b/tools/tools-common.h
@@ -54,7 +54,7 @@ tools_enable_stdin_echo(void);
int
tools_exec_command(const char *prefix, int argc, char **argv);
-#ifdef _MSC_VER
+#ifdef _WIN32
#define setenv(varname, value, overwrite) _putenv_s((varname), (value))
#define unsetenv(varname) _putenv_s(varname, "")
#endif