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