[Pixman] [PATCH 2/3] test: Fix tests for compilation on Windows

Brent Fulgham bfulgham at gmail.com
Wed Feb 23 09:26:59 PST 2011


Thanks for making these fixes -- they look great!

I have one small suggestion regarding your update to "composite.c";
while MSVC does not provide an "snprintf" symbol, it does provide
"_snprintf".

To be consistent with other ports, I would propose the following change:

bfulgham at bfulgham3 ~/requirements_sources/cairo/git/pixman/test
$ git diff composite.c
diff --git a/test/composite.c b/test/composite.c
index e14f954..b4bde09 100644
--- a/test/composite.c
+++ b/test/composite.c
@@ -36,6 +36,10 @@ typedef struct format_t format_t;
 typedef struct image_t image_t;
 typedef struct operator_t operator_t;

+#ifdef _WIN32
+#define snprintf _snprintf
+#endif
+
 struct color_t
 {
     double r, g, b, a;

This builds and runs properly for me.

Thanks,

-Brent


More information about the Pixman mailing list