1 /* $NetBSD: zconf.in.h,v 1.1.1.1 2006/01/14 20:10:33 christos Exp $ */
3 /* zconf.h -- configuration of the zlib compression library
4 * Copyright (C) 1995-2005 Jean-loup Gailly.
5 * For conditions of distribution and use, see copyright notice in zlib.h
14 * If you *really* need a unique prefix for all types and library functions,
15 * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
18 # define deflateInit_ z_deflateInit_
19 # define deflate z_deflate
20 # define deflateEnd z_deflateEnd
21 # define inflateInit_ z_inflateInit_
22 # define inflate z_inflate
23 # define inflateEnd z_inflateEnd
24 # define deflateInit2_ z_deflateInit2_
25 # define deflateSetDictionary z_deflateSetDictionary
26 # define deflateCopy z_deflateCopy
27 # define deflateReset z_deflateReset
28 # define deflateParams z_deflateParams
29 # define deflateBound z_deflateBound
30 # define deflatePrime z_deflatePrime
31 # define inflateInit2_ z_inflateInit2_
32 # define inflateSetDictionary z_inflateSetDictionary
33 # define inflateSync z_inflateSync
34 # define inflateSyncPoint z_inflateSyncPoint
35 # define inflateCopy z_inflateCopy
36 # define inflateReset z_inflateReset
37 # define inflateBack z_inflateBack
38 # define inflateBackEnd z_inflateBackEnd
39 # define compress z_compress
40 # define compress2 z_compress2
41 # define compressBound z_compressBound
42 # define uncompress z_uncompress
43 # define adler32 z_adler32
44 # define crc32 z_crc32
45 # define get_crc_table z_get_crc_table
46 # define zError z_zError
48 # define alloc_func z_alloc_func
49 # define free_func z_free_func
50 # define in_func z_in_func
51 # define out_func z_out_func
54 # define uLong z_uLong
55 # define Bytef z_Bytef
56 # define charf z_charf
58 # define uIntf z_uIntf
59 # define uLongf z_uLongf
60 # define voidpf z_voidpf
61 # define voidp z_voidp
64 #if defined(__MSDOS__) && !defined(MSDOS)
67 #if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
70 #if defined(_WINDOWS) && !defined(WINDOWS)
73 #if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
78 #if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
79 # if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
87 * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
88 * than 64k bytes at a time (needed on systems with 16-bit int).
97 #ifdef __STDC_VERSION__
101 # if __STDC_VERSION__ >= 199901L
107 #if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
110 #if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
113 #if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
116 #if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
120 #if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */
125 # ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
126 # define const /* note: need a more gentle solution here */
130 /* Some Mac compilers merge all .h files incorrectly: */
131 #if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
132 # define NO_DUMMY_DECL
135 /* Maximum value for memLevel in deflateInit2 */
136 #ifndef MAX_MEM_LEVEL
138 # define MAX_MEM_LEVEL 8
140 # define MAX_MEM_LEVEL 9
144 /* Maximum value for windowBits in deflateInit2 and inflateInit2.
145 * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
146 * created by gzip. (Files created by minigzip can still be extracted by
150 # define MAX_WBITS 15 /* 32K LZ77 window */
153 /* The memory requirements for deflate are (in bytes):
154 (1 << (windowBits+2)) + (1 << (memLevel+9))
155 that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
156 plus a few kilobytes for small objects. For example, if you want to reduce
157 the default memory requirements from 256K to 128K, compile with
158 make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
159 Of course this will generally degrade compression (there's no free lunch).
161 The memory requirements for inflate are (in bytes) 1 << windowBits
162 that is, 32K for windowBits=15 (default value) plus a few kilobytes
166 /* Type declarations */
168 #ifndef OF /* function prototypes */
170 # define OF(args) args
176 /* The following definitions for FAR are needed only for MSDOS mixed
177 * model programming (small or medium model with some far allocations).
178 * This was tested only with MSC; for other MSDOS compilers you may have
179 * to define NO_MEMCPY in zutil.h. If you don't need the mixed model,
180 * just define FAR to be empty.
183 # if defined(M_I86SM) || defined(M_I86MM)
184 /* MSC small or medium model */
185 # define SMALL_MEDIUM
192 # if (defined(__SMALL__) || defined(__MEDIUM__))
193 /* Turbo C small or medium model */
194 # define SMALL_MEDIUM
203 #if defined(WINDOWS) || defined(WIN32)
204 /* If building or using zlib as a DLL, define ZLIB_DLL.
205 * This is not mandatory, but it offers a little performance increase.
208 # if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
209 # ifdef ZLIB_INTERNAL
210 # define ZEXTERN extern __declspec(dllexport)
212 # define ZEXTERN extern __declspec(dllimport)
215 # endif /* ZLIB_DLL */
216 /* If building or using zlib with the WINAPI/WINAPIV calling convention,
217 * define ZLIB_WINAPI.
218 * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
224 # include <windows.h>
225 /* No need for _export, use ZLIB.DEF instead. */
226 /* For complete Windows compatibility, use WINAPI, not __stdcall. */
227 # define ZEXPORT WINAPI
229 # define ZEXPORTVA WINAPIV
231 # define ZEXPORTVA FAR CDECL
236 #if defined (__BEOS__)
238 # ifdef ZLIB_INTERNAL
239 # define ZEXPORT __declspec(dllexport)
240 # define ZEXPORTVA __declspec(dllexport)
242 # define ZEXPORT __declspec(dllimport)
243 # define ZEXPORTVA __declspec(dllimport)
249 # define ZEXTERN extern
262 #if !defined(__MACTYPES__)
263 typedef unsigned char Byte
; /* 8 bits */
265 typedef unsigned int uInt
; /* 16 bits or more */
266 typedef unsigned long uLong
; /* 32 bits or more */
269 /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
270 # define Bytef Byte FAR
272 typedef Byte FAR Bytef
;
274 typedef char FAR charf
;
275 typedef int FAR intf
;
276 typedef uInt FAR uIntf
;
277 typedef uLong FAR uLongf
;
280 typedef void const *voidpc
;
281 typedef void FAR
*voidpf
;
284 typedef Byte
const *voidpc
;
285 typedef Byte FAR
*voidpf
;
289 #if 0 /* HAVE_UNISTD_H -- this line is updated by ./configure */
290 # include <sys/types.h> /* for off_t */
291 # include <unistd.h> /* for SEEK_* and off_t */
293 # include <unixio.h> /* for off_t */
295 # define z_off_t off_t
298 # define SEEK_SET 0 /* Seek from beginning of file. */
299 # define SEEK_CUR 1 /* Seek from current position. */
300 # define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
303 # define z_off_t long
306 #if defined(__OS400__)
307 # define NO_vsnprintf
311 # define NO_vsnprintf
317 /* MVS linker does not support external names larger than 8 bytes */
319 # pragma map(deflateInit_,"DEIN")
320 # pragma map(deflateInit2_,"DEIN2")
321 # pragma map(deflateEnd,"DEEND")
322 # pragma map(deflateBound,"DEBND")
323 # pragma map(inflateInit_,"ININ")
324 # pragma map(inflateInit2_,"ININ2")
325 # pragma map(inflateEnd,"INEND")
326 # pragma map(inflateSync,"INSY")
327 # pragma map(inflateSetDictionary,"INSEDI")
328 # pragma map(compressBound,"CMBND")
329 # pragma map(inflate_table,"INTABL")
330 # pragma map(inflate_fast,"INFA")
331 # pragma map(inflate_copyright,"INCOPY")