NCBI C++ ToolKit
zconf_cf.h
Go to the documentation of this file.

Go to the SVN repository for this file.

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