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