cristy | b2b5481 | 2012-02-19 18:15:55 +0000 | [diff] [blame] | 1 | /* |
Cristy | 7ce65e7 | 2015-12-12 18:03:16 -0500 | [diff] [blame] | 2 | Copyright 1999-2016 ImageMagick Studio LLC, a non-profit organization |
cristy | b2b5481 | 2012-02-19 18:15:55 +0000 | [diff] [blame] | 3 | dedicated to making software imaging solutions freely available. |
cristy | d009094 | 2015-03-04 01:03:50 +0000 | [diff] [blame] | 4 | |
cristy | b2b5481 | 2012-02-19 18:15:55 +0000 | [diff] [blame] | 5 | You may not use this file except in compliance with the License. |
| 6 | obtain a copy of the License at |
cristy | d009094 | 2015-03-04 01:03:50 +0000 | [diff] [blame] | 7 | |
cristy | b2b5481 | 2012-02-19 18:15:55 +0000 | [diff] [blame] | 8 | http://www.imagemagick.org/script/license.php |
cristy | d009094 | 2015-03-04 01:03:50 +0000 | [diff] [blame] | 9 | |
cristy | b2b5481 | 2012-02-19 18:15:55 +0000 | [diff] [blame] | 10 | Unless required by applicable law or agreed to in writing, software |
| 11 | distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | See the License for the specific language governing permissions and |
| 14 | limitations under the License. |
| 15 | |
| 16 | MagickWand method attributes. |
| 17 | */ |
| 18 | #ifndef _MAGICKWAND_METHOD_ATTRIBUTE_H |
| 19 | #define _MAGICKWAND_METHOD_ATTRIBUTE_H |
| 20 | |
| 21 | #if defined(__cplusplus) || defined(c_plusplus) |
| 22 | extern "C" { |
| 23 | #endif |
| 24 | |
| 25 | #if defined(__BORLANDC__) && defined(_DLL) |
| 26 | # pragma message("BCBMagick lib DLL export interface") |
| 27 | # define _MAGICKDLL_ |
| 28 | # define _MAGICKLIB_ |
| 29 | # define MAGICKCORE_MODULES_SUPPORT |
| 30 | # undef MAGICKCORE_BUILD_MODULES |
| 31 | #endif |
| 32 | |
cristy | 8711081 | 2013-04-03 00:40:44 +0000 | [diff] [blame] | 33 | #if defined(MAGICKWAND_WINDOWS_SUPPORT) && !defined(__CYGWIN__) |
| 34 | # define WandPrivate |
cristy | b2b5481 | 2012-02-19 18:15:55 +0000 | [diff] [blame] | 35 | # if defined(_MT) && defined(_DLL) && !defined(_MAGICKDLL_) && !defined(_LIB) |
| 36 | # define _MAGICKDLL_ |
| 37 | # endif |
| 38 | # if defined(_MAGICKDLL_) |
| 39 | # if defined(_VISUALC_) |
| 40 | # pragma warning( disable: 4273 ) /* Disable the dll linkage warnings */ |
| 41 | # endif |
| 42 | # if !defined(_MAGICKLIB_) |
cristy | 483eeb6 | 2014-01-12 22:12:44 +0000 | [diff] [blame] | 43 | # if defined(__clang__) || defined(__GNUC__) |
cristy | 8711081 | 2013-04-03 00:40:44 +0000 | [diff] [blame] | 44 | # define WandExport __attribute__ ((dllimport)) |
cristy | b2b5481 | 2012-02-19 18:15:55 +0000 | [diff] [blame] | 45 | # else |
cristy | 8711081 | 2013-04-03 00:40:44 +0000 | [diff] [blame] | 46 | # define WandExport __declspec(dllimport) |
cristy | b2b5481 | 2012-02-19 18:15:55 +0000 | [diff] [blame] | 47 | # endif |
| 48 | # if defined(_VISUALC_) |
| 49 | # pragma message( "MagickCore lib DLL import interface" ) |
| 50 | # endif |
| 51 | # else |
cristy | 483eeb6 | 2014-01-12 22:12:44 +0000 | [diff] [blame] | 52 | # if defined(__clang__) || defined(__GNUC__) |
cristy | 8711081 | 2013-04-03 00:40:44 +0000 | [diff] [blame] | 53 | # define WandExport __attribute__ ((dllexport)) |
cristy | b2b5481 | 2012-02-19 18:15:55 +0000 | [diff] [blame] | 54 | # else |
cristy | 8711081 | 2013-04-03 00:40:44 +0000 | [diff] [blame] | 55 | # define WandExport __declspec(dllexport) |
cristy | b2b5481 | 2012-02-19 18:15:55 +0000 | [diff] [blame] | 56 | # endif |
| 57 | # if defined(_VISUALC_) |
| 58 | # pragma message( "MagickCore lib DLL export interface" ) |
| 59 | # endif |
| 60 | # endif |
| 61 | # else |
cristy | 8711081 | 2013-04-03 00:40:44 +0000 | [diff] [blame] | 62 | # define WandExport |
cristy | b2b5481 | 2012-02-19 18:15:55 +0000 | [diff] [blame] | 63 | # if defined(_VISUALC_) |
| 64 | # pragma message( "MagickCore lib static interface" ) |
| 65 | # endif |
| 66 | # endif |
| 67 | |
| 68 | # if defined(_DLL) && !defined(_LIB) |
| 69 | # if defined(_VISUALC_) |
| 70 | # pragma message( "MagickCore module DLL export interface" ) |
| 71 | # endif |
| 72 | # else |
| 73 | # if defined(_VISUALC_) |
| 74 | # pragma message( "MagickCore module static interface" ) |
| 75 | # endif |
| 76 | |
| 77 | # endif |
cristy | b2b5481 | 2012-02-19 18:15:55 +0000 | [diff] [blame] | 78 | # if defined(_VISUALC_) |
| 79 | # pragma warning(disable : 4018) |
| 80 | # pragma warning(disable : 4068) |
| 81 | # pragma warning(disable : 4244) |
| 82 | # pragma warning(disable : 4142) |
| 83 | # pragma warning(disable : 4800) |
| 84 | # pragma warning(disable : 4786) |
| 85 | # pragma warning(disable : 4996) |
| 86 | # endif |
| 87 | #else |
cristy | 483eeb6 | 2014-01-12 22:12:44 +0000 | [diff] [blame] | 88 | # if defined(__clang__) || (__GNUC__ >= 4) |
cristy | 8711081 | 2013-04-03 00:40:44 +0000 | [diff] [blame] | 89 | # define WandExport __attribute__ ((visibility ("default"))) |
| 90 | # define WandPrivate __attribute__ ((visibility ("hidden"))) |
cristy | b2b5481 | 2012-02-19 18:15:55 +0000 | [diff] [blame] | 91 | # else |
cristy | 8711081 | 2013-04-03 00:40:44 +0000 | [diff] [blame] | 92 | # define WandExport |
| 93 | # define WandPrivate |
cristy | b2b5481 | 2012-02-19 18:15:55 +0000 | [diff] [blame] | 94 | # endif |
cristy | b2b5481 | 2012-02-19 18:15:55 +0000 | [diff] [blame] | 95 | #endif |
| 96 | |
cristy | e1c94d9 | 2015-06-28 12:16:33 +0000 | [diff] [blame] | 97 | #define MagickWandSignature 0xabacadabUL |
cristy | 151b66d | 2015-04-15 10:50:31 +0000 | [diff] [blame] | 98 | #if !defined(MagickPathExtent) |
| 99 | # define MagickPathExtent 4096 |
cristy | b2b5481 | 2012-02-19 18:15:55 +0000 | [diff] [blame] | 100 | #endif |
| 101 | |
| 102 | #if defined(MAGICKCORE_HAVE___ATTRIBUTE__) |
cristy | 8711081 | 2013-04-03 00:40:44 +0000 | [diff] [blame] | 103 | # define wand_aligned(x) __attribute__((aligned(x))) |
| 104 | # define wand_attribute __attribute__ |
| 105 | # define wand_unused(x) wand_unused_ ## x __attribute__((unused)) |
Cristy | 9125cd5 | 2015-09-17 20:16:13 -0400 | [diff] [blame] | 106 | #elif defined( __VMS ) |
| 107 | # define wand_aligned(x) /* nothing */ |
| 108 | # define wand_attribute(x) /* nothing */ |
| 109 | # define wand_unused(x) x |
cristy | b2b5481 | 2012-02-19 18:15:55 +0000 | [diff] [blame] | 110 | #else |
cristy | 8711081 | 2013-04-03 00:40:44 +0000 | [diff] [blame] | 111 | # define wand_aligned(x) __declspec(align(x)) |
| 112 | # define wand_attribute(x) /* nothing */ |
| 113 | # define wand_unused(x) x |
cristy | b2b5481 | 2012-02-19 18:15:55 +0000 | [diff] [blame] | 114 | #endif |
| 115 | |
cristy | e01f3ad | 2014-12-20 20:37:42 +0000 | [diff] [blame] | 116 | #if !defined(__clang__) && (((__GNUC__) > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3))) |
cristy | 8711081 | 2013-04-03 00:40:44 +0000 | [diff] [blame] | 117 | # define wand_alloc_size(x) __attribute__((__alloc_size__(x))) |
| 118 | # define wand_alloc_sizes(x,y) __attribute__((__alloc_size__(x,y))) |
cristy | b2b5481 | 2012-02-19 18:15:55 +0000 | [diff] [blame] | 119 | #else |
cristy | 8711081 | 2013-04-03 00:40:44 +0000 | [diff] [blame] | 120 | # define wand_alloc_size(x) /* nothing */ |
| 121 | # define wand_alloc_sizes(x,y) /* nothing */ |
cristy | e01f3ad | 2014-12-20 20:37:42 +0000 | [diff] [blame] | 122 | #endif |
| 123 | |
| 124 | #if defined(__clang__) || (((__GNUC__) > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3))) |
| 125 | # define wand_cold_spot __attribute__((__cold__)) |
| 126 | # define wand_hot_spot __attribute__((__hot__)) |
| 127 | #else |
cristy | 8711081 | 2013-04-03 00:40:44 +0000 | [diff] [blame] | 128 | # define wand_cold_spot |
| 129 | # define wand_hot_spot |
cristy | b2b5481 | 2012-02-19 18:15:55 +0000 | [diff] [blame] | 130 | #endif |
cristy | b2b5481 | 2012-02-19 18:15:55 +0000 | [diff] [blame] | 131 | |
| 132 | #if defined(__cplusplus) || defined(c_plusplus) |
| 133 | } |
| 134 | #endif |
| 135 | |
| 136 | #endif |