[PATCH 21/27] qga/vss: use standard windows headers location

Paolo Bonzini posted 27 patches 3 years, 10 months ago
[PATCH 21/27] qga/vss: use standard windows headers location
Posted by Paolo Bonzini 3 years, 10 months ago
From: Marc-André Lureau <marcandre.lureau@redhat.com>

Stop using special paths with outdated headers from an old SDK.

Instead, use standard include paths.

You can still build against the old SDK by running configure with
--extra-cxxflags="-isystem `/path/to/inc/win2003/"

(this also allows to build against MinGW headers, which are currently
broken as in 9.0)

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 qga/vss-win32/install.cpp   | 2 +-
 qga/vss-win32/provider.cpp  | 4 ++--
 qga/vss-win32/requester.cpp | 4 ++--
 qga/vss-win32/vss-common.h  | 6 +-----
 4 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/qga/vss-win32/install.cpp b/qga/vss-win32/install.cpp
index 40de133774..efc5bb9909 100644
--- a/qga/vss-win32/install.cpp
+++ b/qga/vss-win32/install.cpp
@@ -13,7 +13,7 @@
 #include "qemu/osdep.h"
 
 #include "vss-common.h"
-#include <inc/win2003/vscoordint.h>
+#include <vscoordint.h>
 #include "install.h"
 #include <wbemidl.h>
 #include <comdef.h>
diff --git a/qga/vss-win32/provider.cpp b/qga/vss-win32/provider.cpp
index 72d8b0e19d..fd187fb66f 100644
--- a/qga/vss-win32/provider.cpp
+++ b/qga/vss-win32/provider.cpp
@@ -12,8 +12,8 @@
 
 #include "qemu/osdep.h"
 #include "vss-common.h"
-#include <inc/win2003/vscoordint.h>
-#include <inc/win2003/vsprov.h>
+#include <vscoordint.h>
+#include <vsprov.h>
 
 #define VSS_TIMEOUT_MSEC (60*1000)
 
diff --git a/qga/vss-win32/requester.cpp b/qga/vss-win32/requester.cpp
index 940a2c8f55..4513324dd2 100644
--- a/qga/vss-win32/requester.cpp
+++ b/qga/vss-win32/requester.cpp
@@ -14,8 +14,8 @@
 #include "vss-common.h"
 #include "requester.h"
 #include "install.h"
-#include <inc/win2003/vswriter.h>
-#include <inc/win2003/vsbackup.h>
+#include <vswriter.h>
+#include <vsbackup.h>
 
 /* Max wait time for frozen event (VSS can only hold writes for 10 seconds) */
 #define VSS_TIMEOUT_FREEZE_MSEC 60000
diff --git a/qga/vss-win32/vss-common.h b/qga/vss-win32/vss-common.h
index 61c170b52e..54f8de8c88 100644
--- a/qga/vss-win32/vss-common.h
+++ b/qga/vss-win32/vss-common.h
@@ -46,11 +46,7 @@
 #undef VSS_E_MAXIMUM_NUMBER_OF_VOLUMES_REACHED
 #undef VSS_E_MAXIMUM_NUMBER_OF_SNAPSHOTS_REACHED
 
-/*
- * VSS headers must be installed from Microsoft VSS SDK 7.2 available at:
- * http://www.microsoft.com/en-us/download/details.aspx?id=23490
- */
-#include <inc/win2003/vss.h>
+#include <vss.h>
 #include "vss-handles.h"
 
 /* Macros to convert char definitions to wchar */
-- 
2.34.1



Re: [PATCH 21/27] qga/vss: use standard windows headers location
Posted by Philippe Mathieu-Daudé via 3 years, 10 months ago
On 3/2/22 18:33, Paolo Bonzini wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
> 
> Stop using special paths with outdated headers from an old SDK.
> 
> Instead, use standard include paths.
> 
> You can still build against the old SDK by running configure with
> --extra-cxxflags="-isystem `/path/to/inc/win2003/"

Superfluous back quote.

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

> (this also allows to build against MinGW headers, which are currently
> broken as in 9.0)
> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>   qga/vss-win32/install.cpp   | 2 +-
>   qga/vss-win32/provider.cpp  | 4 ++--
>   qga/vss-win32/requester.cpp | 4 ++--
>   qga/vss-win32/vss-common.h  | 6 +-----
>   4 files changed, 6 insertions(+), 10 deletions(-)

Re: [PATCH 21/27] qga/vss: use standard windows headers location
Posted by Konstantin Kostiuk 3 years, 10 months ago
Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com>

On Fri, Feb 4, 2022 at 7:18 AM Philippe Mathieu-Daudé via <
qemu-devel@nongnu.org> wrote:

> On 3/2/22 18:33, Paolo Bonzini wrote:
> > From: Marc-André Lureau <marcandre.lureau@redhat.com>
> >
> > Stop using special paths with outdated headers from an old SDK.
> >
> > Instead, use standard include paths.
> >
> > You can still build against the old SDK by running configure with
> > --extra-cxxflags="-isystem `/path/to/inc/win2003/"
>
> Superfluous back quote.
>
> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>
> > (this also allows to build against MinGW headers, which are currently
> > broken as in 9.0)
> >
> > Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> > Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> > ---
> >   qga/vss-win32/install.cpp   | 2 +-
> >   qga/vss-win32/provider.cpp  | 4 ++--
> >   qga/vss-win32/requester.cpp | 4 ++--
> >   qga/vss-win32/vss-common.h  | 6 +-----
> >   4 files changed, 6 insertions(+), 10 deletions(-)
>
>