Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | /* zconf.h -- configuration of the zlib compression library |
michael@0 | 2 | * Copyright (C) 1995-2013 Jean-loup Gailly. |
michael@0 | 3 | * For conditions of distribution and use, see copyright notice in zlib.h |
michael@0 | 4 | */ |
michael@0 | 5 | |
michael@0 | 6 | /* @(#) $Id$ */ |
michael@0 | 7 | |
michael@0 | 8 | #ifndef ZCONF_H |
michael@0 | 9 | #define ZCONF_H |
michael@0 | 10 | |
michael@0 | 11 | /* This header does prefixing as below, but with an updated set of names. */ |
michael@0 | 12 | #include "mozzconf.h" |
michael@0 | 13 | |
michael@0 | 14 | /* |
michael@0 | 15 | * If you *really* need a unique prefix for all types and library functions, |
michael@0 | 16 | * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. |
michael@0 | 17 | * Even better than compiling with -DZ_PREFIX would be to use configure to set |
michael@0 | 18 | * this permanently in zconf.h using "./configure --zprefix". |
michael@0 | 19 | */ |
michael@0 | 20 | #ifdef Z_PREFIX /* may be set to #if 1 by ./configure */ |
michael@0 | 21 | # define Z_PREFIX_SET |
michael@0 | 22 | |
michael@0 | 23 | /* all linked symbols */ |
michael@0 | 24 | # define _dist_code z__dist_code |
michael@0 | 25 | # define _length_code z__length_code |
michael@0 | 26 | # define _tr_align z__tr_align |
michael@0 | 27 | # define _tr_flush_bits z__tr_flush_bits |
michael@0 | 28 | # define _tr_flush_block z__tr_flush_block |
michael@0 | 29 | # define _tr_init z__tr_init |
michael@0 | 30 | # define _tr_stored_block z__tr_stored_block |
michael@0 | 31 | # define _tr_tally z__tr_tally |
michael@0 | 32 | # define adler32 z_adler32 |
michael@0 | 33 | # define adler32_combine z_adler32_combine |
michael@0 | 34 | # define adler32_combine64 z_adler32_combine64 |
michael@0 | 35 | # ifndef Z_SOLO |
michael@0 | 36 | # define compress z_compress |
michael@0 | 37 | # define compress2 z_compress2 |
michael@0 | 38 | # define compressBound z_compressBound |
michael@0 | 39 | # endif |
michael@0 | 40 | # define crc32 z_crc32 |
michael@0 | 41 | # define crc32_combine z_crc32_combine |
michael@0 | 42 | # define crc32_combine64 z_crc32_combine64 |
michael@0 | 43 | # define deflate z_deflate |
michael@0 | 44 | # define deflateBound z_deflateBound |
michael@0 | 45 | # define deflateCopy z_deflateCopy |
michael@0 | 46 | # define deflateEnd z_deflateEnd |
michael@0 | 47 | # define deflateInit2_ z_deflateInit2_ |
michael@0 | 48 | # define deflateInit_ z_deflateInit_ |
michael@0 | 49 | # define deflateParams z_deflateParams |
michael@0 | 50 | # define deflatePending z_deflatePending |
michael@0 | 51 | # define deflatePrime z_deflatePrime |
michael@0 | 52 | # define deflateReset z_deflateReset |
michael@0 | 53 | # define deflateResetKeep z_deflateResetKeep |
michael@0 | 54 | # define deflateSetDictionary z_deflateSetDictionary |
michael@0 | 55 | # define deflateSetHeader z_deflateSetHeader |
michael@0 | 56 | # define deflateTune z_deflateTune |
michael@0 | 57 | # define deflate_copyright z_deflate_copyright |
michael@0 | 58 | # define get_crc_table z_get_crc_table |
michael@0 | 59 | # ifndef Z_SOLO |
michael@0 | 60 | # define gz_error z_gz_error |
michael@0 | 61 | # define gz_intmax z_gz_intmax |
michael@0 | 62 | # define gz_strwinerror z_gz_strwinerror |
michael@0 | 63 | # define gzbuffer z_gzbuffer |
michael@0 | 64 | # define gzclearerr z_gzclearerr |
michael@0 | 65 | # define gzclose z_gzclose |
michael@0 | 66 | # define gzclose_r z_gzclose_r |
michael@0 | 67 | # define gzclose_w z_gzclose_w |
michael@0 | 68 | # define gzdirect z_gzdirect |
michael@0 | 69 | # define gzdopen z_gzdopen |
michael@0 | 70 | # define gzeof z_gzeof |
michael@0 | 71 | # define gzerror z_gzerror |
michael@0 | 72 | # define gzflush z_gzflush |
michael@0 | 73 | # define gzgetc z_gzgetc |
michael@0 | 74 | # define gzgetc_ z_gzgetc_ |
michael@0 | 75 | # define gzgets z_gzgets |
michael@0 | 76 | # define gzoffset z_gzoffset |
michael@0 | 77 | # define gzoffset64 z_gzoffset64 |
michael@0 | 78 | # define gzopen z_gzopen |
michael@0 | 79 | # define gzopen64 z_gzopen64 |
michael@0 | 80 | # ifdef _WIN32 |
michael@0 | 81 | # define gzopen_w z_gzopen_w |
michael@0 | 82 | # endif |
michael@0 | 83 | # define gzprintf z_gzprintf |
michael@0 | 84 | # define gzvprintf z_gzvprintf |
michael@0 | 85 | # define gzputc z_gzputc |
michael@0 | 86 | # define gzputs z_gzputs |
michael@0 | 87 | # define gzread z_gzread |
michael@0 | 88 | # define gzrewind z_gzrewind |
michael@0 | 89 | # define gzseek z_gzseek |
michael@0 | 90 | # define gzseek64 z_gzseek64 |
michael@0 | 91 | # define gzsetparams z_gzsetparams |
michael@0 | 92 | # define gztell z_gztell |
michael@0 | 93 | # define gztell64 z_gztell64 |
michael@0 | 94 | # define gzungetc z_gzungetc |
michael@0 | 95 | # define gzwrite z_gzwrite |
michael@0 | 96 | # endif |
michael@0 | 97 | # define inflate z_inflate |
michael@0 | 98 | # define inflateBack z_inflateBack |
michael@0 | 99 | # define inflateBackEnd z_inflateBackEnd |
michael@0 | 100 | # define inflateBackInit_ z_inflateBackInit_ |
michael@0 | 101 | # define inflateCopy z_inflateCopy |
michael@0 | 102 | # define inflateEnd z_inflateEnd |
michael@0 | 103 | # define inflateGetHeader z_inflateGetHeader |
michael@0 | 104 | # define inflateInit2_ z_inflateInit2_ |
michael@0 | 105 | # define inflateInit_ z_inflateInit_ |
michael@0 | 106 | # define inflateMark z_inflateMark |
michael@0 | 107 | # define inflatePrime z_inflatePrime |
michael@0 | 108 | # define inflateReset z_inflateReset |
michael@0 | 109 | # define inflateReset2 z_inflateReset2 |
michael@0 | 110 | # define inflateSetDictionary z_inflateSetDictionary |
michael@0 | 111 | # define inflateGetDictionary z_inflateGetDictionary |
michael@0 | 112 | # define inflateSync z_inflateSync |
michael@0 | 113 | # define inflateSyncPoint z_inflateSyncPoint |
michael@0 | 114 | # define inflateUndermine z_inflateUndermine |
michael@0 | 115 | # define inflateResetKeep z_inflateResetKeep |
michael@0 | 116 | # define inflate_copyright z_inflate_copyright |
michael@0 | 117 | # define inflate_fast z_inflate_fast |
michael@0 | 118 | # define inflate_table z_inflate_table |
michael@0 | 119 | # ifndef Z_SOLO |
michael@0 | 120 | # define uncompress z_uncompress |
michael@0 | 121 | # endif |
michael@0 | 122 | # define zError z_zError |
michael@0 | 123 | # ifndef Z_SOLO |
michael@0 | 124 | # define zcalloc z_zcalloc |
michael@0 | 125 | # define zcfree z_zcfree |
michael@0 | 126 | # endif |
michael@0 | 127 | # define zlibCompileFlags z_zlibCompileFlags |
michael@0 | 128 | # define zlibVersion z_zlibVersion |
michael@0 | 129 | |
michael@0 | 130 | /* all zlib typedefs in zlib.h and zconf.h */ |
michael@0 | 131 | # define Byte z_Byte |
michael@0 | 132 | # define Bytef z_Bytef |
michael@0 | 133 | # define alloc_func z_alloc_func |
michael@0 | 134 | # define charf z_charf |
michael@0 | 135 | # define free_func z_free_func |
michael@0 | 136 | # ifndef Z_SOLO |
michael@0 | 137 | # define gzFile z_gzFile |
michael@0 | 138 | # endif |
michael@0 | 139 | # define gz_header z_gz_header |
michael@0 | 140 | # define gz_headerp z_gz_headerp |
michael@0 | 141 | # define in_func z_in_func |
michael@0 | 142 | # define intf z_intf |
michael@0 | 143 | # define out_func z_out_func |
michael@0 | 144 | # define uInt z_uInt |
michael@0 | 145 | # define uIntf z_uIntf |
michael@0 | 146 | # define uLong z_uLong |
michael@0 | 147 | # define uLongf z_uLongf |
michael@0 | 148 | # define voidp z_voidp |
michael@0 | 149 | # define voidpc z_voidpc |
michael@0 | 150 | # define voidpf z_voidpf |
michael@0 | 151 | |
michael@0 | 152 | /* all zlib structs in zlib.h and zconf.h */ |
michael@0 | 153 | # define gz_header_s z_gz_header_s |
michael@0 | 154 | # define internal_state z_internal_state |
michael@0 | 155 | |
michael@0 | 156 | #endif |
michael@0 | 157 | |
michael@0 | 158 | #if defined(__MSDOS__) && !defined(MSDOS) |
michael@0 | 159 | # define MSDOS |
michael@0 | 160 | #endif |
michael@0 | 161 | #if (defined(OS_2) || defined(__OS2__)) && !defined(OS2) |
michael@0 | 162 | # define OS2 |
michael@0 | 163 | #endif |
michael@0 | 164 | #if defined(_WINDOWS) && !defined(WINDOWS) |
michael@0 | 165 | # define WINDOWS |
michael@0 | 166 | #endif |
michael@0 | 167 | #if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__) |
michael@0 | 168 | # ifndef WIN32 |
michael@0 | 169 | # define WIN32 |
michael@0 | 170 | # endif |
michael@0 | 171 | #endif |
michael@0 | 172 | #if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32) |
michael@0 | 173 | # if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__) |
michael@0 | 174 | # ifndef SYS16BIT |
michael@0 | 175 | # define SYS16BIT |
michael@0 | 176 | # endif |
michael@0 | 177 | # endif |
michael@0 | 178 | #endif |
michael@0 | 179 | |
michael@0 | 180 | /* |
michael@0 | 181 | * Compile with -DMAXSEG_64K if the alloc function cannot allocate more |
michael@0 | 182 | * than 64k bytes at a time (needed on systems with 16-bit int). |
michael@0 | 183 | */ |
michael@0 | 184 | #ifdef SYS16BIT |
michael@0 | 185 | # define MAXSEG_64K |
michael@0 | 186 | #endif |
michael@0 | 187 | #ifdef MSDOS |
michael@0 | 188 | # define UNALIGNED_OK |
michael@0 | 189 | #endif |
michael@0 | 190 | |
michael@0 | 191 | #ifdef __STDC_VERSION__ |
michael@0 | 192 | # ifndef STDC |
michael@0 | 193 | # define STDC |
michael@0 | 194 | # endif |
michael@0 | 195 | # if __STDC_VERSION__ >= 199901L |
michael@0 | 196 | # ifndef STDC99 |
michael@0 | 197 | # define STDC99 |
michael@0 | 198 | # endif |
michael@0 | 199 | # endif |
michael@0 | 200 | #endif |
michael@0 | 201 | #if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus)) |
michael@0 | 202 | # define STDC |
michael@0 | 203 | #endif |
michael@0 | 204 | #if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__)) |
michael@0 | 205 | # define STDC |
michael@0 | 206 | #endif |
michael@0 | 207 | #if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32)) |
michael@0 | 208 | # define STDC |
michael@0 | 209 | #endif |
michael@0 | 210 | #if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__)) |
michael@0 | 211 | # define STDC |
michael@0 | 212 | #endif |
michael@0 | 213 | |
michael@0 | 214 | #if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */ |
michael@0 | 215 | # define STDC |
michael@0 | 216 | #endif |
michael@0 | 217 | |
michael@0 | 218 | #ifndef STDC |
michael@0 | 219 | # ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */ |
michael@0 | 220 | # define const /* note: need a more gentle solution here */ |
michael@0 | 221 | # endif |
michael@0 | 222 | #endif |
michael@0 | 223 | |
michael@0 | 224 | #if defined(ZLIB_CONST) && !defined(z_const) |
michael@0 | 225 | # define z_const const |
michael@0 | 226 | #else |
michael@0 | 227 | # define z_const |
michael@0 | 228 | #endif |
michael@0 | 229 | |
michael@0 | 230 | /* Some Mac compilers merge all .h files incorrectly: */ |
michael@0 | 231 | #if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__) |
michael@0 | 232 | # define NO_DUMMY_DECL |
michael@0 | 233 | #endif |
michael@0 | 234 | |
michael@0 | 235 | /* Maximum value for memLevel in deflateInit2 */ |
michael@0 | 236 | #ifndef MAX_MEM_LEVEL |
michael@0 | 237 | # ifdef MAXSEG_64K |
michael@0 | 238 | # define MAX_MEM_LEVEL 8 |
michael@0 | 239 | # else |
michael@0 | 240 | # define MAX_MEM_LEVEL 9 |
michael@0 | 241 | # endif |
michael@0 | 242 | #endif |
michael@0 | 243 | |
michael@0 | 244 | /* Maximum value for windowBits in deflateInit2 and inflateInit2. |
michael@0 | 245 | * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files |
michael@0 | 246 | * created by gzip. (Files created by minigzip can still be extracted by |
michael@0 | 247 | * gzip.) |
michael@0 | 248 | */ |
michael@0 | 249 | #ifndef MAX_WBITS |
michael@0 | 250 | # define MAX_WBITS 15 /* 32K LZ77 window */ |
michael@0 | 251 | #endif |
michael@0 | 252 | |
michael@0 | 253 | /* The memory requirements for deflate are (in bytes): |
michael@0 | 254 | (1 << (windowBits+2)) + (1 << (memLevel+9)) |
michael@0 | 255 | that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) |
michael@0 | 256 | plus a few kilobytes for small objects. For example, if you want to reduce |
michael@0 | 257 | the default memory requirements from 256K to 128K, compile with |
michael@0 | 258 | make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" |
michael@0 | 259 | Of course this will generally degrade compression (there's no free lunch). |
michael@0 | 260 | |
michael@0 | 261 | The memory requirements for inflate are (in bytes) 1 << windowBits |
michael@0 | 262 | that is, 32K for windowBits=15 (default value) plus a few kilobytes |
michael@0 | 263 | for small objects. |
michael@0 | 264 | */ |
michael@0 | 265 | |
michael@0 | 266 | /* Type declarations */ |
michael@0 | 267 | |
michael@0 | 268 | #ifndef OF /* function prototypes */ |
michael@0 | 269 | # ifdef STDC |
michael@0 | 270 | # define OF(args) args |
michael@0 | 271 | # else |
michael@0 | 272 | # define OF(args) () |
michael@0 | 273 | # endif |
michael@0 | 274 | #endif |
michael@0 | 275 | |
michael@0 | 276 | #ifndef Z_ARG /* function prototypes for stdarg */ |
michael@0 | 277 | # if defined(STDC) || defined(Z_HAVE_STDARG_H) |
michael@0 | 278 | # define Z_ARG(args) args |
michael@0 | 279 | # else |
michael@0 | 280 | # define Z_ARG(args) () |
michael@0 | 281 | # endif |
michael@0 | 282 | #endif |
michael@0 | 283 | |
michael@0 | 284 | /* The following definitions for FAR are needed only for MSDOS mixed |
michael@0 | 285 | * model programming (small or medium model with some far allocations). |
michael@0 | 286 | * This was tested only with MSC; for other MSDOS compilers you may have |
michael@0 | 287 | * to define NO_MEMCPY in zutil.h. If you don't need the mixed model, |
michael@0 | 288 | * just define FAR to be empty. |
michael@0 | 289 | */ |
michael@0 | 290 | #ifdef SYS16BIT |
michael@0 | 291 | # if defined(M_I86SM) || defined(M_I86MM) |
michael@0 | 292 | /* MSC small or medium model */ |
michael@0 | 293 | # define SMALL_MEDIUM |
michael@0 | 294 | # ifdef _MSC_VER |
michael@0 | 295 | # define FAR _far |
michael@0 | 296 | # else |
michael@0 | 297 | # define FAR far |
michael@0 | 298 | # endif |
michael@0 | 299 | # endif |
michael@0 | 300 | # if (defined(__SMALL__) || defined(__MEDIUM__)) |
michael@0 | 301 | /* Turbo C small or medium model */ |
michael@0 | 302 | # define SMALL_MEDIUM |
michael@0 | 303 | # ifdef __BORLANDC__ |
michael@0 | 304 | # define FAR _far |
michael@0 | 305 | # else |
michael@0 | 306 | # define FAR far |
michael@0 | 307 | # endif |
michael@0 | 308 | # endif |
michael@0 | 309 | #endif |
michael@0 | 310 | |
michael@0 | 311 | #if defined(WINDOWS) || defined(WIN32) |
michael@0 | 312 | /* If building or using zlib as a DLL, define ZLIB_DLL. |
michael@0 | 313 | * This is not mandatory, but it offers a little performance increase. |
michael@0 | 314 | */ |
michael@0 | 315 | # ifdef ZLIB_DLL |
michael@0 | 316 | # if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500)) |
michael@0 | 317 | # ifdef ZLIB_INTERNAL |
michael@0 | 318 | # define ZEXTERN extern __declspec(dllexport) |
michael@0 | 319 | # else |
michael@0 | 320 | # define ZEXTERN extern __declspec(dllimport) |
michael@0 | 321 | # endif |
michael@0 | 322 | # endif |
michael@0 | 323 | # endif /* ZLIB_DLL */ |
michael@0 | 324 | /* If building or using zlib with the WINAPI/WINAPIV calling convention, |
michael@0 | 325 | * define ZLIB_WINAPI. |
michael@0 | 326 | * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI. |
michael@0 | 327 | */ |
michael@0 | 328 | # ifdef ZLIB_WINAPI |
michael@0 | 329 | # ifdef FAR |
michael@0 | 330 | # undef FAR |
michael@0 | 331 | # endif |
michael@0 | 332 | # include <windows.h> |
michael@0 | 333 | /* No need for _export, use ZLIB.DEF instead. */ |
michael@0 | 334 | /* For complete Windows compatibility, use WINAPI, not __stdcall. */ |
michael@0 | 335 | # define ZEXPORT WINAPI |
michael@0 | 336 | # ifdef WIN32 |
michael@0 | 337 | # define ZEXPORTVA WINAPIV |
michael@0 | 338 | # else |
michael@0 | 339 | # define ZEXPORTVA FAR CDECL |
michael@0 | 340 | # endif |
michael@0 | 341 | # endif |
michael@0 | 342 | #endif |
michael@0 | 343 | |
michael@0 | 344 | #if defined (__BEOS__) || (defined(__OS2__) && defined(__declspec)) |
michael@0 | 345 | # ifdef ZLIB_DLL |
michael@0 | 346 | # ifdef ZLIB_INTERNAL |
michael@0 | 347 | # define ZEXPORT __declspec(dllexport) |
michael@0 | 348 | # define ZEXPORTVA __declspec(dllexport) |
michael@0 | 349 | # else |
michael@0 | 350 | # define ZEXPORT __declspec(dllimport) |
michael@0 | 351 | # define ZEXPORTVA __declspec(dllimport) |
michael@0 | 352 | # endif |
michael@0 | 353 | # endif |
michael@0 | 354 | #endif |
michael@0 | 355 | |
michael@0 | 356 | #ifndef ZEXTERN |
michael@0 | 357 | # define ZEXTERN extern |
michael@0 | 358 | #endif |
michael@0 | 359 | #ifndef ZEXPORT |
michael@0 | 360 | # define ZEXPORT |
michael@0 | 361 | #endif |
michael@0 | 362 | #ifndef ZEXPORTVA |
michael@0 | 363 | # define ZEXPORTVA |
michael@0 | 364 | #endif |
michael@0 | 365 | |
michael@0 | 366 | #ifndef FAR |
michael@0 | 367 | # define FAR |
michael@0 | 368 | #endif |
michael@0 | 369 | |
michael@0 | 370 | #if !defined(__MACTYPES__) |
michael@0 | 371 | typedef unsigned char Byte; /* 8 bits */ |
michael@0 | 372 | #endif |
michael@0 | 373 | typedef unsigned int uInt; /* 16 bits or more */ |
michael@0 | 374 | typedef unsigned long uLong; /* 32 bits or more */ |
michael@0 | 375 | |
michael@0 | 376 | #ifdef SMALL_MEDIUM |
michael@0 | 377 | /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */ |
michael@0 | 378 | # define Bytef Byte FAR |
michael@0 | 379 | #else |
michael@0 | 380 | typedef Byte FAR Bytef; |
michael@0 | 381 | #endif |
michael@0 | 382 | typedef char FAR charf; |
michael@0 | 383 | typedef int FAR intf; |
michael@0 | 384 | typedef uInt FAR uIntf; |
michael@0 | 385 | typedef uLong FAR uLongf; |
michael@0 | 386 | |
michael@0 | 387 | #ifdef STDC |
michael@0 | 388 | typedef void const *voidpc; |
michael@0 | 389 | typedef void FAR *voidpf; |
michael@0 | 390 | typedef void *voidp; |
michael@0 | 391 | #else |
michael@0 | 392 | typedef Byte const *voidpc; |
michael@0 | 393 | typedef Byte FAR *voidpf; |
michael@0 | 394 | typedef Byte *voidp; |
michael@0 | 395 | #endif |
michael@0 | 396 | |
michael@0 | 397 | #if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC) |
michael@0 | 398 | # include <limits.h> |
michael@0 | 399 | # if (UINT_MAX == 0xffffffffUL) |
michael@0 | 400 | # define Z_U4 unsigned |
michael@0 | 401 | # elif (ULONG_MAX == 0xffffffffUL) |
michael@0 | 402 | # define Z_U4 unsigned long |
michael@0 | 403 | # elif (USHRT_MAX == 0xffffffffUL) |
michael@0 | 404 | # define Z_U4 unsigned short |
michael@0 | 405 | # endif |
michael@0 | 406 | #endif |
michael@0 | 407 | |
michael@0 | 408 | #ifdef Z_U4 |
michael@0 | 409 | typedef Z_U4 z_crc_t; |
michael@0 | 410 | #else |
michael@0 | 411 | typedef unsigned long z_crc_t; |
michael@0 | 412 | #endif |
michael@0 | 413 | |
michael@0 | 414 | #ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */ |
michael@0 | 415 | # define Z_HAVE_UNISTD_H |
michael@0 | 416 | #endif |
michael@0 | 417 | |
michael@0 | 418 | #ifdef HAVE_STDARG_H /* may be set to #if 1 by ./configure */ |
michael@0 | 419 | # define Z_HAVE_STDARG_H |
michael@0 | 420 | #endif |
michael@0 | 421 | |
michael@0 | 422 | #ifdef STDC |
michael@0 | 423 | # ifndef Z_SOLO |
michael@0 | 424 | # include <sys/types.h> /* for off_t */ |
michael@0 | 425 | # endif |
michael@0 | 426 | #endif |
michael@0 | 427 | |
michael@0 | 428 | #if defined(STDC) || defined(Z_HAVE_STDARG_H) |
michael@0 | 429 | # ifndef Z_SOLO |
michael@0 | 430 | # include <stdarg.h> /* for va_list */ |
michael@0 | 431 | # endif |
michael@0 | 432 | #endif |
michael@0 | 433 | |
michael@0 | 434 | #ifdef _WIN32 |
michael@0 | 435 | # ifndef Z_SOLO |
michael@0 | 436 | # include <stddef.h> /* for wchar_t */ |
michael@0 | 437 | # endif |
michael@0 | 438 | #endif |
michael@0 | 439 | |
michael@0 | 440 | /* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and |
michael@0 | 441 | * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even |
michael@0 | 442 | * though the former does not conform to the LFS document), but considering |
michael@0 | 443 | * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as |
michael@0 | 444 | * equivalently requesting no 64-bit operations |
michael@0 | 445 | */ |
michael@0 | 446 | #if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1 |
michael@0 | 447 | # undef _LARGEFILE64_SOURCE |
michael@0 | 448 | #endif |
michael@0 | 449 | |
michael@0 | 450 | #if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H) |
michael@0 | 451 | # define Z_HAVE_UNISTD_H |
michael@0 | 452 | #endif |
michael@0 | 453 | #ifndef Z_SOLO |
michael@0 | 454 | # if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE) |
michael@0 | 455 | # include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */ |
michael@0 | 456 | # ifdef VMS |
michael@0 | 457 | # include <unixio.h> /* for off_t */ |
michael@0 | 458 | # endif |
michael@0 | 459 | # ifndef z_off_t |
michael@0 | 460 | # define z_off_t off_t |
michael@0 | 461 | # endif |
michael@0 | 462 | # endif |
michael@0 | 463 | #endif |
michael@0 | 464 | |
michael@0 | 465 | #if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0 |
michael@0 | 466 | # define Z_LFS64 |
michael@0 | 467 | #endif |
michael@0 | 468 | |
michael@0 | 469 | #if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64) |
michael@0 | 470 | # define Z_LARGE64 |
michael@0 | 471 | #endif |
michael@0 | 472 | |
michael@0 | 473 | #if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64) |
michael@0 | 474 | # define Z_WANT64 |
michael@0 | 475 | #endif |
michael@0 | 476 | |
michael@0 | 477 | #if !defined(SEEK_SET) && !defined(Z_SOLO) |
michael@0 | 478 | # define SEEK_SET 0 /* Seek from beginning of file. */ |
michael@0 | 479 | # define SEEK_CUR 1 /* Seek from current position. */ |
michael@0 | 480 | # define SEEK_END 2 /* Set file pointer to EOF plus "offset" */ |
michael@0 | 481 | #endif |
michael@0 | 482 | |
michael@0 | 483 | #ifndef z_off_t |
michael@0 | 484 | # define z_off_t long |
michael@0 | 485 | #endif |
michael@0 | 486 | |
michael@0 | 487 | #if !defined(_WIN32) && defined(Z_LARGE64) |
michael@0 | 488 | # define z_off64_t off64_t |
michael@0 | 489 | #else |
michael@0 | 490 | # if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO) |
michael@0 | 491 | # define z_off64_t __int64 |
michael@0 | 492 | # else |
michael@0 | 493 | # define z_off64_t z_off_t |
michael@0 | 494 | # endif |
michael@0 | 495 | #endif |
michael@0 | 496 | |
michael@0 | 497 | /* MVS linker does not support external names larger than 8 bytes */ |
michael@0 | 498 | #if defined(__MVS__) |
michael@0 | 499 | #pragma map(deflateInit_,"DEIN") |
michael@0 | 500 | #pragma map(deflateInit2_,"DEIN2") |
michael@0 | 501 | #pragma map(deflateEnd,"DEEND") |
michael@0 | 502 | #pragma map(deflateBound,"DEBND") |
michael@0 | 503 | #pragma map(inflateInit_,"ININ") |
michael@0 | 504 | #pragma map(inflateInit2_,"ININ2") |
michael@0 | 505 | #pragma map(inflateEnd,"INEND") |
michael@0 | 506 | #pragma map(inflateSync,"INSY") |
michael@0 | 507 | #pragma map(inflateSetDictionary,"INSEDI") |
michael@0 | 508 | #pragma map(compressBound,"CMBND") |
michael@0 | 509 | #pragma map(inflate_table,"INTABL") |
michael@0 | 510 | #pragma map(inflate_fast,"INFA") |
michael@0 | 511 | #pragma map(inflate_copyright,"INCOPY") |
michael@0 | 512 | #endif |
michael@0 | 513 | |
michael@0 | 514 | #endif /* ZCONF_H */ |