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