MagickCore 7.0.10
wizard-config.h
Go to the documentation of this file.
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 WIZARDSTOOLKIT_MAGICK_CONFIG_H
19#define WIZARDSTOOLKIT_MAGICK_CONFIG_H
20
21#if defined(__cplusplus) || defined(c_plusplus)
22extern "C" {
23#endif
24
26
27#define WIZARDSTOOLKIT_STRING_QUOTE(str) #str
28#define WIZARDSTOOLKIT_STRING_XQUOTE(str) WIZARDSTOOLKIT_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(WIZARDSTOOLKIT_STRING_QUOTE(GCC warning w))
33# elif defined(_MSC_VER)
34# define MAGICK_COMPILER_WARNING(w) _Pragma(WIZARDSTOOLKIT_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 WIZARDSTOOLKIT__FILE_OFFSET_BITS
43# ifdef _FILE_OFFSET_BITS
44# if _FILE_OFFSET_BITS != WIZARDSTOOLKIT__FILE_OFFSET_BITS
45 MAGICK_COMPILER_WARNING("_FILE_OFFSET_BITS is already defined, but does not match WIZARDSTOOLKIT__FILE_OFFSET_BITS")
46# else
47# undef _FILE_OFFSET_BITS
48# endif
49# endif
50# ifndef _FILE_OFFSET_BITS
51# if WIZARDSTOOLKIT__FILE_OFFSET_BITS == 64
52# define _FILE_OFFSET_BITS 64
53# elif WIZARDSTOOLKIT__FILE_OFFSET_BITS == 32
54# define _FILE_OFFSET_BITS 32
55# else
56# define _FILE_OFFSET_BITS WIZARDSTOOLKIT__FILE_OFFSET_BITS
57# endif
58# endif
59#endif
60
61/* Compatibility block */
62#if !defined(WIZARDSTOOLKIT_QUANTUM_DEPTH) && defined(WIZARDSTOOLKIT_QUANTUM_DEPTH_OBSOLETE_IN_H)
63# warning "you should set WIZARDSTOOLKIT_QUANTUM_DEPTH to sensible default set it to configure time default"
64# warning "this is an obsolete behavior please fix your makefile"
65# define WIZARDSTOOLKIT_QUANTUM_DEPTH WIZARDSTOOLKIT_QUANTUM_DEPTH_OBSOLETE_IN_H
66#endif
67
68#if defined __CYGWIN32__ && !defined __CYGWIN__
69 /* For backwards compatibility with Cygwin b19 and
70 earlier, we define __CYGWIN__ here, so that
71 we can rely on checking just for that macro. */
72# define __CYGWIN__ __CYGWIN32__
73#endif
74
75/* ABI SUFFIX */
76#ifndef WIZARDSTOOLKIT_HDRI_SUPPORT
77#define WIZARDSTOOLKIT_ABI_SUFFIX "Q" WIZARDSTOOLKIT_STRING_XQUOTE(WIZARDSTOOLKIT_QUANTUM_DEPTH)
78#else
79#define WIZARDSTOOLKIT_ABI_SUFFIX "Q" WIZARDSTOOLKIT_STRING_XQUOTE(WIZARDSTOOLKIT_QUANTUM_DEPTH) "HDRI"
80#endif
81
82/* some path game */
83#if !defined __CYGWIN__
84# if defined (_WIN32) || defined (_WIN64) || defined (__MSDOS__) || defined (__DJGPP__) || defined (__OS2__)
85 /* Use Windows separators on all _WIN32 defining
86 environments, except Cygwin. */
87# define WIZARDSTOOLKIT_DIR_SEPARATOR_CHAR '\\'
88# define WIZARDSTOOLKIT_DIR_SEPARATOR "\\"
89# define WIZARDSTOOLKIT_PATH_SEPARATOR_CHAR ';'
90# define WIZARDSTOOLKIT_PATH_SEPARATOR ";"
91# endif
92#endif
93
94/* posix */
95#ifndef WIZARDSTOOLKIT_DIR_SEPARATOR_CHAR
96 /* Assume that not having this is an indicator that all
97 are missing. */
98# define WIZARDSTOOLKIT_DIR_SEPARATOR_CHAR '/'
99# define WIZARDSTOOLKIT_DIR_SEPARATOR "/"
100# define WIZARDSTOOLKIT_PATH_SEPARATOR_CHAR ':'
101# define WIZARDSTOOLKIT_PATH_SEPARATOR ":"
102#endif /* !DIR_SEPARATOR_CHAR */
103
104# if defined(WIZARDSTOOLKIT_POSIX_SUPPORT) || defined(__MINGW32__)
105
106/* module dir */
107#ifndef WIZARDSTOOLKIT_MODULES_DIRNAME
108# define WIZARDSTOOLKIT_MODULES_DIRNAME WIZARDSTOOLKIT_MODULES_BASEDIRNAME "-" WIZARDSTOOLKIT_ABI_SUFFIX
109#endif
110
111#ifndef WIZARDSTOOLKIT_MODULES_PATH
112# define WIZARDSTOOLKIT_MODULES_PATH WIZARDSTOOLKIT_LIBRARY_PATH WIZARDSTOOLKIT_DIR_SEPARATOR WIZARDSTOOLKIT_MODULES_DIRNAME
113#endif
114
115#ifndef WIZARDSTOOLKIT_MODULES_RELATIVE_PATH
116#define WIZARDSTOOLKIT_MODULES_RELATIVE_PATH WIZARDSTOOLKIT_LIBRARY_RELATIVE_PATH WIZARDSTOOLKIT_DIR_SEPARATOR WIZARDSTOOLKIT_MODULES_DIRNAME
117#endif
118
119/* Subdirectory under lib to place ImageMagick coder module files */
120#ifndef WIZARDSTOOLKIT_CODER_PATH
121# if defined(vms)
122# define WIZARDSTOOLKIT_CODER_PATH "sys$login:"
123# else
124# define WIZARDSTOOLKIT_CODER_PATH WIZARDSTOOLKIT_MODULES_PATH WIZARDSTOOLKIT_DIR_SEPARATOR WIZARDSTOOLKIT_CODER_DIRNAME
125# endif
126#endif
127
128#ifndef WIZARDSTOOLKIT_CODER_RELATIVE_PATH
129# define WIZARDSTOOLKIT_CODER_RELATIVE_PATH WIZARDSTOOLKIT_MODULES_RELATIVE_PATH WIZARDSTOOLKIT_DIR_SEPARATOR WIZARDSTOOLKIT_CODER_DIRNAME
130#endif
131
132/* subdirectory under lib to place ImageMagick filter module files */
133#ifndef WIZARDSTOOLKIT_FILTER_PATH
134# if defined(vms)
135# define WIZARDSTOOLKIT_FILTER_PATH "sys$login:"
136# else
137# define WIZARDSTOOLKIT_FILTER_PATH WIZARDSTOOLKIT_MODULES_PATH WIZARDSTOOLKIT_DIR_SEPARATOR WIZARDSTOOLKIT_FILTER_DIRNAME
138# endif
139#endif
140
141#ifndef WIZARDSTOOLKIT_FILTER_RELATIVE_PATH
142# define WIZARDSTOOLKIT_FILTER_RELATIVE_PATH WIZARDSTOOLKIT_MODULES_RELATIVE_PATH WIZARDSTOOLKIT_DIR_SEPARATOR WIZARDSTOOLKIT_FILTER_DIRNAME
143#endif
144
145/* sharearch dir */
146#ifndef WIZARDSTOOLKIT_SHAREARCH_DIRNAME
147# define WIZARDSTOOLKIT_SHAREARCH_DIRNAME WIZARDSTOOLKIT_SHAREARCH_BASEDIRNAME "-" WIZARDSTOOLKIT_ABI_SUFFIX
148#endif
149
150#ifndef WIZARDSTOOLKIT_SHAREARCH_PATH
151# define WIZARDSTOOLKIT_SHAREARCH_PATH WIZARDSTOOLKIT_LIBRARY_PATH WIZARDSTOOLKIT_DIR_SEPARATOR WIZARDSTOOLKIT_SHAREARCH_DIRNAME WIZARDSTOOLKIT_DIR_SEPARATOR
152#endif
153
154#ifndef WIZARDSTOOLKIT_SHAREARCH_RELATIVE_PATH
155#define WIZARDSTOOLKIT_SHAREARCH_RELATIVE_PATH WIZARDSTOOLKIT_LIBRARY_RELATIVE_PATH WIZARDSTOOLKIT_DIR_SEPARATOR WIZARDSTOOLKIT_SHAREARCH_DIRNAME
156#endif
157
158#endif
159
160/* for Clang compatibility */
161#ifndef __has_builtin
162# define __has_builtin(x) 0
163#endif
164
165#if defined(__GNUC__) && !defined(__clang__)
166# define WIZARDSTOOLKIT_DIAGNOSTIC_PUSH() \
167 _Pragma("GCC diagnostic push")
168# define WIZARDSTOOLKIT_DIAGNOSTIC_IGNORE_MAYBE_UNINITIALIZED() \
169 _Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
170# define WIZARDSTOOLKIT_DIAGNOSTIC_POP() \
171 _Pragma("GCC diagnostic pop")
172#else
173# define WIZARDSTOOLKIT_DIAGNOSTIC_PUSH()
174# define WIZARDSTOOLKIT_DIAGNOSTIC_IGNORE_MAYBE_UNINITIALIZED()
175# define WIZARDSTOOLKIT_DIAGNOSTIC_POP()
176#endif
177
178#define WIZARDSTOOLKIT_BITS_BELOW(power_of_2) \
179 ((power_of_2)-1)
180
181#define WIZARDSTOOLKIT_MAX_ALIGNMENT_PADDING(power_of_2) \
182 WIZARDSTOOLKIT_BITS_BELOW(power_of_2)
183
184#define WIZARDSTOOLKIT_IS_NOT_ALIGNED(n, power_of_2) \
185 ((n) & WIZARDSTOOLKIT_BITS_BELOW(power_of_2))
186
187#define WIZARDSTOOLKIT_IS_NOT_POWER_OF_2(n) \
188 WIZARDSTOOLKIT_IS_NOT_ALIGNED((n), (n))
189
190#define WIZARDSTOOLKIT_ALIGN_DOWN(n, power_of_2) \
191 ((n) & ~WIZARDSTOOLKIT_BITS_BELOW(power_of_2))
192
193#define WIZARDSTOOLKIT_ALIGN_UP(n, power_of_2) \
194 WIZARDSTOOLKIT_ALIGN_DOWN((n) + WIZARDSTOOLKIT_MAX_ALIGNMENT_PADDING(power_of_2),power_of_2)
195
196#if defined(__cplusplus) || defined(c_plusplus)
197}
198#endif
199
200#endif
#define MAGICK_COMPILER_WARNING(w)