1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/modules/zlib/src/zconf.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,514 @@ 1.4 +/* zconf.h -- configuration of the zlib compression library 1.5 + * Copyright (C) 1995-2013 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 +/* This header does prefixing as below, but with an updated set of names. */ 1.15 +#include "mozzconf.h" 1.16 + 1.17 +/* 1.18 + * If you *really* need a unique prefix for all types and library functions, 1.19 + * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. 1.20 + * Even better than compiling with -DZ_PREFIX would be to use configure to set 1.21 + * this permanently in zconf.h using "./configure --zprefix". 1.22 + */ 1.23 +#ifdef Z_PREFIX /* may be set to #if 1 by ./configure */ 1.24 +# define Z_PREFIX_SET 1.25 + 1.26 +/* all linked symbols */ 1.27 +# define _dist_code z__dist_code 1.28 +# define _length_code z__length_code 1.29 +# define _tr_align z__tr_align 1.30 +# define _tr_flush_bits z__tr_flush_bits 1.31 +# define _tr_flush_block z__tr_flush_block 1.32 +# define _tr_init z__tr_init 1.33 +# define _tr_stored_block z__tr_stored_block 1.34 +# define _tr_tally z__tr_tally 1.35 +# define adler32 z_adler32 1.36 +# define adler32_combine z_adler32_combine 1.37 +# define adler32_combine64 z_adler32_combine64 1.38 +# ifndef Z_SOLO 1.39 +# define compress z_compress 1.40 +# define compress2 z_compress2 1.41 +# define compressBound z_compressBound 1.42 +# endif 1.43 +# define crc32 z_crc32 1.44 +# define crc32_combine z_crc32_combine 1.45 +# define crc32_combine64 z_crc32_combine64 1.46 +# define deflate z_deflate 1.47 +# define deflateBound z_deflateBound 1.48 +# define deflateCopy z_deflateCopy 1.49 +# define deflateEnd z_deflateEnd 1.50 +# define deflateInit2_ z_deflateInit2_ 1.51 +# define deflateInit_ z_deflateInit_ 1.52 +# define deflateParams z_deflateParams 1.53 +# define deflatePending z_deflatePending 1.54 +# define deflatePrime z_deflatePrime 1.55 +# define deflateReset z_deflateReset 1.56 +# define deflateResetKeep z_deflateResetKeep 1.57 +# define deflateSetDictionary z_deflateSetDictionary 1.58 +# define deflateSetHeader z_deflateSetHeader 1.59 +# define deflateTune z_deflateTune 1.60 +# define deflate_copyright z_deflate_copyright 1.61 +# define get_crc_table z_get_crc_table 1.62 +# ifndef Z_SOLO 1.63 +# define gz_error z_gz_error 1.64 +# define gz_intmax z_gz_intmax 1.65 +# define gz_strwinerror z_gz_strwinerror 1.66 +# define gzbuffer z_gzbuffer 1.67 +# define gzclearerr z_gzclearerr 1.68 +# define gzclose z_gzclose 1.69 +# define gzclose_r z_gzclose_r 1.70 +# define gzclose_w z_gzclose_w 1.71 +# define gzdirect z_gzdirect 1.72 +# define gzdopen z_gzdopen 1.73 +# define gzeof z_gzeof 1.74 +# define gzerror z_gzerror 1.75 +# define gzflush z_gzflush 1.76 +# define gzgetc z_gzgetc 1.77 +# define gzgetc_ z_gzgetc_ 1.78 +# define gzgets z_gzgets 1.79 +# define gzoffset z_gzoffset 1.80 +# define gzoffset64 z_gzoffset64 1.81 +# define gzopen z_gzopen 1.82 +# define gzopen64 z_gzopen64 1.83 +# ifdef _WIN32 1.84 +# define gzopen_w z_gzopen_w 1.85 +# endif 1.86 +# define gzprintf z_gzprintf 1.87 +# define gzvprintf z_gzvprintf 1.88 +# define gzputc z_gzputc 1.89 +# define gzputs z_gzputs 1.90 +# define gzread z_gzread 1.91 +# define gzrewind z_gzrewind 1.92 +# define gzseek z_gzseek 1.93 +# define gzseek64 z_gzseek64 1.94 +# define gzsetparams z_gzsetparams 1.95 +# define gztell z_gztell 1.96 +# define gztell64 z_gztell64 1.97 +# define gzungetc z_gzungetc 1.98 +# define gzwrite z_gzwrite 1.99 +# endif 1.100 +# define inflate z_inflate 1.101 +# define inflateBack z_inflateBack 1.102 +# define inflateBackEnd z_inflateBackEnd 1.103 +# define inflateBackInit_ z_inflateBackInit_ 1.104 +# define inflateCopy z_inflateCopy 1.105 +# define inflateEnd z_inflateEnd 1.106 +# define inflateGetHeader z_inflateGetHeader 1.107 +# define inflateInit2_ z_inflateInit2_ 1.108 +# define inflateInit_ z_inflateInit_ 1.109 +# define inflateMark z_inflateMark 1.110 +# define inflatePrime z_inflatePrime 1.111 +# define inflateReset z_inflateReset 1.112 +# define inflateReset2 z_inflateReset2 1.113 +# define inflateSetDictionary z_inflateSetDictionary 1.114 +# define inflateGetDictionary z_inflateGetDictionary 1.115 +# define inflateSync z_inflateSync 1.116 +# define inflateSyncPoint z_inflateSyncPoint 1.117 +# define inflateUndermine z_inflateUndermine 1.118 +# define inflateResetKeep z_inflateResetKeep 1.119 +# define inflate_copyright z_inflate_copyright 1.120 +# define inflate_fast z_inflate_fast 1.121 +# define inflate_table z_inflate_table 1.122 +# ifndef Z_SOLO 1.123 +# define uncompress z_uncompress 1.124 +# endif 1.125 +# define zError z_zError 1.126 +# ifndef Z_SOLO 1.127 +# define zcalloc z_zcalloc 1.128 +# define zcfree z_zcfree 1.129 +# endif 1.130 +# define zlibCompileFlags z_zlibCompileFlags 1.131 +# define zlibVersion z_zlibVersion 1.132 + 1.133 +/* all zlib typedefs in zlib.h and zconf.h */ 1.134 +# define Byte z_Byte 1.135 +# define Bytef z_Bytef 1.136 +# define alloc_func z_alloc_func 1.137 +# define charf z_charf 1.138 +# define free_func z_free_func 1.139 +# ifndef Z_SOLO 1.140 +# define gzFile z_gzFile 1.141 +# endif 1.142 +# define gz_header z_gz_header 1.143 +# define gz_headerp z_gz_headerp 1.144 +# define in_func z_in_func 1.145 +# define intf z_intf 1.146 +# define out_func z_out_func 1.147 +# define uInt z_uInt 1.148 +# define uIntf z_uIntf 1.149 +# define uLong z_uLong 1.150 +# define uLongf z_uLongf 1.151 +# define voidp z_voidp 1.152 +# define voidpc z_voidpc 1.153 +# define voidpf z_voidpf 1.154 + 1.155 +/* all zlib structs in zlib.h and zconf.h */ 1.156 +# define gz_header_s z_gz_header_s 1.157 +# define internal_state z_internal_state 1.158 + 1.159 +#endif 1.160 + 1.161 +#if defined(__MSDOS__) && !defined(MSDOS) 1.162 +# define MSDOS 1.163 +#endif 1.164 +#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2) 1.165 +# define OS2 1.166 +#endif 1.167 +#if defined(_WINDOWS) && !defined(WINDOWS) 1.168 +# define WINDOWS 1.169 +#endif 1.170 +#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__) 1.171 +# ifndef WIN32 1.172 +# define WIN32 1.173 +# endif 1.174 +#endif 1.175 +#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32) 1.176 +# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__) 1.177 +# ifndef SYS16BIT 1.178 +# define SYS16BIT 1.179 +# endif 1.180 +# endif 1.181 +#endif 1.182 + 1.183 +/* 1.184 + * Compile with -DMAXSEG_64K if the alloc function cannot allocate more 1.185 + * than 64k bytes at a time (needed on systems with 16-bit int). 1.186 + */ 1.187 +#ifdef SYS16BIT 1.188 +# define MAXSEG_64K 1.189 +#endif 1.190 +#ifdef MSDOS 1.191 +# define UNALIGNED_OK 1.192 +#endif 1.193 + 1.194 +#ifdef __STDC_VERSION__ 1.195 +# ifndef STDC 1.196 +# define STDC 1.197 +# endif 1.198 +# if __STDC_VERSION__ >= 199901L 1.199 +# ifndef STDC99 1.200 +# define STDC99 1.201 +# endif 1.202 +# endif 1.203 +#endif 1.204 +#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus)) 1.205 +# define STDC 1.206 +#endif 1.207 +#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__)) 1.208 +# define STDC 1.209 +#endif 1.210 +#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32)) 1.211 +# define STDC 1.212 +#endif 1.213 +#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__)) 1.214 +# define STDC 1.215 +#endif 1.216 + 1.217 +#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */ 1.218 +# define STDC 1.219 +#endif 1.220 + 1.221 +#ifndef STDC 1.222 +# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */ 1.223 +# define const /* note: need a more gentle solution here */ 1.224 +# endif 1.225 +#endif 1.226 + 1.227 +#if defined(ZLIB_CONST) && !defined(z_const) 1.228 +# define z_const const 1.229 +#else 1.230 +# define z_const 1.231 +#endif 1.232 + 1.233 +/* Some Mac compilers merge all .h files incorrectly: */ 1.234 +#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__) 1.235 +# define NO_DUMMY_DECL 1.236 +#endif 1.237 + 1.238 +/* Maximum value for memLevel in deflateInit2 */ 1.239 +#ifndef MAX_MEM_LEVEL 1.240 +# ifdef MAXSEG_64K 1.241 +# define MAX_MEM_LEVEL 8 1.242 +# else 1.243 +# define MAX_MEM_LEVEL 9 1.244 +# endif 1.245 +#endif 1.246 + 1.247 +/* Maximum value for windowBits in deflateInit2 and inflateInit2. 1.248 + * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files 1.249 + * created by gzip. (Files created by minigzip can still be extracted by 1.250 + * gzip.) 1.251 + */ 1.252 +#ifndef MAX_WBITS 1.253 +# define MAX_WBITS 15 /* 32K LZ77 window */ 1.254 +#endif 1.255 + 1.256 +/* The memory requirements for deflate are (in bytes): 1.257 + (1 << (windowBits+2)) + (1 << (memLevel+9)) 1.258 + that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) 1.259 + plus a few kilobytes for small objects. For example, if you want to reduce 1.260 + the default memory requirements from 256K to 128K, compile with 1.261 + make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" 1.262 + Of course this will generally degrade compression (there's no free lunch). 1.263 + 1.264 + The memory requirements for inflate are (in bytes) 1 << windowBits 1.265 + that is, 32K for windowBits=15 (default value) plus a few kilobytes 1.266 + for small objects. 1.267 +*/ 1.268 + 1.269 + /* Type declarations */ 1.270 + 1.271 +#ifndef OF /* function prototypes */ 1.272 +# ifdef STDC 1.273 +# define OF(args) args 1.274 +# else 1.275 +# define OF(args) () 1.276 +# endif 1.277 +#endif 1.278 + 1.279 +#ifndef Z_ARG /* function prototypes for stdarg */ 1.280 +# if defined(STDC) || defined(Z_HAVE_STDARG_H) 1.281 +# define Z_ARG(args) args 1.282 +# else 1.283 +# define Z_ARG(args) () 1.284 +# endif 1.285 +#endif 1.286 + 1.287 +/* The following definitions for FAR are needed only for MSDOS mixed 1.288 + * model programming (small or medium model with some far allocations). 1.289 + * This was tested only with MSC; for other MSDOS compilers you may have 1.290 + * to define NO_MEMCPY in zutil.h. If you don't need the mixed model, 1.291 + * just define FAR to be empty. 1.292 + */ 1.293 +#ifdef SYS16BIT 1.294 +# if defined(M_I86SM) || defined(M_I86MM) 1.295 + /* MSC small or medium model */ 1.296 +# define SMALL_MEDIUM 1.297 +# ifdef _MSC_VER 1.298 +# define FAR _far 1.299 +# else 1.300 +# define FAR far 1.301 +# endif 1.302 +# endif 1.303 +# if (defined(__SMALL__) || defined(__MEDIUM__)) 1.304 + /* Turbo C small or medium model */ 1.305 +# define SMALL_MEDIUM 1.306 +# ifdef __BORLANDC__ 1.307 +# define FAR _far 1.308 +# else 1.309 +# define FAR far 1.310 +# endif 1.311 +# endif 1.312 +#endif 1.313 + 1.314 +#if defined(WINDOWS) || defined(WIN32) 1.315 + /* If building or using zlib as a DLL, define ZLIB_DLL. 1.316 + * This is not mandatory, but it offers a little performance increase. 1.317 + */ 1.318 +# ifdef ZLIB_DLL 1.319 +# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500)) 1.320 +# ifdef ZLIB_INTERNAL 1.321 +# define ZEXTERN extern __declspec(dllexport) 1.322 +# else 1.323 +# define ZEXTERN extern __declspec(dllimport) 1.324 +# endif 1.325 +# endif 1.326 +# endif /* ZLIB_DLL */ 1.327 + /* If building or using zlib with the WINAPI/WINAPIV calling convention, 1.328 + * define ZLIB_WINAPI. 1.329 + * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI. 1.330 + */ 1.331 +# ifdef ZLIB_WINAPI 1.332 +# ifdef FAR 1.333 +# undef FAR 1.334 +# endif 1.335 +# include <windows.h> 1.336 + /* No need for _export, use ZLIB.DEF instead. */ 1.337 + /* For complete Windows compatibility, use WINAPI, not __stdcall. */ 1.338 +# define ZEXPORT WINAPI 1.339 +# ifdef WIN32 1.340 +# define ZEXPORTVA WINAPIV 1.341 +# else 1.342 +# define ZEXPORTVA FAR CDECL 1.343 +# endif 1.344 +# endif 1.345 +#endif 1.346 + 1.347 +#if defined (__BEOS__) || (defined(__OS2__) && defined(__declspec)) 1.348 +# ifdef ZLIB_DLL 1.349 +# ifdef ZLIB_INTERNAL 1.350 +# define ZEXPORT __declspec(dllexport) 1.351 +# define ZEXPORTVA __declspec(dllexport) 1.352 +# else 1.353 +# define ZEXPORT __declspec(dllimport) 1.354 +# define ZEXPORTVA __declspec(dllimport) 1.355 +# endif 1.356 +# endif 1.357 +#endif 1.358 + 1.359 +#ifndef ZEXTERN 1.360 +# define ZEXTERN extern 1.361 +#endif 1.362 +#ifndef ZEXPORT 1.363 +# define ZEXPORT 1.364 +#endif 1.365 +#ifndef ZEXPORTVA 1.366 +# define ZEXPORTVA 1.367 +#endif 1.368 + 1.369 +#ifndef FAR 1.370 +# define FAR 1.371 +#endif 1.372 + 1.373 +#if !defined(__MACTYPES__) 1.374 +typedef unsigned char Byte; /* 8 bits */ 1.375 +#endif 1.376 +typedef unsigned int uInt; /* 16 bits or more */ 1.377 +typedef unsigned long uLong; /* 32 bits or more */ 1.378 + 1.379 +#ifdef SMALL_MEDIUM 1.380 + /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */ 1.381 +# define Bytef Byte FAR 1.382 +#else 1.383 + typedef Byte FAR Bytef; 1.384 +#endif 1.385 +typedef char FAR charf; 1.386 +typedef int FAR intf; 1.387 +typedef uInt FAR uIntf; 1.388 +typedef uLong FAR uLongf; 1.389 + 1.390 +#ifdef STDC 1.391 + typedef void const *voidpc; 1.392 + typedef void FAR *voidpf; 1.393 + typedef void *voidp; 1.394 +#else 1.395 + typedef Byte const *voidpc; 1.396 + typedef Byte FAR *voidpf; 1.397 + typedef Byte *voidp; 1.398 +#endif 1.399 + 1.400 +#if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC) 1.401 +# include <limits.h> 1.402 +# if (UINT_MAX == 0xffffffffUL) 1.403 +# define Z_U4 unsigned 1.404 +# elif (ULONG_MAX == 0xffffffffUL) 1.405 +# define Z_U4 unsigned long 1.406 +# elif (USHRT_MAX == 0xffffffffUL) 1.407 +# define Z_U4 unsigned short 1.408 +# endif 1.409 +#endif 1.410 + 1.411 +#ifdef Z_U4 1.412 + typedef Z_U4 z_crc_t; 1.413 +#else 1.414 + typedef unsigned long z_crc_t; 1.415 +#endif 1.416 + 1.417 +#ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */ 1.418 +# define Z_HAVE_UNISTD_H 1.419 +#endif 1.420 + 1.421 +#ifdef HAVE_STDARG_H /* may be set to #if 1 by ./configure */ 1.422 +# define Z_HAVE_STDARG_H 1.423 +#endif 1.424 + 1.425 +#ifdef STDC 1.426 +# ifndef Z_SOLO 1.427 +# include <sys/types.h> /* for off_t */ 1.428 +# endif 1.429 +#endif 1.430 + 1.431 +#if defined(STDC) || defined(Z_HAVE_STDARG_H) 1.432 +# ifndef Z_SOLO 1.433 +# include <stdarg.h> /* for va_list */ 1.434 +# endif 1.435 +#endif 1.436 + 1.437 +#ifdef _WIN32 1.438 +# ifndef Z_SOLO 1.439 +# include <stddef.h> /* for wchar_t */ 1.440 +# endif 1.441 +#endif 1.442 + 1.443 +/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and 1.444 + * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even 1.445 + * though the former does not conform to the LFS document), but considering 1.446 + * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as 1.447 + * equivalently requesting no 64-bit operations 1.448 + */ 1.449 +#if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1 1.450 +# undef _LARGEFILE64_SOURCE 1.451 +#endif 1.452 + 1.453 +#if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H) 1.454 +# define Z_HAVE_UNISTD_H 1.455 +#endif 1.456 +#ifndef Z_SOLO 1.457 +# if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE) 1.458 +# include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */ 1.459 +# ifdef VMS 1.460 +# include <unixio.h> /* for off_t */ 1.461 +# endif 1.462 +# ifndef z_off_t 1.463 +# define z_off_t off_t 1.464 +# endif 1.465 +# endif 1.466 +#endif 1.467 + 1.468 +#if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0 1.469 +# define Z_LFS64 1.470 +#endif 1.471 + 1.472 +#if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64) 1.473 +# define Z_LARGE64 1.474 +#endif 1.475 + 1.476 +#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64) 1.477 +# define Z_WANT64 1.478 +#endif 1.479 + 1.480 +#if !defined(SEEK_SET) && !defined(Z_SOLO) 1.481 +# define SEEK_SET 0 /* Seek from beginning of file. */ 1.482 +# define SEEK_CUR 1 /* Seek from current position. */ 1.483 +# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */ 1.484 +#endif 1.485 + 1.486 +#ifndef z_off_t 1.487 +# define z_off_t long 1.488 +#endif 1.489 + 1.490 +#if !defined(_WIN32) && defined(Z_LARGE64) 1.491 +# define z_off64_t off64_t 1.492 +#else 1.493 +# if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO) 1.494 +# define z_off64_t __int64 1.495 +# else 1.496 +# define z_off64_t z_off_t 1.497 +# endif 1.498 +#endif 1.499 + 1.500 +/* MVS linker does not support external names larger than 8 bytes */ 1.501 +#if defined(__MVS__) 1.502 + #pragma map(deflateInit_,"DEIN") 1.503 + #pragma map(deflateInit2_,"DEIN2") 1.504 + #pragma map(deflateEnd,"DEEND") 1.505 + #pragma map(deflateBound,"DEBND") 1.506 + #pragma map(inflateInit_,"ININ") 1.507 + #pragma map(inflateInit2_,"ININ2") 1.508 + #pragma map(inflateEnd,"INEND") 1.509 + #pragma map(inflateSync,"INSY") 1.510 + #pragma map(inflateSetDictionary,"INSEDI") 1.511 + #pragma map(compressBound,"CMBND") 1.512 + #pragma map(inflate_table,"INTABL") 1.513 + #pragma map(inflate_fast,"INFA") 1.514 + #pragma map(inflate_copyright,"INCOPY") 1.515 +#endif 1.516 + 1.517 +#endif /* ZCONF_H */