11cb0ef41Sopenharmony_ci/* zconf.h -- configuration of the zlib compression library 21cb0ef41Sopenharmony_ci * Copyright (C) 1995-2016 Jean-loup Gailly, Mark Adler 31cb0ef41Sopenharmony_ci * For conditions of distribution and use, see copyright notice in zlib.h 41cb0ef41Sopenharmony_ci */ 51cb0ef41Sopenharmony_ci 61cb0ef41Sopenharmony_ci/* @(#) $Id$ */ 71cb0ef41Sopenharmony_ci 81cb0ef41Sopenharmony_ci#ifndef ZCONF_H 91cb0ef41Sopenharmony_ci#define ZCONF_H 101cb0ef41Sopenharmony_ci#cmakedefine Z_PREFIX 111cb0ef41Sopenharmony_ci#cmakedefine Z_HAVE_UNISTD_H 121cb0ef41Sopenharmony_ci 131cb0ef41Sopenharmony_ci/* 141cb0ef41Sopenharmony_ci * If you *really* need a unique prefix for all types and library functions, 151cb0ef41Sopenharmony_ci * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. 161cb0ef41Sopenharmony_ci * Even better than compiling with -DZ_PREFIX would be to use configure to set 171cb0ef41Sopenharmony_ci * this permanently in zconf.h using "./configure --zprefix". 181cb0ef41Sopenharmony_ci */ 191cb0ef41Sopenharmony_ci#ifdef Z_PREFIX /* may be set to #if 1 by ./configure */ 201cb0ef41Sopenharmony_ci# define Z_PREFIX_SET 211cb0ef41Sopenharmony_ci 221cb0ef41Sopenharmony_ci/* all linked symbols and init macros */ 231cb0ef41Sopenharmony_ci# define _dist_code z__dist_code 241cb0ef41Sopenharmony_ci# define _length_code z__length_code 251cb0ef41Sopenharmony_ci# define _tr_align z__tr_align 261cb0ef41Sopenharmony_ci# define _tr_flush_bits z__tr_flush_bits 271cb0ef41Sopenharmony_ci# define _tr_flush_block z__tr_flush_block 281cb0ef41Sopenharmony_ci# define _tr_init z__tr_init 291cb0ef41Sopenharmony_ci# define _tr_stored_block z__tr_stored_block 301cb0ef41Sopenharmony_ci# define _tr_tally z__tr_tally 311cb0ef41Sopenharmony_ci# define adler32 z_adler32 321cb0ef41Sopenharmony_ci# define adler32_combine z_adler32_combine 331cb0ef41Sopenharmony_ci# define adler32_combine64 z_adler32_combine64 341cb0ef41Sopenharmony_ci# define adler32_z z_adler32_z 351cb0ef41Sopenharmony_ci# ifndef Z_SOLO 361cb0ef41Sopenharmony_ci# define compress z_compress 371cb0ef41Sopenharmony_ci# define compress2 z_compress2 381cb0ef41Sopenharmony_ci# define compressBound z_compressBound 391cb0ef41Sopenharmony_ci# endif 401cb0ef41Sopenharmony_ci# define crc32 z_crc32 411cb0ef41Sopenharmony_ci# define crc32_combine z_crc32_combine 421cb0ef41Sopenharmony_ci# define crc32_combine64 z_crc32_combine64 431cb0ef41Sopenharmony_ci# define crc32_combine_gen z_crc32_combine_gen 441cb0ef41Sopenharmony_ci# define crc32_combine_gen64 z_crc32_combine_gen64 451cb0ef41Sopenharmony_ci# define crc32_combine_op z_crc32_combine_op 461cb0ef41Sopenharmony_ci# define crc32_z z_crc32_z 471cb0ef41Sopenharmony_ci# define deflate z_deflate 481cb0ef41Sopenharmony_ci# define deflateBound z_deflateBound 491cb0ef41Sopenharmony_ci# define deflateCopy z_deflateCopy 501cb0ef41Sopenharmony_ci# define deflateEnd z_deflateEnd 511cb0ef41Sopenharmony_ci# define deflateGetDictionary z_deflateGetDictionary 521cb0ef41Sopenharmony_ci# define deflateInit z_deflateInit 531cb0ef41Sopenharmony_ci# define deflateInit2 z_deflateInit2 541cb0ef41Sopenharmony_ci# define deflateInit2_ z_deflateInit2_ 551cb0ef41Sopenharmony_ci# define deflateInit_ z_deflateInit_ 561cb0ef41Sopenharmony_ci# define deflateParams z_deflateParams 571cb0ef41Sopenharmony_ci# define deflatePending z_deflatePending 581cb0ef41Sopenharmony_ci# define deflatePrime z_deflatePrime 591cb0ef41Sopenharmony_ci# define deflateReset z_deflateReset 601cb0ef41Sopenharmony_ci# define deflateResetKeep z_deflateResetKeep 611cb0ef41Sopenharmony_ci# define deflateSetDictionary z_deflateSetDictionary 621cb0ef41Sopenharmony_ci# define deflateSetHeader z_deflateSetHeader 631cb0ef41Sopenharmony_ci# define deflateTune z_deflateTune 641cb0ef41Sopenharmony_ci# define deflate_copyright z_deflate_copyright 651cb0ef41Sopenharmony_ci# define get_crc_table z_get_crc_table 661cb0ef41Sopenharmony_ci# ifndef Z_SOLO 671cb0ef41Sopenharmony_ci# define gz_error z_gz_error 681cb0ef41Sopenharmony_ci# define gz_intmax z_gz_intmax 691cb0ef41Sopenharmony_ci# define gz_strwinerror z_gz_strwinerror 701cb0ef41Sopenharmony_ci# define gzbuffer z_gzbuffer 711cb0ef41Sopenharmony_ci# define gzclearerr z_gzclearerr 721cb0ef41Sopenharmony_ci# define gzclose z_gzclose 731cb0ef41Sopenharmony_ci# define gzclose_r z_gzclose_r 741cb0ef41Sopenharmony_ci# define gzclose_w z_gzclose_w 751cb0ef41Sopenharmony_ci# define gzdirect z_gzdirect 761cb0ef41Sopenharmony_ci# define gzdopen z_gzdopen 771cb0ef41Sopenharmony_ci# define gzeof z_gzeof 781cb0ef41Sopenharmony_ci# define gzerror z_gzerror 791cb0ef41Sopenharmony_ci# define gzflush z_gzflush 801cb0ef41Sopenharmony_ci# define gzfread z_gzfread 811cb0ef41Sopenharmony_ci# define gzfwrite z_gzfwrite 821cb0ef41Sopenharmony_ci# define gzgetc z_gzgetc 831cb0ef41Sopenharmony_ci# define gzgetc_ z_gzgetc_ 841cb0ef41Sopenharmony_ci# define gzgets z_gzgets 851cb0ef41Sopenharmony_ci# define gzoffset z_gzoffset 861cb0ef41Sopenharmony_ci# define gzoffset64 z_gzoffset64 871cb0ef41Sopenharmony_ci# define gzopen z_gzopen 881cb0ef41Sopenharmony_ci# define gzopen64 z_gzopen64 891cb0ef41Sopenharmony_ci# ifdef _WIN32 901cb0ef41Sopenharmony_ci# define gzopen_w z_gzopen_w 911cb0ef41Sopenharmony_ci# endif 921cb0ef41Sopenharmony_ci# define gzprintf z_gzprintf 931cb0ef41Sopenharmony_ci# define gzputc z_gzputc 941cb0ef41Sopenharmony_ci# define gzputs z_gzputs 951cb0ef41Sopenharmony_ci# define gzread z_gzread 961cb0ef41Sopenharmony_ci# define gzrewind z_gzrewind 971cb0ef41Sopenharmony_ci# define gzseek z_gzseek 981cb0ef41Sopenharmony_ci# define gzseek64 z_gzseek64 991cb0ef41Sopenharmony_ci# define gzsetparams z_gzsetparams 1001cb0ef41Sopenharmony_ci# define gztell z_gztell 1011cb0ef41Sopenharmony_ci# define gztell64 z_gztell64 1021cb0ef41Sopenharmony_ci# define gzungetc z_gzungetc 1031cb0ef41Sopenharmony_ci# define gzvprintf z_gzvprintf 1041cb0ef41Sopenharmony_ci# define gzwrite z_gzwrite 1051cb0ef41Sopenharmony_ci# endif 1061cb0ef41Sopenharmony_ci# define inflate z_inflate 1071cb0ef41Sopenharmony_ci# define inflateBack z_inflateBack 1081cb0ef41Sopenharmony_ci# define inflateBackEnd z_inflateBackEnd 1091cb0ef41Sopenharmony_ci# define inflateBackInit z_inflateBackInit 1101cb0ef41Sopenharmony_ci# define inflateBackInit_ z_inflateBackInit_ 1111cb0ef41Sopenharmony_ci# define inflateCodesUsed z_inflateCodesUsed 1121cb0ef41Sopenharmony_ci# define inflateCopy z_inflateCopy 1131cb0ef41Sopenharmony_ci# define inflateEnd z_inflateEnd 1141cb0ef41Sopenharmony_ci# define inflateGetDictionary z_inflateGetDictionary 1151cb0ef41Sopenharmony_ci# define inflateGetHeader z_inflateGetHeader 1161cb0ef41Sopenharmony_ci# define inflateInit z_inflateInit 1171cb0ef41Sopenharmony_ci# define inflateInit2 z_inflateInit2 1181cb0ef41Sopenharmony_ci# define inflateInit2_ z_inflateInit2_ 1191cb0ef41Sopenharmony_ci# define inflateInit_ z_inflateInit_ 1201cb0ef41Sopenharmony_ci# define inflateMark z_inflateMark 1211cb0ef41Sopenharmony_ci# define inflatePrime z_inflatePrime 1221cb0ef41Sopenharmony_ci# define inflateReset z_inflateReset 1231cb0ef41Sopenharmony_ci# define inflateReset2 z_inflateReset2 1241cb0ef41Sopenharmony_ci# define inflateResetKeep z_inflateResetKeep 1251cb0ef41Sopenharmony_ci# define inflateSetDictionary z_inflateSetDictionary 1261cb0ef41Sopenharmony_ci# define inflateSync z_inflateSync 1271cb0ef41Sopenharmony_ci# define inflateSyncPoint z_inflateSyncPoint 1281cb0ef41Sopenharmony_ci# define inflateUndermine z_inflateUndermine 1291cb0ef41Sopenharmony_ci# define inflateValidate z_inflateValidate 1301cb0ef41Sopenharmony_ci# define inflate_copyright z_inflate_copyright 1311cb0ef41Sopenharmony_ci# define inflate_fast z_inflate_fast 1321cb0ef41Sopenharmony_ci# define inflate_table z_inflate_table 1331cb0ef41Sopenharmony_ci# ifndef Z_SOLO 1341cb0ef41Sopenharmony_ci# define uncompress z_uncompress 1351cb0ef41Sopenharmony_ci# define uncompress2 z_uncompress2 1361cb0ef41Sopenharmony_ci# endif 1371cb0ef41Sopenharmony_ci# define zError z_zError 1381cb0ef41Sopenharmony_ci# ifndef Z_SOLO 1391cb0ef41Sopenharmony_ci# define zcalloc z_zcalloc 1401cb0ef41Sopenharmony_ci# define zcfree z_zcfree 1411cb0ef41Sopenharmony_ci# endif 1421cb0ef41Sopenharmony_ci# define zlibCompileFlags z_zlibCompileFlags 1431cb0ef41Sopenharmony_ci# define zlibVersion z_zlibVersion 1441cb0ef41Sopenharmony_ci 1451cb0ef41Sopenharmony_ci/* all zlib typedefs in zlib.h and zconf.h */ 1461cb0ef41Sopenharmony_ci# define Byte z_Byte 1471cb0ef41Sopenharmony_ci# define Bytef z_Bytef 1481cb0ef41Sopenharmony_ci# define alloc_func z_alloc_func 1491cb0ef41Sopenharmony_ci# define charf z_charf 1501cb0ef41Sopenharmony_ci# define free_func z_free_func 1511cb0ef41Sopenharmony_ci# ifndef Z_SOLO 1521cb0ef41Sopenharmony_ci# define gzFile z_gzFile 1531cb0ef41Sopenharmony_ci# endif 1541cb0ef41Sopenharmony_ci# define gz_header z_gz_header 1551cb0ef41Sopenharmony_ci# define gz_headerp z_gz_headerp 1561cb0ef41Sopenharmony_ci# define in_func z_in_func 1571cb0ef41Sopenharmony_ci# define intf z_intf 1581cb0ef41Sopenharmony_ci# define out_func z_out_func 1591cb0ef41Sopenharmony_ci# define uInt z_uInt 1601cb0ef41Sopenharmony_ci# define uIntf z_uIntf 1611cb0ef41Sopenharmony_ci# define uLong z_uLong 1621cb0ef41Sopenharmony_ci# define uLongf z_uLongf 1631cb0ef41Sopenharmony_ci# define voidp z_voidp 1641cb0ef41Sopenharmony_ci# define voidpc z_voidpc 1651cb0ef41Sopenharmony_ci# define voidpf z_voidpf 1661cb0ef41Sopenharmony_ci 1671cb0ef41Sopenharmony_ci/* all zlib structs in zlib.h and zconf.h */ 1681cb0ef41Sopenharmony_ci# define gz_header_s z_gz_header_s 1691cb0ef41Sopenharmony_ci# define internal_state z_internal_state 1701cb0ef41Sopenharmony_ci 1711cb0ef41Sopenharmony_ci#endif 1721cb0ef41Sopenharmony_ci 1731cb0ef41Sopenharmony_ci#if defined(__MSDOS__) && !defined(MSDOS) 1741cb0ef41Sopenharmony_ci# define MSDOS 1751cb0ef41Sopenharmony_ci#endif 1761cb0ef41Sopenharmony_ci#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2) 1771cb0ef41Sopenharmony_ci# define OS2 1781cb0ef41Sopenharmony_ci#endif 1791cb0ef41Sopenharmony_ci#if defined(_WINDOWS) && !defined(WINDOWS) 1801cb0ef41Sopenharmony_ci# define WINDOWS 1811cb0ef41Sopenharmony_ci#endif 1821cb0ef41Sopenharmony_ci#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__) 1831cb0ef41Sopenharmony_ci# ifndef WIN32 1841cb0ef41Sopenharmony_ci# define WIN32 1851cb0ef41Sopenharmony_ci# endif 1861cb0ef41Sopenharmony_ci#endif 1871cb0ef41Sopenharmony_ci#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32) 1881cb0ef41Sopenharmony_ci# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__) 1891cb0ef41Sopenharmony_ci# ifndef SYS16BIT 1901cb0ef41Sopenharmony_ci# define SYS16BIT 1911cb0ef41Sopenharmony_ci# endif 1921cb0ef41Sopenharmony_ci# endif 1931cb0ef41Sopenharmony_ci#endif 1941cb0ef41Sopenharmony_ci 1951cb0ef41Sopenharmony_ci/* 1961cb0ef41Sopenharmony_ci * Compile with -DMAXSEG_64K if the alloc function cannot allocate more 1971cb0ef41Sopenharmony_ci * than 64k bytes at a time (needed on systems with 16-bit int). 1981cb0ef41Sopenharmony_ci */ 1991cb0ef41Sopenharmony_ci#ifdef SYS16BIT 2001cb0ef41Sopenharmony_ci# define MAXSEG_64K 2011cb0ef41Sopenharmony_ci#endif 2021cb0ef41Sopenharmony_ci#ifdef MSDOS 2031cb0ef41Sopenharmony_ci# define UNALIGNED_OK 2041cb0ef41Sopenharmony_ci#endif 2051cb0ef41Sopenharmony_ci 2061cb0ef41Sopenharmony_ci#ifdef __STDC_VERSION__ 2071cb0ef41Sopenharmony_ci# ifndef STDC 2081cb0ef41Sopenharmony_ci# define STDC 2091cb0ef41Sopenharmony_ci# endif 2101cb0ef41Sopenharmony_ci# if __STDC_VERSION__ >= 199901L 2111cb0ef41Sopenharmony_ci# ifndef STDC99 2121cb0ef41Sopenharmony_ci# define STDC99 2131cb0ef41Sopenharmony_ci# endif 2141cb0ef41Sopenharmony_ci# endif 2151cb0ef41Sopenharmony_ci#endif 2161cb0ef41Sopenharmony_ci#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus)) 2171cb0ef41Sopenharmony_ci# define STDC 2181cb0ef41Sopenharmony_ci#endif 2191cb0ef41Sopenharmony_ci#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__)) 2201cb0ef41Sopenharmony_ci# define STDC 2211cb0ef41Sopenharmony_ci#endif 2221cb0ef41Sopenharmony_ci#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32)) 2231cb0ef41Sopenharmony_ci# define STDC 2241cb0ef41Sopenharmony_ci#endif 2251cb0ef41Sopenharmony_ci#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__)) 2261cb0ef41Sopenharmony_ci# define STDC 2271cb0ef41Sopenharmony_ci#endif 2281cb0ef41Sopenharmony_ci 2291cb0ef41Sopenharmony_ci#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */ 2301cb0ef41Sopenharmony_ci# define STDC 2311cb0ef41Sopenharmony_ci#endif 2321cb0ef41Sopenharmony_ci 2331cb0ef41Sopenharmony_ci#ifndef STDC 2341cb0ef41Sopenharmony_ci# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */ 2351cb0ef41Sopenharmony_ci# define const /* note: need a more gentle solution here */ 2361cb0ef41Sopenharmony_ci# endif 2371cb0ef41Sopenharmony_ci#endif 2381cb0ef41Sopenharmony_ci 2391cb0ef41Sopenharmony_ci#if defined(ZLIB_CONST) && !defined(z_const) 2401cb0ef41Sopenharmony_ci# define z_const const 2411cb0ef41Sopenharmony_ci#else 2421cb0ef41Sopenharmony_ci# define z_const 2431cb0ef41Sopenharmony_ci#endif 2441cb0ef41Sopenharmony_ci 2451cb0ef41Sopenharmony_ci#ifdef Z_SOLO 2461cb0ef41Sopenharmony_ci# ifdef _WIN64 2471cb0ef41Sopenharmony_ci typedef unsigned long long z_size_t; 2481cb0ef41Sopenharmony_ci# else 2491cb0ef41Sopenharmony_ci typedef unsigned long z_size_t; 2501cb0ef41Sopenharmony_ci# endif 2511cb0ef41Sopenharmony_ci#else 2521cb0ef41Sopenharmony_ci# define z_longlong long long 2531cb0ef41Sopenharmony_ci# if defined(NO_SIZE_T) 2541cb0ef41Sopenharmony_ci typedef unsigned NO_SIZE_T z_size_t; 2551cb0ef41Sopenharmony_ci# elif defined(STDC) 2561cb0ef41Sopenharmony_ci# include <stddef.h> 2571cb0ef41Sopenharmony_ci typedef size_t z_size_t; 2581cb0ef41Sopenharmony_ci# else 2591cb0ef41Sopenharmony_ci typedef unsigned long z_size_t; 2601cb0ef41Sopenharmony_ci# endif 2611cb0ef41Sopenharmony_ci# undef z_longlong 2621cb0ef41Sopenharmony_ci#endif 2631cb0ef41Sopenharmony_ci 2641cb0ef41Sopenharmony_ci/* Maximum value for memLevel in deflateInit2 */ 2651cb0ef41Sopenharmony_ci#ifndef MAX_MEM_LEVEL 2661cb0ef41Sopenharmony_ci# ifdef MAXSEG_64K 2671cb0ef41Sopenharmony_ci# define MAX_MEM_LEVEL 8 2681cb0ef41Sopenharmony_ci# else 2691cb0ef41Sopenharmony_ci# define MAX_MEM_LEVEL 9 2701cb0ef41Sopenharmony_ci# endif 2711cb0ef41Sopenharmony_ci#endif 2721cb0ef41Sopenharmony_ci 2731cb0ef41Sopenharmony_ci/* Maximum value for windowBits in deflateInit2 and inflateInit2. 2741cb0ef41Sopenharmony_ci * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files 2751cb0ef41Sopenharmony_ci * created by gzip. (Files created by minigzip can still be extracted by 2761cb0ef41Sopenharmony_ci * gzip.) 2771cb0ef41Sopenharmony_ci */ 2781cb0ef41Sopenharmony_ci#ifndef MAX_WBITS 2791cb0ef41Sopenharmony_ci# define MAX_WBITS 15 /* 32K LZ77 window */ 2801cb0ef41Sopenharmony_ci#endif 2811cb0ef41Sopenharmony_ci 2821cb0ef41Sopenharmony_ci/* The memory requirements for deflate are (in bytes): 2831cb0ef41Sopenharmony_ci (1 << (windowBits+2)) + (1 << (memLevel+9)) 2841cb0ef41Sopenharmony_ci that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) 2851cb0ef41Sopenharmony_ci plus a few kilobytes for small objects. For example, if you want to reduce 2861cb0ef41Sopenharmony_ci the default memory requirements from 256K to 128K, compile with 2871cb0ef41Sopenharmony_ci make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" 2881cb0ef41Sopenharmony_ci Of course this will generally degrade compression (there's no free lunch). 2891cb0ef41Sopenharmony_ci 2901cb0ef41Sopenharmony_ci The memory requirements for inflate are (in bytes) 1 << windowBits 2911cb0ef41Sopenharmony_ci that is, 32K for windowBits=15 (default value) plus about 7 kilobytes 2921cb0ef41Sopenharmony_ci for small objects. 2931cb0ef41Sopenharmony_ci*/ 2941cb0ef41Sopenharmony_ci 2951cb0ef41Sopenharmony_ci /* Type declarations */ 2961cb0ef41Sopenharmony_ci 2971cb0ef41Sopenharmony_ci#ifndef OF /* function prototypes */ 2981cb0ef41Sopenharmony_ci# ifdef STDC 2991cb0ef41Sopenharmony_ci# define OF(args) args 3001cb0ef41Sopenharmony_ci# else 3011cb0ef41Sopenharmony_ci# define OF(args) () 3021cb0ef41Sopenharmony_ci# endif 3031cb0ef41Sopenharmony_ci#endif 3041cb0ef41Sopenharmony_ci 3051cb0ef41Sopenharmony_ci#ifndef Z_ARG /* function prototypes for stdarg */ 3061cb0ef41Sopenharmony_ci# if defined(STDC) || defined(Z_HAVE_STDARG_H) 3071cb0ef41Sopenharmony_ci# define Z_ARG(args) args 3081cb0ef41Sopenharmony_ci# else 3091cb0ef41Sopenharmony_ci# define Z_ARG(args) () 3101cb0ef41Sopenharmony_ci# endif 3111cb0ef41Sopenharmony_ci#endif 3121cb0ef41Sopenharmony_ci 3131cb0ef41Sopenharmony_ci/* The following definitions for FAR are needed only for MSDOS mixed 3141cb0ef41Sopenharmony_ci * model programming (small or medium model with some far allocations). 3151cb0ef41Sopenharmony_ci * This was tested only with MSC; for other MSDOS compilers you may have 3161cb0ef41Sopenharmony_ci * to define NO_MEMCPY in zutil.h. If you don't need the mixed model, 3171cb0ef41Sopenharmony_ci * just define FAR to be empty. 3181cb0ef41Sopenharmony_ci */ 3191cb0ef41Sopenharmony_ci#ifdef SYS16BIT 3201cb0ef41Sopenharmony_ci# if defined(M_I86SM) || defined(M_I86MM) 3211cb0ef41Sopenharmony_ci /* MSC small or medium model */ 3221cb0ef41Sopenharmony_ci# define SMALL_MEDIUM 3231cb0ef41Sopenharmony_ci# ifdef _MSC_VER 3241cb0ef41Sopenharmony_ci# define FAR _far 3251cb0ef41Sopenharmony_ci# else 3261cb0ef41Sopenharmony_ci# define FAR far 3271cb0ef41Sopenharmony_ci# endif 3281cb0ef41Sopenharmony_ci# endif 3291cb0ef41Sopenharmony_ci# if (defined(__SMALL__) || defined(__MEDIUM__)) 3301cb0ef41Sopenharmony_ci /* Turbo C small or medium model */ 3311cb0ef41Sopenharmony_ci# define SMALL_MEDIUM 3321cb0ef41Sopenharmony_ci# ifdef __BORLANDC__ 3331cb0ef41Sopenharmony_ci# define FAR _far 3341cb0ef41Sopenharmony_ci# else 3351cb0ef41Sopenharmony_ci# define FAR far 3361cb0ef41Sopenharmony_ci# endif 3371cb0ef41Sopenharmony_ci# endif 3381cb0ef41Sopenharmony_ci#endif 3391cb0ef41Sopenharmony_ci 3401cb0ef41Sopenharmony_ci#if defined(WINDOWS) || defined(WIN32) 3411cb0ef41Sopenharmony_ci /* If building or using zlib as a DLL, define ZLIB_DLL. 3421cb0ef41Sopenharmony_ci * This is not mandatory, but it offers a little performance increase. 3431cb0ef41Sopenharmony_ci */ 3441cb0ef41Sopenharmony_ci# ifdef ZLIB_DLL 3451cb0ef41Sopenharmony_ci# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500)) 3461cb0ef41Sopenharmony_ci# ifdef ZLIB_INTERNAL 3471cb0ef41Sopenharmony_ci# define ZEXTERN extern __declspec(dllexport) 3481cb0ef41Sopenharmony_ci# else 3491cb0ef41Sopenharmony_ci# define ZEXTERN extern __declspec(dllimport) 3501cb0ef41Sopenharmony_ci# endif 3511cb0ef41Sopenharmony_ci# endif 3521cb0ef41Sopenharmony_ci# endif /* ZLIB_DLL */ 3531cb0ef41Sopenharmony_ci /* If building or using zlib with the WINAPI/WINAPIV calling convention, 3541cb0ef41Sopenharmony_ci * define ZLIB_WINAPI. 3551cb0ef41Sopenharmony_ci * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI. 3561cb0ef41Sopenharmony_ci */ 3571cb0ef41Sopenharmony_ci# ifdef ZLIB_WINAPI 3581cb0ef41Sopenharmony_ci# ifdef FAR 3591cb0ef41Sopenharmony_ci# undef FAR 3601cb0ef41Sopenharmony_ci# endif 3611cb0ef41Sopenharmony_ci# ifndef WIN32_LEAN_AND_MEAN 3621cb0ef41Sopenharmony_ci# define WIN32_LEAN_AND_MEAN 3631cb0ef41Sopenharmony_ci# endif 3641cb0ef41Sopenharmony_ci# include <windows.h> 3651cb0ef41Sopenharmony_ci /* No need for _export, use ZLIB.DEF instead. */ 3661cb0ef41Sopenharmony_ci /* For complete Windows compatibility, use WINAPI, not __stdcall. */ 3671cb0ef41Sopenharmony_ci# define ZEXPORT WINAPI 3681cb0ef41Sopenharmony_ci# ifdef WIN32 3691cb0ef41Sopenharmony_ci# define ZEXPORTVA WINAPIV 3701cb0ef41Sopenharmony_ci# else 3711cb0ef41Sopenharmony_ci# define ZEXPORTVA FAR CDECL 3721cb0ef41Sopenharmony_ci# endif 3731cb0ef41Sopenharmony_ci# endif 3741cb0ef41Sopenharmony_ci#endif 3751cb0ef41Sopenharmony_ci 3761cb0ef41Sopenharmony_ci#if defined (__BEOS__) 3771cb0ef41Sopenharmony_ci# ifdef ZLIB_DLL 3781cb0ef41Sopenharmony_ci# ifdef ZLIB_INTERNAL 3791cb0ef41Sopenharmony_ci# define ZEXPORT __declspec(dllexport) 3801cb0ef41Sopenharmony_ci# define ZEXPORTVA __declspec(dllexport) 3811cb0ef41Sopenharmony_ci# else 3821cb0ef41Sopenharmony_ci# define ZEXPORT __declspec(dllimport) 3831cb0ef41Sopenharmony_ci# define ZEXPORTVA __declspec(dllimport) 3841cb0ef41Sopenharmony_ci# endif 3851cb0ef41Sopenharmony_ci# endif 3861cb0ef41Sopenharmony_ci#endif 3871cb0ef41Sopenharmony_ci 3881cb0ef41Sopenharmony_ci#ifndef ZEXTERN 3891cb0ef41Sopenharmony_ci# define ZEXTERN extern 3901cb0ef41Sopenharmony_ci#endif 3911cb0ef41Sopenharmony_ci#ifndef ZEXPORT 3921cb0ef41Sopenharmony_ci# define ZEXPORT 3931cb0ef41Sopenharmony_ci#endif 3941cb0ef41Sopenharmony_ci#ifndef ZEXPORTVA 3951cb0ef41Sopenharmony_ci# define ZEXPORTVA 3961cb0ef41Sopenharmony_ci#endif 3971cb0ef41Sopenharmony_ci 3981cb0ef41Sopenharmony_ci#ifndef FAR 3991cb0ef41Sopenharmony_ci# define FAR 4001cb0ef41Sopenharmony_ci#endif 4011cb0ef41Sopenharmony_ci 4021cb0ef41Sopenharmony_ci#if !defined(__MACTYPES__) 4031cb0ef41Sopenharmony_citypedef unsigned char Byte; /* 8 bits */ 4041cb0ef41Sopenharmony_ci#endif 4051cb0ef41Sopenharmony_citypedef unsigned int uInt; /* 16 bits or more */ 4061cb0ef41Sopenharmony_citypedef unsigned long uLong; /* 32 bits or more */ 4071cb0ef41Sopenharmony_ci 4081cb0ef41Sopenharmony_ci#ifdef SMALL_MEDIUM 4091cb0ef41Sopenharmony_ci /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */ 4101cb0ef41Sopenharmony_ci# define Bytef Byte FAR 4111cb0ef41Sopenharmony_ci#else 4121cb0ef41Sopenharmony_ci typedef Byte FAR Bytef; 4131cb0ef41Sopenharmony_ci#endif 4141cb0ef41Sopenharmony_citypedef char FAR charf; 4151cb0ef41Sopenharmony_citypedef int FAR intf; 4161cb0ef41Sopenharmony_citypedef uInt FAR uIntf; 4171cb0ef41Sopenharmony_citypedef uLong FAR uLongf; 4181cb0ef41Sopenharmony_ci 4191cb0ef41Sopenharmony_ci#ifdef STDC 4201cb0ef41Sopenharmony_ci typedef void const *voidpc; 4211cb0ef41Sopenharmony_ci typedef void FAR *voidpf; 4221cb0ef41Sopenharmony_ci typedef void *voidp; 4231cb0ef41Sopenharmony_ci#else 4241cb0ef41Sopenharmony_ci typedef Byte const *voidpc; 4251cb0ef41Sopenharmony_ci typedef Byte FAR *voidpf; 4261cb0ef41Sopenharmony_ci typedef Byte *voidp; 4271cb0ef41Sopenharmony_ci#endif 4281cb0ef41Sopenharmony_ci 4291cb0ef41Sopenharmony_ci#if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC) 4301cb0ef41Sopenharmony_ci# include <limits.h> 4311cb0ef41Sopenharmony_ci# if (UINT_MAX == 0xffffffffUL) 4321cb0ef41Sopenharmony_ci# define Z_U4 unsigned 4331cb0ef41Sopenharmony_ci# elif (ULONG_MAX == 0xffffffffUL) 4341cb0ef41Sopenharmony_ci# define Z_U4 unsigned long 4351cb0ef41Sopenharmony_ci# elif (USHRT_MAX == 0xffffffffUL) 4361cb0ef41Sopenharmony_ci# define Z_U4 unsigned short 4371cb0ef41Sopenharmony_ci# endif 4381cb0ef41Sopenharmony_ci#endif 4391cb0ef41Sopenharmony_ci 4401cb0ef41Sopenharmony_ci#ifdef Z_U4 4411cb0ef41Sopenharmony_ci typedef Z_U4 z_crc_t; 4421cb0ef41Sopenharmony_ci#else 4431cb0ef41Sopenharmony_ci typedef unsigned long z_crc_t; 4441cb0ef41Sopenharmony_ci#endif 4451cb0ef41Sopenharmony_ci 4461cb0ef41Sopenharmony_ci#ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */ 4471cb0ef41Sopenharmony_ci# define Z_HAVE_UNISTD_H 4481cb0ef41Sopenharmony_ci#endif 4491cb0ef41Sopenharmony_ci 4501cb0ef41Sopenharmony_ci#ifdef HAVE_STDARG_H /* may be set to #if 1 by ./configure */ 4511cb0ef41Sopenharmony_ci# define Z_HAVE_STDARG_H 4521cb0ef41Sopenharmony_ci#endif 4531cb0ef41Sopenharmony_ci 4541cb0ef41Sopenharmony_ci#ifdef STDC 4551cb0ef41Sopenharmony_ci# ifndef Z_SOLO 4561cb0ef41Sopenharmony_ci# include <sys/types.h> /* for off_t */ 4571cb0ef41Sopenharmony_ci# endif 4581cb0ef41Sopenharmony_ci#endif 4591cb0ef41Sopenharmony_ci 4601cb0ef41Sopenharmony_ci#if defined(STDC) || defined(Z_HAVE_STDARG_H) 4611cb0ef41Sopenharmony_ci# ifndef Z_SOLO 4621cb0ef41Sopenharmony_ci# include <stdarg.h> /* for va_list */ 4631cb0ef41Sopenharmony_ci# endif 4641cb0ef41Sopenharmony_ci#endif 4651cb0ef41Sopenharmony_ci 4661cb0ef41Sopenharmony_ci#ifdef _WIN32 4671cb0ef41Sopenharmony_ci# ifndef Z_SOLO 4681cb0ef41Sopenharmony_ci# include <stddef.h> /* for wchar_t */ 4691cb0ef41Sopenharmony_ci# endif 4701cb0ef41Sopenharmony_ci#endif 4711cb0ef41Sopenharmony_ci 4721cb0ef41Sopenharmony_ci/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and 4731cb0ef41Sopenharmony_ci * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even 4741cb0ef41Sopenharmony_ci * though the former does not conform to the LFS document), but considering 4751cb0ef41Sopenharmony_ci * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as 4761cb0ef41Sopenharmony_ci * equivalently requesting no 64-bit operations 4771cb0ef41Sopenharmony_ci */ 4781cb0ef41Sopenharmony_ci#if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1 4791cb0ef41Sopenharmony_ci# undef _LARGEFILE64_SOURCE 4801cb0ef41Sopenharmony_ci#endif 4811cb0ef41Sopenharmony_ci 4821cb0ef41Sopenharmony_ci#ifndef Z_HAVE_UNISTD_H 4831cb0ef41Sopenharmony_ci# ifdef __WATCOMC__ 4841cb0ef41Sopenharmony_ci# define Z_HAVE_UNISTD_H 4851cb0ef41Sopenharmony_ci# endif 4861cb0ef41Sopenharmony_ci#endif 4871cb0ef41Sopenharmony_ci#ifndef Z_HAVE_UNISTD_H 4881cb0ef41Sopenharmony_ci# if defined(_LARGEFILE64_SOURCE) && !defined(_WIN32) 4891cb0ef41Sopenharmony_ci# define Z_HAVE_UNISTD_H 4901cb0ef41Sopenharmony_ci# endif 4911cb0ef41Sopenharmony_ci#endif 4921cb0ef41Sopenharmony_ci#ifndef Z_SOLO 4931cb0ef41Sopenharmony_ci# if defined(Z_HAVE_UNISTD_H) 4941cb0ef41Sopenharmony_ci# include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */ 4951cb0ef41Sopenharmony_ci# ifdef VMS 4961cb0ef41Sopenharmony_ci# include <unixio.h> /* for off_t */ 4971cb0ef41Sopenharmony_ci# endif 4981cb0ef41Sopenharmony_ci# ifndef z_off_t 4991cb0ef41Sopenharmony_ci# define z_off_t off_t 5001cb0ef41Sopenharmony_ci# endif 5011cb0ef41Sopenharmony_ci# endif 5021cb0ef41Sopenharmony_ci#endif 5031cb0ef41Sopenharmony_ci 5041cb0ef41Sopenharmony_ci#if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0 5051cb0ef41Sopenharmony_ci# define Z_LFS64 5061cb0ef41Sopenharmony_ci#endif 5071cb0ef41Sopenharmony_ci 5081cb0ef41Sopenharmony_ci#if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64) 5091cb0ef41Sopenharmony_ci# define Z_LARGE64 5101cb0ef41Sopenharmony_ci#endif 5111cb0ef41Sopenharmony_ci 5121cb0ef41Sopenharmony_ci#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64) 5131cb0ef41Sopenharmony_ci# define Z_WANT64 5141cb0ef41Sopenharmony_ci#endif 5151cb0ef41Sopenharmony_ci 5161cb0ef41Sopenharmony_ci#if !defined(SEEK_SET) && !defined(Z_SOLO) 5171cb0ef41Sopenharmony_ci# define SEEK_SET 0 /* Seek from beginning of file. */ 5181cb0ef41Sopenharmony_ci# define SEEK_CUR 1 /* Seek from current position. */ 5191cb0ef41Sopenharmony_ci# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */ 5201cb0ef41Sopenharmony_ci#endif 5211cb0ef41Sopenharmony_ci 5221cb0ef41Sopenharmony_ci#ifndef z_off_t 5231cb0ef41Sopenharmony_ci# define z_off_t long 5241cb0ef41Sopenharmony_ci#endif 5251cb0ef41Sopenharmony_ci 5261cb0ef41Sopenharmony_ci#if !defined(_WIN32) && defined(Z_LARGE64) 5271cb0ef41Sopenharmony_ci# define z_off64_t off64_t 5281cb0ef41Sopenharmony_ci#else 5291cb0ef41Sopenharmony_ci# if defined(_WIN32) && !defined(__GNUC__) 5301cb0ef41Sopenharmony_ci# define z_off64_t __int64 5311cb0ef41Sopenharmony_ci# else 5321cb0ef41Sopenharmony_ci# define z_off64_t z_off_t 5331cb0ef41Sopenharmony_ci# endif 5341cb0ef41Sopenharmony_ci#endif 5351cb0ef41Sopenharmony_ci 5361cb0ef41Sopenharmony_ci/* MVS linker does not support external names larger than 8 bytes */ 5371cb0ef41Sopenharmony_ci#if defined(__MVS__) 5381cb0ef41Sopenharmony_ci #pragma map(deflateInit_,"DEIN") 5391cb0ef41Sopenharmony_ci #pragma map(deflateInit2_,"DEIN2") 5401cb0ef41Sopenharmony_ci #pragma map(deflateEnd,"DEEND") 5411cb0ef41Sopenharmony_ci #pragma map(deflateBound,"DEBND") 5421cb0ef41Sopenharmony_ci #pragma map(inflateInit_,"ININ") 5431cb0ef41Sopenharmony_ci #pragma map(inflateInit2_,"ININ2") 5441cb0ef41Sopenharmony_ci #pragma map(inflateEnd,"INEND") 5451cb0ef41Sopenharmony_ci #pragma map(inflateSync,"INSY") 5461cb0ef41Sopenharmony_ci #pragma map(inflateSetDictionary,"INSEDI") 5471cb0ef41Sopenharmony_ci #pragma map(compressBound,"CMBND") 5481cb0ef41Sopenharmony_ci #pragma map(inflate_table,"INTABL") 5491cb0ef41Sopenharmony_ci #pragma map(inflate_fast,"INFA") 5501cb0ef41Sopenharmony_ci #pragma map(inflate_copyright,"INCOPY") 5511cb0ef41Sopenharmony_ci#endif 5521cb0ef41Sopenharmony_ci 5531cb0ef41Sopenharmony_ci#endif /* ZCONF_H */ 554