fltk  1.3.5-source
About: FLTK (Fast Light Tool Kit) is a cross-platform C++ GUI toolkit for UNIX/Linux (X11), Microsoft Windows, and MacOS X.
  Fossies Dox: fltk-1.3.5-source.tar.bz2  ("inofficial" and yet experimental doxygen-generated source code documentation)  

zconf.h
Go to the documentation of this file.
1 /* FLTK *************************************************************** */
2 /* FLTK Comments marked with FLTK show modifications for FLTK which */
3 /* FLTK should probably be preserved when zlib is upgraded. */
4 /* FLTK *************************************************************** */
5 
6 /* zconf.h -- configuration of the zlib compression library
7  * Copyright (C) 1995-2013 Jean-loup Gailly.
8  * For conditions of distribution and use, see copyright notice in zlib.h
9  */
10 
11 /* @(#) $Id$ */
12 
13 #ifndef ZCONF_H
14 #define ZCONF_H
15 
16 #if ! (defined(_WIN32) || defined(WIN32)) /* FLTK */
17 # define HAVE_UNISTD_H /* FLTK */
18 #endif /* FLTK */
19 
20 /*
21  * If you *really* need a unique prefix for all types and library functions,
22  * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
23  * Even better than compiling with -DZ_PREFIX would be to use configure to set
24  * this permanently in zconf.h using "./configure --zprefix".
25  */
26 #ifdef Z_PREFIX /* may be set to #if 1 by ./configure */
27 # define Z_PREFIX_SET
28 
29 /* all linked symbols */
30 # define _dist_code z__dist_code
31 # define _length_code z__length_code
32 # define _tr_align z__tr_align
33 # define _tr_flush_bits z__tr_flush_bits
34 # define _tr_flush_block z__tr_flush_block
35 # define _tr_init z__tr_init
36 # define _tr_stored_block z__tr_stored_block
37 # define _tr_tally z__tr_tally
38 # define adler32 z_adler32
39 # define adler32_combine z_adler32_combine
40 # define adler32_combine64 z_adler32_combine64
41 # ifndef Z_SOLO
42 # define compress z_compress
43 # define compress2 z_compress2
44 # define compressBound z_compressBound
45 # endif
46 # define crc32 z_crc32
47 # define crc32_combine z_crc32_combine
48 # define crc32_combine64 z_crc32_combine64
49 # define deflate z_deflate
50 # define deflateBound z_deflateBound
51 # define deflateCopy z_deflateCopy
52 # define deflateEnd z_deflateEnd
53 # define deflateInit2_ z_deflateInit2_
54 # define deflateInit_ z_deflateInit_
55 # define deflateParams z_deflateParams
56 # define deflatePending z_deflatePending
57 # define deflatePrime z_deflatePrime
58 # define deflateReset z_deflateReset
59 # define deflateResetKeep z_deflateResetKeep
60 # define deflateSetDictionary z_deflateSetDictionary
61 # define deflateSetHeader z_deflateSetHeader
62 # define deflateTune z_deflateTune
63 # define deflate_copyright z_deflate_copyright
64 # define get_crc_table z_get_crc_table
65 # ifndef Z_SOLO
66 # define gz_error z_gz_error
67 # define gz_intmax z_gz_intmax
68 # define gz_strwinerror z_gz_strwinerror
69 # define gzbuffer z_gzbuffer
70 # define gzclearerr z_gzclearerr
71 # define gzclose z_gzclose
72 # define gzclose_r z_gzclose_r
73 # define gzclose_w z_gzclose_w
74 # define gzdirect z_gzdirect
75 # define gzdopen z_gzdopen
76 # define gzeof z_gzeof
77 # define gzerror z_gzerror
78 # define gzflush z_gzflush
79 # define gzgetc z_gzgetc
80 # define gzgetc_ z_gzgetc_
81 # define gzgets z_gzgets
82 # define gzoffset z_gzoffset
83 # define gzoffset64 z_gzoffset64
84 # define gzopen z_gzopen
85 # define gzopen64 z_gzopen64
86 # ifdef _WIN32
87 # define gzopen_w z_gzopen_w
88 # endif
89 # define gzprintf z_gzprintf
90 # define gzvprintf z_gzvprintf
91 # define gzputc z_gzputc
92 # define gzputs z_gzputs
93 # define gzread z_gzread
94 # define gzrewind z_gzrewind
95 # define gzseek z_gzseek
96 # define gzseek64 z_gzseek64
97 # define gzsetparams z_gzsetparams
98 # define gztell z_gztell
99 # define gztell64 z_gztell64
100 # define gzungetc z_gzungetc
101 # define gzwrite z_gzwrite
102 # endif
103 # define inflate z_inflate
104 # define inflateBack z_inflateBack
105 # define inflateBackEnd z_inflateBackEnd
106 # define inflateBackInit_ z_inflateBackInit_
107 # define inflateCopy z_inflateCopy
108 # define inflateEnd z_inflateEnd
109 # define inflateGetHeader z_inflateGetHeader
110 # define inflateInit2_ z_inflateInit2_
111 # define inflateInit_ z_inflateInit_
112 # define inflateMark z_inflateMark
113 # define inflatePrime z_inflatePrime
114 # define inflateReset z_inflateReset
115 # define inflateReset2 z_inflateReset2
116 # define inflateSetDictionary z_inflateSetDictionary
117 # define inflateGetDictionary z_inflateGetDictionary
118 # define inflateSync z_inflateSync
119 # define inflateSyncPoint z_inflateSyncPoint
120 # define inflateUndermine z_inflateUndermine
121 # define inflateResetKeep z_inflateResetKeep
122 # define inflate_copyright z_inflate_copyright
123 # define inflate_fast z_inflate_fast
124 # define inflate_table z_inflate_table
125 # ifndef Z_SOLO
126 # define uncompress z_uncompress
127 # endif
128 # define zError z_zError
129 # ifndef Z_SOLO
130 # define zcalloc z_zcalloc
131 # define zcfree z_zcfree
132 # endif
133 # define zlibCompileFlags z_zlibCompileFlags
134 # define zlibVersion z_zlibVersion
135 
136 /* all zlib typedefs in zlib.h and zconf.h */
137 # define Byte z_Byte
138 # define Bytef z_Bytef
139 # define alloc_func z_alloc_func
140 # define charf z_charf
141 # define free_func z_free_func
142 # ifndef Z_SOLO
143 # define gzFile z_gzFile
144 # endif
145 # define gz_header z_gz_header
146 # define gz_headerp z_gz_headerp
147 # define in_func z_in_func
148 # define intf z_intf
149 # define out_func z_out_func
150 # define uInt z_uInt
151 # define uIntf z_uIntf
152 # define uLong z_uLong
153 # define uLongf z_uLongf
154 # define voidp z_voidp
155 # define voidpc z_voidpc
156 # define voidpf z_voidpf
157 
158 /* all zlib structs in zlib.h and zconf.h */
159 # define gz_header_s z_gz_header_s
160 # define internal_state z_internal_state
161 
162 #endif
163 
164 #if defined(__MSDOS__) && !defined(MSDOS)
165 # define MSDOS
166 #endif
167 #if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
168 # define OS2
169 #endif
170 #if defined(_WINDOWS) && !defined(WINDOWS)
171 # define WINDOWS
172 #endif
173 #if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
174 # ifndef WIN32
175 # define WIN32
176 # endif
177 #endif
178 #if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
179 # if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
180 # ifndef SYS16BIT
181 # define SYS16BIT
182 # endif
183 # endif
184 #endif
185 
186 /*
187  * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
188  * than 64k bytes at a time (needed on systems with 16-bit int).
189  */
190 #ifdef SYS16BIT
191 # define MAXSEG_64K
192 #endif
193 #ifdef MSDOS
194 # define UNALIGNED_OK
195 #endif
196 
197 #ifdef __STDC_VERSION__
198 # ifndef STDC
199 # define STDC
200 # endif
201 # if __STDC_VERSION__ >= 199901L
202 # ifndef STDC99
203 # define STDC99
204 # endif
205 # endif
206 #endif
207 #if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
208 # define STDC
209 #endif
210 #if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
211 # define STDC
212 #endif
213 #if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
214 # define STDC
215 #endif
216 #if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
217 # define STDC
218 #endif
219 
220 #if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */
221 # define STDC
222 #endif
223 
224 #ifndef STDC
225 # ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
226 # define const /* note: need a more gentle solution here */
227 # endif
228 #endif
229 
230 #if defined(ZLIB_CONST) && !defined(z_const)
231 # define z_const const
232 #else
233 # define z_const
234 #endif
235 
236 /* Some Mac compilers merge all .h files incorrectly: */
237 #if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
238 # define NO_DUMMY_DECL
239 #endif
240 
241 /* Maximum value for memLevel in deflateInit2 */
242 #ifndef MAX_MEM_LEVEL
243 # ifdef MAXSEG_64K
244 # define MAX_MEM_LEVEL 8
245 # else
246 # define MAX_MEM_LEVEL 9
247 # endif
248 #endif
249 
250 /* Maximum value for windowBits in deflateInit2 and inflateInit2.
251  * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
252  * created by gzip. (Files created by minigzip can still be extracted by
253  * gzip.)
254  */
255 #ifndef MAX_WBITS
256 # define MAX_WBITS 15 /* 32K LZ77 window */
257 #endif
258 
259 /* The memory requirements for deflate are (in bytes):
260  (1 << (windowBits+2)) + (1 << (memLevel+9))
261  that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
262  plus a few kilobytes for small objects. For example, if you want to reduce
263  the default memory requirements from 256K to 128K, compile with
264  make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
265  Of course this will generally degrade compression (there's no free lunch).
266 
267  The memory requirements for inflate are (in bytes) 1 << windowBits
268  that is, 32K for windowBits=15 (default value) plus a few kilobytes
269  for small objects.
270 */
271 
272  /* Type declarations */
273 
274 #ifndef OF /* function prototypes */
275 # ifdef STDC
276 # define OF(args) args
277 # else
278 # define OF(args) ()
279 # endif
280 #endif
281 
282 #ifndef Z_ARG /* function prototypes for stdarg */
283 # if defined(STDC) || defined(Z_HAVE_STDARG_H)
284 # define Z_ARG(args) args
285 # else
286 # define Z_ARG(args) ()
287 # endif
288 #endif
289 
290 /* The following definitions for FAR are needed only for MSDOS mixed
291  * model programming (small or medium model with some far allocations).
292  * This was tested only with MSC; for other MSDOS compilers you may have
293  * to define NO_MEMCPY in zutil.h. If you don't need the mixed model,
294  * just define FAR to be empty.
295  */
296 #ifdef SYS16BIT
297 # if defined(M_I86SM) || defined(M_I86MM)
298  /* MSC small or medium model */
299 # define SMALL_MEDIUM
300 # ifdef _MSC_VER
301 # define FAR _far
302 # else
303 # define FAR far
304 # endif
305 # endif
306 # if (defined(__SMALL__) || defined(__MEDIUM__))
307  /* Turbo C small or medium model */
308 # define SMALL_MEDIUM
309 # ifdef __BORLANDC__
310 # define FAR _far
311 # else
312 # define FAR far
313 # endif
314 # endif
315 #endif
316 
317 #if defined(WINDOWS) || defined(WIN32)
318  /* If building or using zlib as a DLL, define ZLIB_DLL.
319  * This is not mandatory, but it offers a little performance increase.
320  */
321 # ifdef ZLIB_DLL
322 # if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
323 # ifdef ZLIB_INTERNAL
324 # define ZEXTERN extern __declspec(dllexport)
325 # else
326 # define ZEXTERN extern __declspec(dllimport)
327 # endif
328 # endif
329 # endif /* ZLIB_DLL */
330  /* If building or using zlib with the WINAPI/WINAPIV calling convention,
331  * define ZLIB_WINAPI.
332  * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
333  */
334 # ifdef ZLIB_WINAPI
335 # ifdef FAR
336 # undef FAR
337 # endif
338 # include <windows.h>
339  /* No need for _export, use ZLIB.DEF instead. */
340  /* For complete Windows compatibility, use WINAPI, not __stdcall. */
341 # define ZEXPORT WINAPI
342 # ifdef WIN32
343 # define ZEXPORTVA WINAPIV
344 # else
345 # define ZEXPORTVA FAR CDECL
346 # endif
347 # endif
348 #endif
349 
350 #if defined (__BEOS__)
351 # ifdef ZLIB_DLL
352 # ifdef ZLIB_INTERNAL
353 # define ZEXPORT __declspec(dllexport)
354 # define ZEXPORTVA __declspec(dllexport)
355 # else
356 # define ZEXPORT __declspec(dllimport)
357 # define ZEXPORTVA __declspec(dllimport)
358 # endif
359 # endif
360 #endif
361 
362 #ifndef ZEXTERN
363 # define ZEXTERN extern
364 #endif
365 #ifndef ZEXPORT
366 # define ZEXPORT
367 #endif
368 #ifndef ZEXPORTVA
369 # define ZEXPORTVA
370 #endif
371 
372 #ifndef FAR
373 # define FAR
374 #endif
375 
376 #if !defined(__MACTYPES__)
377 typedef unsigned char Byte; /* 8 bits */
378 #endif
379 typedef unsigned int uInt; /* 16 bits or more */
380 typedef unsigned long uLong; /* 32 bits or more */
381 
382 #ifdef SMALL_MEDIUM
383  /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
384 # define Bytef Byte FAR
385 #else
386  typedef Byte FAR Bytef;
387 #endif
388 typedef char FAR charf;
389 typedef int FAR intf;
390 typedef uInt FAR uIntf;
391 typedef uLong FAR uLongf;
392 
393 #ifdef STDC
394  typedef void const *voidpc;
395  typedef void FAR *voidpf;
396  typedef void *voidp;
397 #else
398  typedef Byte const *voidpc;
399  typedef Byte FAR *voidpf;
400  typedef Byte *voidp;
401 #endif
402 
403 #if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC)
404 # include <limits.h>
405 # if (UINT_MAX == 0xffffffffUL)
406 # define Z_U4 unsigned
407 # elif (ULONG_MAX == 0xffffffffUL)
408 # define Z_U4 unsigned long
409 # elif (USHRT_MAX == 0xffffffffUL)
410 # define Z_U4 unsigned short
411 # endif
412 #endif
413 
414 #ifdef Z_U4
415  typedef Z_U4 z_crc_t;
416 #else
417  typedef unsigned long z_crc_t;
418 #endif
419 
420 #ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */
421 # define Z_HAVE_UNISTD_H
422 #endif
423 
424 #ifdef HAVE_STDARG_H /* may be set to #if 1 by ./configure */
425 # define Z_HAVE_STDARG_H
426 #endif
427 
428 #ifdef STDC
429 # ifndef Z_SOLO
430 # include <sys/types.h> /* for off_t */
431 # endif
432 #endif
433 
434 #if defined(STDC) || defined(Z_HAVE_STDARG_H)
435 # ifndef Z_SOLO
436 # include <stdarg.h> /* for va_list */
437 # endif
438 #endif
439 
440 #ifdef _WIN32
441 # ifndef Z_SOLO
442 # include <stddef.h> /* for wchar_t */
443 # endif
444 #endif
445 
446 /* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and
447  * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even
448  * though the former does not conform to the LFS document), but considering
449  * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as
450  * equivalently requesting no 64-bit operations
451  */
452 #if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1
453 # undef _LARGEFILE64_SOURCE
454 #endif
455 
456 #if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H)
457 # define Z_HAVE_UNISTD_H
458 #endif
459 #ifndef Z_SOLO
460 # if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE)
461 # include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */
462 # ifdef VMS
463 # include <unixio.h> /* for off_t */
464 # endif
465 # ifndef z_off_t
466 # define z_off_t off_t
467 # endif
468 # endif
469 #endif
470 
471 #if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0
472 # define Z_LFS64
473 #endif
474 
475 #if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64)
476 # define Z_LARGE64
477 #endif
478 
479 #if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64)
480 # define Z_WANT64
481 #endif
482 
483 #if !defined(SEEK_SET) && !defined(Z_SOLO)
484 # define SEEK_SET 0 /* Seek from beginning of file. */
485 # define SEEK_CUR 1 /* Seek from current position. */
486 # define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
487 #endif
488 
489 #ifndef z_off_t
490 # define z_off_t long
491 #endif
492 
493 #if !defined(_WIN32) && defined(Z_LARGE64)
494 # define z_off64_t off64_t
495 #else
496 # if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO)
497 # define z_off64_t __int64
498 # else
499 # define z_off64_t z_off_t
500 # endif
501 #endif
502 
503 /* MVS linker does not support external names larger than 8 bytes */
504 #if defined(__MVS__)
505  #pragma map(deflateInit_,"DEIN")
506  #pragma map(deflateInit2_,"DEIN2")
507  #pragma map(deflateEnd,"DEEND")
508  #pragma map(deflateBound,"DEBND")
509  #pragma map(inflateInit_,"ININ")
510  #pragma map(inflateInit2_,"ININ2")
511  #pragma map(inflateEnd,"INEND")
512  #pragma map(inflateSync,"INSY")
513  #pragma map(inflateSetDictionary,"INSEDI")
514  #pragma map(compressBound,"CMBND")
515  #pragma map(inflate_table,"INTABL")
516  #pragma map(inflate_fast,"INFA")
517  #pragma map(inflate_copyright,"INCOPY")
518 #endif
519 
520 #endif /* ZCONF_H */
uLong
unsigned long uLong
Definition: zconf.h:380
voidpc
Byte * voidpc
Definition: zconf.h:398
uLongf
uLong uLongf
Definition: zconf.h:391
Byte
unsigned char Byte
Definition: zconf.h:377
charf
char charf
Definition: zconf.h:388
uIntf
uInt uIntf
Definition: zconf.h:390
voidp
Byte * voidp
Definition: zconf.h:400
FAR
#define FAR
Definition: zconf.h:373
voidpf
Byte * voidpf
Definition: zconf.h:399
uInt
unsigned int uInt
Definition: zconf.h:379
intf
int intf
Definition: zconf.h:389
Bytef
Byte Bytef
Definition: zconf.h:386
z_crc_t
unsigned long z_crc_t
Definition: zconf.h:417