Doug Anson / zlib
Committer:
ansond
Date:
Tue Feb 28 16:29:20 2017 +0000
Revision:
0:a01d5b0fe226
initial checkin

Who changed what in which revision?

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