1 --- cairo-1.12.0/util/cairo-missing/cairo-missing.h.orig 2012-02-02 01:48:15.000000000 +0100
2 +++ cairo-1.12.0/util/cairo-missing/cairo-missing.h 2012-03-25 12:56:29.970335651 +0200
8 +#if defined(_WIN32) && !defined(__MINGW32__)
9 #define WIN32_LEAN_AND_MEAN
12 --- cairo-1.12.0/test/any2ppm.c.orig 2012-02-29 13:10:30.000000000 +0100
13 +++ cairo-1.12.0/test/any2ppm.c 2012-03-25 13:20:49.717047188 +0200
19 +_cairo_write (int fd,
20 char *buf, int maxlen, int buflen,
21 const unsigned char *src, int srclen)
25 switch ((int) format) {
26 case CAIRO_FORMAT_ARGB32:
28 + len = _cairo_write (fd,
29 buf, sizeof (buf), len,
30 (unsigned char *) row, 4 * width);
33 rgb[0] = (p & 0xff0000) >> 16;
34 rgb[1] = (p & 0x00ff00) >> 8;
35 rgb[2] = (p & 0x0000ff) >> 0;
37 + len = _cairo_write (fd,
38 buf, sizeof (buf), len,
44 + len = _cairo_write (fd,
45 buf, sizeof (buf), len,
46 (unsigned char *) row, width);
48 --- cairo-1.12.0/boilerplate/cairo-boilerplate-win32-printing.c.orig 2012-02-29 13:10:30.000000000 +0100
49 +++ cairo-1.12.0/boilerplate/cairo-boilerplate-win32-printing.c 2012-03-25 17:00:32.410822070 +0200
51 #include <cairo-win32.h>
52 #include <cairo-paginated-surface-private.h>
57 #if !defined(POSTSCRIPT_IDENTIFY)
59 # define FEATURESETTING_PSLEVEL 0x0002
63 -_cairo_win32_print_gdi_error (const char *context);
64 +/* private function copied from cairo-win32-surface.c */
65 +static cairo_status_t
66 +_cairo_win32_print_gdi_error (const char *context)
69 + DWORD last_error = GetLastError ();
71 + if (!FormatMessageW (FORMAT_MESSAGE_ALLOCATE_BUFFER |
72 + FORMAT_MESSAGE_FROM_SYSTEM,
75 + MAKELANGID (LANG_NEUTRAL, SUBLANG_DEFAULT),
78 + fprintf (stderr, "%s: Unknown GDI error", context);
80 + fprintf (stderr, "%s: %S", context, (wchar_t *)lpMsgBuf);
82 + LocalFree (lpMsgBuf);
87 + /* We should switch off of last_status, but we'd either return
88 + * CAIRO_STATUS_NO_MEMORY or CAIRO_STATUS_UNKNOWN_ERROR and there
89 + * is no CAIRO_STATUS_UNKNOWN_ERROR.
91 + return CAIRO_STATUS_NO_MEMORY;
94 static cairo_user_data_key_t win32_closure_key;