Home | History | Annotate | Download | only in libtiff
      1 /* libtiff/tiffconf.h.  Generated by configure.  */
      2 /*
      3   Configuration defines for installed libtiff.
      4   This file maintained for backward compatibility. Do not use definitions
      5   from this file in your programs.
      6 */
      7 #ifndef _TIFFCONF_
      8 #define _TIFFCONF_
      9 
     10 #include "core/include/fxcrt/fx_system.h"
     11 
     12 //NOTE: The tiff codec requires an ANSI C compiler environment for building and
     13 //		presumes an ANSI C environment for use.
     14 
     15 /* Define to 1 if you have the <fcntl.h> header file. */
     16 /* Define to 1 if you have the <sys/types.h> header file. */
     17 #if _FX_OS_ == _FX_WIN32_MOBILE_
     18 # define O_RDONLY       0x0000  /* open for reading only */
     19 # define O_WRONLY       0x0001  /* open for writing only */
     20 # define O_RDWR         0x0002  /* open for reading and writing */
     21 # define O_CREAT        0x0100  /* create and open file */
     22 # define O_TRUNC        0x0200  /* open and truncate */
     23 #else
     24 # define HAVE_SYS_TYPES_H 1
     25 # define HAVE_FCNTL_H 1
     26 #endif
     27 
     28 /* Compatibility stuff. */
     29 
     30 /* Define to 1 if you have the <assert.h> header file. */
     31 #define HAVE_ASSERT_H 1
     32 
     33 /* Define as 0 or 1 according to the floating point format suported by the
     34    machine */
     35 #define HAVE_IEEEFP 1
     36 
     37 /* Define to 1 if you have the <string.h> header file. */
     38 //#define HAVE_STRING_H 1
     39 //fx_system.h already include the string.h in ANSIC
     40 
     41 /* Define to 1 if you have the <search.h> header file. */
     42 /*#define HAVE_SEARCH_H 1 */
     43 
     44 /* The size of a `int', as computed by sizeof. */
     45 /* According typedef int	int32_t; in the fx_system.h*/
     46 #define SIZEOF_INT 4
     47 
     48 /* Sunliang.Liu 20110325. We should config the correct long size for tif
     49    fax4decode optimize in tif_fax3.c  -- Linux64 decode issue.
     50    TESTDOC: Bug #23661 - z1.tif. */
     51 #if _FX_CPU_ == _FX_WIN64_ || _FX_CPU_ == _FX_X64_ || _FX_CPU_ == _FX_IA64_
     52 /* The size of `unsigned long', as computed by sizeof. */
     53 #define SIZEOF_UNSIGNED_LONG 8
     54 #else
     55 #define SIZEOF_UNSIGNED_LONG 4
     56 #endif
     57 
     58 /* Signed 8-bit type */
     59 #define TIFF_INT8_T signed char
     60 
     61 /* Unsigned 8-bit type */
     62 #define TIFF_UINT8_T unsigned char
     63 
     64 /* Signed 16-bit type */
     65 #define TIFF_INT16_T signed short
     66 
     67 /* Unsigned 16-bit type */
     68 #define TIFF_UINT16_T unsigned short
     69 
     70 /* Signed 32-bit type */
     71 #define TIFF_INT32_T signed int
     72 
     73 /* Unsigned 32-bit type */
     74 #define TIFF_UINT32_T unsigned int
     75 
     76 /* Signed 32-bit type formatter */
     77 #define TIFF_INT32_FORMAT "%d"
     78 
     79 /* Unsigned 32-bit type formatter */
     80 #define TIFF_UINT32_FORMAT "%u"
     81 
     82 #ifdef _MSC_VER		// windows
     83 
     84 /* Signed 64-bit type formatter */
     85 #define TIFF_INT64_FORMAT "%I64d"
     86 
     87 /* Unsigned 64-bit type formatter */
     88 #define TIFF_UINT64_FORMAT "%I64u"
     89 
     90 /* Signed 64-bit type */
     91 #define TIFF_INT64_T signed __int64
     92 
     93 /* Unsigned 64-bit type */
     94 #define TIFF_UINT64_T unsigned __int64
     95 
     96 #else						// linux/unix
     97 
     98 #if 0 //_FX_CPU_ == _FX_X64_	// linux/unix 64
     99 
    100 /* Signed 64-bit type formatter */
    101 #define TIFF_INT64_FORMAT "%ld"
    102 
    103 /* Unsigned 64-bit type formatter */
    104 #define TIFF_UINT64_FORMAT "%lu"
    105 
    106 /* Signed 64-bit type */
    107 #define TIFF_INT64_T signed long
    108 
    109 #else						// linux/unix 32
    110 
    111 /* Signed 64-bit type formatter */
    112 #define TIFF_INT64_FORMAT "%lld"
    113 
    114 /* Unsigned 64-bit type formatter */
    115 #define TIFF_UINT64_FORMAT "%llu"
    116 
    117 /* Signed 64-bit type */
    118 #define TIFF_INT64_T signed long long
    119 
    120 #endif						// end _FX_CPU_
    121 
    122 /* Unsigned 64-bit type */
    123 #define TIFF_UINT64_T unsigned long long
    124 
    125 #endif
    126 
    127 
    128 /* Signed size type */
    129 #ifdef _MSC_VER
    130 
    131 #if defined(_WIN64)
    132 #define TIFF_SSIZE_T signed __int64
    133 #else
    134 #define TIFF_SSIZE_T signed int
    135 #endif
    136 
    137 #else
    138 
    139 #define TIFF_SSIZE_T signed long
    140 
    141 #endif
    142 
    143 /* Signed size type formatter */
    144 #if defined(_WIN64)
    145 #define TIFF_SSIZE_FORMAT "%I64d"
    146 #else
    147 #define TIFF_SSIZE_FORMAT "%ld"
    148 #endif
    149 
    150 /* Pointer difference type */
    151 #ifdef _MSC_VER
    152 #define TIFF_PTRDIFF_T long
    153 #else
    154 #define TIFF_PTRDIFF_T ptrdiff_t
    155 #endif
    156 
    157 /* Signed 64-bit type */
    158 /*#define TIFF_INT64_T signed __int64*/
    159 
    160 /* Unsigned 64-bit type */
    161 /*#define TIFF_UINT64_T unsigned __int64*/
    162 
    163 /* Define to `__inline__' or `__inline' if that's what the C compiler
    164    calls it, or to nothing if 'inline' is not supported under any name.  */
    165 #ifndef __cplusplus
    166 # ifndef inline
    167 #  define inline __inline
    168 # endif
    169 #endif
    170 
    171 #define lfind _lfind
    172 
    173 #define BSDTYPES
    174 
    175 /* Set the native cpu bit order (FILLORDER_LSB2MSB or FILLORDER_MSB2LSB) */
    176 #define HOST_FILLORDER FILLORDER_LSB2MSB
    177 
    178 /* Native cpu byte order: 1 if big-endian (Motorola) or 0 if little-endian
    179    (Intel) */
    180 #if _FX_ENDIAN_ == _FX_BIG_ENDIAN_
    181 # define HOST_BIGENDIAN 1
    182 #else
    183 # define HOST_BIGENDIAN 0
    184 #endif
    185 
    186 /* Support CCITT Group 3 & 4 algorithms */
    187 #define CCITT_SUPPORT 1
    188 
    189 /* Support JPEG compression (requires IJG JPEG library) */
    190 #define JPEG_SUPPORT 1
    191 
    192 /* Support LogLuv high dynamic range encoding */
    193 #define LOGLUV_SUPPORT 1
    194 
    195 /* Support LZW algorithm */
    196 #define LZW_SUPPORT 1
    197 
    198 /* Support NeXT 2-bit RLE algorithm */
    199 #define NEXT_SUPPORT 1
    200 
    201 /* Support Old JPEG compresson (read contrib/ojpeg/README first! Compilation
    202    fails with unpatched IJG JPEG library) */
    203 #define  OJPEG_SUPPORT	1
    204 
    205 /* Support Macintosh PackBits algorithm */
    206 #define PACKBITS_SUPPORT 1
    207 
    208 /* Support Pixar log-format algorithm (requires Zlib) */
    209 #define PIXARLOG_SUPPORT 1
    210 
    211 /* Support ThunderScan 4-bit RLE algorithm */
    212 #define THUNDER_SUPPORT 1
    213 
    214 /* Support Deflate compression */
    215 #define ZIP_SUPPORT 1
    216 
    217 /* Support strip chopping (whether or not to convert single-strip uncompressed
    218    images to mutiple strips of ~8Kb to reduce memory usage) */
    219 #define STRIPCHOP_DEFAULT TIFF_STRIPCHOP
    220 
    221 /* Enable SubIFD tag (330) support */
    222 #define SUBIFD_SUPPORT 1
    223 
    224 /* Treat extra sample as alpha (default enabled). The RGBA interface will
    225    treat a fourth sample with no EXTRASAMPLE_ value as being ASSOCALPHA. Many
    226    packages produce RGBA files but don't mark the alpha properly. */
    227 #define DEFAULT_EXTRASAMPLE_AS_ALPHA 1
    228 
    229 /* Pick up YCbCr subsampling info from the JPEG data stream to support files
    230    lacking the tag (default enabled). */
    231 #define CHECK_JPEG_YCBCR_SUBSAMPLING 1
    232 
    233 /* Support MS MDI magic number files as TIFF */
    234 #define MDI_SUPPORT 1
    235 
    236 /*
    237  * Feature support definitions.
    238  * XXX: These macros are obsoleted. Don't use them in your apps!
    239  * Macros stays here for backward compatibility and should be always defined.
    240  */
    241 #define COLORIMETRY_SUPPORT
    242 #define YCBCR_SUPPORT
    243 #define CMYK_SUPPORT
    244 #define ICC_SUPPORT
    245 #define PHOTOSHOP_SUPPORT
    246 #define IPTC_SUPPORT
    247 
    248 #endif /* _TIFFCONF_ */
    249