Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:01:21

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 
0085 #if !defined(MAGICKCORE_HDRI_ENABLE) && defined(MAGICKCORE_HDRI_ENABLE_OBSOLETE_IN_H)
0086 # warning "you should set MAGICKCORE_HDRI_ENABLE to sensible default set it to configure time default"
0087 # warning "this is an obsolete behavior please fix yours makefile"
0088 # define MAGICKCORE_HDRI_ENABLE MAGICKCORE_HDRI_ENABLE_OBSOLETE_IN_H
0089 #endif
0090 
0091 /* whether HDRI is enable */
0092 #if !defined(MAGICKCORE_HDRI_ENABLE)
0093 # error "you should set MAGICKCORE_HDRI_ENABLE"
0094 #endif
0095 
0096 #if MAGICKCORE_HDRI_ENABLE
0097 # define MAGICKCORE_HDRI_SUPPORT 1
0098 #endif
0099 
0100 /* Compatibility block */
0101 #if !defined(MAGICKCORE_QUANTUM_DEPTH) && defined(MAGICKCORE_QUANTUM_DEPTH_OBSOLETE_IN_H)
0102 # warning "you should set MAGICKCORE_QUANTUM_DEPTH to sensible default set it to configure time default"
0103 # warning "this is an obsolete behavior please fix yours makefile"
0104 # define MAGICKCORE_QUANTUM_DEPTH MAGICKCORE_QUANTUM_DEPTH_OBSOLETE_IN_H
0105 #endif
0106 
0107 /* Number of bits in a pixel Quantum (8/16/32/64) */
0108 #ifndef MAGICKCORE_QUANTUM_DEPTH
0109 # error "you should set MAGICKCORE_QUANTUM_DEPTH"
0110 #endif
0111 
0112 /* check values */
0113 #if MAGICKCORE_QUANTUM_DEPTH != 8
0114 # if MAGICKCORE_QUANTUM_DEPTH != 16
0115 #  if MAGICKCORE_QUANTUM_DEPTH != 32
0116 #   if MAGICKCORE_QUANTUM_DEPTH != 64
0117 #    error "MAGICKCORE_QUANTUM_DEPTH is not 8/16/32/64 bits"
0118 #   endif
0119 #  endif
0120 # endif
0121 #endif
0122 
0123 
0124 #if !defined(MAGICKCORE_HDRI_ENABLE) && defined(MAGICKCORE_HDRI_ENABLE_OBSOLETE_IN_H)
0125 # warning "you should set MAGICKCORE_HDRI_ENABLE to sensible default set it to configure time default"
0126 # warning "this is an obsolete behavior please fix yours makefile"
0127 # define MAGICKCORE_HDRI_ENABLE MAGICKCORE_HDRI_ENABLE_OBSOLETE_IN_H
0128 #endif
0129 
0130 /* whether HDRI is enable */
0131 #if !defined(MAGICKCORE_HDRI_ENABLE)
0132 # error "you should set MAGICKCORE_HDRI_ENABLE"
0133 #endif
0134 
0135 #if MAGICKCORE_HDRI_ENABLE
0136 # define MAGICKCORE_HDRI_SUPPORT 1
0137 #endif
0138 
0139 #if defined __CYGWIN32__ && !defined __CYGWIN__
0140    /* For backwards compatibility with Cygwin b19 and
0141       earlier, we define __CYGWIN__ here, so that
0142       we can rely on checking just for that macro. */
0143 #  define __CYGWIN__  __CYGWIN32__
0144 #endif
0145 
0146 /*  ABI SUFFIX */
0147 #ifndef MAGICKCORE_HDRI_SUPPORT
0148 #define MAGICKCORE_ABI_SUFFIX  "Q" MAGICKCORE_STRING_XQUOTE(MAGICKCORE_QUANTUM_DEPTH)
0149 #else 
0150 #define MAGICKCORE_ABI_SUFFIX "Q" MAGICKCORE_STRING_XQUOTE(MAGICKCORE_QUANTUM_DEPTH) "HDRI"
0151 #endif 
0152 
0153 /* some path game */
0154 #if !defined __CYGWIN__
0155 # if defined (_WIN32) || defined (_WIN64) || defined (__MSDOS__) || defined (__DJGPP__) || defined (__OS2__)
0156    /* Use Windows separators on all _WIN32 defining
0157       environments, except Cygwin. */
0158 #  define MAGICKCORE_DIR_SEPARATOR_CHAR     '\\'
0159 #  define MAGICKCORE_DIR_SEPARATOR      "\\"
0160 #  define MAGICKCORE_PATH_SEPARATOR_CHAR    ';'
0161 #  define MAGICKCORE_PATH_SEPARATOR     ";"
0162 # endif
0163 #endif
0164  
0165 /* posix */
0166 #ifndef MAGICKCORE_DIR_SEPARATOR_CHAR
0167    /* Assume that not having this is an indicator that all
0168       are missing. */
0169 #  define MAGICKCORE_DIR_SEPARATOR_CHAR     '/'
0170 #  define MAGICKCORE_DIR_SEPARATOR      "/"
0171 #  define MAGICKCORE_PATH_SEPARATOR_CHAR    ':'
0172 #  define MAGICKCORE_PATH_SEPARATOR     ":"
0173 #endif /* !DIR_SEPARATOR_CHAR */
0174 
0175 # if defined(MAGICKCORE_POSIX_SUPPORT) || defined(__MINGW32__)
0176  
0177 /* module dir */
0178 #ifndef MAGICKCORE_MODULES_DIRNAME
0179 # define MAGICKCORE_MODULES_DIRNAME MAGICKCORE_MODULES_BASEDIRNAME "-" MAGICKCORE_ABI_SUFFIX
0180 #endif
0181  
0182 #ifndef MAGICKCORE_MODULES_PATH
0183 #  define MAGICKCORE_MODULES_PATH MAGICKCORE_LIBRARY_PATH MAGICKCORE_DIR_SEPARATOR MAGICKCORE_MODULES_DIRNAME
0184 #endif
0185  
0186 #ifndef MAGICKCORE_MODULES_RELATIVE_PATH
0187 #define MAGICKCORE_MODULES_RELATIVE_PATH MAGICKCORE_LIBRARY_RELATIVE_PATH MAGICKCORE_DIR_SEPARATOR MAGICKCORE_MODULES_DIRNAME
0188 #endif
0189  
0190 /* Subdirectory under lib to place ImageMagick coder module files */
0191 #ifndef MAGICKCORE_CODER_PATH
0192 # if defined(vms)
0193 #  define MAGICKCORE_CODER_PATH "sys$login:"
0194 # else
0195 #  define MAGICKCORE_CODER_PATH MAGICKCORE_MODULES_PATH MAGICKCORE_DIR_SEPARATOR MAGICKCORE_CODER_DIRNAME
0196 # endif
0197 #endif
0198  
0199 #ifndef MAGICKCORE_CODER_RELATIVE_PATH
0200 # define MAGICKCORE_CODER_RELATIVE_PATH MAGICKCORE_MODULES_RELATIVE_PATH MAGICKCORE_DIR_SEPARATOR MAGICKCORE_CODER_DIRNAME
0201 #endif
0202  
0203 /* subdirectory under lib to place ImageMagick filter module files */
0204 #ifndef MAGICKCORE_FILTER_PATH
0205 # if defined(vms)
0206 #  define MAGICKCORE_FILTER_PATH  "sys$login:"
0207 # else
0208 #  define MAGICKCORE_FILTER_PATH MAGICKCORE_MODULES_PATH MAGICKCORE_DIR_SEPARATOR MAGICKCORE_FILTER_DIRNAME
0209 # endif
0210 #endif
0211  
0212 #ifndef MAGICKCORE_FILTER_RELATIVE_PATH
0213 # define MAGICKCORE_FILTER_RELATIVE_PATH MAGICKCORE_MODULES_RELATIVE_PATH MAGICKCORE_DIR_SEPARATOR MAGICKCORE_FILTER_DIRNAME
0214 #endif
0215 
0216 /* sharearch dir */
0217 #ifndef MAGICKCORE_SHAREARCH_DIRNAME
0218 # define MAGICKCORE_SHAREARCH_DIRNAME MAGICKCORE_SHAREARCH_BASEDIRNAME "-" MAGICKCORE_ABI_SUFFIX
0219 #endif
0220  
0221 #ifndef MAGICKCORE_SHAREARCH_PATH
0222 #  define MAGICKCORE_SHAREARCH_PATH MAGICKCORE_LIBRARY_PATH MAGICKCORE_DIR_SEPARATOR MAGICKCORE_SHAREARCH_DIRNAME MAGICKCORE_DIR_SEPARATOR
0223 #endif
0224  
0225 #ifndef MAGICKCORE_SHAREARCH_RELATIVE_PATH
0226 #define MAGICKCORE_SHAREARCH_RELATIVE_PATH MAGICKCORE_LIBRARY_RELATIVE_PATH MAGICKCORE_DIR_SEPARATOR MAGICKCORE_SHAREARCH_DIRNAME
0227 #endif
0228 
0229 #endif
0230 
0231 /* for Clang compatibility */
0232 #ifndef __has_builtin
0233 #  define __has_builtin(x) 0
0234 #endif
0235 
0236 #if defined(__GNUC__) && !defined(__clang__)
0237 # define MAGICKCORE_DIAGNOSTIC_PUSH() \
0238    _Pragma("GCC diagnostic push")
0239 # define MAGICKCORE_DIAGNOSTIC_IGNORE_MAYBE_UNINITIALIZED() \
0240    _Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
0241 # define MAGICKCORE_DIAGNOSTIC_POP() \
0242    _Pragma("GCC diagnostic pop")
0243 #else
0244 # define MAGICKCORE_DIAGNOSTIC_PUSH()
0245 # define MAGICKCORE_DIAGNOSTIC_IGNORE_MAYBE_UNINITIALIZED()
0246 # define MAGICKCORE_DIAGNOSTIC_POP()
0247 #endif
0248 
0249 #define MAGICKCORE_BITS_BELOW(power_of_2) \
0250   ((power_of_2)-1)
0251 
0252 #define MAGICKCORE_MAX_ALIGNMENT_PADDING(power_of_2) \
0253   MAGICKCORE_BITS_BELOW(power_of_2)
0254 
0255 #define MAGICKCORE_IS_NOT_ALIGNED(n, power_of_2) \
0256   ((n) & MAGICKCORE_BITS_BELOW(power_of_2))
0257 
0258 #define MAGICKCORE_IS_NOT_POWER_OF_2(n) \
0259   MAGICKCORE_IS_NOT_ALIGNED((n), (n))
0260 
0261 #define MAGICKCORE_ALIGN_DOWN(n, power_of_2) \
0262   ((n) & ~MAGICKCORE_BITS_BELOW(power_of_2))
0263 
0264 #define MAGICKCORE_ALIGN_UP(n, power_of_2) \
0265   MAGICKCORE_ALIGN_DOWN((n) + MAGICKCORE_MAX_ALIGNMENT_PADDING(power_of_2),power_of_2)
0266  
0267 #if defined(__cplusplus) || defined(c_plusplus)
0268 }
0269 #endif
0270  
0271 #endif