vrshoot

diff libs/zlib/zconf.h @ 0:b2f14e535253

initial commit
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 01 Feb 2014 19:58:19 +0200
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/libs/zlib/zconf.h	Sat Feb 01 19:58:19 2014 +0200
     1.3 @@ -0,0 +1,332 @@
     1.4 +/* zconf.h -- configuration of the zlib compression library
     1.5 + * Copyright (C) 1995-2005 Jean-loup Gailly.
     1.6 + * For conditions of distribution and use, see copyright notice in zlib.h
     1.7 + */
     1.8 +
     1.9 +/* @(#) $Id$ */
    1.10 +
    1.11 +#ifndef ZCONF_H
    1.12 +#define ZCONF_H
    1.13 +
    1.14 +/*
    1.15 + * If you *really* need a unique prefix for all types and library functions,
    1.16 + * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
    1.17 + */
    1.18 +#ifdef Z_PREFIX
    1.19 +#  define deflateInit_          z_deflateInit_
    1.20 +#  define deflate               z_deflate
    1.21 +#  define deflateEnd            z_deflateEnd
    1.22 +#  define inflateInit_          z_inflateInit_
    1.23 +#  define inflate               z_inflate
    1.24 +#  define inflateEnd            z_inflateEnd
    1.25 +#  define deflateInit2_         z_deflateInit2_
    1.26 +#  define deflateSetDictionary  z_deflateSetDictionary
    1.27 +#  define deflateCopy           z_deflateCopy
    1.28 +#  define deflateReset          z_deflateReset
    1.29 +#  define deflateParams         z_deflateParams
    1.30 +#  define deflateBound          z_deflateBound
    1.31 +#  define deflatePrime          z_deflatePrime
    1.32 +#  define inflateInit2_         z_inflateInit2_
    1.33 +#  define inflateSetDictionary  z_inflateSetDictionary
    1.34 +#  define inflateSync           z_inflateSync
    1.35 +#  define inflateSyncPoint      z_inflateSyncPoint
    1.36 +#  define inflateCopy           z_inflateCopy
    1.37 +#  define inflateReset          z_inflateReset
    1.38 +#  define inflateBack           z_inflateBack
    1.39 +#  define inflateBackEnd        z_inflateBackEnd
    1.40 +#  define compress              z_compress
    1.41 +#  define compress2             z_compress2
    1.42 +#  define compressBound         z_compressBound
    1.43 +#  define uncompress            z_uncompress
    1.44 +#  define adler32               z_adler32
    1.45 +#  define crc32                 z_crc32
    1.46 +#  define get_crc_table         z_get_crc_table
    1.47 +#  define zError                z_zError
    1.48 +
    1.49 +#  define alloc_func            z_alloc_func
    1.50 +#  define free_func             z_free_func
    1.51 +#  define in_func               z_in_func
    1.52 +#  define out_func              z_out_func
    1.53 +#  define Byte                  z_Byte
    1.54 +#  define uInt                  z_uInt
    1.55 +#  define uLong                 z_uLong
    1.56 +#  define Bytef                 z_Bytef
    1.57 +#  define charf                 z_charf
    1.58 +#  define intf                  z_intf
    1.59 +#  define uIntf                 z_uIntf
    1.60 +#  define uLongf                z_uLongf
    1.61 +#  define voidpf                z_voidpf
    1.62 +#  define voidp                 z_voidp
    1.63 +#endif
    1.64 +
    1.65 +#if defined(__MSDOS__) && !defined(MSDOS)
    1.66 +#  define MSDOS
    1.67 +#endif
    1.68 +#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
    1.69 +#  define OS2
    1.70 +#endif
    1.71 +#if defined(_WINDOWS) && !defined(WINDOWS)
    1.72 +#  define WINDOWS
    1.73 +#endif
    1.74 +#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
    1.75 +#  ifndef WIN32
    1.76 +#    define WIN32
    1.77 +#  endif
    1.78 +#endif
    1.79 +#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
    1.80 +#  if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
    1.81 +#    ifndef SYS16BIT
    1.82 +#      define SYS16BIT
    1.83 +#    endif
    1.84 +#  endif
    1.85 +#endif
    1.86 +
    1.87 +/*
    1.88 + * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
    1.89 + * than 64k bytes at a time (needed on systems with 16-bit int).
    1.90 + */
    1.91 +#ifdef SYS16BIT
    1.92 +#  define MAXSEG_64K
    1.93 +#endif
    1.94 +#ifdef MSDOS
    1.95 +#  define UNALIGNED_OK
    1.96 +#endif
    1.97 +
    1.98 +#ifdef __STDC_VERSION__
    1.99 +#  ifndef STDC
   1.100 +#    define STDC
   1.101 +#  endif
   1.102 +#  if __STDC_VERSION__ >= 199901L
   1.103 +#    ifndef STDC99
   1.104 +#      define STDC99
   1.105 +#    endif
   1.106 +#  endif
   1.107 +#endif
   1.108 +#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
   1.109 +#  define STDC
   1.110 +#endif
   1.111 +#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
   1.112 +#  define STDC
   1.113 +#endif
   1.114 +#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
   1.115 +#  define STDC
   1.116 +#endif
   1.117 +#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
   1.118 +#  define STDC
   1.119 +#endif
   1.120 +
   1.121 +#if defined(__OS400__) && !defined(STDC)    /* iSeries (formerly AS/400). */
   1.122 +#  define STDC
   1.123 +#endif
   1.124 +
   1.125 +#ifndef STDC
   1.126 +#  ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
   1.127 +#    define const       /* note: need a more gentle solution here */
   1.128 +#  endif
   1.129 +#endif
   1.130 +
   1.131 +/* Some Mac compilers merge all .h files incorrectly: */
   1.132 +#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
   1.133 +#  define NO_DUMMY_DECL
   1.134 +#endif
   1.135 +
   1.136 +/* Maximum value for memLevel in deflateInit2 */
   1.137 +#ifndef MAX_MEM_LEVEL
   1.138 +#  ifdef MAXSEG_64K
   1.139 +#    define MAX_MEM_LEVEL 8
   1.140 +#  else
   1.141 +#    define MAX_MEM_LEVEL 9
   1.142 +#  endif
   1.143 +#endif
   1.144 +
   1.145 +/* Maximum value for windowBits in deflateInit2 and inflateInit2.
   1.146 + * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
   1.147 + * created by gzip. (Files created by minigzip can still be extracted by
   1.148 + * gzip.)
   1.149 + */
   1.150 +#ifndef MAX_WBITS
   1.151 +#  define MAX_WBITS   15 /* 32K LZ77 window */
   1.152 +#endif
   1.153 +
   1.154 +/* The memory requirements for deflate are (in bytes):
   1.155 +            (1 << (windowBits+2)) +  (1 << (memLevel+9))
   1.156 + that is: 128K for windowBits=15  +  128K for memLevel = 8  (default values)
   1.157 + plus a few kilobytes for small objects. For example, if you want to reduce
   1.158 + the default memory requirements from 256K to 128K, compile with
   1.159 +     make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
   1.160 + Of course this will generally degrade compression (there's no free lunch).
   1.161 +
   1.162 +   The memory requirements for inflate are (in bytes) 1 << windowBits
   1.163 + that is, 32K for windowBits=15 (default value) plus a few kilobytes
   1.164 + for small objects.
   1.165 +*/
   1.166 +
   1.167 +                        /* Type declarations */
   1.168 +
   1.169 +#ifndef OF /* function prototypes */
   1.170 +#  ifdef STDC
   1.171 +#    define OF(args)  args
   1.172 +#  else
   1.173 +#    define OF(args)  ()
   1.174 +#  endif
   1.175 +#endif
   1.176 +
   1.177 +/* The following definitions for FAR are needed only for MSDOS mixed
   1.178 + * model programming (small or medium model with some far allocations).
   1.179 + * This was tested only with MSC; for other MSDOS compilers you may have
   1.180 + * to define NO_MEMCPY in zutil.h.  If you don't need the mixed model,
   1.181 + * just define FAR to be empty.
   1.182 + */
   1.183 +#ifdef SYS16BIT
   1.184 +#  if defined(M_I86SM) || defined(M_I86MM)
   1.185 +     /* MSC small or medium model */
   1.186 +#    define SMALL_MEDIUM
   1.187 +#    ifdef _MSC_VER
   1.188 +#      define FAR _far
   1.189 +#    else
   1.190 +#      define FAR far
   1.191 +#    endif
   1.192 +#  endif
   1.193 +#  if (defined(__SMALL__) || defined(__MEDIUM__))
   1.194 +     /* Turbo C small or medium model */
   1.195 +#    define SMALL_MEDIUM
   1.196 +#    ifdef __BORLANDC__
   1.197 +#      define FAR _far
   1.198 +#    else
   1.199 +#      define FAR far
   1.200 +#    endif
   1.201 +#  endif
   1.202 +#endif
   1.203 +
   1.204 +#if defined(WINDOWS) || defined(WIN32)
   1.205 +   /* If building or using zlib as a DLL, define ZLIB_DLL.
   1.206 +    * This is not mandatory, but it offers a little performance increase.
   1.207 +    */
   1.208 +#  ifdef ZLIB_DLL
   1.209 +#    if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
   1.210 +#      ifdef ZLIB_INTERNAL
   1.211 +#        define ZEXTERN extern __declspec(dllexport)
   1.212 +#      else
   1.213 +#        define ZEXTERN extern __declspec(dllimport)
   1.214 +#      endif
   1.215 +#    endif
   1.216 +#  endif  /* ZLIB_DLL */
   1.217 +   /* If building or using zlib with the WINAPI/WINAPIV calling convention,
   1.218 +    * define ZLIB_WINAPI.
   1.219 +    * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
   1.220 +    */
   1.221 +#  ifdef ZLIB_WINAPI
   1.222 +#    ifdef FAR
   1.223 +#      undef FAR
   1.224 +#    endif
   1.225 +#    include <windows.h>
   1.226 +     /* No need for _export, use ZLIB.DEF instead. */
   1.227 +     /* For complete Windows compatibility, use WINAPI, not __stdcall. */
   1.228 +#    define ZEXPORT WINAPI
   1.229 +#    ifdef WIN32
   1.230 +#      define ZEXPORTVA WINAPIV
   1.231 +#    else
   1.232 +#      define ZEXPORTVA FAR CDECL
   1.233 +#    endif
   1.234 +#  endif
   1.235 +#endif
   1.236 +
   1.237 +#if defined (__BEOS__)
   1.238 +#  ifdef ZLIB_DLL
   1.239 +#    ifdef ZLIB_INTERNAL
   1.240 +#      define ZEXPORT   __declspec(dllexport)
   1.241 +#      define ZEXPORTVA __declspec(dllexport)
   1.242 +#    else
   1.243 +#      define ZEXPORT   __declspec(dllimport)
   1.244 +#      define ZEXPORTVA __declspec(dllimport)
   1.245 +#    endif
   1.246 +#  endif
   1.247 +#endif
   1.248 +
   1.249 +#ifndef ZEXTERN
   1.250 +#  define ZEXTERN extern
   1.251 +#endif
   1.252 +#ifndef ZEXPORT
   1.253 +#  define ZEXPORT
   1.254 +#endif
   1.255 +#ifndef ZEXPORTVA
   1.256 +#  define ZEXPORTVA
   1.257 +#endif
   1.258 +
   1.259 +#ifndef FAR
   1.260 +#  define FAR
   1.261 +#endif
   1.262 +
   1.263 +#if !defined(__MACTYPES__)
   1.264 +typedef unsigned char  Byte;  /* 8 bits */
   1.265 +#endif
   1.266 +typedef unsigned int   uInt;  /* 16 bits or more */
   1.267 +typedef unsigned long  uLong; /* 32 bits or more */
   1.268 +
   1.269 +#ifdef SMALL_MEDIUM
   1.270 +   /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
   1.271 +#  define Bytef Byte FAR
   1.272 +#else
   1.273 +   typedef Byte  FAR Bytef;
   1.274 +#endif
   1.275 +typedef char  FAR charf;
   1.276 +typedef int   FAR intf;
   1.277 +typedef uInt  FAR uIntf;
   1.278 +typedef uLong FAR uLongf;
   1.279 +
   1.280 +#ifdef STDC
   1.281 +   typedef void const *voidpc;
   1.282 +   typedef void FAR   *voidpf;
   1.283 +   typedef void       *voidp;
   1.284 +#else
   1.285 +   typedef Byte const *voidpc;
   1.286 +   typedef Byte FAR   *voidpf;
   1.287 +   typedef Byte       *voidp;
   1.288 +#endif
   1.289 +
   1.290 +#if 0           /* HAVE_UNISTD_H -- this line is updated by ./configure */
   1.291 +#  include <sys/types.h> /* for off_t */
   1.292 +#  include <unistd.h>    /* for SEEK_* and off_t */
   1.293 +#  ifdef VMS
   1.294 +#    include <unixio.h>   /* for off_t */
   1.295 +#  endif
   1.296 +#  define z_off_t off_t
   1.297 +#endif
   1.298 +#ifndef SEEK_SET
   1.299 +#  define SEEK_SET        0       /* Seek from beginning of file.  */
   1.300 +#  define SEEK_CUR        1       /* Seek from current position.  */
   1.301 +#  define SEEK_END        2       /* Set file pointer to EOF plus "offset" */
   1.302 +#endif
   1.303 +#ifndef z_off_t
   1.304 +#  define z_off_t long
   1.305 +#endif
   1.306 +
   1.307 +#if defined(__OS400__)
   1.308 +#  define NO_vsnprintf
   1.309 +#endif
   1.310 +
   1.311 +#if defined(__MVS__)
   1.312 +#  define NO_vsnprintf
   1.313 +#  ifdef FAR
   1.314 +#    undef FAR
   1.315 +#  endif
   1.316 +#endif
   1.317 +
   1.318 +/* MVS linker does not support external names larger than 8 bytes */
   1.319 +#if defined(__MVS__)
   1.320 +#   pragma map(deflateInit_,"DEIN")
   1.321 +#   pragma map(deflateInit2_,"DEIN2")
   1.322 +#   pragma map(deflateEnd,"DEEND")
   1.323 +#   pragma map(deflateBound,"DEBND")
   1.324 +#   pragma map(inflateInit_,"ININ")
   1.325 +#   pragma map(inflateInit2_,"ININ2")
   1.326 +#   pragma map(inflateEnd,"INEND")
   1.327 +#   pragma map(inflateSync,"INSY")
   1.328 +#   pragma map(inflateSetDictionary,"INSEDI")
   1.329 +#   pragma map(compressBound,"CMBND")
   1.330 +#   pragma map(inflate_table,"INTABL")
   1.331 +#   pragma map(inflate_fast,"INFA")
   1.332 +#   pragma map(inflate_copyright,"INCOPY")
   1.333 +#endif
   1.334 +
   1.335 +#endif /* ZCONF_H */