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