summaryrefslogtreecommitdiff
path: root/test/cairo-test.h
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2005-09-01 02:14:31 +0000
committerCarl Worth <cworth@cworth.org>2005-09-01 02:14:31 +0000
commit7e4465819b7f0da3f16a18c6ffcf2b8f7a9ee04a (patch)
tree5d9b1b2da0df99c9a91558785a66fbbb2a5902d9 /test/cairo-test.h
parent0f4beab5070ce6f7129ca52953eb002ac7f40b93 (diff)
Add includes to get sized-integer types such as uint32_t.
Fix declaration of image data array to be uint32_t rather than unsigned long. Fixes four out of the remaining five failures in bug #4245.
Diffstat (limited to 'test/cairo-test.h')
-rw-r--r--test/cairo-test.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/cairo-test.h b/test/cairo-test.h
index d35faab8..a047fbca 100644
--- a/test/cairo-test.h
+++ b/test/cairo-test.h
@@ -26,10 +26,36 @@
#ifndef _CAIRO_TEST_H_
#define _CAIRO_TEST_H_
+#if HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <math.h>
#include <cairo.h>
#include <cairo-debug.h>
+#if HAVE_STDINT_H
+# include <stdint.h>
+#elif HAVE_INTTYPES_H
+# 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
+
typedef enum cairo_test_status {
CAIRO_TEST_SUCCESS = 0,
CAIRO_TEST_FAILURE,