1b33c96954667ba382fa595baf7b31290bfdd517vboxsync/* zconf.h -- configuration of the zlib compression library
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync * Copyright (C) 1995-2011 Jean-loup Gailly.
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync * For conditions of distribution and use, see copyright notice in zlib.h
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync/* @(#) $Id$ */
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync * If you *really* need a unique prefix for all types and library functions,
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync * Even better than compiling with -DZ_PREFIX would be to use configure to set
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync * this permanently in zconf.h using "./configure --zprefix".
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync#ifdef Z_PREFIX /* may be set to #if 1 by ./configure */
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync/* all linked symbols */
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync# define deflateSetDictionary z_deflateSetDictionary
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync# define inflateSetDictionary z_inflateSetDictionary
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync/* all zlib typedefs in zlib.h and zconf.h */
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync/* all zlib structs in zlib.h and zconf.h */
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync * than 64k bytes at a time (needed on systems with 16-bit int).
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync# define const /* note: need a more gentle solution here */
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync/* Some Mac compilers merge all .h files incorrectly: */
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync/* Maximum value for memLevel in deflateInit2 */
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync/* Maximum value for windowBits in deflateInit2 and inflateInit2.
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync * created by gzip. (Files created by minigzip can still be extracted by
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync/* The memory requirements for deflate are (in bytes):
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync (1 << (windowBits+2)) + (1 << (memLevel+9))
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync plus a few kilobytes for small objects. For example, if you want to reduce
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync the default memory requirements from 256K to 128K, compile with
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync Of course this will generally degrade compression (there's no free lunch).
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync The memory requirements for inflate are (in bytes) 1 << windowBits
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync that is, 32K for windowBits=15 (default value) plus a few kilobytes
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync for small objects.
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync /* Type declarations */
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync/* The following definitions for FAR are needed only for MSDOS mixed
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync * model programming (small or medium model with some far allocations).
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync * This was tested only with MSC; for other MSDOS compilers you may have
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync * to define NO_MEMCPY in zutil.h. If you don't need the mixed model,
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync * just define FAR to be empty.
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync /* MSC small or medium model */
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync /* Turbo C small or medium model */
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync /* If building or using zlib as a DLL, define ZLIB_DLL.
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync * This is not mandatory, but it offers a little performance increase.
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync /* If building or using zlib with the WINAPI/WINAPIV calling convention,
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync * define ZLIB_WINAPI.
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync /* No need for _export, use ZLIB.DEF instead. */
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync /* For complete Windows compatibility, use WINAPI, not __stdcall. */
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync#ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync#ifdef HAVE_STDARG_H /* may be set to #if 1 by ./configure */
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync * though the former does not conform to the LFS document), but considering
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync * equivalently requesting no 64-bit operations
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync#if (defined(Z_HAVE_UNISTD_H) || defined(Z_LARGE)) && !defined(Z_SOLO)
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync# define SEEK_SET 0 /* Seek from beginning of file. */
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync# define SEEK_CUR 1 /* Seek from current position. */
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync#if !defined(_WIN32) && (defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0)
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync/* MVS linker does not support external names larger than 8 bytes */