Mesa (staging/20.0): meson: correct windows-version define

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Apr 23 17:13:40 UTC 2020


Module: Mesa
Branch: staging/20.0
Commit: b754deecb0af7ece7817300be89f181ba63516f3
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=b754deecb0af7ece7817300be89f181ba63516f3

Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date:   Wed Apr 22 17:54:38 2020 +0200

meson: correct windows-version define

The macro "_WINVER" does nothing, the macro definitions that matter for
windows API version selection are "_WIN32_WINNT" and "WINVER".

The header "sdkddkver.h" (which is included from thousands of
different windows-headers) defines "WINVER" to the same value as
"_WIN32_WINNT" of only the latter is defined, which explains why this
works right now. But we shouldn't depend on that kind of luck, and
instead define the right maco.

Fixes: 3aee462781a ("meson: add windows compiler checks and libraries")
Acked-by: Dylan Baker <dylan at pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4681>
(cherry picked from commit 7f17a0a809195cefa2240f55d30f00e3fe0572b3)

---

 .pick_status.json | 2 +-
 meson.build       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index f9d245786df..51af0e6df88 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -103,7 +103,7 @@
         "description": "meson: correct windows-version define",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "master_sha": null,
         "because_sha": "3aee462781abc0bfcce207fb64f9199b43a57542"
     },
diff --git a/meson.build b/meson.build
index ebccd56f169..366c41b5fed 100644
--- a/meson.build
+++ b/meson.build
@@ -896,7 +896,7 @@ elif host_machine.system() == 'sunos'
   pre_args += '-D__EXTENSIONS__'
 elif host_machine.system() == 'windows'
   pre_args += [
-    '-D_WINDOWS', '-D_WIN32_WINNT=0x0601', '-D_WINVER=0x0601',
+    '-D_WINDOWS', '-D_WIN32_WINNT=0x0601', '-DWINVER=0x0601',
     '-DPIPE_SUBSYSTEM_WINDOWS_USER',
     '-D_USE_MATH_DEFINES',  # XXX: scons doesn't use this for mingw
   ]



More information about the mesa-commit mailing list