MagickWand  7.1.1-43
Convert, Edit, Or Compose Bitmap Images
method-attribute.h
1 /*
2  Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization
3  dedicated to making software imaging solutions freely available.
4 
5  You may not use this file except in compliance with the License. You may
6  obtain a copy of the License at
7 
8  https://imagemagick.org/script/license.php
9 
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(MAGICKWAND_WINDOWS_SUPPORT) && !defined(__CYGWIN__)
26 # define WandPrivate
27 # if defined(_MT) && defined(_DLL) && !defined(_MAGICKDLL_) && !defined(_LIB)
28 # define _MAGICKDLL_
29 # endif
30 # if defined(_MAGICKDLL_)
31 # if defined(_VISUALC_)
32 # pragma warning( disable: 4273 ) /* Disable the dll linkage warnings */
33 # endif
34 # if !defined(_MAGICKLIB_)
35 # if defined(__clang__) || defined(__GNUC__)
36 # define WandExport __attribute__ ((dllimport))
37 # else
38 # define WandExport __declspec(dllimport)
39 # endif
40 # else
41 # if defined(__clang__) || defined(__GNUC__)
42 # define WandExport __attribute__ ((dllexport))
43 # else
44 # define WandExport __declspec(dllexport)
45 # endif
46 # endif
47 # else
48 # define WandExport
49 # endif
50 # if defined(_VISUALC_)
51 # pragma warning(disable : 4018)
52 # pragma warning(disable : 4068)
53 # pragma warning(disable : 4244)
54 # pragma warning(disable : 4142)
55 # pragma warning(disable : 4800)
56 # pragma warning(disable : 4786)
57 # pragma warning(disable : 4996)
58 # endif
59 #else
60 # if defined(__clang__) || (__GNUC__ >= 4)
61 # define WandExport __attribute__ ((visibility ("default")))
62 # define WandPrivate __attribute__ ((visibility ("hidden")))
63 # else
64 # define WandExport
65 # define WandPrivate
66 # endif
67 #endif
68 
69 #define MagickWandSignature 0xabacadabUL
70 #if !defined(MagickPathExtent)
71 # define MagickPathExtent 4096
72 #endif
73 
74 #if defined(MAGICKCORE_HAVE___ATTRIBUTE__)
75 # define wand_aligned(x) __attribute__((aligned(x)))
76 # define wand_attribute __attribute__
77 # define wand_unused(x) wand_unused_ ## x __attribute__((unused))
78 # define wand_unreferenced(x) /* nothing */
79 #elif defined(MAGICKWAND_WINDOWS_SUPPORT) && !defined(__CYGWIN__)
80 # define wand_aligned(x) __declspec(align(x))
81 # define wand_attribute(x) /* nothing */
82 # define wand_unused(x) x
83 # define wand_unreferenced(x) (x)
84 #else
85 # define wand_aligned(x) /* nothing */
86 # define wand_attribute(x) /* nothing */
87 # define wand_unused(x) x
88 # define wand_unreferenced(x) /* nothing */
89 #endif
90 
91 #if !defined(__clang__) && (defined(__GNUC__) && (__GNUC__) > 4)
92 # define wand_alloc_size(x) __attribute__((__alloc_size__(x)))
93 # define wand_alloc_sizes(x,y) __attribute__((__alloc_size__(x,y)))
94 #else
95 # define wand_alloc_size(x) /* nothing */
96 # define wand_alloc_sizes(x,y) /* nothing */
97 #endif
98 
99 #if defined(__clang__) || (defined(__GNUC__) && (__GNUC__) > 4)
100 # define wand_cold_spot __attribute__((__cold__))
101 # define wand_hot_spot __attribute__((__hot__))
102 #else
103 # define wand_cold_spot
104 # define wand_hot_spot
105 #endif
106 
107 #if defined(__cplusplus) || defined(c_plusplus)
108 }
109 #endif
110 
111 #endif