[Spice-devel] [PATCH 3/9] common: RFC: add windows.h where required, make gdi_handlers static

Marc-André Lureau marcandre.lureau at redhat.com
Tue Jan 25 10:17:22 PST 2011


This patch has not been verified. Somebody with VS should check if it
still compiles and run fine before applying it.
---
 client/windows/platform.cpp |    1 -
 common/canvas_base.h        |    3 +++
 common/canvas_utils.c       |    2 +-
 common/canvas_utils.h       |    4 ++++
 4 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/client/windows/platform.cpp b/client/windows/platform.cpp
index c41c39a..ac6fd91 100644
--- a/client/windows/platform.cpp
+++ b/client/windows/platform.cpp
@@ -42,7 +42,6 @@
 #endif
 #include <spice/vd_agent.h>
 
-int gdi_handlers = 0;
 extern HINSTANCE instance;
 
 class DefaultEventListener: public Platform::EventListener {
diff --git a/common/canvas_base.h b/common/canvas_base.h
index 2166dcf..bea041f 100644
--- a/common/canvas_base.h
+++ b/common/canvas_base.h
@@ -24,6 +24,9 @@
 #include "lz.h"
 #include "region.h"
 #include "draw.h"
+#ifdef WIN32
+#include <windows.h>
+#endif
 
 typedef void (*spice_destroy_fn_t)(void *data);
 
diff --git a/common/canvas_utils.c b/common/canvas_utils.c
index 020b23c..743c86c 100644
--- a/common/canvas_utils.c
+++ b/common/canvas_utils.c
@@ -27,7 +27,7 @@
 #include "mem.h"
 
 #ifdef WIN32
-extern int gdi_handlers;
+static int gdi_handlers = 0;
 #endif
 
 #ifndef ASSERT
diff --git a/common/canvas_utils.h b/common/canvas_utils.h
index b87b816..fe66f85 100644
--- a/common/canvas_utils.h
+++ b/common/canvas_utils.h
@@ -19,6 +19,10 @@
 #ifndef _H_CANVAS_UTILS
 #define _H_CANVAS_UTILS
 
+#ifdef WIN32
+#include <windows.h>
+#endif
+
 #include <spice/types.h>
 
 #include "pixman_utils.h"
-- 
1.7.3.4



More information about the Spice-devel mailing list