zconf.h

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

Generated on Tue Jul 5 14:12:04 2011 for ROOT_528-00b_version by  doxygen 1.5.1