Watt-32 tcp/ip  2.2 dev-rel.10
zconf.h
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  */
5 
6 /* @(#) $Id$ */
7 
8 #ifndef ZCONF_H
9 #define ZCONF_H
10 
11 #define Z_PREFIX
12 
13 /*
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.
16  */
17 #ifdef Z_PREFIX
18 # define deflateInit_ _w32_z_deflateInit_
19 # define deflate _w32_z_deflate
20 # define deflateEnd _w32_z_deflateEnd
21 # define inflateInit_ _w32_z_inflateInit_
22 # define inflate _w32_z_inflate
23 # define inflateEnd _w32_z_inflateEnd
24 # define deflateInit2_ _w32_z_deflateInit2_
25 # define deflateSetDictionary _w32_z_deflateSetDictionary
26 # define deflateCopy _w32_z_deflateCopy
27 # define deflate_copyright _w32_z_deflate_copyright
28 # define deflateReset _w32_z_deflateReset
29 # define deflatePrime _w32_z_deflatePrime
30 # define deflateParams _w32_z_deflateParams
31 # define deflateBound _w32_z_deflateBound
32 # define inflateInit2_ _w32_z_inflateInit2_
33 # define inflateSetDictionary _w32_z_inflateSetDictionary
34 # define inflateSync _w32_z_inflateSync
35 # define inflateSyncPoint _w32_z_inflateSyncPoint
36 # define inflateCopy _w32_z_inflateCopy
37 # define inflateReset _w32_z_inflateReset
38 # define compress _w32_z_compress
39 # define compress2 _w32_z_compress2
40 # define compressBound _w32_z_compressBound
41 # define uncompress _w32_z_uncompress
42 # define adler32 _w32_z_adler32
43 # define crc32 _w32_z_crc32
44 # define get_crc_table _w32_z_get_crc_table
45 # define gzopen _w32_z_gzopen
46 # define gzprintf _w32_z_gzprintf
47 # define gzflush _w32_z_gzflush
48 # define gzwrite _w32_z_gzwrite
49 # define gzeof _w32_z_gzeof
50 # define gzdopen _w32_z_gzdopen
51 # define gzputs _w32_z_gzputs
52 # define gzputc _w32_z_gzputc
53 # define gzerror _w32_z_gzerror
54 # define gzclose _w32_z_gzclose
55 # define gzsetparams _w32_z_gzsetparams
56 # define gzclearerr _w32_z_gzclearerr
57 # define gzungetc _w32_z_gzungetc
58 # define gzrewind _w32_z_gzrewind
59 # define gzread _w32_z_gzread
60 # define gzseek _w32_z_gzseek
61 # define gztell _w32_z_gztell
62 # define gzgetc _w32_z_gzgetc
63 # define gzgets _w32_z_gzgets
64 # define zcalloc _w32_z_calloc
65 # define z_errmsg _w32_z_errmsg
66 # define zError _w32_zError
67 # define zcfree _w32_zcfree
68 # define zlibVersion _w32_zlibVersion
69 # define zlibCompileFlags _w32_zlibCompileFlags
70 # define _tr_init _w32_z_tr_init
71 # define _tr_tally _w32_z_tr_tally
72 # define _tr_flush_block _w32_z_tr_flush_block
73 # define _tr_align _w32_z_tr_align
74 # define _tr_stored_block _w32_z_tr_stored_block
75 # define _dist_code _w32_z_dist_code
76 # define _length_code _w32_z_length_code
77 
78 # define Byte z_Byte
79 # define uInt z_uInt
80 # define uLong z_uLong
81 # define Bytef z_Bytef
82 # define charf z_charf
83 # define intf z_intf
84 # define uIntf z_uIntf
85 # define uLongf z_uLongf
86 # define voidpf z_voidpf
87 # define voidp z_voidp
88 #endif
89 
90 #if defined(__MSDOS__) && !defined(MSDOS)
91 # define MSDOS
92 #endif
93 
94 #if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
95 # define OS2
96 #endif
97 
98 #if defined(_WINDOWS) && !defined(WINDOWS)
99 # define WINDOWS
100 #endif
101 
102 #if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32)
103 # define _WIN32
104 #endif
105 
106 #if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32) && !defined(_WIN32)
107 # if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
108 # ifndef SYS16BIT
109 # define SYS16BIT
110 # endif
111 # if defined(__DMC__) && defined(__SMALL32__)
112 # undef SYS16BIT
113 # endif
114 # endif
115 #endif
116 
117 /*
118  * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
119  * than 64k bytes at a time (needed on systems with 16-bit int).
120  */
121 #ifdef SYS16BIT
122 # define MAXSEG_64K
123 #endif
124 #ifdef MSDOS
125 # define UNALIGNED_OK
126 #endif
127 
128 #ifdef __STDC_VERSION__
129 # ifndef STDC
130 # define STDC
131 # endif
132 # if __STDC_VERSION__ >= 199901L
133 # ifndef STDC99
134 # define STDC99
135 # endif
136 # endif
137 #endif
138 
139 #if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
140 # define STDC
141 #endif
142 
143 #if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
144 # define STDC
145 #endif
146 
147 #if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(_WIN32))
148 # define STDC
149 #endif
150 
151 #if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
152 # define STDC
153 #endif
154 
155 #if !defined(STDC) && defined(__POCC__)
156 # define STDC
157 #endif
158 
159 #if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */
160 # define STDC
161 #endif
162 
163 #ifndef STDC
164 # ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
165 # define const /* note: need a more gentle solution here */
166 # endif
167 #endif
168 
169 /* Some Mac compilers merge all .h files incorrectly: */
170 #if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
171 # define NO_DUMMY_DECL
172 #endif
173 
174 /* Maximum value for memLevel in deflateInit2 */
175 #ifndef MAX_MEM_LEVEL
176 # ifdef MAXSEG_64K
177 # define MAX_MEM_LEVEL 8
178 # else
179 # define MAX_MEM_LEVEL 9
180 # endif
181 #endif
182 
183 /* Maximum value for windowBits in deflateInit2 and inflateInit2.
184  * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
185  * created by gzip. (Files created by minigzip can still be extracted by
186  * gzip.)
187  */
188 #ifndef MAX_WBITS
189 # define MAX_WBITS 15 /* 32K LZ77 window */
190 #endif
191 
192 /* The memory requirements for deflate are (in bytes):
193  (1 << (windowBits+2)) + (1 << (memLevel+9))
194  that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
195  plus a few kilobytes for small objects. For example, if you want to reduce
196  the default memory requirements from 256K to 128K, compile with
197  make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
198  Of course this will generally degrade compression (there's no free lunch).
199 
200  The memory requirements for inflate are (in bytes) 1 << windowBits
201  that is, 32K for windowBits=15 (default value) plus a few kilobytes
202  for small objects.
203 */
204 
205  /* Type declarations */
206 
207 #ifndef OF /* function prototypes */
208 # ifdef STDC
209 # define OF(args) args
210 # else
211 # define OF(args) ()
212 # endif
213 #endif
214 
215 /* The following definitions for FAR are needed only for MSDOS mixed
216  * model programming (small or medium model with some far allocations).
217  * This was tested only with MSC; for other MSDOS compilers you may have
218  * to define NO_MEMCPY in zutil.h. If you don't need the mixed model,
219  * just define FAR to be empty.
220  */
221 #ifdef SYS16BIT
222 # if defined(M_I86SM) || defined(M_I86MM)
223  /* MSC small or medium model */
224 # define SMALL_MEDIUM
225 # ifdef _MSC_VER
226 # define FAR _far
227 # else
228 # define FAR far
229 # endif
230 # endif
231 # if (defined(__SMALL__) || defined(__MEDIUM__))
232  /* Turbo C small or medium model */
233 # define SMALL_MEDIUM
234 # ifdef __BORLANDC__
235 # define FAR _far
236 # else
237 # define FAR far
238 # endif
239 # endif
240 #endif
241 
242 #if defined(WINDOWS) || defined(_WIN32)
243  /* If building or using zlib as a DLL, define ZLIB_DLL.
244  * This is not mandatory, but it offers a little performance increase.
245  */
246 # ifdef ZLIB_DLL
247 # if defined(_WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
248 # ifdef ZLIB_INTERNAL
249 # define ZEXTERN extern __declspec(dllexport)
250 # else
251 # define ZEXTERN extern __declspec(dllimport)
252 # endif
253 # endif
254 # endif /* ZLIB_DLL */
255  /* If building or using zlib with the WINAPI/WINAPIV calling convention,
256  * define ZLIB_WINAPI.
257  * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
258  */
259 # ifdef ZLIB_WINAPI
260 # ifdef FAR
261 # undef FAR
262 # endif
263 # include <windows.h>
264  /* No need for _export, use ZLIB.DEF instead. */
265  /* For complete Windows compatibility, use WINAPI, not __stdcall. */
266 # define ZEXPORT WINAPI
267 # ifdef _WIN32
268 # define ZEXPORTVA WINAPIV
269 # else
270 # define ZEXPORTVA FAR CDECL
271 # endif
272 # endif
273 #endif
274 
275 #if defined (__BEOS__)
276 # ifdef ZLIB_DLL
277 # ifdef ZLIB_INTERNAL
278 # define ZEXPORT __declspec(dllexport)
279 # define ZEXPORTVA __declspec(dllexport)
280 # else
281 # define ZEXPORT __declspec(dllimport)
282 # define ZEXPORTVA __declspec(dllimport)
283 # endif
284 # endif
285 #endif
286 
287 #ifndef ZEXTERN
288 # define ZEXTERN extern
289 #endif
290 #ifndef ZEXPORT
291 # define ZEXPORT
292 #endif
293 #ifndef ZEXPORTVA
294 # define ZEXPORTVA
295 #endif
296 
297 #ifndef FAR
298 # define FAR
299 #endif
300 
301 typedef unsigned char Byte; /* 8 bits */
302 typedef unsigned int uInt; /* 16 bits or more */
303 typedef unsigned long uLong; /* 32 bits or more */
304 
305 #ifdef SMALL_MEDIUM
306  /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
307  #undef Bytef
308  #define Bytef Byte FAR
309 #else
310  typedef Byte FAR Bytef;
311 #endif
312 
313 typedef char FAR charf;
314 typedef int FAR intf;
315 typedef uInt FAR uIntf;
316 typedef uLong FAR uLongf;
317 
318 #ifdef STDC
319  typedef void const *voidpc;
320  typedef void FAR *voidpf;
321  typedef void *voidp;
322 #else
323  typedef Byte const *voidpc;
324  typedef Byte FAR *voidpf;
325  typedef Byte *voidp;
326 #endif
327 
328 #ifndef SEEK_SET
329 # define SEEK_SET 0 /* Seek from beginning of file. */
330 # define SEEK_CUR 1 /* Seek from current position. */
331 # define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
332 #endif
333 
334 #ifndef z_off_t
335 # define z_off_t long
336 #endif
337 
338 #if defined(__OS400__)
339 #define NO_vsnprintf
340 #endif
341 
342 #if defined(__MVS__)
343 # define NO_vsnprintf
344 # ifdef FAR
345 # undef FAR
346 # endif
347 #endif
348 
349 /* MVS linker does not support external names larger than 8 bytes */
350 #if defined(__MVS__)
351 # pragma map(deflateInit_,"DEIN")
352 # pragma map(deflateInit2_,"DEIN2")
353 # pragma map(deflateEnd,"DEEND")
354 # pragma map(deflateBound,"DEBND")
355 # pragma map(inflateInit_,"ININ")
356 # pragma map(inflateInit2_,"ININ2")
357 # pragma map(inflateEnd,"INEND")
358 # pragma map(inflateSync,"INSY")
359 # pragma map(inflateSetDictionary,"INSEDI")
360 # pragma map(compressBound,"CMBND")
361 # pragma map(inflate_table,"INTABL")
362 # pragma map(inflate_fast,"INFA")
363 # pragma map(inflate_copyright,"INCOPY")
364 #endif
365 
366 #endif /* ZCONF_H */