Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-09-16 08:58:53

0001 /*
0002   Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization
0003   dedicated to making software imaging solutions freely available.
0004 
0005   You may not use this file except in compliance with the License.  You may
0006   obtain a copy of the License at
0007 
0008     https://imagemagick.org/script/license.php
0009 
0010   Unless required by applicable law or agreed to in writing, software
0011   distributed under the License is distributed on an "AS IS" BASIS,
0012   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
0013   See the License for the specific language governing permissions and
0014   limitations under the License.
0015 
0016   MagickConfig not autogenerated (fixed stuff)
0017 */
0018 #ifndef MAGICKCORE_MAGICK_CONFIG_H
0019 #define MAGICKCORE_MAGICK_CONFIG_H
0020 
0021 #if defined(__cplusplus) || defined(c_plusplus)
0022 extern "C" {
0023 #endif
0024 
0025 #include "MagickCore/magick-baseconfig.h"
0026 
0027 #define MAGICKCORE_STRING_QUOTE(str) #str
0028 #define MAGICKCORE_STRING_XQUOTE(str) MAGICKCORE_STRING_QUOTE(str)
0029 
0030 #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
0031 # if defined(__GNUC__) || defined(__clang__)
0032 #  define MAGICK_COMPILER_WARNING(w) _Pragma(MAGICKCORE_STRING_QUOTE(GCC warning w))
0033 # elif defined(_MSC_VER)
0034 #  define MAGICK_COMPILER_WARNING(w) _Pragma(MAGICKCORE_STRING_QUOTE(message(w)))
0035 # endif
0036 #endif
0037 
0038 #ifndef MAGICK_COMPILER_WARNING
0039 # define MAGICK_COMPILER_WARNING(w)
0040 #endif
0041 
0042 #ifdef MAGICKCORE__FILE_OFFSET_BITS
0043 # ifdef _FILE_OFFSET_BITS
0044 #  if _FILE_OFFSET_BITS != MAGICKCORE__FILE_OFFSET_BITS
0045     MAGICK_COMPILER_WARNING("_FILE_OFFSET_BITS is already defined, but does not match MAGICKCORE__FILE_OFFSET_BITS")
0046 #  else
0047 #   undef _FILE_OFFSET_BITS
0048 #  endif
0049 # endif
0050 # ifndef _FILE_OFFSET_BITS
0051 #  if MAGICKCORE__FILE_OFFSET_BITS == 64
0052 #   define _FILE_OFFSET_BITS 64
0053 #  elif MAGICKCORE__FILE_OFFSET_BITS == 32
0054 #   define _FILE_OFFSET_BITS 32
0055 #  else
0056 #   define _FILE_OFFSET_BITS MAGICKCORE__FILE_OFFSET_BITS
0057 #  endif
0058 # endif
0059 #endif
0060 
0061 /* Compatibility block */
0062 #if !defined(MAGICKCORE_QUANTUM_DEPTH) && defined(MAGICKCORE_QUANTUM_DEPTH_OBSOLETE_IN_H)
0063 # warning "you should set MAGICKCORE_QUANTUM_DEPTH to sensible default set it to configure time default"
0064 # warning "this is an obsolete behavior please fix your makefile"
0065 # define MAGICKCORE_QUANTUM_DEPTH MAGICKCORE_QUANTUM_DEPTH_OBSOLETE_IN_H
0066 #endif
0067 
0068 /* Number of bits in a pixel Quantum (8/16/32/64) */
0069 #ifndef MAGICKCORE_QUANTUM_DEPTH
0070 # error "you should set MAGICKCORE_QUANTUM_DEPTH"
0071 #endif
0072 
0073 /* check values */
0074 #if MAGICKCORE_QUANTUM_DEPTH != 8
0075 # if MAGICKCORE_QUANTUM_DEPTH != 16
0076 #  if MAGICKCORE_QUANTUM_DEPTH != 32
0077 #   if MAGICKCORE_QUANTUM_DEPTH != 64
0078 #    error "MAGICKCORE_QUANTUM_DEPTH is not 8/16/32/64 bits"
0079 #   endif
0080 #  endif
0081 # endif
0082 #endif
0083 
0084 /* whether HDRI is enable */
0085 #if !defined(MAGICKCORE_HDRI_ENABLE)
0086 # error "you should set MAGICKCORE_HDRI_ENABLE"
0087 #endif
0088 
0089 #if MAGICKCORE_HDRI_ENABLE
0090 # define MAGICKCORE_HDRI_SUPPORT 1
0091 #endif
0092 #if MAGICKCORE_CHANNEL_MASK_DEPTH == 64
0093 # define MAGICKCORE_64BIT_CHANNEL_MASK_SUPPORT 1
0094 #endif
0095 
0096 /* Compatibility block */
0097 #if !defined(MAGICKCORE_QUANTUM_DEPTH) && defined(MAGICKCORE_QUANTUM_DEPTH_OBSOLETE_IN_H)
0098 # warning "you should set MAGICKCORE_QUANTUM_DEPTH to sensible default set it to configure time default"
0099 # warning "this is an obsolete behavior please fix yours makefile"
0100 # define MAGICKCORE_QUANTUM_DEPTH MAGICKCORE_QUANTUM_DEPTH_OBSOLETE_IN_H
0101 #endif
0102 
0103 /* Number of bits in a pixel Quantum (8/16/32/64) */
0104 #ifndef MAGICKCORE_QUANTUM_DEPTH
0105 # error "you should set MAGICKCORE_QUANTUM_DEPTH"
0106 #endif
0107 
0108 /* check values */
0109 #if MAGICKCORE_QUANTUM_DEPTH != 8
0110 # if MAGICKCORE_QUANTUM_DEPTH != 16
0111 #  if MAGICKCORE_QUANTUM_DEPTH != 32
0112 #   if MAGICKCORE_QUANTUM_DEPTH != 64
0113 #    error "MAGICKCORE_QUANTUM_DEPTH is not 8/16/32/64 bits"
0114 #   endif
0115 #  endif
0116 # endif
0117 #endif
0118 
0119 /* whether HDRI is enable */
0120 #if !defined(MAGICKCORE_HDRI_ENABLE)
0121 # error "you should set MAGICKCORE_HDRI_ENABLE"
0122 #endif
0123 
0124 #if MAGICKCORE_HDRI_ENABLE
0125 # define MAGICKCORE_HDRI_SUPPORT 1
0126 #endif
0127 
0128 #if defined __CYGWIN32__ && !defined __CYGWIN__
0129    /* For backwards compatibility with Cygwin b19 and
0130       earlier, we define __CYGWIN__ here, so that
0131       we can rely on checking just for that macro. */
0132 #  define __CYGWIN__  __CYGWIN32__
0133 #endif
0134 
0135 /*  ABI SUFFIX */
0136 #ifndef MAGICKCORE_HDRI_SUPPORT
0137 #define MAGICKCORE_ABI_SUFFIX  "Q" MAGICKCORE_STRING_XQUOTE(MAGICKCORE_QUANTUM_DEPTH)
0138 #else
0139 #define MAGICKCORE_ABI_SUFFIX "Q" MAGICKCORE_STRING_XQUOTE(MAGICKCORE_QUANTUM_DEPTH) "HDRI"
0140 #endif
0141 
0142 /* some path game */
0143 #if !defined __CYGWIN__
0144 # if defined (_WIN32) || defined (_WIN64) || defined (__MSDOS__) || defined (__DJGPP__) || defined (__OS2__)
0145    /* Use Windows separators on all _WIN32 defining
0146       environments, except Cygwin. */
0147 #  define MAGICKCORE_DIR_SEPARATOR_CHAR     '\\'
0148 #  define MAGICKCORE_DIR_SEPARATOR      "\\"
0149 #  define MAGICKCORE_PATH_SEPARATOR_CHAR    ';'
0150 #  define MAGICKCORE_PATH_SEPARATOR     ";"
0151 # endif
0152 #endif
0153 
0154 /* posix */
0155 #ifndef MAGICKCORE_DIR_SEPARATOR_CHAR
0156    /* Assume that not having this is an indicator that all
0157       are missing. */
0158 #  define MAGICKCORE_DIR_SEPARATOR_CHAR     '/'
0159 #  define MAGICKCORE_DIR_SEPARATOR      "/"
0160 #  define MAGICKCORE_PATH_SEPARATOR_CHAR    ':'
0161 #  define MAGICKCORE_PATH_SEPARATOR     ":"
0162 #endif /* !DIR_SEPARATOR_CHAR */
0163 
0164 # if defined(MAGICKCORE_POSIX_SUPPORT) || defined(__MINGW32__)
0165 
0166 /* module dir */
0167 #ifndef MAGICKCORE_MODULES_DIRNAME
0168 # define MAGICKCORE_MODULES_DIRNAME MAGICKCORE_MODULES_BASEDIRNAME "-" MAGICKCORE_ABI_SUFFIX
0169 #endif
0170 
0171 #ifndef MAGICKCORE_MODULES_PATH
0172 #  define MAGICKCORE_MODULES_PATH MAGICKCORE_LIBRARY_ABSOLUTE_PATH MAGICKCORE_DIR_SEPARATOR MAGICKCORE_MODULES_DIRNAME
0173 #endif
0174 
0175 #ifndef MAGICKCORE_MODULES_RELATIVE_PATH
0176 #define MAGICKCORE_MODULES_RELATIVE_PATH MAGICKCORE_LIBRARY_RELATIVE_PATH MAGICKCORE_DIR_SEPARATOR MAGICKCORE_MODULES_DIRNAME
0177 #endif
0178 
0179 /* Subdirectory under lib to place ImageMagick coder module files */
0180 #ifndef MAGICKCORE_CODER_PATH
0181 # if defined(vms)
0182 #  define MAGICKCORE_CODER_PATH "sys$login:"
0183 # else
0184 #  define MAGICKCORE_CODER_PATH MAGICKCORE_MODULES_PATH MAGICKCORE_DIR_SEPARATOR MAGICKCORE_CODER_DIRNAME
0185 # endif
0186 #endif
0187 
0188 #ifndef MAGICKCORE_CODER_RELATIVE_PATH
0189 # define MAGICKCORE_CODER_RELATIVE_PATH MAGICKCORE_MODULES_RELATIVE_PATH MAGICKCORE_DIR_SEPARATOR MAGICKCORE_CODER_DIRNAME
0190 #endif
0191 
0192 /* subdirectory under lib to place ImageMagick filter module files */
0193 #ifndef MAGICKCORE_FILTER_PATH
0194 # if defined(vms)
0195 #  define MAGICKCORE_FILTER_PATH  "sys$login:"
0196 # else
0197 #  define MAGICKCORE_FILTER_PATH MAGICKCORE_MODULES_PATH MAGICKCORE_DIR_SEPARATOR MAGICKCORE_FILTER_DIRNAME
0198 # endif
0199 #endif
0200 
0201 #ifndef MAGICKCORE_FILTER_RELATIVE_PATH
0202 # define MAGICKCORE_FILTER_RELATIVE_PATH MAGICKCORE_MODULES_RELATIVE_PATH MAGICKCORE_DIR_SEPARATOR MAGICKCORE_FILTER_DIRNAME
0203 #endif
0204 
0205 /* sharearch dir */
0206 #ifndef MAGICKCORE_SHAREARCH_DIRNAME
0207 # define MAGICKCORE_SHAREARCH_DIRNAME MAGICKCORE_SHAREARCH_BASEDIRNAME "-" MAGICKCORE_ABI_SUFFIX
0208 #endif
0209 
0210 #ifndef MAGICKCORE_SHAREARCH_PATH
0211 #  define MAGICKCORE_SHAREARCH_PATH MAGICKCORE_LIBRARY_ABSOLUTE_PATH MAGICKCORE_DIR_SEPARATOR MAGICKCORE_SHAREARCH_DIRNAME MAGICKCORE_DIR_SEPARATOR
0212 #endif
0213 
0214 #ifndef MAGICKCORE_SHAREARCH_RELATIVE_PATH
0215 #define MAGICKCORE_SHAREARCH_RELATIVE_PATH MAGICKCORE_LIBRARY_RELATIVE_PATH MAGICKCORE_DIR_SEPARATOR MAGICKCORE_SHAREARCH_DIRNAME
0216 #endif
0217 
0218 #endif
0219 
0220 /* for Clang compatibility */
0221 #ifndef __has_builtin
0222 #  define __has_builtin(x) 0
0223 #endif
0224 
0225 #if defined(__GNUC__) && !defined(__clang__)
0226 # define MAGICKCORE_DIAGNOSTIC_PUSH() \
0227    _Pragma("GCC diagnostic push")
0228 # define MAGICKCORE_DIAGNOSTIC_IGNORE_MAYBE_UNINITIALIZED() \
0229    _Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
0230 # define MAGICKCORE_DIAGNOSTIC_POP() \
0231    _Pragma("GCC diagnostic pop")
0232 #else
0233 # define MAGICKCORE_DIAGNOSTIC_PUSH()
0234 # define MAGICKCORE_DIAGNOSTIC_IGNORE_MAYBE_UNINITIALIZED()
0235 # define MAGICKCORE_DIAGNOSTIC_POP()
0236 #endif
0237 
0238 #define MAGICKCORE_BITS_BELOW(power_of_2) \
0239   ((power_of_2)-1)
0240 
0241 #define MAGICKCORE_MAX_ALIGNMENT_PADDING(power_of_2) \
0242   MAGICKCORE_BITS_BELOW(power_of_2)
0243 
0244 #define MAGICKCORE_IS_NOT_ALIGNED(n, power_of_2) \
0245   ((n) & MAGICKCORE_BITS_BELOW(power_of_2))
0246 
0247 #define MAGICKCORE_IS_NOT_POWER_OF_2(n) \
0248   MAGICKCORE_IS_NOT_ALIGNED((n), (n))
0249 
0250 #define MAGICKCORE_ALIGN_DOWN(n, power_of_2) \
0251   ((n) & ~MAGICKCORE_BITS_BELOW(power_of_2))
0252 
0253 #define MAGICKCORE_ALIGN_UP(n, power_of_2) \
0254   MAGICKCORE_ALIGN_DOWN((n) + MAGICKCORE_MAX_ALIGNMENT_PADDING(power_of_2),power_of_2)
0255 
0256 #if defined(__cplusplus) || defined(c_plusplus)
0257 }
0258 #endif
0259 
0260 #endif