versadac  1
versadac - Scalable Recorder Firmware
zconf.h
1 /* zconf.h -- configuration of the zlib compression library
2  * Copyright (C) 1995-2002 Jean-loup Gailly.
3  * For conditions of distribution and use, see copyright notice in zlib.h
4  */
5 
6 /* @(#) $Id$ */
7 
8 
9 #ifndef _ZCONF_H
10 #define _ZCONF_H
11 
12 /*
13  * If you *really* need a unique prefix for all types and library functions,
14  * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
15  */
16 
17 /*
18  * WindManage needs a unique prefix for zlib to avoid conflicts with
19  * the incomplete zlib version included with vxWorks.
20  */
21 
22 #ifndef Z_PREFIX
23 #define Z_PREFIX
24 #endif
25 
26 
27 #ifdef Z_PREFIX
28 # define deflateInit_ zlib_z_deflateInit_
29 # define deflate zlib_z_deflate
30 # define deflateEnd zlib_z_deflateEnd
31 # define inflateInit_ zlib_z_inflateInit_
32 # define inflate zlib_z_inflate
33 # define inflateEnd zlib_z_inflateEnd
34 # define deflateInit2_ zlib_z_deflateInit2_
35 # define deflateSetDictionary zlib_z_deflateSetDictionary
36 # define deflateCopy zlib_z_deflateCopy
37 # define deflateReset zlib_z_deflateReset
38 # define deflateParams zlib_z_deflateParams
39 # define inflateInit2_ zlib_z_inflateInit2_
40 # define inflateSetDictionary zlib_z_inflateSetDictionary
41 # define inflateSync zlib_z_inflateSync
42 # define inflateSyncPoint zlib_z_inflateSyncPoint
43 # define inflateReset zlib_z_inflateReset
44 # define compress zlib_z_compress
45 # define compress2 zlib_z_compress2
46 # define uncompress zlib_z_uncompress
47 # define adler32 zlib_z_adler32
48 # define crc32 zlib_z_crc32
49 # define get_crc_table zlib_z_get_crc_table
50 
51 # define zcalloc zlib_zcalloc
52 # define zcfree zlib_zcfree
53 # define zError zlib_zError
54 # define gzerror zlib_gzerror
55 # define gzclose zlib_gzclose
56 # define gzseek zlib_gzseek
57 # define gzrewind zlib_gzrewind
58 # define gztell zlib_gztell
59 # define gzflush zlib_gzflush
60 # define gzgetc zlib_gzgetc
61 # define gzgets zlib_gzgets
62 # define gzputc zlib_gzputc
63 # define gzputs zlib_gzputs
64 # define gzprintf zlib_gzprintf
65 # define gzwrite zlib_gzwrite
66 # define gzread zlib_gzread
67 # define gzsetparams zlib_gzsetparams
68 # define gzopen zlib_gzopen
69 # define gzdopen zlib_gzdopen
70 # define maketree zlib_maketree
71 # define main zlib_main
72 # define z_errmsg zlib_z_errmsg
73 # define inflate_mask zlib_inflate_mask
74 # define inflate_fast zlib_inflate_fast
75 # define inflate_flush zlib_inflate_flush
76 # define inflate_blocks zlib_inflate_blocks
77 # define inflate_codes zlib_inflate_codes
78 # define inflate_codes_new zlib_inflate_codes_new
79 # define inflate_blocks_new zlib_inflate_blocks_new
80 # define inflate_blocks_free zlib_inflate_blocks_free
81 # define inflate_blocks_reset zlib_inflate_blocks_reset
82 # define inflate_set_dictionary zlib_inflate_set_dictionary
83 # define inflate_blocks_sync_point zlib_inflate_blocks_sync_point
84 # define inflate_codes_free zlib_inflate_codes_free
85 # define inflate_trees_fixed zlib_inflate_trees_fixed
86 # define inflate_trees_bits zlib_inflate_trees_bits
87 # define inflate_trees_dynamic zlib_inflate_trees_dynamic
88 # define deflate_copyright zlib_deflate_copyright
89 # define _tr_init _zlib_tr_init
90 # define _tr_align _zlib_tr_align
91 # define _tr_stored_block _zlib_tr_stored_block
92 # define _tr_flush_block _zlib_tr_flush_block
93 # define _tr_tally _zlib_tr_tally
94 # define _dist_code _zlib_dist_code
95 # define _length_code _zlib_length_code
96 
97 # define Byte z_Byte
98 # define uInt z_uInt
99 # define uLong z_uLong
100 # define Bytef z_Bytef
101 # define charf z_charf
102 # define intf z_intf
103 # define uIntf z_uIntf
104 # define uLongf z_uLongf
105 # define voidpf z_voidpf
106 # define voidp z_voidp
107 #endif
108 
109 #if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32)
110 # define WIN32
111 #endif
112 #if defined(__GNUC__) || defined(WIN32) || defined(__386__) || defined(i386)
113 # ifndef __32BIT__
114 # define __32BIT__
115 # endif
116 #endif
117 #if defined(__MSDOS__) && !defined(MSDOS)
118 # define MSDOS
119 #endif
120 
121 /*
122  * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
123  * than 64k bytes at a time (needed on systems with 16-bit int).
124  */
125 #if defined(MSDOS) && !defined(__32BIT__)
126 # define MAXSEG_64K
127 #endif
128 #ifdef MSDOS
129 # define UNALIGNED_OK
130 #endif
131 
132 #if (defined(MSDOS) || defined(_WINDOWS) || defined(WIN32)) && !defined(STDC)
133 # define STDC
134 #endif
135 #if defined(__STDC__) || defined(__cplusplus) || defined(__OS2__)
136 # ifndef STDC
137 # define STDC
138 # endif
139 #endif
140 
141 #ifndef STDC
142 # ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
143 # define const
144 # endif
145 #endif
146 
147 /* Some Mac compilers merge all .h files incorrectly: */
148 #if defined(__MWERKS__) || defined(applec) ||defined(THINK_C) ||defined(__SC__)
149 # define NO_DUMMY_DECL
150 #endif
151 
152 /* Old Borland C incorrectly complains about missing returns: */
153 #if defined(__BORLANDC__) && (__BORLANDC__ < 0x500)
154 # define NEED_DUMMY_RETURN
155 #endif
156 
157 
158 /* Maximum value for memLevel in deflateInit2 */
159 #ifndef MAX_MEM_LEVEL
160 # ifdef MAXSEG_64K
161 # define MAX_MEM_LEVEL 8
162 # else
163 # define MAX_MEM_LEVEL 9
164 # endif
165 #endif
166 
167 /* Maximum value for windowBits in deflateInit2 and inflateInit2.
168  * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
169  * created by gzip. (Files created by minigzip can still be extracted by
170  * gzip.)
171  */
172 #ifndef MAX_WBITS
173 # define MAX_WBITS 15 /* 32K LZ77 window */
174 #endif
175 
176 /* The memory requirements for deflate are (in bytes):
177  (1 << (windowBits+2)) + (1 << (memLevel+9))
178  that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
179  plus a few kilobytes for small objects. For example, if you want to reduce
180  the default memory requirements from 256K to 128K, compile with
181  make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
182  Of course this will generally degrade compression (there's no free lunch).
183 
184  The memory requirements for inflate are (in bytes) 1 << windowBits
185  that is, 32K for windowBits=15 (default value) plus a few kilobytes
186  for small objects.
187 */
188 
189  /* Type declarations */
190 
191 #ifndef OF /* function prototypes */
192 # ifdef STDC
193 # define OF(args) args
194 # else
195 # define OF(args) ()
196 # endif
197 #endif
198 
199 /* The following definitions for FAR are needed only for MSDOS mixed
200  * model programming (small or medium model with some far allocations).
201  * This was tested only with MSC; for other MSDOS compilers you may have
202  * to define NO_MEMCPY in zutil.h. If you don't need the mixed model,
203  * just define FAR to be empty.
204  */
205 #if (defined(M_I86SM) || defined(M_I86MM)) && !defined(__32BIT__)
206  /* MSC small or medium model */
207 # define SMALL_MEDIUM
208 # ifdef _MSC_VER
209 # define FAR _far
210 # else
211 # define FAR far
212 # endif
213 #endif
214 #if defined(__BORLANDC__) && (defined(__SMALL__) || defined(__MEDIUM__))
215 # ifndef __32BIT__
216 # define SMALL_MEDIUM
217 # define FAR _far
218 # endif
219 #endif
220 
221 /* Compile with -DZLIB_DLL for Windows DLL support */
222 #if defined(ZLIB_DLL)
223 # if defined(_WINDOWS) || defined(WINDOWS)
224 # ifdef FAR
225 # undef FAR
226 # endif
227 # include <windows.h>
228 # define ZEXPORT WINAPI
229 # ifdef WIN32
230 # define ZEXPORTVA WINAPIV
231 # else
232 # define ZEXPORTVA FAR _cdecl _export
233 # endif
234 # endif
235 # if defined (__BORLANDC__)
236 # if (__BORLANDC__ >= 0x0500) && defined (WIN32)
237 # include <windows.h>
238 # define ZEXPORT __declspec(dllexport) WINAPI
239 # define ZEXPORTRVA __declspec(dllexport) WINAPIV
240 # else
241 # if defined (_Windows) && defined (__DLL__)
242 # define ZEXPORT _export
243 # define ZEXPORTVA _export
244 # endif
245 # endif
246 # endif
247 #endif
248 
249 #if defined (__BEOS__)
250 # if defined (ZLIB_DLL)
251 # define ZEXTERN extern __declspec(dllexport)
252 # else
253 # define ZEXTERN extern __declspec(dllimport)
254 # endif
255 #endif
256 
257 #ifndef ZEXPORT
258 # define ZEXPORT
259 #endif
260 #ifndef ZEXPORTVA
261 # define ZEXPORTVA
262 #endif
263 #ifndef ZEXTERN
264 # define ZEXTERN extern
265 #endif
266 
267 #ifndef FAR
268 # define FAR
269 #endif
270 
271 #if !defined(MACOS) && !defined(TARGET_OS_MAC)
272 typedef unsigned char Byte; /* 8 bits */
273 #endif
274 typedef unsigned int uInt; /* 16 bits or more */
275 typedef unsigned long uLong; /* 32 bits or more */
276 
277 #ifdef SMALL_MEDIUM
278  /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
279 # define Bytef Byte FAR
280 #else
281  typedef Byte FAR Bytef;
282 #endif
283 typedef char FAR charf;
284 typedef int FAR intf;
285 typedef uInt FAR uIntf;
286 typedef uLong FAR uLongf;
287 
288 #ifdef STDC
289  typedef void FAR *voidpf;
290  typedef void *voidp;
291 #else
292  typedef Byte FAR *voidpf;
293  typedef Byte *voidp;
294 #endif
295 
296 #ifdef HAVE_UNISTD_H
297 # include <sys/types.h> /* for off_t */
298 # include <unistd.h> /* for SEEK_* and off_t */
299 # define z_off_t off_t
300 #endif
301 #ifndef SEEK_SET
302 # define SEEK_SET 0 /* Seek from beginning of file. */
303 # define SEEK_CUR 1 /* Seek from current position. */
304 # define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
305 #endif
306 #ifndef z_off_t
307 # define z_off_t long
308 #endif
309 
310 /* MVS linker does not support external names larger than 8 bytes */
311 #if defined(__MVS__)
312 # pragma map(deflateInit_,"DEIN")
313 # pragma map(deflateInit2_,"DEIN2")
314 # pragma map(deflateEnd,"DEEND")
315 # pragma map(inflateInit_,"ININ")
316 # pragma map(inflateInit2_,"ININ2")
317 # pragma map(inflateEnd,"INEND")
318 # pragma map(inflateSync,"INSY")
319 # pragma map(inflateSetDictionary,"INSEDI")
320 # pragma map(zlib_inflate_blocks,"INBL")
321 # pragma map(zlib_inflate_blocks_new,"INBLNE")
322 # pragma map(zlib_inflate_blocks_free,"INBLFR")
323 # pragma map(zlib_inflate_blocks_reset,"INBLRE")
324 # pragma map(zlib_inflate_codes_free,"INCOFR")
325 # pragma map(zlib_inflate_codes,"INCO")
326 # pragma map(zlib_inflate_fast,"INFA")
327 # pragma map(zlib_inflate_flush,"INFLU")
328 # pragma map(zlib_inflate_mask,"INMA")
329 # pragma map(zlib_inflate_set_dictionary,"INSEDI2")
330 # pragma map(zlib_inflate_copyright,"INCOPY")
331 # pragma map(zlib_inflate_trees_bits,"INTRBI")
332 # pragma map(zlib_inflate_trees_dynamic,"INTRDY")
333 # pragma map(zlib_inflate_trees_fixed,"INTRFI")
334 # pragma map(inflate_trees_free,"INTRFR")
335 #endif
336 
337 #endif /* _ZCONF_H */