Back to index

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