]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Sat, 18 Feb 2012 22:00:17 +0000 (22:00 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Sat, 18 Feb 2012 22:00:17 +0000 (22:00 +0000)
MagickCore/MagickCore.h
MagickWand/MagickWand.h

index 453139d04fd3a03fad7b34adc759ea5712cdd903..751e71a9e6cc34d6d49ecc977e4ed9c18baa90bc 100644 (file)
@@ -128,12 +128,26 @@ extern "C" {
 #endif
 #define MagickSignature  0xabacadabUL
 
-#if !defined(magick_attribute)
-#  if !defined(__GNUC__)
-#    define magick_attribute(x)  /* nothing */
-#  else
-#    define magick_attribute  __attribute__
-#  endif
+#if defined(MAGICKCORE_HAVE___ATTRIBUTE__)
+#  define magick_aligned(x)  __attribute__((__aligned__(x)))
+#  define magick_attribute  __attribute__
+#  define magick_unused(x)  magick_unused_ ## x __attribute__((__unused__))
+#else
+#  define magick_aligned(x)  /* nothing */
+#  define magick_attribute(x)  /* nothing */
+#  define magick_unused(x) x
+#endif
+
+#if defined(MAGICKCORE_HAVE___ALLOC_SIZE__)
+#  define magick_alloc_size(x)  __attribute__((__alloc_size__(x)))
+#  define magick_alloc_sizes(x,y)  __attribute__((__alloc_size__(x,y)))
+#  define magick_cold  __attribute__((__cold__))
+#  define magick_hot  __attribute__((__hot__))
+#else
+#  define magick_alloc_size(x)  /* nothing */
+#  define magick_alloc_sizes(x,y)  /* nothing */
+#  define magick_cold
+#  define magick_hot
 #endif
 
 #if defined(MAGICKCORE_NAMESPACE_PREFIX)
index bfb83f0d6223a1627084bb763bb6a4da5d4df189..bfeca5f139dc375313fa6073c27663a9570a97e4 100644 (file)
@@ -127,12 +127,26 @@ extern "C" {
 #endif
 #define WandSignature  0xabacadabUL
 
-#if !defined(wand_attribute)
-#  if !defined(__GNUC__)
-#    define wand_attribute(x)  /* nothing */
-#  else
-#    define wand_attribute  __attribute__
-#  endif
+#if defined(MAGICKCORE_HAVE___ATTRIBUTE__)
+#  define wand_aligned(x)  __attribute__((__aligned__(x)))
+#  define wand_attribute  __attribute__
+#  define wand_unused(x)  wand_unused_ ## x __attribute__((__unused__))
+#else
+#  define wand_aligned(x)  /* nothing */
+#  define wand_attribute(x)  /* nothing */
+#  define wand_unused(x) x
+#endif
+
+#if defined(MAGICKCORE_HAVE___ALLOC_SIZE__)
+#  define wand_alloc_size(x)  __attribute__((__alloc_size__(x)))
+#  define wand_alloc_sizes(x,y)  __attribute__((__alloc_size__(x,y)))
+#  define wand_cold  __attribute__((__cold__))
+#  define wand_hot  __attribute__((__hot__))
+#else
+#  define wand_alloc_size(x)  /* nothing */
+#  define wand_alloc_sizes(x,y)  /* nothing */
+#  define wand_cold
+#  define wand_hot
 #endif
 
 typedef struct _MagickWand