1275793eaSopenharmony_ci/* zconf.h -- configuration of the zlib compression library 2275793eaSopenharmony_ci * Copyright (C) 1995-2024 Jean-loup Gailly, Mark Adler 3275793eaSopenharmony_ci * For conditions of distribution and use, see copyright notice in zlib.h 4275793eaSopenharmony_ci */ 5275793eaSopenharmony_ci 6275793eaSopenharmony_ci/* @(#) $Id$ */ 7275793eaSopenharmony_ci 8275793eaSopenharmony_ci#ifndef ZCONF_H 9275793eaSopenharmony_ci#define ZCONF_H 10275793eaSopenharmony_ci#cmakedefine Z_PREFIX 11275793eaSopenharmony_ci#cmakedefine Z_HAVE_UNISTD_H 12275793eaSopenharmony_ci 13275793eaSopenharmony_ci/* 14275793eaSopenharmony_ci * If you *really* need a unique prefix for all types and library functions, 15275793eaSopenharmony_ci * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. 16275793eaSopenharmony_ci * Even better than compiling with -DZ_PREFIX would be to use configure to set 17275793eaSopenharmony_ci * this permanently in zconf.h using "./configure --zprefix". 18275793eaSopenharmony_ci */ 19275793eaSopenharmony_ci#ifdef Z_PREFIX /* may be set to #if 1 by ./configure */ 20275793eaSopenharmony_ci# define Z_PREFIX_SET 21275793eaSopenharmony_ci 22275793eaSopenharmony_ci/* all linked symbols and init macros */ 23275793eaSopenharmony_ci# define _dist_code z__dist_code 24275793eaSopenharmony_ci# define _length_code z__length_code 25275793eaSopenharmony_ci# define _tr_align z__tr_align 26275793eaSopenharmony_ci# define _tr_flush_bits z__tr_flush_bits 27275793eaSopenharmony_ci# define _tr_flush_block z__tr_flush_block 28275793eaSopenharmony_ci# define _tr_init z__tr_init 29275793eaSopenharmony_ci# define _tr_stored_block z__tr_stored_block 30275793eaSopenharmony_ci# define _tr_tally z__tr_tally 31275793eaSopenharmony_ci# define adler32 z_adler32 32275793eaSopenharmony_ci# define adler32_combine z_adler32_combine 33275793eaSopenharmony_ci# define adler32_combine64 z_adler32_combine64 34275793eaSopenharmony_ci# define adler32_z z_adler32_z 35275793eaSopenharmony_ci# ifndef Z_SOLO 36275793eaSopenharmony_ci# define compress z_compress 37275793eaSopenharmony_ci# define compress2 z_compress2 38275793eaSopenharmony_ci# define compressBound z_compressBound 39275793eaSopenharmony_ci# endif 40275793eaSopenharmony_ci# define crc32 z_crc32 41275793eaSopenharmony_ci# define crc32_combine z_crc32_combine 42275793eaSopenharmony_ci# define crc32_combine64 z_crc32_combine64 43275793eaSopenharmony_ci# define crc32_combine_gen z_crc32_combine_gen 44275793eaSopenharmony_ci# define crc32_combine_gen64 z_crc32_combine_gen64 45275793eaSopenharmony_ci# define crc32_combine_op z_crc32_combine_op 46275793eaSopenharmony_ci# define crc32_z z_crc32_z 47275793eaSopenharmony_ci# define deflate z_deflate 48275793eaSopenharmony_ci# define deflateBound z_deflateBound 49275793eaSopenharmony_ci# define deflateCopy z_deflateCopy 50275793eaSopenharmony_ci# define deflateEnd z_deflateEnd 51275793eaSopenharmony_ci# define deflateGetDictionary z_deflateGetDictionary 52275793eaSopenharmony_ci# define deflateInit z_deflateInit 53275793eaSopenharmony_ci# define deflateInit2 z_deflateInit2 54275793eaSopenharmony_ci# define deflateInit2_ z_deflateInit2_ 55275793eaSopenharmony_ci# define deflateInit_ z_deflateInit_ 56275793eaSopenharmony_ci# define deflateParams z_deflateParams 57275793eaSopenharmony_ci# define deflatePending z_deflatePending 58275793eaSopenharmony_ci# define deflatePrime z_deflatePrime 59275793eaSopenharmony_ci# define deflateReset z_deflateReset 60275793eaSopenharmony_ci# define deflateResetKeep z_deflateResetKeep 61275793eaSopenharmony_ci# define deflateSetDictionary z_deflateSetDictionary 62275793eaSopenharmony_ci# define deflateSetHeader z_deflateSetHeader 63275793eaSopenharmony_ci# define deflateTune z_deflateTune 64275793eaSopenharmony_ci# define deflate_copyright z_deflate_copyright 65275793eaSopenharmony_ci# define get_crc_table z_get_crc_table 66275793eaSopenharmony_ci# ifndef Z_SOLO 67275793eaSopenharmony_ci# define gz_error z_gz_error 68275793eaSopenharmony_ci# define gz_intmax z_gz_intmax 69275793eaSopenharmony_ci# define gz_strwinerror z_gz_strwinerror 70275793eaSopenharmony_ci# define gzbuffer z_gzbuffer 71275793eaSopenharmony_ci# define gzclearerr z_gzclearerr 72275793eaSopenharmony_ci# define gzclose z_gzclose 73275793eaSopenharmony_ci# define gzclose_r z_gzclose_r 74275793eaSopenharmony_ci# define gzclose_w z_gzclose_w 75275793eaSopenharmony_ci# define gzdirect z_gzdirect 76275793eaSopenharmony_ci# define gzdopen z_gzdopen 77275793eaSopenharmony_ci# define gzeof z_gzeof 78275793eaSopenharmony_ci# define gzerror z_gzerror 79275793eaSopenharmony_ci# define gzflush z_gzflush 80275793eaSopenharmony_ci# define gzfread z_gzfread 81275793eaSopenharmony_ci# define gzfwrite z_gzfwrite 82275793eaSopenharmony_ci# define gzgetc z_gzgetc 83275793eaSopenharmony_ci# define gzgetc_ z_gzgetc_ 84275793eaSopenharmony_ci# define gzgets z_gzgets 85275793eaSopenharmony_ci# define gzoffset z_gzoffset 86275793eaSopenharmony_ci# define gzoffset64 z_gzoffset64 87275793eaSopenharmony_ci# define gzopen z_gzopen 88275793eaSopenharmony_ci# define gzopen64 z_gzopen64 89275793eaSopenharmony_ci# ifdef _WIN32 90275793eaSopenharmony_ci# define gzopen_w z_gzopen_w 91275793eaSopenharmony_ci# endif 92275793eaSopenharmony_ci# define gzprintf z_gzprintf 93275793eaSopenharmony_ci# define gzputc z_gzputc 94275793eaSopenharmony_ci# define gzputs z_gzputs 95275793eaSopenharmony_ci# define gzread z_gzread 96275793eaSopenharmony_ci# define gzrewind z_gzrewind 97275793eaSopenharmony_ci# define gzseek z_gzseek 98275793eaSopenharmony_ci# define gzseek64 z_gzseek64 99275793eaSopenharmony_ci# define gzsetparams z_gzsetparams 100275793eaSopenharmony_ci# define gztell z_gztell 101275793eaSopenharmony_ci# define gztell64 z_gztell64 102275793eaSopenharmony_ci# define gzungetc z_gzungetc 103275793eaSopenharmony_ci# define gzvprintf z_gzvprintf 104275793eaSopenharmony_ci# define gzwrite z_gzwrite 105275793eaSopenharmony_ci# endif 106275793eaSopenharmony_ci# define inflate z_inflate 107275793eaSopenharmony_ci# define inflateBack z_inflateBack 108275793eaSopenharmony_ci# define inflateBackEnd z_inflateBackEnd 109275793eaSopenharmony_ci# define inflateBackInit z_inflateBackInit 110275793eaSopenharmony_ci# define inflateBackInit_ z_inflateBackInit_ 111275793eaSopenharmony_ci# define inflateCodesUsed z_inflateCodesUsed 112275793eaSopenharmony_ci# define inflateCopy z_inflateCopy 113275793eaSopenharmony_ci# define inflateEnd z_inflateEnd 114275793eaSopenharmony_ci# define inflateGetDictionary z_inflateGetDictionary 115275793eaSopenharmony_ci# define inflateGetHeader z_inflateGetHeader 116275793eaSopenharmony_ci# define inflateInit z_inflateInit 117275793eaSopenharmony_ci# define inflateInit2 z_inflateInit2 118275793eaSopenharmony_ci# define inflateInit2_ z_inflateInit2_ 119275793eaSopenharmony_ci# define inflateInit_ z_inflateInit_ 120275793eaSopenharmony_ci# define inflateMark z_inflateMark 121275793eaSopenharmony_ci# define inflatePrime z_inflatePrime 122275793eaSopenharmony_ci# define inflateReset z_inflateReset 123275793eaSopenharmony_ci# define inflateReset2 z_inflateReset2 124275793eaSopenharmony_ci# define inflateResetKeep z_inflateResetKeep 125275793eaSopenharmony_ci# define inflateSetDictionary z_inflateSetDictionary 126275793eaSopenharmony_ci# define inflateSync z_inflateSync 127275793eaSopenharmony_ci# define inflateSyncPoint z_inflateSyncPoint 128275793eaSopenharmony_ci# define inflateUndermine z_inflateUndermine 129275793eaSopenharmony_ci# define inflateValidate z_inflateValidate 130275793eaSopenharmony_ci# define inflate_copyright z_inflate_copyright 131275793eaSopenharmony_ci# define inflate_fast z_inflate_fast 132275793eaSopenharmony_ci# define inflate_table z_inflate_table 133275793eaSopenharmony_ci# ifndef Z_SOLO 134275793eaSopenharmony_ci# define uncompress z_uncompress 135275793eaSopenharmony_ci# define uncompress2 z_uncompress2 136275793eaSopenharmony_ci# endif 137275793eaSopenharmony_ci# define zError z_zError 138275793eaSopenharmony_ci# ifndef Z_SOLO 139275793eaSopenharmony_ci# define zcalloc z_zcalloc 140275793eaSopenharmony_ci# define zcfree z_zcfree 141275793eaSopenharmony_ci# endif 142275793eaSopenharmony_ci# define zlibCompileFlags z_zlibCompileFlags 143275793eaSopenharmony_ci# define zlibVersion z_zlibVersion 144275793eaSopenharmony_ci 145275793eaSopenharmony_ci/* all zlib typedefs in zlib.h and zconf.h */ 146275793eaSopenharmony_ci# define Byte z_Byte 147275793eaSopenharmony_ci# define Bytef z_Bytef 148275793eaSopenharmony_ci# define alloc_func z_alloc_func 149275793eaSopenharmony_ci# define charf z_charf 150275793eaSopenharmony_ci# define free_func z_free_func 151275793eaSopenharmony_ci# ifndef Z_SOLO 152275793eaSopenharmony_ci# define gzFile z_gzFile 153275793eaSopenharmony_ci# endif 154275793eaSopenharmony_ci# define gz_header z_gz_header 155275793eaSopenharmony_ci# define gz_headerp z_gz_headerp 156275793eaSopenharmony_ci# define in_func z_in_func 157275793eaSopenharmony_ci# define intf z_intf 158275793eaSopenharmony_ci# define out_func z_out_func 159275793eaSopenharmony_ci# define uInt z_uInt 160275793eaSopenharmony_ci# define uIntf z_uIntf 161275793eaSopenharmony_ci# define uLong z_uLong 162275793eaSopenharmony_ci# define uLongf z_uLongf 163275793eaSopenharmony_ci# define voidp z_voidp 164275793eaSopenharmony_ci# define voidpc z_voidpc 165275793eaSopenharmony_ci# define voidpf z_voidpf 166275793eaSopenharmony_ci 167275793eaSopenharmony_ci/* all zlib structs in zlib.h and zconf.h */ 168275793eaSopenharmony_ci# define gz_header_s z_gz_header_s 169275793eaSopenharmony_ci# define internal_state z_internal_state 170275793eaSopenharmony_ci 171275793eaSopenharmony_ci#endif 172275793eaSopenharmony_ci 173275793eaSopenharmony_ci#if defined(__MSDOS__) && !defined(MSDOS) 174275793eaSopenharmony_ci# define MSDOS 175275793eaSopenharmony_ci#endif 176275793eaSopenharmony_ci#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2) 177275793eaSopenharmony_ci# define OS2 178275793eaSopenharmony_ci#endif 179275793eaSopenharmony_ci#if defined(_WINDOWS) && !defined(WINDOWS) 180275793eaSopenharmony_ci# define WINDOWS 181275793eaSopenharmony_ci#endif 182275793eaSopenharmony_ci#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__) 183275793eaSopenharmony_ci# ifndef WIN32 184275793eaSopenharmony_ci# define WIN32 185275793eaSopenharmony_ci# endif 186275793eaSopenharmony_ci#endif 187275793eaSopenharmony_ci#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32) 188275793eaSopenharmony_ci# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__) 189275793eaSopenharmony_ci# ifndef SYS16BIT 190275793eaSopenharmony_ci# define SYS16BIT 191275793eaSopenharmony_ci# endif 192275793eaSopenharmony_ci# endif 193275793eaSopenharmony_ci#endif 194275793eaSopenharmony_ci 195275793eaSopenharmony_ci/* 196275793eaSopenharmony_ci * Compile with -DMAXSEG_64K if the alloc function cannot allocate more 197275793eaSopenharmony_ci * than 64k bytes at a time (needed on systems with 16-bit int). 198275793eaSopenharmony_ci */ 199275793eaSopenharmony_ci#ifdef SYS16BIT 200275793eaSopenharmony_ci# define MAXSEG_64K 201275793eaSopenharmony_ci#endif 202275793eaSopenharmony_ci#ifdef MSDOS 203275793eaSopenharmony_ci# define UNALIGNED_OK 204275793eaSopenharmony_ci#endif 205275793eaSopenharmony_ci 206275793eaSopenharmony_ci#ifdef __STDC_VERSION__ 207275793eaSopenharmony_ci# ifndef STDC 208275793eaSopenharmony_ci# define STDC 209275793eaSopenharmony_ci# endif 210275793eaSopenharmony_ci# if __STDC_VERSION__ >= 199901L 211275793eaSopenharmony_ci# ifndef STDC99 212275793eaSopenharmony_ci# define STDC99 213275793eaSopenharmony_ci# endif 214275793eaSopenharmony_ci# endif 215275793eaSopenharmony_ci#endif 216275793eaSopenharmony_ci#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus)) 217275793eaSopenharmony_ci# define STDC 218275793eaSopenharmony_ci#endif 219275793eaSopenharmony_ci#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__)) 220275793eaSopenharmony_ci# define STDC 221275793eaSopenharmony_ci#endif 222275793eaSopenharmony_ci#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32)) 223275793eaSopenharmony_ci# define STDC 224275793eaSopenharmony_ci#endif 225275793eaSopenharmony_ci#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__)) 226275793eaSopenharmony_ci# define STDC 227275793eaSopenharmony_ci#endif 228275793eaSopenharmony_ci 229275793eaSopenharmony_ci#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */ 230275793eaSopenharmony_ci# define STDC 231275793eaSopenharmony_ci#endif 232275793eaSopenharmony_ci 233275793eaSopenharmony_ci#ifndef STDC 234275793eaSopenharmony_ci# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */ 235275793eaSopenharmony_ci# define const /* note: need a more gentle solution here */ 236275793eaSopenharmony_ci# endif 237275793eaSopenharmony_ci#endif 238275793eaSopenharmony_ci 239275793eaSopenharmony_ci#if defined(ZLIB_CONST) && !defined(z_const) 240275793eaSopenharmony_ci# define z_const const 241275793eaSopenharmony_ci#else 242275793eaSopenharmony_ci# define z_const 243275793eaSopenharmony_ci#endif 244275793eaSopenharmony_ci 245275793eaSopenharmony_ci#ifdef Z_SOLO 246275793eaSopenharmony_ci# ifdef _WIN64 247275793eaSopenharmony_ci typedef unsigned long long z_size_t; 248275793eaSopenharmony_ci# else 249275793eaSopenharmony_ci typedef unsigned long z_size_t; 250275793eaSopenharmony_ci# endif 251275793eaSopenharmony_ci#else 252275793eaSopenharmony_ci# define z_longlong long long 253275793eaSopenharmony_ci# if defined(NO_SIZE_T) 254275793eaSopenharmony_ci typedef unsigned NO_SIZE_T z_size_t; 255275793eaSopenharmony_ci# elif defined(STDC) 256275793eaSopenharmony_ci# include <stddef.h> 257275793eaSopenharmony_ci typedef size_t z_size_t; 258275793eaSopenharmony_ci# else 259275793eaSopenharmony_ci typedef unsigned long z_size_t; 260275793eaSopenharmony_ci# endif 261275793eaSopenharmony_ci# undef z_longlong 262275793eaSopenharmony_ci#endif 263275793eaSopenharmony_ci 264275793eaSopenharmony_ci/* Maximum value for memLevel in deflateInit2 */ 265275793eaSopenharmony_ci#ifndef MAX_MEM_LEVEL 266275793eaSopenharmony_ci# ifdef MAXSEG_64K 267275793eaSopenharmony_ci# define MAX_MEM_LEVEL 8 268275793eaSopenharmony_ci# else 269275793eaSopenharmony_ci# define MAX_MEM_LEVEL 9 270275793eaSopenharmony_ci# endif 271275793eaSopenharmony_ci#endif 272275793eaSopenharmony_ci 273275793eaSopenharmony_ci/* Maximum value for windowBits in deflateInit2 and inflateInit2. 274275793eaSopenharmony_ci * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files 275275793eaSopenharmony_ci * created by gzip. (Files created by minigzip can still be extracted by 276275793eaSopenharmony_ci * gzip.) 277275793eaSopenharmony_ci */ 278275793eaSopenharmony_ci#ifndef MAX_WBITS 279275793eaSopenharmony_ci# define MAX_WBITS 15 /* 32K LZ77 window */ 280275793eaSopenharmony_ci#endif 281275793eaSopenharmony_ci 282275793eaSopenharmony_ci/* The memory requirements for deflate are (in bytes): 283275793eaSopenharmony_ci (1 << (windowBits+2)) + (1 << (memLevel+9)) 284275793eaSopenharmony_ci that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) 285275793eaSopenharmony_ci plus a few kilobytes for small objects. For example, if you want to reduce 286275793eaSopenharmony_ci the default memory requirements from 256K to 128K, compile with 287275793eaSopenharmony_ci make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" 288275793eaSopenharmony_ci Of course this will generally degrade compression (there's no free lunch). 289275793eaSopenharmony_ci 290275793eaSopenharmony_ci The memory requirements for inflate are (in bytes) 1 << windowBits 291275793eaSopenharmony_ci that is, 32K for windowBits=15 (default value) plus about 7 kilobytes 292275793eaSopenharmony_ci for small objects. 293275793eaSopenharmony_ci*/ 294275793eaSopenharmony_ci 295275793eaSopenharmony_ci /* Type declarations */ 296275793eaSopenharmony_ci 297275793eaSopenharmony_ci#ifndef OF /* function prototypes */ 298275793eaSopenharmony_ci# ifdef STDC 299275793eaSopenharmony_ci# define OF(args) args 300275793eaSopenharmony_ci# else 301275793eaSopenharmony_ci# define OF(args) () 302275793eaSopenharmony_ci# endif 303275793eaSopenharmony_ci#endif 304275793eaSopenharmony_ci 305275793eaSopenharmony_ci/* The following definitions for FAR are needed only for MSDOS mixed 306275793eaSopenharmony_ci * model programming (small or medium model with some far allocations). 307275793eaSopenharmony_ci * This was tested only with MSC; for other MSDOS compilers you may have 308275793eaSopenharmony_ci * to define NO_MEMCPY in zutil.h. If you don't need the mixed model, 309275793eaSopenharmony_ci * just define FAR to be empty. 310275793eaSopenharmony_ci */ 311275793eaSopenharmony_ci#ifdef SYS16BIT 312275793eaSopenharmony_ci# if defined(M_I86SM) || defined(M_I86MM) 313275793eaSopenharmony_ci /* MSC small or medium model */ 314275793eaSopenharmony_ci# define SMALL_MEDIUM 315275793eaSopenharmony_ci# ifdef _MSC_VER 316275793eaSopenharmony_ci# define FAR _far 317275793eaSopenharmony_ci# else 318275793eaSopenharmony_ci# define FAR far 319275793eaSopenharmony_ci# endif 320275793eaSopenharmony_ci# endif 321275793eaSopenharmony_ci# if (defined(__SMALL__) || defined(__MEDIUM__)) 322275793eaSopenharmony_ci /* Turbo C small or medium model */ 323275793eaSopenharmony_ci# define SMALL_MEDIUM 324275793eaSopenharmony_ci# ifdef __BORLANDC__ 325275793eaSopenharmony_ci# define FAR _far 326275793eaSopenharmony_ci# else 327275793eaSopenharmony_ci# define FAR far 328275793eaSopenharmony_ci# endif 329275793eaSopenharmony_ci# endif 330275793eaSopenharmony_ci#endif 331275793eaSopenharmony_ci 332275793eaSopenharmony_ci#if defined(WINDOWS) || defined(WIN32) 333275793eaSopenharmony_ci /* If building or using zlib as a DLL, define ZLIB_DLL. 334275793eaSopenharmony_ci * This is not mandatory, but it offers a little performance increase. 335275793eaSopenharmony_ci */ 336275793eaSopenharmony_ci# ifdef ZLIB_DLL 337275793eaSopenharmony_ci# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500)) 338275793eaSopenharmony_ci# ifdef ZLIB_INTERNAL 339275793eaSopenharmony_ci# define ZEXTERN extern __declspec(dllexport) 340275793eaSopenharmony_ci# else 341275793eaSopenharmony_ci# define ZEXTERN extern __declspec(dllimport) 342275793eaSopenharmony_ci# endif 343275793eaSopenharmony_ci# endif 344275793eaSopenharmony_ci# endif /* ZLIB_DLL */ 345275793eaSopenharmony_ci /* If building or using zlib with the WINAPI/WINAPIV calling convention, 346275793eaSopenharmony_ci * define ZLIB_WINAPI. 347275793eaSopenharmony_ci * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI. 348275793eaSopenharmony_ci */ 349275793eaSopenharmony_ci# ifdef ZLIB_WINAPI 350275793eaSopenharmony_ci# ifdef FAR 351275793eaSopenharmony_ci# undef FAR 352275793eaSopenharmony_ci# endif 353275793eaSopenharmony_ci# ifndef WIN32_LEAN_AND_MEAN 354275793eaSopenharmony_ci# define WIN32_LEAN_AND_MEAN 355275793eaSopenharmony_ci# endif 356275793eaSopenharmony_ci# include <windows.h> 357275793eaSopenharmony_ci /* No need for _export, use ZLIB.DEF instead. */ 358275793eaSopenharmony_ci /* For complete Windows compatibility, use WINAPI, not __stdcall. */ 359275793eaSopenharmony_ci# define ZEXPORT WINAPI 360275793eaSopenharmony_ci# ifdef WIN32 361275793eaSopenharmony_ci# define ZEXPORTVA WINAPIV 362275793eaSopenharmony_ci# else 363275793eaSopenharmony_ci# define ZEXPORTVA FAR CDECL 364275793eaSopenharmony_ci# endif 365275793eaSopenharmony_ci# endif 366275793eaSopenharmony_ci#endif 367275793eaSopenharmony_ci 368275793eaSopenharmony_ci#if defined (__BEOS__) 369275793eaSopenharmony_ci# ifdef ZLIB_DLL 370275793eaSopenharmony_ci# ifdef ZLIB_INTERNAL 371275793eaSopenharmony_ci# define ZEXPORT __declspec(dllexport) 372275793eaSopenharmony_ci# define ZEXPORTVA __declspec(dllexport) 373275793eaSopenharmony_ci# else 374275793eaSopenharmony_ci# define ZEXPORT __declspec(dllimport) 375275793eaSopenharmony_ci# define ZEXPORTVA __declspec(dllimport) 376275793eaSopenharmony_ci# endif 377275793eaSopenharmony_ci# endif 378275793eaSopenharmony_ci#endif 379275793eaSopenharmony_ci 380275793eaSopenharmony_ci#ifndef ZEXTERN 381275793eaSopenharmony_ci# define ZEXTERN extern 382275793eaSopenharmony_ci#endif 383275793eaSopenharmony_ci#ifndef ZEXPORT 384275793eaSopenharmony_ci# define ZEXPORT 385275793eaSopenharmony_ci#endif 386275793eaSopenharmony_ci#ifndef ZEXPORTVA 387275793eaSopenharmony_ci# define ZEXPORTVA 388275793eaSopenharmony_ci#endif 389275793eaSopenharmony_ci 390275793eaSopenharmony_ci#ifndef FAR 391275793eaSopenharmony_ci# define FAR 392275793eaSopenharmony_ci#endif 393275793eaSopenharmony_ci 394275793eaSopenharmony_ci#if !defined(__MACTYPES__) 395275793eaSopenharmony_citypedef unsigned char Byte; /* 8 bits */ 396275793eaSopenharmony_ci#endif 397275793eaSopenharmony_citypedef unsigned int uInt; /* 16 bits or more */ 398275793eaSopenharmony_citypedef unsigned long uLong; /* 32 bits or more */ 399275793eaSopenharmony_ci 400275793eaSopenharmony_ci#ifdef SMALL_MEDIUM 401275793eaSopenharmony_ci /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */ 402275793eaSopenharmony_ci# define Bytef Byte FAR 403275793eaSopenharmony_ci#else 404275793eaSopenharmony_ci typedef Byte FAR Bytef; 405275793eaSopenharmony_ci#endif 406275793eaSopenharmony_citypedef char FAR charf; 407275793eaSopenharmony_citypedef int FAR intf; 408275793eaSopenharmony_citypedef uInt FAR uIntf; 409275793eaSopenharmony_citypedef uLong FAR uLongf; 410275793eaSopenharmony_ci 411275793eaSopenharmony_ci#ifdef STDC 412275793eaSopenharmony_ci typedef void const *voidpc; 413275793eaSopenharmony_ci typedef void FAR *voidpf; 414275793eaSopenharmony_ci typedef void *voidp; 415275793eaSopenharmony_ci#else 416275793eaSopenharmony_ci typedef Byte const *voidpc; 417275793eaSopenharmony_ci typedef Byte FAR *voidpf; 418275793eaSopenharmony_ci typedef Byte *voidp; 419275793eaSopenharmony_ci#endif 420275793eaSopenharmony_ci 421275793eaSopenharmony_ci#if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC) 422275793eaSopenharmony_ci# include <limits.h> 423275793eaSopenharmony_ci# if (UINT_MAX == 0xffffffffUL) 424275793eaSopenharmony_ci# define Z_U4 unsigned 425275793eaSopenharmony_ci# elif (ULONG_MAX == 0xffffffffUL) 426275793eaSopenharmony_ci# define Z_U4 unsigned long 427275793eaSopenharmony_ci# elif (USHRT_MAX == 0xffffffffUL) 428275793eaSopenharmony_ci# define Z_U4 unsigned short 429275793eaSopenharmony_ci# endif 430275793eaSopenharmony_ci#endif 431275793eaSopenharmony_ci 432275793eaSopenharmony_ci#ifdef Z_U4 433275793eaSopenharmony_ci typedef Z_U4 z_crc_t; 434275793eaSopenharmony_ci#else 435275793eaSopenharmony_ci typedef unsigned long z_crc_t; 436275793eaSopenharmony_ci#endif 437275793eaSopenharmony_ci 438275793eaSopenharmony_ci#ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */ 439275793eaSopenharmony_ci# define Z_HAVE_UNISTD_H 440275793eaSopenharmony_ci#endif 441275793eaSopenharmony_ci 442275793eaSopenharmony_ci#ifdef HAVE_STDARG_H /* may be set to #if 1 by ./configure */ 443275793eaSopenharmony_ci# define Z_HAVE_STDARG_H 444275793eaSopenharmony_ci#endif 445275793eaSopenharmony_ci 446275793eaSopenharmony_ci#ifdef STDC 447275793eaSopenharmony_ci# ifndef Z_SOLO 448275793eaSopenharmony_ci# include <sys/types.h> /* for off_t */ 449275793eaSopenharmony_ci# endif 450275793eaSopenharmony_ci#endif 451275793eaSopenharmony_ci 452275793eaSopenharmony_ci#if defined(STDC) || defined(Z_HAVE_STDARG_H) 453275793eaSopenharmony_ci# ifndef Z_SOLO 454275793eaSopenharmony_ci# include <stdarg.h> /* for va_list */ 455275793eaSopenharmony_ci# endif 456275793eaSopenharmony_ci#endif 457275793eaSopenharmony_ci 458275793eaSopenharmony_ci#ifdef _WIN32 459275793eaSopenharmony_ci# ifndef Z_SOLO 460275793eaSopenharmony_ci# include <stddef.h> /* for wchar_t */ 461275793eaSopenharmony_ci# endif 462275793eaSopenharmony_ci#endif 463275793eaSopenharmony_ci 464275793eaSopenharmony_ci/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and 465275793eaSopenharmony_ci * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even 466275793eaSopenharmony_ci * though the former does not conform to the LFS document), but considering 467275793eaSopenharmony_ci * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as 468275793eaSopenharmony_ci * equivalently requesting no 64-bit operations 469275793eaSopenharmony_ci */ 470275793eaSopenharmony_ci#if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1 471275793eaSopenharmony_ci# undef _LARGEFILE64_SOURCE 472275793eaSopenharmony_ci#endif 473275793eaSopenharmony_ci 474275793eaSopenharmony_ci#ifndef Z_HAVE_UNISTD_H 475275793eaSopenharmony_ci# ifdef __WATCOMC__ 476275793eaSopenharmony_ci# define Z_HAVE_UNISTD_H 477275793eaSopenharmony_ci# endif 478275793eaSopenharmony_ci#endif 479275793eaSopenharmony_ci#ifndef Z_HAVE_UNISTD_H 480275793eaSopenharmony_ci# if defined(_LARGEFILE64_SOURCE) && !defined(_WIN32) 481275793eaSopenharmony_ci# define Z_HAVE_UNISTD_H 482275793eaSopenharmony_ci# endif 483275793eaSopenharmony_ci#endif 484275793eaSopenharmony_ci#ifndef Z_SOLO 485275793eaSopenharmony_ci# if defined(Z_HAVE_UNISTD_H) 486275793eaSopenharmony_ci# include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */ 487275793eaSopenharmony_ci# ifdef VMS 488275793eaSopenharmony_ci# include <unixio.h> /* for off_t */ 489275793eaSopenharmony_ci# endif 490275793eaSopenharmony_ci# ifndef z_off_t 491275793eaSopenharmony_ci# define z_off_t off_t 492275793eaSopenharmony_ci# endif 493275793eaSopenharmony_ci# endif 494275793eaSopenharmony_ci#endif 495275793eaSopenharmony_ci 496275793eaSopenharmony_ci#if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0 497275793eaSopenharmony_ci# define Z_LFS64 498275793eaSopenharmony_ci#endif 499275793eaSopenharmony_ci 500275793eaSopenharmony_ci#if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64) 501275793eaSopenharmony_ci# define Z_LARGE64 502275793eaSopenharmony_ci#endif 503275793eaSopenharmony_ci 504275793eaSopenharmony_ci#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64) 505275793eaSopenharmony_ci# define Z_WANT64 506275793eaSopenharmony_ci#endif 507275793eaSopenharmony_ci 508275793eaSopenharmony_ci#if !defined(SEEK_SET) && !defined(Z_SOLO) 509275793eaSopenharmony_ci# define SEEK_SET 0 /* Seek from beginning of file. */ 510275793eaSopenharmony_ci# define SEEK_CUR 1 /* Seek from current position. */ 511275793eaSopenharmony_ci# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */ 512275793eaSopenharmony_ci#endif 513275793eaSopenharmony_ci 514275793eaSopenharmony_ci#ifndef z_off_t 515275793eaSopenharmony_ci# define z_off_t long 516275793eaSopenharmony_ci#endif 517275793eaSopenharmony_ci 518275793eaSopenharmony_ci#if !defined(_WIN32) && defined(Z_LARGE64) 519275793eaSopenharmony_ci# define z_off64_t off64_t 520275793eaSopenharmony_ci#else 521275793eaSopenharmony_ci# if defined(_WIN32) && !defined(__GNUC__) 522275793eaSopenharmony_ci# define z_off64_t __int64 523275793eaSopenharmony_ci# else 524275793eaSopenharmony_ci# define z_off64_t z_off_t 525275793eaSopenharmony_ci# endif 526275793eaSopenharmony_ci#endif 527275793eaSopenharmony_ci 528275793eaSopenharmony_ci/* MVS linker does not support external names larger than 8 bytes */ 529275793eaSopenharmony_ci#if defined(__MVS__) 530275793eaSopenharmony_ci #pragma map(deflateInit_,"DEIN") 531275793eaSopenharmony_ci #pragma map(deflateInit2_,"DEIN2") 532275793eaSopenharmony_ci #pragma map(deflateEnd,"DEEND") 533275793eaSopenharmony_ci #pragma map(deflateBound,"DEBND") 534275793eaSopenharmony_ci #pragma map(inflateInit_,"ININ") 535275793eaSopenharmony_ci #pragma map(inflateInit2_,"ININ2") 536275793eaSopenharmony_ci #pragma map(inflateEnd,"INEND") 537275793eaSopenharmony_ci #pragma map(inflateSync,"INSY") 538275793eaSopenharmony_ci #pragma map(inflateSetDictionary,"INSEDI") 539275793eaSopenharmony_ci #pragma map(compressBound,"CMBND") 540275793eaSopenharmony_ci #pragma map(inflate_table,"INTABL") 541275793eaSopenharmony_ci #pragma map(inflate_fast,"INFA") 542275793eaSopenharmony_ci #pragma map(inflate_copyright,"INCOPY") 543275793eaSopenharmony_ci#endif 544275793eaSopenharmony_ci 545275793eaSopenharmony_ci#endif /* ZCONF_H */ 546