[cairo] Win32 build

Alexander Larsson alexl at redhat.com
Tue Apr 11 08:48:08 PDT 2006


On Fri, 7 Apr 2006, Hans Breuer wrote:

> On 06.04.2006 15:50, Alexander Larsson wrote:
> > I couldn't build the current cairo on win32 without the attached patch (or 
> > something similar) because SHADEBLENDCAPS isn't defined. I'm not sure 
> > defining WINVER like this is the best thing to do, because I'm not really 
> > a windows developer, but it makes it work.
> > 
> What we usually do for gdk is defining needed stuff for WINVER above 0x400
> by hand. This is done to allow compilation with VC6 provided sdk and
> to be sure to handle platform differences at runtime.
> Simply defining WINVER to 0x500 would drop the compile time check
> and thus silently bind to the newest win32 version (0x500 == win2k,
> 0x501 ?= winxp)
> 
> [Sorry no patch, cairo's version control is not compatible
>   with my current os]
> 

Something like this? (patch attached)

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl at redhat.com    alla at lysator.liu.se 
He's an immortal crooked stage actor haunted by memories of 'Nam. She's a 
bloodthirsty kleptomaniac hooker from a different time and place. They fight 
crime! 
-------------- next part --------------
diff --git a/src/cairo-win32-surface.c b/src/cairo-win32-surface.c
old mode 100644
new mode 100755
index 310561a..0676201
--- a/src/cairo-win32-surface.c
+++ b/src/cairo-win32-surface.c
@@ -39,6 +39,13 @@
 #include "cairoint.h"
 #include "cairo-win32-private.h"
 
+#ifndef SHADEBLENDCAPS
+#define SHADEBLENDCAPS 120
+#endif
+#ifndef SB_NONE
+#define SB_NONE 0x00
+#endif
+
 static const cairo_surface_backend_t cairo_win32_surface_backend;
 
 /**


More information about the cairo mailing list