Adding upstream version 4.00~pre53+dfsg.
[syslinux-debian/hramrach.git] / com32 / include / zconf.h
blob031f08d20d0ac93128577e2c55d47fba9b60ff27
1 /* zconf.h -- configuration of the zlib compression library
2 * Copyright (C) 1995-2003 Jean-loup Gailly.
3 * For conditions of distribution and use, see copyright notice in zlib.h
4 */
6 #ifndef ZCONF_H
7 #define ZCONF_H
9 /*
10 * If you *really* need a unique prefix for all types and library functions,
11 * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
13 #ifdef Z_PREFIX
14 # define deflateInit_ z_deflateInit_
15 # define deflate z_deflate
16 # define deflateEnd z_deflateEnd
17 # define inflateInit_ z_inflateInit_
18 # define inflate z_inflate
19 # define inflateEnd z_inflateEnd
20 # define deflateInit2_ z_deflateInit2_
21 # define deflateSetDictionary z_deflateSetDictionary
22 # define deflateCopy z_deflateCopy
23 # define deflateReset z_deflateReset
24 # define deflatePrime z_deflatePrime
25 # define deflateParams z_deflateParams
26 # define deflateBound z_deflateBound
27 # define inflateInit2_ z_inflateInit2_
28 # define inflateSetDictionary z_inflateSetDictionary
29 # define inflateSync z_inflateSync
30 # define inflateSyncPoint z_inflateSyncPoint
31 # define inflateCopy z_inflateCopy
32 # define inflateReset z_inflateReset
33 # define compress z_compress
34 # define compress2 z_compress2
35 # define compressBound z_compressBound
36 # define uncompress z_uncompress
37 # define adler32 z_adler32
38 # define crc32 z_crc32
39 # define get_crc_table z_get_crc_table
41 # define Byte z_Byte
42 # define uInt z_uInt
43 # define uLong z_uLong
44 # define Bytef z_Bytef
45 # define charf z_charf
46 # define intf z_intf
47 # define uIntf z_uIntf
48 # define uLongf z_uLongf
49 # define voidpf z_voidpf
50 # define voidp z_voidp
51 #endif
53 #if defined(__MSDOS__) && !defined(MSDOS)
54 # define MSDOS
55 #endif
56 #if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
57 # define OS2
58 #endif
59 #if defined(_WINDOWS) && !defined(WINDOWS)
60 # define WINDOWS
61 #endif
62 #if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32)
63 # define WIN32
64 #endif
65 #if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
66 # if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
67 # ifndef SYS16BIT
68 # define SYS16BIT
69 # endif
70 # endif
71 #endif
74 * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
75 * than 64k bytes at a time (needed on systems with 16-bit int).
77 #ifdef SYS16BIT
78 # define MAXSEG_64K
79 #endif
80 #ifdef MSDOS
81 # define UNALIGNED_OK
82 #endif
84 #ifdef __STDC_VERSION__
85 # ifndef STDC
86 # define STDC
87 # endif
88 # if __STDC_VERSION__ >= 199901L
89 # ifndef STDC99
90 # define STDC99
91 # endif
92 # endif
93 #endif
94 #if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
95 # define STDC
96 #endif
97 #if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
98 # define STDC
99 #endif
100 #if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
101 # define STDC
102 #endif
103 #if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
104 # define STDC
105 #endif
107 #if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */
108 # define STDC
109 #endif
111 #ifndef STDC
112 # ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
113 # define const /* note: need a more gentle solution here */
114 # endif
115 #endif
117 /* Some Mac compilers merge all .h files incorrectly: */
118 #if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
119 # define NO_DUMMY_DECL
120 #endif
122 /* Maximum value for memLevel in deflateInit2 */
123 #ifndef MAX_MEM_LEVEL
124 # ifdef MAXSEG_64K
125 # define MAX_MEM_LEVEL 8
126 # else
127 # define MAX_MEM_LEVEL 9
128 # endif
129 #endif
131 /* Maximum value for windowBits in deflateInit2 and inflateInit2.
132 * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
133 * created by gzip. (Files created by minigzip can still be extracted by
134 * gzip.)
136 #ifndef MAX_WBITS
137 # define MAX_WBITS 15 /* 32K LZ77 window */
138 #endif
140 /* The memory requirements for deflate are (in bytes):
141 (1 << (windowBits+2)) + (1 << (memLevel+9))
142 that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
143 plus a few kilobytes for small objects. For example, if you want to reduce
144 the default memory requirements from 256K to 128K, compile with
145 make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
146 Of course this will generally degrade compression (there's no free lunch).
148 The memory requirements for inflate are (in bytes) 1 << windowBits
149 that is, 32K for windowBits=15 (default value) plus a few kilobytes
150 for small objects.
153 /* Type declarations */
155 #ifndef OF /* function prototypes */
156 # ifdef STDC
157 # define OF(args) args
158 # else
159 # define OF(args) ()
160 # endif
161 #endif
163 /* The following definitions for FAR are needed only for MSDOS mixed
164 * model programming (small or medium model with some far allocations).
165 * This was tested only with MSC; for other MSDOS compilers you may have
166 * to define NO_MEMCPY in zutil.h. If you don't need the mixed model,
167 * just define FAR to be empty.
169 #ifdef SYS16BIT
170 # if defined(M_I86SM) || defined(M_I86MM)
171 /* MSC small or medium model */
172 # define SMALL_MEDIUM
173 # ifdef _MSC_VER
174 # define FAR _far
175 # else
176 # define FAR far
177 # endif
178 # endif
179 # if (defined(__SMALL__) || defined(__MEDIUM__))
180 /* Turbo C small or medium model */
181 # define SMALL_MEDIUM
182 # ifdef __BORLANDC__
183 # define FAR _far
184 # else
185 # define FAR far
186 # endif
187 # endif
188 #endif
190 #if defined(WINDOWS) || defined(WIN32)
191 /* If building or using zlib as a DLL, define ZLIB_DLL.
192 * This is not mandatory, but it offers a little performance increase.
194 # ifdef ZLIB_DLL
195 # if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
196 # ifdef ZLIB_INTERNAL
197 # define ZEXTERN extern __declspec(dllexport)
198 # else
199 # define ZEXTERN extern __declspec(dllimport)
200 # endif
201 # endif
202 # endif /* ZLIB_DLL */
203 /* If building or using zlib with the WINAPI/WINAPIV calling convention,
204 * define ZLIB_WINAPI.
205 * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
207 # ifdef ZLIB_WINAPI
208 # ifdef FAR
209 # undef FAR
210 # endif
211 # include <windows.h>
212 /* No need for _export, use ZLIB.DEF instead. */
213 /* For complete Windows compatibility, use WINAPI, not __stdcall. */
214 # define ZEXPORT WINAPI
215 # ifdef WIN32
216 # define ZEXPORTVA WINAPIV
217 # else
218 # define ZEXPORTVA FAR CDECL
219 # endif
220 # endif
221 #endif
223 #if defined (__BEOS__)
224 # ifdef ZLIB_DLL
225 # ifdef ZLIB_INTERNAL
226 # define ZEXPORT __declspec(dllexport)
227 # define ZEXPORTVA __declspec(dllexport)
228 # else
229 # define ZEXPORT __declspec(dllimport)
230 # define ZEXPORTVA __declspec(dllimport)
231 # endif
232 # endif
233 #endif
235 #ifndef ZEXTERN
236 # define ZEXTERN extern
237 #endif
238 #ifndef ZEXPORT
239 # define ZEXPORT
240 #endif
241 #ifndef ZEXPORTVA
242 # define ZEXPORTVA
243 #endif
245 #ifndef FAR
246 # define FAR
247 #endif
249 #if !defined(__MACTYPES__)
250 typedef unsigned char Byte; /* 8 bits */
251 #endif
252 typedef unsigned int uInt; /* 16 bits or more */
253 typedef unsigned long uLong; /* 32 bits or more */
255 #ifdef SMALL_MEDIUM
256 /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
257 # define Bytef Byte FAR
258 #else
259 typedef Byte FAR Bytef;
260 #endif
261 typedef char FAR charf;
262 typedef int FAR intf;
263 typedef uInt FAR uIntf;
264 typedef uLong FAR uLongf;
266 #ifdef STDC
267 typedef void const *voidpc;
268 typedef void FAR *voidpf;
269 typedef void *voidp;
270 #else
271 typedef Byte const *voidpc;
272 typedef Byte FAR *voidpf;
273 typedef Byte *voidp;
274 #endif
276 #if 0 /* HAVE_UNISTD_H -- this line is updated by ./configure */
277 # include <sys/types.h> /* for off_t */
278 # include <unistd.h> /* for SEEK_* and off_t */
279 # ifdef VMS
280 # include <unixio.h> /* for off_t */
281 # endif
282 # define z_off_t off_t
283 #endif
284 #ifndef SEEK_SET
285 # define SEEK_SET 0 /* Seek from beginning of file. */
286 # define SEEK_CUR 1 /* Seek from current position. */
287 # define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
288 #endif
289 #ifndef z_off_t
290 # define z_off_t long
291 #endif
293 #if defined(__OS400__)
294 #define NO_vsnprintf
295 #endif
297 #if defined(__MVS__)
298 # define NO_vsnprintf
299 # ifdef FAR
300 # undef FAR
301 # endif
302 #endif
304 /* MVS linker does not support external names larger than 8 bytes */
305 #if defined(__MVS__)
306 # pragma map(deflateInit_,"DEIN")
307 # pragma map(deflateInit2_,"DEIN2")
308 # pragma map(deflateEnd,"DEEND")
309 # pragma map(deflateBound,"DEBND")
310 # pragma map(inflateInit_,"ININ")
311 # pragma map(inflateInit2_,"ININ2")
312 # pragma map(inflateEnd,"INEND")
313 # pragma map(inflateSync,"INSY")
314 # pragma map(inflateSetDictionary,"INSEDI")
315 # pragma map(compressBound,"CMBND")
316 # pragma map(inflate_table,"INTABL")
317 # pragma map(inflate_fast,"INFA")
318 # pragma map(inflate_copyright,"INCOPY")
319 #endif
321 #endif /* ZCONF_H */