diff options
author | Siarhei Siamashka <siarhei.siamashka@nokia.com> | 2011-01-04 13:42:29 +0200 |
---|---|---|
committer | Siarhei Siamashka <siarhei.siamashka@nokia.com> | 2011-01-16 20:48:39 +0200 |
commit | ab3809f4da0d833944363c5c039c3a2e6a8389c5 (patch) | |
tree | 0ace87c2a4214441cfcfc90975c1d7286f42d2d2 | |
parent | f5c0a60ac8c32ac37aaf58f67048585af58f3141 (diff) |
Workaround for a preprocessor issue in old Sun Studio
Patch from Peter O'Gorman with some modifications
https://bugs.freedesktop.org//show_bug.cgi?id=32764
-rw-r--r-- | pixman/pixman-fast-path.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/pixman/pixman-fast-path.h b/pixman/pixman-fast-path.h index ed09ba50..d98cfbf6 100644 --- a/pixman/pixman-fast-path.h +++ b/pixman/pixman-fast-path.h @@ -245,10 +245,10 @@ scanline_func_name (dst_type_t *dst, \ } \ } -#define FAST_NEAREST_MAINLOOP(scale_func_name, scanline_func, src_type_t, dst_type_t, \ - repeat_mode) \ +#define FAST_NEAREST_MAINLOOP_INT(scale_func_name, scanline_func, src_type_t, dst_type_t, \ + repeat_mode) \ static void \ -fast_composite_scaled_nearest_ ## scale_func_name (pixman_implementation_t *imp, \ +fast_composite_scaled_nearest ## scale_func_name (pixman_implementation_t *imp, \ pixman_op_t op, \ pixman_image_t * src_image, \ pixman_image_t * mask_image, \ @@ -374,12 +374,18 @@ fast_composite_scaled_nearest_ ## scale_func_name (pixman_implementation_t *imp, } \ } +/* A workaround for old sun studio, see: https://bugs.freedesktop.org/show_bug.cgi?id=32764 */ +#define FAST_NEAREST_MAINLOOP(scale_func_name, scanline_func, src_type_t, dst_type_t, \ + repeat_mode) \ + FAST_NEAREST_MAINLOOP_INT(_ ## scale_func_name, scanline_func, src_type_t, dst_type_t, \ + repeat_mode) \ + #define FAST_NEAREST(scale_func_name, SRC_FORMAT, DST_FORMAT, \ src_type_t, dst_type_t, OP, repeat_mode) \ FAST_NEAREST_SCANLINE(scaled_nearest_scanline_ ## scale_func_name ## _ ## OP, \ SRC_FORMAT, DST_FORMAT, src_type_t, dst_type_t, \ OP, repeat_mode) \ - FAST_NEAREST_MAINLOOP(scale_func_name##_##OP, \ + FAST_NEAREST_MAINLOOP_INT(_ ## scale_func_name ## _ ## OP, \ scaled_nearest_scanline_ ## scale_func_name ## _ ## OP, \ src_type_t, dst_type_t, repeat_mode) |