[cairo-commit] cairo/src cairo-output-stream.c, 1.7, 1.8 cairo-wideint.h, 1.11, 1.12

Carl Worth commit at pdx.freedesktop.org
Fri Aug 5 07:48:21 PDT 2005


Committed by: cworth

Update of /cvs/cairo/cairo/src
In directory gabe:/tmp/cvs-serv20852/src

Modified Files:
	cairo-output-stream.c cairo-wideint.h 
Log Message:

2005-08-05  Carl Worth  <cworth at cworth.org>

        Patch from John Ehresman <jpe at wingide.com> to aid win32
        compilation:

        * src/cairo-output-stream.c: Define snprintf as _snprintf when
        under the influence of _MSC_VER.

        * test/read-png.c: (read_png_argb32):
        * src/cairo-wideint.h: Define int32_t and friends as __int32 and
        friends when under the influence of _MSC_VER.

        * test/buffer-diff.c:
        * test/cairo-test.c: Make include of unistd.h conditional on
        HAVE_UNISTD_H.


Index: cairo-output-stream.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo-output-stream.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- cairo-output-stream.c	1 Jul 2005 19:45:35 -0000	1.7
+++ cairo-output-stream.c	5 Aug 2005 14:48:19 -0000	1.8
@@ -39,6 +39,10 @@
 #include <ctype.h>
 #include "cairoint.h"
 
+#ifdef _MSC_VER
+#define snprintf _snprintf
+#endif /* _MSC_VER */
+
 struct _cairo_output_stream {
     cairo_write_func_t		write_data;
     void			*closure;

Index: cairo-wideint.h
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo-wideint.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- cairo-wideint.h	30 Jul 2005 19:57:54 -0000	1.11
+++ cairo-wideint.h	5 Aug 2005 14:48:19 -0000	1.12
@@ -44,6 +44,18 @@
 # include <inttypes.h>
 #elif HAVE_SYS_INT_TYPES_H
 # include <sys/int_types.h>
+#elif defined(_MSC_VER)
+  typedef __int8 int8_t;
+  typedef unsigned __int8 uint8_t;
+  typedef __int16 int16_t;
+  typedef unsigned __int16 uint16_t;
+  typedef __int32 int32_t;
+  typedef unsigned __int32 uint32_t;
+  typedef __int64 int64_t;
+  typedef unsigned __int64 uint64_t;
+# ifndef HAVE_UINT64_T
+#  define HAVE_UINT64_T 1
+# endif
 #else
 #error Cannot find definitions for fixed-width integral types (uint8_t, uint32_t, etc.)
 #endif




More information about the cairo-commit mailing list