MagickWand  6.8.5
method-attribute.h
Go to the documentation of this file.
1 /*
2  Copyright 1999-2013 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.
6  obtain a copy of the License at
7 
8  http://www.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 attribute.
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 
33 #if defined(MAGICKWAND_WINDOWS_SUPPORT) && !defined(__CYGWIN__)
34 # define WandPrivate
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_)
43 # if defined(__GNUC__)
44 # define WandExport __attribute__ ((dllimport))
45 # else
46 # define WandExport __declspec(dllimport)
47 # endif
48 # if defined(_VISUALC_)
49 # pragma message( "MagickWand lib DLL import interface" )
50 # endif
51 # else
52 # if defined(__GNUC__)
53 # define WandExport __attribute__ ((dllexport))
54 # else
55 # define WandExport __declspec(dllexport)
56 # endif
57 # if defined(_VISUALC_)
58 # pragma message( "MagickWand lib DLL export interface" )
59 # endif
60 # endif
61 # else
62 # define WandExport
63 # if defined(_VISUALC_)
64 # pragma message( "MagickWand lib static interface" )
65 # endif
66 # endif
67 
68 # if defined(_DLL) && !defined(_LIB)
69 # if defined(_VISUALC_)
70 # pragma message( "MagickWand module DLL export interface" )
71 # endif
72 # else
73 # if defined(_VISUALC_)
74 # pragma message( "MagickWand module static interface" )
75 # endif
76 
77 # endif
78 # define WandGlobal __declspec(thread)
79 # if defined(_VISUALC_)
80 # pragma warning(disable : 4018)
81 # pragma warning(disable : 4068)
82 # pragma warning(disable : 4244)
83 # pragma warning(disable : 4142)
84 # pragma warning(disable : 4800)
85 # pragma warning(disable : 4786)
86 # pragma warning(disable : 4996)
87 # endif
88 #else
89 # if __GNUC__ >= 4
90 # define WandExport __attribute__ ((visibility ("default")))
91 # define WandPrivate __attribute__ ((visibility ("hidden")))
92 # else
93 # define WandExport
94 # define WandPrivate
95 # endif
96 # define WandGlobal
97 #endif
98 
99 #define WandSignature 0xabacadabUL
100 #if !defined(MaxTextExtent)
101 # define MaxTextExtent 4096
102 #endif
103 
104 #if defined(MAGICKCORE_HAVE___ATTRIBUTE__)
105 # define wand_aligned(x) __attribute__((aligned(x)))
106 # define wand_attribute __attribute__
107 # define wand_unused(x) wand_unused_ ## x __attribute__((unused))
108 #else
109 # define wand_aligned(x) /* nothing */
110 # define wand_attribute(x) /* nothing */
111 # define wand_unused(x) x
112 #endif
113 
114 #if (((__GNUC__) > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)))
115 # define wand_alloc_size(x) __attribute__((__alloc_size__(x)))
116 # define wand_alloc_sizes(x,y) __attribute__((__alloc_size__(x,y)))
117 # define wand_cold_spot __attribute__((__cold__))
118 # define wand_hot_spot __attribute__((__hot__))
119 #else
120 # define wand_alloc_size(x) /* nothing */
121 # define wand_alloc_sizes(x,y) /* nothing */
122 # define wand_cold_spot
123 # define wand_hot_spot
124 #endif
125 
126 #if defined(__cplusplus) || defined(c_plusplus)
127 }
128 #endif
129 
130 #endif