diff options
-rw-r--r-- | ChangeLog | 17 | ||||
-rw-r--r-- | test/cairo-test.h | 26 | ||||
-rw-r--r-- | test/filter-nearest-offset.c | 2 | ||||
-rw-r--r-- | test/mask-ctm.c | 2 | ||||
-rw-r--r-- | test/mask-surface-ctm.c | 2 | ||||
-rw-r--r-- | test/move-to-show-surface.c | 2 | ||||
-rw-r--r-- | test/paint-with-alpha.c | 2 | ||||
-rw-r--r-- | test/scale-source-surface-paint.c | 2 | ||||
-rw-r--r-- | test/set-source.c | 2 | ||||
-rw-r--r-- | test/source-surface-scale-paint.c | 2 | ||||
-rw-r--r-- | test/translate-show-surface.c | 2 |
11 files changed, 52 insertions, 9 deletions
@@ -1,3 +1,20 @@ +2005-09-01 Carl Worth <cworth@cworth.org> + + * test/cairo-test.h: Add includes to get sized-integer types such + as uint32_t. + + * test/filter-nearest-offset.c: (draw): + * test/mask-ctm.c: (draw): + * test/mask-surface-ctm.c: (draw): + * test/move-to-show-surface.c: (draw): + * test/paint-with-alpha.c: (draw): + * test/scale-source-surface-paint.c: (draw): + * test/set-source.c: (draw): + * test/source-surface-scale-paint.c: (draw): + * test/translate-show-surface.c: (draw): 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. + 2005-08-31 Carl Worth <cworth@cworth.org> * test/cairo-test.c: (create_xlib_surface): Add call to diff --git a/test/cairo-test.h b/test/cairo-test.h index d35faab82..a047fbcae 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, diff --git a/test/filter-nearest-offset.c b/test/filter-nearest-offset.c index e5657bbcf..7718da5d6 100644 --- a/test/filter-nearest-offset.c +++ b/test/filter-nearest-offset.c @@ -44,7 +44,7 @@ static cairo_test_status_t draw (cairo_t *cr, int width, int height) { cairo_surface_t *surface; - unsigned long data[STAMP_WIDTH * STAMP_HEIGHT] = { + uint32_t data[STAMP_WIDTH * STAMP_HEIGHT] = { 0xffffffff, 0xffffffff, 0xffff0000, 0xffff0000, 0xffffffff, 0xffffffff, 0xffff0000, 0xffff0000, diff --git a/test/mask-ctm.c b/test/mask-ctm.c index 1fd48285e..6bc9992a3 100644 --- a/test/mask-ctm.c +++ b/test/mask-ctm.c @@ -36,7 +36,7 @@ draw (cairo_t *cr, int width, int height) { cairo_surface_t *mask_surface; cairo_pattern_t *mask; - unsigned long data[] = { + uint32_t data[] = { 0x80000000, 0x80000000, 0x80000000, 0x80000000, }; diff --git a/test/mask-surface-ctm.c b/test/mask-surface-ctm.c index 6eb2bf26d..1d5bf3372 100644 --- a/test/mask-surface-ctm.c +++ b/test/mask-surface-ctm.c @@ -35,7 +35,7 @@ static cairo_test_status_t draw (cairo_t *cr, int width, int height) { cairo_surface_t *mask; - unsigned long data[] = { + uint32_t data[] = { 0x80000000, 0x80000000, 0x80000000, 0x80000000, }; diff --git a/test/move-to-show-surface.c b/test/move-to-show-surface.c index c5cc1ae59..74bf51b7b 100644 --- a/test/move-to-show-surface.c +++ b/test/move-to-show-surface.c @@ -55,7 +55,7 @@ static cairo_test_status_t draw (cairo_t *cr, int width, int height) { cairo_surface_t *surface; - unsigned long colors[4] = { + uint32_t colors[4] = { 0xffffffff, 0xffff0000, 0xff00ff00, 0xff0000ff }; diff --git a/test/paint-with-alpha.c b/test/paint-with-alpha.c index f4734afdb..552c062f3 100644 --- a/test/paint-with-alpha.c +++ b/test/paint-with-alpha.c @@ -35,7 +35,7 @@ static cairo_test_status_t draw (cairo_t *cr, int width, int height) { cairo_surface_t *surface; - unsigned long data[16] = { + uint32_t data[16] = { 0xffffffff, 0xffffffff, 0xffff0000, 0xffff0000, 0xffffffff, 0xffffffff, 0xffff0000, 0xffff0000, diff --git a/test/scale-source-surface-paint.c b/test/scale-source-surface-paint.c index 7b1cc3824..9e36ea66a 100644 --- a/test/scale-source-surface-paint.c +++ b/test/scale-source-surface-paint.c @@ -35,7 +35,7 @@ static cairo_test_status_t draw (cairo_t *cr, int width, int height) { cairo_surface_t *surface; - unsigned long data[16] = { + uint32_t data[16] = { 0xffffffff, 0xffffffff, 0xffff0000, 0xffff0000, 0xffffffff, 0xffffffff, 0xffff0000, 0xffff0000, diff --git a/test/set-source.c b/test/set-source.c index 568935df6..08e9e3e2e 100644 --- a/test/set-source.c +++ b/test/set-source.c @@ -37,7 +37,7 @@ draw (cairo_t *cr, int width, int height) int i; /* This color value might need to change in the future when we fix * the rounding in cairo-color.c */ - unsigned long color = 0x7f19334C; + uint32_t color = 0x7f19334C; cairo_surface_t *surface; cairo_pattern_t *pattern; diff --git a/test/source-surface-scale-paint.c b/test/source-surface-scale-paint.c index 1af972f23..3f3644c44 100644 --- a/test/source-surface-scale-paint.c +++ b/test/source-surface-scale-paint.c @@ -35,7 +35,7 @@ static cairo_test_status_t draw (cairo_t *cr, int width, int height) { cairo_surface_t *surface; - unsigned long data[16] = { + uint32_t data[16] = { 0xffffffff, 0xffffffff, 0xffff0000, 0xffff0000, 0xffffffff, 0xffffffff, 0xffff0000, 0xffff0000, diff --git a/test/translate-show-surface.c b/test/translate-show-surface.c index 5a566bcb1..d81ed1ad0 100644 --- a/test/translate-show-surface.c +++ b/test/translate-show-surface.c @@ -53,7 +53,7 @@ static cairo_test_status_t draw (cairo_t *cr, int width, int height) { cairo_surface_t *surface; - unsigned long colors[4] = { + uint32_t colors[4] = { 0xffffffff, 0xffff0000, 0xff00ff00, 0xff0000ff }; |