From: cristy Date: Wed, 5 Mar 2014 00:51:48 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~2616 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=55a946662d0a96cead83e26a2cde12e29c995070;p=imagemagick --- diff --git a/MagickCore/method-attribute.h b/MagickCore/method-attribute.h index 80f99f676..a0b0e7740 100644 --- a/MagickCore/method-attribute.h +++ b/MagickCore/method-attribute.h @@ -123,6 +123,12 @@ extern "C" { # define magick_unreferenced(x) /* nothing */ #endif +#if defined(__apple_build_version__) +# define magick_alloc_size(x) __attribute__((__alloc_size__(x))) +# define magick_alloc_sizes(x,y) __attribute__((__alloc_size__(x,y))) +# define magick_cold_spot +# define magick_hot_spot +#else #if defined(__clang__) || (((__GNUC__) > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3))) # define magick_alloc_size(x) __attribute__((__alloc_size__(x))) # define magick_alloc_sizes(x,y) __attribute__((__alloc_size__(x,y))) @@ -134,6 +140,7 @@ extern "C" { # define magick_cold_spot # define magick_hot_spot #endif +#endif #if defined(__cplusplus) || defined(c_plusplus) } diff --git a/MagickWand/method-attribute.h b/MagickWand/method-attribute.h index 4c86f131b..9ee27aaef 100644 --- a/MagickWand/method-attribute.h +++ b/MagickWand/method-attribute.h @@ -109,6 +109,12 @@ extern "C" { # define wand_unused(x) x #endif +#if defined(__apple_build_version__) +# define magick_alloc_size(x) __attribute__((__alloc_size__(x))) +# define magick_alloc_sizes(x,y) __attribute__((__alloc_size__(x,y))) +# define magick_cold_spot +# define magick_hot_spot +#else #if defined(__clang__) || (((__GNUC__) > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3))) # define wand_alloc_size(x) __attribute__((__alloc_size__(x))) # define wand_alloc_sizes(x,y) __attribute__((__alloc_size__(x,y))) @@ -120,6 +126,7 @@ extern "C" { # define wand_cold_spot # define wand_hot_spot #endif +#endif #if defined(__cplusplus) || defined(c_plusplus) }