1381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes/* zconf.h -- configuration of the zlib compression library 204351a92ecc8429c999acbfc5dfe5aa8bee1d19dElliott Hughes * Copyright (C) 1995-2013 Jean-loup Gailly. 3381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes * For conditions of distribution and use, see copyright notice in zlib.h 4381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes */ 5381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes 6381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes/* @(#) $Id$ */ 7381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes 8381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#ifndef ZCONF_H 9381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#define ZCONF_H 10381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes 11381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes/* 12381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes * If you *really* need a unique prefix for all types and library functions, 13381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. 14381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes * Even better than compiling with -DZ_PREFIX would be to use configure to set 15381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes * this permanently in zconf.h using "./configure --zprefix". 16381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes */ 17381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#ifdef Z_PREFIX /* may be set to #if 1 by ./configure */ 18ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes# define Z_PREFIX_SET 19381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes 20381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes/* all linked symbols */ 21381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define _dist_code z__dist_code 22381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define _length_code z__length_code 23381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define _tr_align z__tr_align 2404351a92ecc8429c999acbfc5dfe5aa8bee1d19dElliott Hughes# define _tr_flush_bits z__tr_flush_bits 25381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define _tr_flush_block z__tr_flush_block 26381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define _tr_init z__tr_init 27381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define _tr_stored_block z__tr_stored_block 28381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define _tr_tally z__tr_tally 29381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define adler32 z_adler32 30381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define adler32_combine z_adler32_combine 31381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define adler32_combine64 z_adler32_combine64 32ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes# ifndef Z_SOLO 33ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes# define compress z_compress 34ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes# define compress2 z_compress2 35ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes# define compressBound z_compressBound 36ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes# endif 37381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define crc32 z_crc32 38381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define crc32_combine z_crc32_combine 39381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define crc32_combine64 z_crc32_combine64 40381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define deflate z_deflate 41381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define deflateBound z_deflateBound 42381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define deflateCopy z_deflateCopy 43381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define deflateEnd z_deflateEnd 44381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define deflateInit2_ z_deflateInit2_ 45381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define deflateInit_ z_deflateInit_ 46381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define deflateParams z_deflateParams 47ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes# define deflatePending z_deflatePending 48381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define deflatePrime z_deflatePrime 49381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define deflateReset z_deflateReset 50ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes# define deflateResetKeep z_deflateResetKeep 51381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define deflateSetDictionary z_deflateSetDictionary 52381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define deflateSetHeader z_deflateSetHeader 53381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define deflateTune z_deflateTune 54381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define deflate_copyright z_deflate_copyright 55381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define get_crc_table z_get_crc_table 56ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes# ifndef Z_SOLO 57ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes# define gz_error z_gz_error 58ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes# define gz_intmax z_gz_intmax 59ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes# define gz_strwinerror z_gz_strwinerror 60ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes# define gzbuffer z_gzbuffer 61ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes# define gzclearerr z_gzclearerr 62ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes# define gzclose z_gzclose 63ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes# define gzclose_r z_gzclose_r 64ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes# define gzclose_w z_gzclose_w 65ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes# define gzdirect z_gzdirect 66ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes# define gzdopen z_gzdopen 67ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes# define gzeof z_gzeof 68ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes# define gzerror z_gzerror 69ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes# define gzflush z_gzflush 70ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes# define gzgetc z_gzgetc 71ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes# define gzgetc_ z_gzgetc_ 72ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes# define gzgets z_gzgets 73ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes# define gzoffset z_gzoffset 74ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes# define gzoffset64 z_gzoffset64 75ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes# define gzopen z_gzopen 76ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes# define gzopen64 z_gzopen64 7709eb358bbbb9aad3fe48dd3368c8a7a481cbda1cElliott Hughes# ifdef _WIN32 7809eb358bbbb9aad3fe48dd3368c8a7a481cbda1cElliott Hughes# define gzopen_w z_gzopen_w 7909eb358bbbb9aad3fe48dd3368c8a7a481cbda1cElliott Hughes# endif 80ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes# define gzprintf z_gzprintf 8104351a92ecc8429c999acbfc5dfe5aa8bee1d19dElliott Hughes# define gzvprintf z_gzvprintf 82ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes# define gzputc z_gzputc 83ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes# define gzputs z_gzputs 84ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes# define gzread z_gzread 85ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes# define gzrewind z_gzrewind 86ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes# define gzseek z_gzseek 87ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes# define gzseek64 z_gzseek64 88ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes# define gzsetparams z_gzsetparams 89ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes# define gztell z_gztell 90ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes# define gztell64 z_gztell64 91ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes# define gzungetc z_gzungetc 92ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes# define gzwrite z_gzwrite 93ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes# endif 94381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define inflate z_inflate 95381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define inflateBack z_inflateBack 96381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define inflateBackEnd z_inflateBackEnd 97381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define inflateBackInit_ z_inflateBackInit_ 98381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define inflateCopy z_inflateCopy 99381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define inflateEnd z_inflateEnd 100381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define inflateGetHeader z_inflateGetHeader 101381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define inflateInit2_ z_inflateInit2_ 102381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define inflateInit_ z_inflateInit_ 103381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define inflateMark z_inflateMark 104381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define inflatePrime z_inflatePrime 105381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define inflateReset z_inflateReset 106381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define inflateReset2 z_inflateReset2 107381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define inflateSetDictionary z_inflateSetDictionary 10804351a92ecc8429c999acbfc5dfe5aa8bee1d19dElliott Hughes# define inflateGetDictionary z_inflateGetDictionary 109381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define inflateSync z_inflateSync 110381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define inflateSyncPoint z_inflateSyncPoint 111381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define inflateUndermine z_inflateUndermine 112ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes# define inflateResetKeep z_inflateResetKeep 113381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define inflate_copyright z_inflate_copyright 114381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define inflate_fast z_inflate_fast 115381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define inflate_table z_inflate_table 116ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes# ifndef Z_SOLO 117ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes# define uncompress z_uncompress 118ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes# endif 119381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define zError z_zError 120ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes# ifndef Z_SOLO 121ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes# define zcalloc z_zcalloc 122ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes# define zcfree z_zcfree 123ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes# endif 124381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define zlibCompileFlags z_zlibCompileFlags 125381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define zlibVersion z_zlibVersion 126381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes 127381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes/* all zlib typedefs in zlib.h and zconf.h */ 128381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define Byte z_Byte 129381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define Bytef z_Bytef 130381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define alloc_func z_alloc_func 131381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define charf z_charf 132381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define free_func z_free_func 133ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes# ifndef Z_SOLO 134ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes# define gzFile z_gzFile 135ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes# endif 13609eb358bbbb9aad3fe48dd3368c8a7a481cbda1cElliott Hughes# define gz_header z_gz_header 13709eb358bbbb9aad3fe48dd3368c8a7a481cbda1cElliott Hughes# define gz_headerp z_gz_headerp 138381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define in_func z_in_func 139381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define intf z_intf 140381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define out_func z_out_func 141381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define uInt z_uInt 142381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define uIntf z_uIntf 143381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define uLong z_uLong 144381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define uLongf z_uLongf 145381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define voidp z_voidp 146381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define voidpc z_voidpc 147381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define voidpf z_voidpf 148381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes 149381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes/* all zlib structs in zlib.h and zconf.h */ 15009eb358bbbb9aad3fe48dd3368c8a7a481cbda1cElliott Hughes# define gz_header_s z_gz_header_s 151381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define internal_state z_internal_state 152381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes 153381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#endif 154381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes 155381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#if defined(__MSDOS__) && !defined(MSDOS) 156381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define MSDOS 157381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#endif 158381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2) 159381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define OS2 160381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#endif 161381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#if defined(_WINDOWS) && !defined(WINDOWS) 162381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define WINDOWS 163381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#endif 164381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__) 165381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# ifndef WIN32 166381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define WIN32 167381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# endif 168381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#endif 169381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32) 170381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__) 171381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# ifndef SYS16BIT 172381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define SYS16BIT 173381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# endif 174381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# endif 175381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#endif 176381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes 177381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes/* 178381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes * Compile with -DMAXSEG_64K if the alloc function cannot allocate more 179381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes * than 64k bytes at a time (needed on systems with 16-bit int). 180381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes */ 181381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#ifdef SYS16BIT 182381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define MAXSEG_64K 183381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#endif 184381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#ifdef MSDOS 185381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define UNALIGNED_OK 186381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#endif 187381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes 188381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#ifdef __STDC_VERSION__ 189381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# ifndef STDC 190381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define STDC 191381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# endif 192381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# if __STDC_VERSION__ >= 199901L 193381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# ifndef STDC99 194381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define STDC99 195381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# endif 196381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# endif 197381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#endif 198381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus)) 199381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define STDC 200381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#endif 201381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__)) 202381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define STDC 203381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#endif 204381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32)) 205381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define STDC 206381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#endif 207381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__)) 208381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define STDC 209381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#endif 210381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes 211381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */ 212381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define STDC 213381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#endif 214381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes 215381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#ifndef STDC 216381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */ 217381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define const /* note: need a more gentle solution here */ 218381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# endif 219381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#endif 220381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes 221ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes#if defined(ZLIB_CONST) && !defined(z_const) 222ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes# define z_const const 223ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes#else 224ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes# define z_const 225ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes#endif 226ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes 227381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes/* Some Mac compilers merge all .h files incorrectly: */ 228381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__) 229381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define NO_DUMMY_DECL 230381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#endif 231381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes 232381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes/* Maximum value for memLevel in deflateInit2 */ 233381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#ifndef MAX_MEM_LEVEL 234381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# ifdef MAXSEG_64K 235381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define MAX_MEM_LEVEL 8 236381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# else 237381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define MAX_MEM_LEVEL 9 238381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# endif 239381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#endif 240381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes 241381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes/* Maximum value for windowBits in deflateInit2 and inflateInit2. 242381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files 243381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes * created by gzip. (Files created by minigzip can still be extracted by 244381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes * gzip.) 245381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes */ 246381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#ifndef MAX_WBITS 247381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define MAX_WBITS 15 /* 32K LZ77 window */ 248381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#endif 249381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes 250381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes/* The memory requirements for deflate are (in bytes): 251381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes (1 << (windowBits+2)) + (1 << (memLevel+9)) 252381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) 253381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes plus a few kilobytes for small objects. For example, if you want to reduce 254381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes the default memory requirements from 256K to 128K, compile with 255381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" 256381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes Of course this will generally degrade compression (there's no free lunch). 257381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes 258381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes The memory requirements for inflate are (in bytes) 1 << windowBits 259381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes that is, 32K for windowBits=15 (default value) plus a few kilobytes 260381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes for small objects. 261381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes*/ 262381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes 263381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes /* Type declarations */ 264381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes 265381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#ifndef OF /* function prototypes */ 266381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# ifdef STDC 267381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define OF(args) args 268381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# else 269381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define OF(args) () 270381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# endif 271381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#endif 272381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes 273ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes#ifndef Z_ARG /* function prototypes for stdarg */ 274ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes# if defined(STDC) || defined(Z_HAVE_STDARG_H) 275ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes# define Z_ARG(args) args 276ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes# else 277ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes# define Z_ARG(args) () 278ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes# endif 279ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes#endif 280ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes 281381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes/* The following definitions for FAR are needed only for MSDOS mixed 282381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes * model programming (small or medium model with some far allocations). 283381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes * This was tested only with MSC; for other MSDOS compilers you may have 284381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes * to define NO_MEMCPY in zutil.h. If you don't need the mixed model, 285381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes * just define FAR to be empty. 286381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes */ 287381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#ifdef SYS16BIT 288381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# if defined(M_I86SM) || defined(M_I86MM) 289381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes /* MSC small or medium model */ 290381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define SMALL_MEDIUM 291381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# ifdef _MSC_VER 292381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define FAR _far 293381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# else 294381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define FAR far 295381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# endif 296381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# endif 297381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# if (defined(__SMALL__) || defined(__MEDIUM__)) 298381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes /* Turbo C small or medium model */ 299381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define SMALL_MEDIUM 300381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# ifdef __BORLANDC__ 301381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define FAR _far 302381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# else 303381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define FAR far 304381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# endif 305381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# endif 306381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#endif 307381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes 308381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#if defined(WINDOWS) || defined(WIN32) 309381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes /* If building or using zlib as a DLL, define ZLIB_DLL. 310381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes * This is not mandatory, but it offers a little performance increase. 311381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes */ 312381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# ifdef ZLIB_DLL 313381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500)) 314381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# ifdef ZLIB_INTERNAL 315381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define ZEXTERN extern __declspec(dllexport) 316381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# else 317381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define ZEXTERN extern __declspec(dllimport) 318381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# endif 319381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# endif 320381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# endif /* ZLIB_DLL */ 321381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes /* If building or using zlib with the WINAPI/WINAPIV calling convention, 322381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes * define ZLIB_WINAPI. 323381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI. 324381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes */ 325381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# ifdef ZLIB_WINAPI 326381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# ifdef FAR 327381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# undef FAR 328381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# endif 329381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# include <windows.h> 330381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes /* No need for _export, use ZLIB.DEF instead. */ 331381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes /* For complete Windows compatibility, use WINAPI, not __stdcall. */ 332381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define ZEXPORT WINAPI 333381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# ifdef WIN32 334381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define ZEXPORTVA WINAPIV 335381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# else 336381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define ZEXPORTVA FAR CDECL 337381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# endif 338381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# endif 339381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#endif 340381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes 341381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#if defined (__BEOS__) 342381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# ifdef ZLIB_DLL 343381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# ifdef ZLIB_INTERNAL 344381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define ZEXPORT __declspec(dllexport) 345381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define ZEXPORTVA __declspec(dllexport) 346381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# else 347381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define ZEXPORT __declspec(dllimport) 348381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define ZEXPORTVA __declspec(dllimport) 349381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# endif 350381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# endif 351381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#endif 352381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes 353381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#ifndef ZEXTERN 354381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define ZEXTERN extern 355381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#endif 356381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#ifndef ZEXPORT 357381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define ZEXPORT 358381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#endif 359381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#ifndef ZEXPORTVA 360381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define ZEXPORTVA 361381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#endif 362381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes 363381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#ifndef FAR 364381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define FAR 365381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#endif 366381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes 367381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#if !defined(__MACTYPES__) 368381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughestypedef unsigned char Byte; /* 8 bits */ 369381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#endif 370381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughestypedef unsigned int uInt; /* 16 bits or more */ 371381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughestypedef unsigned long uLong; /* 32 bits or more */ 372381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes 373381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#ifdef SMALL_MEDIUM 374381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */ 375381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define Bytef Byte FAR 376381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#else 377381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes typedef Byte FAR Bytef; 378381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#endif 379381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughestypedef char FAR charf; 380381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughestypedef int FAR intf; 381381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughestypedef uInt FAR uIntf; 382381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughestypedef uLong FAR uLongf; 383381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes 384381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#ifdef STDC 385381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes typedef void const *voidpc; 386381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes typedef void FAR *voidpf; 387381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes typedef void *voidp; 388381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#else 389381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes typedef Byte const *voidpc; 390381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes typedef Byte FAR *voidpf; 391381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes typedef Byte *voidp; 392381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#endif 393381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes 39409eb358bbbb9aad3fe48dd3368c8a7a481cbda1cElliott Hughes#if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC) 39509eb358bbbb9aad3fe48dd3368c8a7a481cbda1cElliott Hughes# include <limits.h> 39609eb358bbbb9aad3fe48dd3368c8a7a481cbda1cElliott Hughes# if (UINT_MAX == 0xffffffffUL) 39709eb358bbbb9aad3fe48dd3368c8a7a481cbda1cElliott Hughes# define Z_U4 unsigned 39804351a92ecc8429c999acbfc5dfe5aa8bee1d19dElliott Hughes# elif (ULONG_MAX == 0xffffffffUL) 39904351a92ecc8429c999acbfc5dfe5aa8bee1d19dElliott Hughes# define Z_U4 unsigned long 40004351a92ecc8429c999acbfc5dfe5aa8bee1d19dElliott Hughes# elif (USHRT_MAX == 0xffffffffUL) 40104351a92ecc8429c999acbfc5dfe5aa8bee1d19dElliott Hughes# define Z_U4 unsigned short 40209eb358bbbb9aad3fe48dd3368c8a7a481cbda1cElliott Hughes# endif 40309eb358bbbb9aad3fe48dd3368c8a7a481cbda1cElliott Hughes#endif 40409eb358bbbb9aad3fe48dd3368c8a7a481cbda1cElliott Hughes 40509eb358bbbb9aad3fe48dd3368c8a7a481cbda1cElliott Hughes#ifdef Z_U4 40609eb358bbbb9aad3fe48dd3368c8a7a481cbda1cElliott Hughes typedef Z_U4 z_crc_t; 40709eb358bbbb9aad3fe48dd3368c8a7a481cbda1cElliott Hughes#else 40809eb358bbbb9aad3fe48dd3368c8a7a481cbda1cElliott Hughes typedef unsigned long z_crc_t; 40909eb358bbbb9aad3fe48dd3368c8a7a481cbda1cElliott Hughes#endif 41009eb358bbbb9aad3fe48dd3368c8a7a481cbda1cElliott Hughes 41100fb66d0b1488e4ca655906f82b27eb2ccc3e309Elliott Hughes#if 1 /* was set to #if 1 by ./configure */ 412381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define Z_HAVE_UNISTD_H 413381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#endif 414381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes 41500fb66d0b1488e4ca655906f82b27eb2ccc3e309Elliott Hughes#if 1 /* was set to #if 1 by ./configure */ 416ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes# define Z_HAVE_STDARG_H 417ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes#endif 418ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes 419381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#ifdef STDC 420ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes# ifndef Z_SOLO 421ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes# include <sys/types.h> /* for off_t */ 422ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes# endif 423381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#endif 424381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes 42504351a92ecc8429c999acbfc5dfe5aa8bee1d19dElliott Hughes#if defined(STDC) || defined(Z_HAVE_STDARG_H) 42604351a92ecc8429c999acbfc5dfe5aa8bee1d19dElliott Hughes# ifndef Z_SOLO 42704351a92ecc8429c999acbfc5dfe5aa8bee1d19dElliott Hughes# include <stdarg.h> /* for va_list */ 42804351a92ecc8429c999acbfc5dfe5aa8bee1d19dElliott Hughes# endif 42904351a92ecc8429c999acbfc5dfe5aa8bee1d19dElliott Hughes#endif 43004351a92ecc8429c999acbfc5dfe5aa8bee1d19dElliott Hughes 43109eb358bbbb9aad3fe48dd3368c8a7a481cbda1cElliott Hughes#ifdef _WIN32 43204351a92ecc8429c999acbfc5dfe5aa8bee1d19dElliott Hughes# ifndef Z_SOLO 43304351a92ecc8429c999acbfc5dfe5aa8bee1d19dElliott Hughes# include <stddef.h> /* for wchar_t */ 43404351a92ecc8429c999acbfc5dfe5aa8bee1d19dElliott Hughes# endif 43509eb358bbbb9aad3fe48dd3368c8a7a481cbda1cElliott Hughes#endif 43609eb358bbbb9aad3fe48dd3368c8a7a481cbda1cElliott Hughes 437381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and 438381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even 439381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes * though the former does not conform to the LFS document), but considering 440381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as 441381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes * equivalently requesting no 64-bit operations 442381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes */ 44304351a92ecc8429c999acbfc5dfe5aa8bee1d19dElliott Hughes#if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1 444381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# undef _LARGEFILE64_SOURCE 445381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#endif 446381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes 44709eb358bbbb9aad3fe48dd3368c8a7a481cbda1cElliott Hughes#if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H) 44809eb358bbbb9aad3fe48dd3368c8a7a481cbda1cElliott Hughes# define Z_HAVE_UNISTD_H 449ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes#endif 45009eb358bbbb9aad3fe48dd3368c8a7a481cbda1cElliott Hughes#ifndef Z_SOLO 45104351a92ecc8429c999acbfc5dfe5aa8bee1d19dElliott Hughes# if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE) 45209eb358bbbb9aad3fe48dd3368c8a7a481cbda1cElliott Hughes# include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */ 45309eb358bbbb9aad3fe48dd3368c8a7a481cbda1cElliott Hughes# ifdef VMS 45409eb358bbbb9aad3fe48dd3368c8a7a481cbda1cElliott Hughes# include <unixio.h> /* for off_t */ 45509eb358bbbb9aad3fe48dd3368c8a7a481cbda1cElliott Hughes# endif 45609eb358bbbb9aad3fe48dd3368c8a7a481cbda1cElliott Hughes# ifndef z_off_t 45709eb358bbbb9aad3fe48dd3368c8a7a481cbda1cElliott Hughes# define z_off_t off_t 45809eb358bbbb9aad3fe48dd3368c8a7a481cbda1cElliott Hughes# endif 459381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# endif 460381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#endif 461381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes 46209eb358bbbb9aad3fe48dd3368c8a7a481cbda1cElliott Hughes#if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0 46309eb358bbbb9aad3fe48dd3368c8a7a481cbda1cElliott Hughes# define Z_LFS64 46409eb358bbbb9aad3fe48dd3368c8a7a481cbda1cElliott Hughes#endif 46509eb358bbbb9aad3fe48dd3368c8a7a481cbda1cElliott Hughes 46609eb358bbbb9aad3fe48dd3368c8a7a481cbda1cElliott Hughes#if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64) 46709eb358bbbb9aad3fe48dd3368c8a7a481cbda1cElliott Hughes# define Z_LARGE64 46809eb358bbbb9aad3fe48dd3368c8a7a481cbda1cElliott Hughes#endif 46909eb358bbbb9aad3fe48dd3368c8a7a481cbda1cElliott Hughes 47009eb358bbbb9aad3fe48dd3368c8a7a481cbda1cElliott Hughes#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64) 47109eb358bbbb9aad3fe48dd3368c8a7a481cbda1cElliott Hughes# define Z_WANT64 47209eb358bbbb9aad3fe48dd3368c8a7a481cbda1cElliott Hughes#endif 47309eb358bbbb9aad3fe48dd3368c8a7a481cbda1cElliott Hughes 474ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes#if !defined(SEEK_SET) && !defined(Z_SOLO) 475381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define SEEK_SET 0 /* Seek from beginning of file. */ 476381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define SEEK_CUR 1 /* Seek from current position. */ 477381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */ 478381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#endif 479381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes 480381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#ifndef z_off_t 481381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define z_off_t long 482381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#endif 483381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes 48409eb358bbbb9aad3fe48dd3368c8a7a481cbda1cElliott Hughes#if !defined(_WIN32) && defined(Z_LARGE64) 485381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes# define z_off64_t off64_t 486381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#else 48709eb358bbbb9aad3fe48dd3368c8a7a481cbda1cElliott Hughes# if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO) 488ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes# define z_off64_t __int64 489ee9e11d0d4e3361533860bf04896abb86a291bfbElliott Hughes# else 49009eb358bbbb9aad3fe48dd3368c8a7a481cbda1cElliott Hughes# define z_off64_t z_off_t 49109eb358bbbb9aad3fe48dd3368c8a7a481cbda1cElliott Hughes# endif 492381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#endif 493381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes 494381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes/* MVS linker does not support external names larger than 8 bytes */ 495381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#if defined(__MVS__) 496381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes #pragma map(deflateInit_,"DEIN") 497381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes #pragma map(deflateInit2_,"DEIN2") 498381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes #pragma map(deflateEnd,"DEEND") 499381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes #pragma map(deflateBound,"DEBND") 500381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes #pragma map(inflateInit_,"ININ") 501381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes #pragma map(inflateInit2_,"ININ2") 502381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes #pragma map(inflateEnd,"INEND") 503381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes #pragma map(inflateSync,"INSY") 504381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes #pragma map(inflateSetDictionary,"INSEDI") 505381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes #pragma map(compressBound,"CMBND") 506381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes #pragma map(inflate_table,"INTABL") 507381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes #pragma map(inflate_fast,"INFA") 508381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes #pragma map(inflate_copyright,"INCOPY") 509381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#endif 510381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes 511381716e9396b55b1adb8235b020c37344f60ab07Elliott Hughes#endif /* ZCONF_H */ 512