diff --git a/src/cairo.h b/src/cairo.h index 99e008480..18c434a5b 100644 --- a/src/cairo.h +++ b/src/cairo.h @@ -532,6 +532,7 @@ cairo_matrix_transform_point (cairo_matrix_t *matrix, double *x, double *y); deprecated functions to continue to work for now, (with useful warnings). But the deprecated functions will not appear in the next release. */ +#ifndef _CAIROINT_H_ #define cairo_get_operator cairo_get_operator_DEPRECATED_BY_cairo_current_operator #define cairo_get_rgb_color cairo_get_rgb_color_DEPRECATED_BY_cairo_current_rgb_color #define cairo_get_alpha cairo_get_alpha_DEPRECATED_BY_cairo_current_alpha @@ -546,6 +547,7 @@ cairo_matrix_transform_point (cairo_matrix_t *matrix, double *x, double *y); #define cairo_get_target_surface cairo_get_target_surface_DEPRECATED_BY_cairo_current_target_surface #define cairo_get_status cairo_get_status_DEPRECATED_BY_cairo_status #define cairo_get_status_string cairo_get_status_string_DEPRECATED_BY_cairo_status_string +#endif #ifdef __cplusplus } diff --git a/src/cairoint.h b/src/cairoint.h index 90c985a03..be591d9f6 100644 --- a/src/cairoint.h +++ b/src/cairoint.h @@ -56,10 +56,10 @@ If the macro is not supported by the compiler, the program will not link, and the user will still se a useful error message. */ #if __GNUC__ >= 2 && defined(__ELF__) -# define DEPRECATE(old, new) DEPRECATE_INT(old, old##_DEPRECATED_BY_##new , new) -# define DEPRECATE_INT(old, int, new) \ - extern __typeof (new) int \ - __asm__ ("" #int) \ +# define DEPRECATE(old, new) ADD_ALIAS(old, new); ADD_ALIAS(old##_DEPRECATED_BY_##new , new) +# define ADD_ALIAS(old, new) \ + extern __typeof (new) old \ + __asm__ ("" #old) \ __attribute__((__alias__("" #new))) #else # define DEPRECATE(old, new)