From 55a946662d0a96cead83e26a2cde12e29c995070 Mon Sep 17 00:00:00 2001 From: cristy Date: Wed, 5 Mar 2014 00:51:48 +0000 Subject: [PATCH] --- MagickCore/method-attribute.h | 7 +++++++ MagickWand/method-attribute.h | 7 +++++++ 2 files changed, 14 insertions(+) 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) } -- 2.50.1