zconf.h

Go to the documentation of this file.
00001 // $Id: zconf.h 751 2006-03-31 15:43:49Z alex $
00002 /* zconf.h -- configuration of the zlib compression library
00003  * Copyright (C) 1995-2004 Jean-loup Gailly.
00004  * For conditions of distribution and use, see copyright notice in zlib.h
00005  */
00006 /* @@tag:xara-cn-tp@@ THIRD PARTY COPYRIGHT */
00007 /* @(#) $Id: zconf.h 751 2006-03-31 15:43:49Z alex $ */
00008 
00009 #ifndef ZCONF_H
00010 #define ZCONF_H
00011 
00012 /*
00013  * If you *really* need a unique prefix for all types and library functions,
00014  * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
00015  */
00016 #ifdef Z_PREFIX
00017 #  define deflateInit_          z_deflateInit_
00018 #  define deflate               z_deflate
00019 #  define deflateEnd            z_deflateEnd
00020 #  define inflateInit_          z_inflateInit_
00021 #  define inflate               z_inflate
00022 #  define inflateEnd            z_inflateEnd
00023 #  define deflateInit2_         z_deflateInit2_
00024 #  define deflateSetDictionary  z_deflateSetDictionary
00025 #  define deflateCopy           z_deflateCopy
00026 #  define deflateReset          z_deflateReset
00027 #  define deflateParams         z_deflateParams
00028 #  define deflateBound          z_deflateBound
00029 #  define deflatePrime          z_deflatePrime
00030 #  define inflateInit2_         z_inflateInit2_
00031 #  define inflateSetDictionary  z_inflateSetDictionary
00032 #  define inflateSync           z_inflateSync
00033 #  define inflateSyncPoint      z_inflateSyncPoint
00034 #  define inflateCopy           z_inflateCopy
00035 #  define inflateReset          z_inflateReset
00036 #  define inflateBack           z_inflateBack
00037 #  define inflateBackEnd        z_inflateBackEnd
00038 #  define compress              z_compress
00039 #  define compress2             z_compress2
00040 #  define compressBound         z_compressBound
00041 #  define uncompress            z_uncompress
00042 #  define adler32               z_adler32
00043 #  define crc32                 z_crc32
00044 #  define get_crc_table         z_get_crc_table
00045 #  define zError                z_zError
00046 
00047 #  define Byte                  z_Byte
00048 #  define uInt                  z_uInt
00049 #  define uLong                 z_uLong
00050 #  define Bytef                 z_Bytef
00051 #  define charf                 z_charf
00052 #  define intf                  z_intf
00053 #  define uIntf                 z_uIntf
00054 #  define uLongf                z_uLongf
00055 #  define voidpf                z_voidpf
00056 #  define voidp                 z_voidp
00057 #endif
00058 
00059 #if defined(__MSDOS__) && !defined(MSDOS)
00060 #  define MSDOS
00061 #endif
00062 #if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
00063 #  define OS2
00064 #endif
00065 #if defined(_WINDOWS) && !defined(WINDOWS)
00066 #  define WINDOWS
00067 #endif
00068 #if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32)
00069 #  define WIN32
00070 #endif
00071 #if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
00072 #  if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
00073 #    ifndef SYS16BIT
00074 #      define SYS16BIT
00075 #    endif
00076 #  endif
00077 #endif
00078 
00079 /*
00080  * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
00081  * than 64k bytes at a time (needed on systems with 16-bit INT32).
00082  */
00083 #ifdef SYS16BIT
00084 #  define MAXSEG_64K
00085 #endif
00086 #ifdef MSDOS
00087 #  define UNALIGNED_OK
00088 #endif
00089 
00090 #ifdef __STDC_VERSION__
00091 #  ifndef STDC
00092 #    define STDC
00093 #  endif
00094 #  if __STDC_VERSION__ >= 199901L
00095 #    ifndef STDC99
00096 #      define STDC99
00097 #    endif
00098 #  endif
00099 #endif
00100 #if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
00101 #  define STDC
00102 #endif
00103 #if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
00104 #  define STDC
00105 #endif
00106 #if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
00107 #  define STDC
00108 #endif
00109 #if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
00110 #  define STDC
00111 #endif
00112 
00113 #if defined(__OS400__) && !defined(STDC)    /* iSeries (formerly AS/400). */
00114 #  define STDC
00115 #endif
00116 
00117 #ifndef STDC
00118 #  ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
00119 #    define const       /* note: need a more gentle solution here */
00120 #  endif
00121 #endif
00122 
00123 /* Some Mac compilers merge all .h files incorrectly: */
00124 #if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
00125 #  define NO_DUMMY_DECL
00126 #endif
00127 
00128 /* Maximum value for memLevel in deflateInit2 */
00129 #ifndef MAX_MEM_LEVEL
00130 #  ifdef MAXSEG_64K
00131 #    define MAX_MEM_LEVEL 8
00132 #  else
00133 #    define MAX_MEM_LEVEL 9
00134 #  endif
00135 #endif
00136 
00137 /* Maximum value for windowBits in deflateInit2 and inflateInit2.
00138  * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
00139  * created by gzip. (Files created by minigzip can still be extracted by
00140  * gzip.)
00141  */
00142 #ifndef MAX_WBITS
00143 #  define MAX_WBITS   15 /* 32K LZ77 window */
00144 #endif
00145 
00146 /* The memory requirements for deflate are (in bytes):
00147             (1 << (windowBits+2)) +  (1 << (memLevel+9))
00148  that is: 128K for windowBits=15  +  128K for memLevel = 8  (default values)
00149  plus a few kilobytes for small objects. For example, if you want to reduce
00150  the default memory requirements from 256K to 128K, compile with
00151      make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
00152  Of course this will generally degrade compression (there's no free lunch).
00153 
00154    The memory requirements for inflate are (in bytes) 1 << windowBits
00155  that is, 32K for windowBits=15 (default value) plus a few kilobytes
00156  for small objects.
00157 */
00158 
00159                         /* Type declarations */
00160 
00161 #ifndef OF /* function prototypes */
00162 #  ifdef STDC
00163 #    define OF(args)  args
00164 #  else
00165 #    define OF(args)  ()
00166 #  endif
00167 #endif
00168 
00169 /* The following definitions for FAR are needed only for MSDOS mixed
00170  * model programming (small or medium model with some far allocations).
00171  * This was tested only with MSC; for other MSDOS compilers you may have
00172  * to define NO_MEMCPY in zutil.h.  If you don't need the mixed model,
00173  * just define FAR to be empty.
00174  */
00175 #ifdef SYS16BIT
00176 #  if defined(M_I86SM) || defined(M_I86MM)
00177      /* MSC small or medium model */
00178 #    define SMALL_MEDIUM
00179 #    ifdef _MSC_VER
00180 #      define FAR _far
00181 #    else
00182 #      define FAR far
00183 #    endif
00184 #  endif
00185 #  if (defined(__SMALL__) || defined(__MEDIUM__))
00186      /* Turbo C small or medium model */
00187 #    define SMALL_MEDIUM
00188 #    ifdef __BORLANDC__
00189 #      define FAR _far
00190 #    else
00191 #      define FAR far
00192 #    endif
00193 #  endif
00194 #endif
00195 
00196 #if defined(WINDOWS) || defined(WIN32)
00197    /* If building or using zlib as a DLL, define ZLIB_DLL.
00198     * This is not mandatory, but it offers a little performance increase.
00199     */
00200 #  ifdef ZLIB_DLL
00201 #    if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
00202 #      ifdef ZLIB_INTERNAL
00203 #        define ZEXTERN extern __declspec(dllexport)
00204 #      else
00205 #        define ZEXTERN extern __declspec(dllimport)
00206 #      endif
00207 #    endif
00208 #  endif  /* ZLIB_DLL */
00209    /* If building or using zlib with the WINAPI/WINAPIV calling convention,
00210     * define ZLIB_WINAPI.
00211     * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
00212     */
00213 #  ifdef ZLIB_WINAPI
00214 #    ifdef FAR
00215 #      undef FAR
00216 #    endif
00217 #    include <windows.h>
00218      /* No need for _export, use ZLIB.DEF instead. */
00219      /* For complete Windows compatibility, use WINAPI, not __stdcall. */
00220 #    define ZEXPORT WINAPI
00221 #    ifdef WIN32
00222 #      define ZEXPORTVA WINAPIV
00223 #    else
00224 #      define ZEXPORTVA FAR CDECL
00225 #    endif
00226 #  endif
00227 #endif
00228 
00229 #if defined (__BEOS__)
00230 #  ifdef ZLIB_DLL
00231 #    ifdef ZLIB_INTERNAL
00232 #      define ZEXPORT   __declspec(dllexport)
00233 #      define ZEXPORTVA __declspec(dllexport)
00234 #    else
00235 #      define ZEXPORT   __declspec(dllimport)
00236 #      define ZEXPORTVA __declspec(dllimport)
00237 #    endif
00238 #  endif
00239 #endif
00240 
00241 #ifndef ZEXTERN
00242 #  define ZEXTERN extern
00243 #endif
00244 #ifndef ZEXPORT
00245 #  define ZEXPORT
00246 #endif
00247 #ifndef ZEXPORTVA
00248 #  define ZEXPORTVA
00249 #endif
00250 
00251 #ifndef FAR
00252 #  define FAR
00253 #endif
00254 
00255 #if !defined(__MACTYPES__)
00256 typedef unsigned char  Byte;  /* 8 bits */
00257 #endif
00258 typedef UINT32   uInt;  /* 16 bits or more */
00259 typedef UINT32  uLong; /* 32 bits or more */
00260 
00261 #ifdef SMALL_MEDIUM
00262    /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
00263 #  define Bytef Byte FAR
00264 #else
00265    typedef Byte  FAR Bytef;
00266 #endif
00267 typedef char  FAR charf;
00268 typedef INT32   FAR intf;
00269 typedef uInt  FAR uIntf;
00270 typedef uLong FAR uLongf;
00271 
00272 #ifdef STDC
00273    typedef void const *voidpc;
00274    typedef void FAR   *voidpf;
00275    typedef void       *voidp;
00276 #else
00277    typedef Byte const *voidpc;
00278    typedef Byte FAR   *voidpf;
00279    typedef Byte       *voidp;
00280 #endif
00281 
00282 #if 0           /* HAVE_UNISTD_H -- this line is updated by ./configure */
00283 #  include <sys/types.h> /* for off_t */
00284 #  include <unistd.h>    /* for SEEK_* and off_t */
00285 #  ifdef VMS
00286 #    include <unixio.h>   /* for off_t */
00287 #  endif
00288 #  define z_off_t off_t
00289 #endif
00290 #ifndef SEEK_SET
00291 #  define SEEK_SET        0       /* Seek from beginning of file.  */
00292 #  define SEEK_CUR        1       /* Seek from current position.  */
00293 #  define SEEK_END        2       /* Set file pointer to EOF plus "offset" */
00294 #endif
00295 #ifndef z_off_t
00296 #  define z_off_t INT32
00297 #endif
00298 
00299 #if defined(__OS400__)
00300 #  define NO_vsnprintf
00301 #endif
00302 
00303 #if defined(__MVS__)
00304 #  define NO_vsnprintf
00305 #  ifdef FAR
00306 #    undef FAR
00307 #  endif
00308 #endif
00309 
00310 /* MVS linker does not support external names larger than 8 bytes */
00311 #if defined(__MVS__)
00312 #   pragma map(deflateInit_,"DEIN")
00313 #   pragma map(deflateInit2_,"DEIN2")
00314 #   pragma map(deflateEnd,"DEEND")
00315 #   pragma map(deflateBound,"DEBND")
00316 #   pragma map(inflateInit_,"ININ")
00317 #   pragma map(inflateInit2_,"ININ2")
00318 #   pragma map(inflateEnd,"INEND")
00319 #   pragma map(inflateSync,"INSY")
00320 #   pragma map(inflateSetDictionary,"INSEDI")
00321 #   pragma map(compressBound,"CMBND")
00322 #   pragma map(inflate_table,"INTABL")
00323 #   pragma map(inflate_fast,"INFA")
00324 #   pragma map(inflate_copyright,"INCOPY")
00325 #endif
00326 
00327 #endif /* ZCONF_H */

Generated on Sat Nov 10 03:47:25 2007 for Camelot by  doxygen 1.4.4