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



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ae4571287 Thu Nov 23 00:06:53 2017 +0100 at dom oct 27 23:51:55 CET 2019