Skip to contentSkip to conversation

include/qemu/osdep.h: Bump _WIN32_WINNT to the Windows 8 API

PATCH Applied Thomas Huth 4 participants 4 messages May 4, 2023 – May 5, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 include/qemu/osdep.h: Bump _WIN32_WINNT to the Windows 8 API

Commit cf60ccc330 ("cutils: Introduce bundle mechanism") abandoned compatibility with Windows older than 8 - we should reflect this in our _WIN32_WINNT and set it to the value that corresponds to Windows 8.

---
 include/qemu/osdep.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/qemu/osdep.h +1 -1
index 9eff0be95b..cc61b00ba9 100644
@@ -75,7 +75,7 @@ QEMU_EXTERN_C int daemon(int, int);
 #ifdef _WIN32
 /* as defined in sdkddkver.h */
 #ifndef _WIN32_WINNT
-#define _WIN32_WINNT 0x0601 /* Windows 7 API (should be in sync with glib) */
+#define _WIN32_WINNT 0x0602 /* Windows 8 API (should be >= the one from glib) */
 #endif
 /* reduces the number of implicitly included headers */
 #ifndef WIN32_LEAN_AND_MEAN
Signature · 1 line
2.31.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Thomas Huth

Commit cf60ccc330 ("cutils: Introduce bundle mechanism") abandoned compatibility with Windows older than 8 - we should reflect this in our _WIN32_WINNT and set it to the value that corresponds to Windows 8.

Reference for this claim:

https://learn.microsoft.com/en-us/cpp/porting/modifying-winver-and-win32-winnt?view=msvc-170

[quote]
#define _WIN32_WINNT_WIN8 0x0602 // Windows 8
[/quote]

Quoted 5 lines
---
 include/qemu/osdep.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 17 lines
include/qemu/osdep.h +1 -1
index 9eff0be95b..cc61b00ba9 100644
@@ -75,7 +75,7 @@ QEMU_EXTERN_C int daemon(int, int);
 #ifdef _WIN32
 /* as defined in sdkddkver.h */
 #ifndef _WIN32_WINNT
-#define _WIN32_WINNT 0x0601 /* Windows 7 API (should be in sync with glib) */
+#define _WIN32_WINNT 0x0602 /* Windows 8 API (should be >= the one from glib) */
 #endif
 /* reduces the number of implicitly included headers */
 #ifndef WIN32_LEAN_AND_MEAN
Signature · 1 line
2.31.1

With regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
#3 lore raw
In reply to Thomas Huth
Quoted 15 lines · Thomas Huth

Commit cf60ccc330 ("cutils: Introduce bundle mechanism") abandoned compatibility with Windows older than 8 - we should reflect this in our _WIN32_WINNT and set it to the value that corresponds to Windows 8.

---
  include/qemu/osdep.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
include/qemu/osdep.h +0 -0
index 9eff0be95b..cc61b00ba9 100644

include/qemu/osdep.h QEMU_EXTERN_C int daemon(int, int); · line 81

Quoted 8 lines
include/qemu/osdep.h +1 -1
@@ -75,7 +75,7 @@ QEMU_EXTERN_C int daemon(int, int);
  #ifdef _WIN32
  /* as defined in sdkddkver.h */
  #ifndef _WIN32_WINNT
-#define _WIN32_WINNT 0x0601 /* Windows 7 API (should be in sync with glib) */
+#define _WIN32_WINNT 0x0602 /* Windows 8 API (should be >= the one from glib) */
  #endif
  /* reduces the number of implicitly included headers */
  #ifndef WIN32_LEAN_AND_MEAN

Queued, thanks.

Paolo