Back to index

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