This matches what WinSDK headers do these days. We always have
_WIN32_WINNT set to a default value of our choice, and there's
no value we can set _WIN32_WINNT to, that would set NTDDI_VERSION
to include the features from newer versions of Windows 10/11,
such as e.g. NTDDI_WIN10_RS1.

Signed-off-by: Martin Storsjö <[email protected]>
---
 mingw-w64-headers/include/sdkddkver.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/mingw-w64-headers/include/sdkddkver.h 
b/mingw-w64-headers/include/sdkddkver.h
index 57672c70b..d34c36dd8 100644
--- a/mingw-w64-headers/include/sdkddkver.h
+++ b/mingw-w64-headers/include/sdkddkver.h
@@ -175,8 +175,15 @@
 /* Choose NTDDI Version */
 #ifndef NTDDI_VERSION
 #ifdef _WIN32_WINNT
+#if _WIN32_WINNT < _WIN32_WINNT_WIN10
+/* For versions before Windows 10, set the corresponding NTDDI_VERSION. */
 #define NTDDI_VERSION NTDDI_VERSION_FROM_WIN32_WINNT(_WIN32_WINNT)
 #else
+/* As _WIN32_WINNT doesn't distinguish between versions of Windows 10/11,
+ * set NTDDI_VERSION to the highest version. */
+#define NTDDI_VERSION WDK_NTDDI_VERSION
+#endif
+#else
 #define NTDDI_VERSION NTDDI_WS03
 #endif
 #endif
-- 
2.34.1



_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to