MagickCore
7.1.2
Convert, Edit, Or Compose Bitmap Images
Loading...
Searching...
No Matches
magick-config.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
MagickConfig not autogenerated (fixed stuff)
17
*/
18
#ifndef MAGICKCORE_MAGICK_CONFIG_H
19
#define MAGICKCORE_MAGICK_CONFIG_H
20
21
#if defined(__cplusplus) || defined(c_plusplus)
22
extern
"C"
{
23
#endif
24
25
#include "MagickCore/magick-baseconfig.h"
26
27
#define MAGICKCORE_STRING_QUOTE(str) #str
28
#define MAGICKCORE_STRING_XQUOTE(str) MAGICKCORE_STRING_QUOTE(str)
29
30
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
31
# if defined(__GNUC__) || defined(__clang__)
32
# define MAGICK_COMPILER_WARNING(w) _Pragma(MAGICKCORE_STRING_QUOTE(GCC warning w))
33
# elif defined(_MSC_VER)
34
# define MAGICK_COMPILER_WARNING(w) _Pragma(MAGICKCORE_STRING_QUOTE(message(w)))
35
# endif
36
#endif
37
38
#ifndef MAGICK_COMPILER_WARNING
39
# define MAGICK_COMPILER_WARNING(w)
40
#endif
41
42
#ifdef MAGICKCORE__FILE_OFFSET_BITS
43
# ifdef _FILE_OFFSET_BITS
44
# if _FILE_OFFSET_BITS != MAGICKCORE__FILE_OFFSET_BITS
45
MAGICK_COMPILER_WARNING(
"_FILE_OFFSET_BITS is already defined, but does not match MAGICKCORE__FILE_OFFSET_BITS"
)
46
# else
47
# undef _FILE_OFFSET_BITS
48
# endif
49
# endif
50
# ifndef _FILE_OFFSET_BITS
51
# if MAGICKCORE__FILE_OFFSET_BITS == 64
52
# define _FILE_OFFSET_BITS 64
53
# elif MAGICKCORE__FILE_OFFSET_BITS == 32
54
# define _FILE_OFFSET_BITS 32
55
# else
56
# define _FILE_OFFSET_BITS MAGICKCORE__FILE_OFFSET_BITS
57
# endif
58
# endif
59
#endif
60
61
/* Compatibility block */
62
#if !defined(MAGICKCORE_QUANTUM_DEPTH) && defined(MAGICKCORE_QUANTUM_DEPTH_OBSOLETE_IN_H)
63
# warning "you should set MAGICKCORE_QUANTUM_DEPTH to sensible default set it to configure time default"
64
# warning "this is an obsolete behavior please fix your makefile"
65
# define MAGICKCORE_QUANTUM_DEPTH MAGICKCORE_QUANTUM_DEPTH_OBSOLETE_IN_H
66
#endif
67
68
/* Number of bits in a pixel Quantum (8/16/32/64) */
69
#ifndef MAGICKCORE_QUANTUM_DEPTH
70
# error "you should set MAGICKCORE_QUANTUM_DEPTH"
71
#endif
72
73
/* check values */
74
#if MAGICKCORE_QUANTUM_DEPTH != 8
75
# if MAGICKCORE_QUANTUM_DEPTH != 16
76
# if MAGICKCORE_QUANTUM_DEPTH != 32
77
# if MAGICKCORE_QUANTUM_DEPTH != 64
78
# error "MAGICKCORE_QUANTUM_DEPTH is not 8/16/32/64 bits"
79
# endif
80
# endif
81
# endif
82
#endif
83
84
/* whether HDRI is enable */
85
#if !defined(MAGICKCORE_HDRI_ENABLE)
86
# error "you should set MAGICKCORE_HDRI_ENABLE"
87
#endif
88
89
#if MAGICKCORE_HDRI_ENABLE
90
# define MAGICKCORE_HDRI_SUPPORT 1
91
#endif
92
#if MAGICKCORE_CHANNEL_MASK_DEPTH == 64
93
# define MAGICKCORE_64BIT_CHANNEL_MASK_SUPPORT 1
94
#endif
95
96
#if defined __CYGWIN32__ && !defined __CYGWIN__
97
/* For backwards compatibility with Cygwin b19 and
98
earlier, we define __CYGWIN__ here, so that
99
we can rely on checking just for that macro. */
100
# define __CYGWIN__ __CYGWIN32__
101
#endif
102
103
/* ABI SUFFIX */
104
#ifndef MAGICKCORE_HDRI_SUPPORT
105
#define MAGICKCORE_ABI_SUFFIX "Q" MAGICKCORE_STRING_XQUOTE(MAGICKCORE_QUANTUM_DEPTH)
106
#else
107
#define MAGICKCORE_ABI_SUFFIX "Q" MAGICKCORE_STRING_XQUOTE(MAGICKCORE_QUANTUM_DEPTH) "HDRI"
108
#endif
109
110
/* some path game */
111
#if !defined __CYGWIN__
112
# if defined (_WIN32) || defined (_WIN64) || defined (__MSDOS__) || defined (__DJGPP__) || defined (__OS2__)
113
/* Use Windows separators on all _WIN32 defining
114
environments, except Cygwin. */
115
# define MAGICKCORE_DIR_SEPARATOR_CHAR '\\'
116
# define MAGICKCORE_DIR_SEPARATOR "\\"
117
# define MAGICKCORE_PATH_SEPARATOR_CHAR ';'
118
# define MAGICKCORE_PATH_SEPARATOR ";"
119
# endif
120
#endif
121
122
/* posix */
123
#ifndef MAGICKCORE_DIR_SEPARATOR_CHAR
124
/* Assume that not having this is an indicator that all
125
are missing. */
126
# define MAGICKCORE_DIR_SEPARATOR_CHAR '/'
127
# define MAGICKCORE_DIR_SEPARATOR "/"
128
# define MAGICKCORE_PATH_SEPARATOR_CHAR ':'
129
# define MAGICKCORE_PATH_SEPARATOR ":"
130
#endif
/* !DIR_SEPARATOR_CHAR */
131
132
# if defined(MAGICKCORE_POSIX_SUPPORT) || defined(__MINGW32__)
133
134
/* module dir */
135
#ifndef MAGICKCORE_MODULES_DIRNAME
136
# define MAGICKCORE_MODULES_DIRNAME MAGICKCORE_MODULES_BASEDIRNAME "-" MAGICKCORE_ABI_SUFFIX
137
#endif
138
139
#ifndef MAGICKCORE_MODULES_PATH
140
# define MAGICKCORE_MODULES_PATH MAGICKCORE_LIBRARY_ABSOLUTE_PATH MAGICKCORE_DIR_SEPARATOR MAGICKCORE_MODULES_DIRNAME
141
#endif
142
143
#ifndef MAGICKCORE_MODULES_RELATIVE_PATH
144
#define MAGICKCORE_MODULES_RELATIVE_PATH MAGICKCORE_LIBRARY_RELATIVE_PATH MAGICKCORE_DIR_SEPARATOR MAGICKCORE_MODULES_DIRNAME
145
#endif
146
147
/* Subdirectory under lib to place ImageMagick coder module files */
148
#ifndef MAGICKCORE_CODER_PATH
149
# if defined(vms)
150
# define MAGICKCORE_CODER_PATH "sys$login:"
151
# else
152
# define MAGICKCORE_CODER_PATH MAGICKCORE_MODULES_PATH MAGICKCORE_DIR_SEPARATOR MAGICKCORE_CODER_DIRNAME
153
# endif
154
#endif
155
156
#ifndef MAGICKCORE_CODER_RELATIVE_PATH
157
# define MAGICKCORE_CODER_RELATIVE_PATH MAGICKCORE_MODULES_RELATIVE_PATH MAGICKCORE_DIR_SEPARATOR MAGICKCORE_CODER_DIRNAME
158
#endif
159
160
/* subdirectory under lib to place ImageMagick filter module files */
161
#ifndef MAGICKCORE_FILTER_PATH
162
# if defined(vms)
163
# define MAGICKCORE_FILTER_PATH "sys$login:"
164
# else
165
# define MAGICKCORE_FILTER_PATH MAGICKCORE_MODULES_PATH MAGICKCORE_DIR_SEPARATOR MAGICKCORE_FILTER_DIRNAME
166
# endif
167
#endif
168
169
#ifndef MAGICKCORE_FILTER_RELATIVE_PATH
170
# define MAGICKCORE_FILTER_RELATIVE_PATH MAGICKCORE_MODULES_RELATIVE_PATH MAGICKCORE_DIR_SEPARATOR MAGICKCORE_FILTER_DIRNAME
171
#endif
172
173
/* sharearch dir */
174
#ifndef MAGICKCORE_SHAREARCH_DIRNAME
175
# define MAGICKCORE_SHAREARCH_DIRNAME MAGICKCORE_SHAREARCH_BASEDIRNAME "-" MAGICKCORE_ABI_SUFFIX
176
#endif
177
178
#ifndef MAGICKCORE_SHAREARCH_PATH
179
# define MAGICKCORE_SHAREARCH_PATH MAGICKCORE_LIBRARY_ABSOLUTE_PATH MAGICKCORE_DIR_SEPARATOR MAGICKCORE_SHAREARCH_DIRNAME MAGICKCORE_DIR_SEPARATOR
180
#endif
181
182
#ifndef MAGICKCORE_SHAREARCH_RELATIVE_PATH
183
#define MAGICKCORE_SHAREARCH_RELATIVE_PATH MAGICKCORE_LIBRARY_RELATIVE_PATH MAGICKCORE_DIR_SEPARATOR MAGICKCORE_SHAREARCH_DIRNAME
184
#endif
185
186
#endif
187
188
/* for Clang compatibility */
189
#ifndef __has_builtin
190
# define __has_builtin(x) 0
191
#endif
192
193
#if defined(__GNUC__) && !defined(__clang__)
194
# define MAGICKCORE_DIAGNOSTIC_PUSH() \
195
_Pragma("GCC diagnostic push")
196
# define MAGICKCORE_DIAGNOSTIC_IGNORE_MAYBE_UNINITIALIZED() \
197
_Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
198
# define MAGICKCORE_DIAGNOSTIC_POP() \
199
_Pragma("GCC diagnostic pop")
200
#else
201
# define MAGICKCORE_DIAGNOSTIC_PUSH()
202
# define MAGICKCORE_DIAGNOSTIC_IGNORE_MAYBE_UNINITIALIZED()
203
# define MAGICKCORE_DIAGNOSTIC_POP()
204
#endif
205
206
#define MAGICKCORE_BITS_BELOW(power_of_2) \
207
((power_of_2)-1)
208
209
#define MAGICKCORE_MAX_ALIGNMENT_PADDING(power_of_2) \
210
MAGICKCORE_BITS_BELOW(power_of_2)
211
212
#define MAGICKCORE_IS_NOT_ALIGNED(n, power_of_2) \
213
((n) & MAGICKCORE_BITS_BELOW(power_of_2))
214
215
#define MAGICKCORE_IS_NOT_POWER_OF_2(n) \
216
MAGICKCORE_IS_NOT_ALIGNED((n), (n))
217
218
#define MAGICKCORE_ALIGN_DOWN(n, power_of_2) \
219
((n) & ~MAGICKCORE_BITS_BELOW(power_of_2))
220
221
#define MAGICKCORE_ALIGN_UP(n, power_of_2) \
222
MAGICKCORE_ALIGN_DOWN((n) + MAGICKCORE_MAX_ALIGNMENT_PADDING(power_of_2),power_of_2)
223
224
#if defined(__cplusplus) || defined(c_plusplus)
225
}
226
#endif
227
228
#endif
ImageMagick-7
MagickCore
magick-config.h
Generated by
1.13.2