From 81c3c3808e611adeda204891f7f14228fc51efee Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Sun, 26 Mar 2023 02:44:47 -0400 Subject: [PATCH] python dependency: avoid redefinition warnings for MS_WIN64 pyconfig.h defines it in limited cases, but as empty, rather than as "1" which is what command-line defines generally do. Explicitly define it as a compatible definition so the compiler does not log a warning that the value has changed. Fixes #11592 --- mesonbuild/dependencies/python.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mesonbuild/dependencies/python.py b/mesonbuild/dependencies/python.py index eaa906748..14386f96f 100644 --- a/mesonbuild/dependencies/python.py +++ b/mesonbuild/dependencies/python.py @@ -209,7 +209,7 @@ class PythonSystemDependency(SystemDependency, _PythonDependencyBase): # https://sourceforge.net/p/mingw-w64/mailman/message/30504611/ # https://github.com/python/cpython/pull/100137 if mesonlib.is_windows() and self.get_windows_python_arch() == '64' and mesonlib.version_compare(self.version, '<3.12'): - self.compile_args += ['-DMS_WIN64'] + self.compile_args += ['-DMS_WIN64='] if not self.clib_compiler.has_header('Python.h', '', environment, extra_args=self.compile_args): self.is_found = False