VirtualBox

source: vbox/trunk/src/libs/zlib-1.2.8/zconf.h@ 66649

最後變更 在這個檔案從66649是 58209,由 vboxsync 提交於 9 年 前

zlib 1.2.8 VBox fixes

  • 屬性 svn:eol-style 設為 native
檔案大小: 20.8 KB
 
1/* zconf.h -- configuration of the zlib compression library
2 * Copyright (C) 1995-2013 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 * If you *really* need a unique prefix for all types and library functions,
13 * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
14 * Even better than compiling with -DZ_PREFIX would be to use configure to set
15 * this permanently in zconf.h using "./configure --zprefix".
16 */
17#ifdef VBOX /* Map public symbols to make sure the build is sane. */
18# define deflateInit_ vboxzlib_deflateInit_
19# define deflate vboxzlib_deflate
20# define deflateEnd vboxzlib_deflateEnd
21# define deflatePending vboxzlib_deflatePending
22# define deflateResetKeep vboxzlib_deflateResetKeep
23# define deflateSetHeader vboxzlib_deflateSetHeader
24# define deflateTune vboxzlib_deflateTune
25# define inflateInit_ vboxzlib_inflateInit_
26# define inflate vboxzlib_inflate
27# define inflateEnd vboxzlib_inflateEnd
28# define inflateGetDictionary vboxzlib_inflateGetDictionary
29# define inflateGetHeader vboxzlib_inflateGetHeader
30# define inflateMark vboxzlib_inflateMark
31# define inflatePrime vboxzlib_inflatePrime
32# define inflateUndermine vboxzlib_inflateUndermine
33# define deflateInit2_ vboxzlib_deflateInit2_
34# define deflateSetDictionary vboxzlib_deflateSetDictionary
35# define deflateCopy vboxzlib_deflateCopy
36# define deflateReset vboxzlib_deflateReset
37# define deflatePrime vboxzlib_deflatePrime
38# define deflateParams vboxzlib_deflateParams
39# define deflateBound vboxzlib_deflateBound
40# define inflateInit2_ vboxzlib_inflateInit2_
41# define inflateSetDictionary vboxzlib_inflateSetDictionary
42# define inflateSync vboxzlib_inflateSync
43# define inflateSyncPoint vboxzlib_inflateSyncPoint
44# define inflateCopy vboxzlib_inflateCopy
45# define inflateReset vboxzlib_inflateReset
46# define inflateReset2 vboxzlib_inflateReset2
47# define inflateResetKeep vboxzlib_inflateResetKeep
48# define compress vboxzlib_compress
49# define compress2 vboxzlib_compress2
50# define compressBound vboxzlib_compressBound
51# define uncompress vboxzlib_uncompress
52# define adler32 vboxzlib_adler32
53# define adler32_combine vboxzlib_adler32_combine
54# define adler32 vboxzlib_adler32
55# define adler32_combine64 vboxzlib_adler32_combine64
56# define crc32 vboxzlib_crc32
57# define crc32_combine vboxzlib_crc32_combine
58# define crc32_combine64 vboxzlib_crc32_combine64
59# define get_crc_table vboxzlib_get_crc_table
60
61# define inflateBackInit_ vboxzlib_inflateBackInit_
62# define inflate_fast vboxzlib_inflate_fast
63# define inflate_table vboxzlib_inflate_table
64# define zlibVersion vboxzlib_zlibVersion
65# define zlibCompileFlags vboxzlib_zlibCompileFlags
66# define z_error vboxzlib_z_error
67# define zError vboxzlib_zError
68# define zcalloc vboxzlib_zcalloc
69# define zcfree vboxzlib_zcfree
70# define inflateBack vboxzlib_inflateBack
71# define _tr_init vboxzlib__tr_init
72# define gz_error vboxzlib_gz_error
73# define gzbuffer vboxzlib_gzbuffer
74# define gzdirect vboxzlib_gzdirect
75# define gzopen vboxzlib_gzopen
76# define gzopen64 vboxzlib_gzopen64
77# define gzdopen vboxzlib_gzdopen
78# define gzsetparams vboxzlib_gzsetparams
79# define gzread vboxzlib_gzread
80/*# define gzgetc vboxzlib_gzgetc*/
81# define gzgetc_ vboxzlib_gzgetc_
82# define gzungetc vboxzlib_gzungetc
83# define gzgets vboxzlib_gzgets
84# define gzoffset vboxzlib_gzoffset
85# define gzoffset64 vboxzlib_gzoffset64
86# define gzwrite vboxzlib_gzwrite
87# define gzprintf vboxzlib_gzprintf
88# define gzputc vboxzlib_gzputc
89# define gzputs vboxzlib_gzputs
90# define gzvprintf vboxzlib_gzvprintf
91# define gzflush vboxzlib_gzflush
92# define _tr_stored_block vboxzlib__tr_stored_block
93# define gzseek vboxzlib_gzseek
94# define gzseek64 vboxzlib_gzseek64
95# define _tr_align vboxzlib__tr_align
96# define inflateBackEnd vboxzlib_inflateBackEnd
97# define _tr_flush_bits vboxzlib__tr_flush_bits
98# define _tr_flush_block vboxzlib__tr_flush_block
99# define gzrewind vboxzlib_gzrewind
100# define gztell vboxzlib_gztell
101# define gztell64 vboxzlib_gztell64
102# define gzeof vboxzlib_gzeof
103# define _tr_tally vboxzlib__tr_tally
104# define gzclose vboxzlib_gzclose
105# define gzclose_r vboxzlib_gzclose_r
106# define gzclose_w vboxzlib_gzclose_w
107# define gzerror vboxzlib_gzerror
108# define gzflags vboxzlib_gzflags
109# define gzclearerr vboxzlib_gzclearerr
110# define z_verbose vboxzlib_z_verbose
111# define deflate_copyright vboxzlib_deflate_copyright
112# define inflate_copyright vboxzlib_inflate_copyright
113# define _dist_code vboxzlib__dist_code
114# define _length_code vboxzlib__length_code
115# define z_errmsg vboxzlib_z_errmsg
116
117# define Byte vboxzlib_Byte
118# define uInt vboxzlib_uInt
119# define uLong vboxzlib_uLong
120# define Bytef vboxzlib_Bytef
121# define charf vboxzlib_charf
122# define intf vboxzlib_intf
123# define uIntf vboxzlib_uIntf
124# define uLongf vboxzlib_uLongf
125# define voidpf vboxzlib_voidpf
126# define voidp vboxzlib_voidp
127#else /* !VBOX */
128# ifdef Z_PREFIX /* may be set to #if 1 by ./configure */
129# define Z_PREFIX_SET
130
131/* all linked symbols */
132# define _dist_code z__dist_code
133# define _length_code z__length_code
134# define _tr_align z__tr_align
135# define _tr_flush_bits z__tr_flush_bits
136# define _tr_flush_block z__tr_flush_block
137# define _tr_init z__tr_init
138# define _tr_stored_block z__tr_stored_block
139# define _tr_tally z__tr_tally
140# define adler32 z_adler32
141# define adler32_combine z_adler32_combine
142# define adler32_combine64 z_adler32_combine64
143# ifndef Z_SOLO
144# define compress z_compress
145# define compress2 z_compress2
146# define compressBound z_compressBound
147# endif
148# define crc32 z_crc32
149# define crc32_combine z_crc32_combine
150# define crc32_combine64 z_crc32_combine64
151# define deflate z_deflate
152# define deflateBound z_deflateBound
153# define deflateCopy z_deflateCopy
154# define deflateEnd z_deflateEnd
155# define deflateInit2_ z_deflateInit2_
156# define deflateInit_ z_deflateInit_
157# define deflateParams z_deflateParams
158# define deflatePending z_deflatePending
159# define deflatePrime z_deflatePrime
160# define deflateReset z_deflateReset
161# define deflateResetKeep z_deflateResetKeep
162# define deflateSetDictionary z_deflateSetDictionary
163# define deflateSetHeader z_deflateSetHeader
164# define deflateTune z_deflateTune
165# define deflate_copyright z_deflate_copyright
166# define get_crc_table z_get_crc_table
167# ifndef Z_SOLO
168# define gz_error z_gz_error
169# define gz_intmax z_gz_intmax
170# define gz_strwinerror z_gz_strwinerror
171# define gzbuffer z_gzbuffer
172# define gzclearerr z_gzclearerr
173# define gzclose z_gzclose
174# define gzclose_r z_gzclose_r
175# define gzclose_w z_gzclose_w
176# define gzdirect z_gzdirect
177# define gzdopen z_gzdopen
178# define gzeof z_gzeof
179# define gzerror z_gzerror
180# define gzflush z_gzflush
181# define gzgetc z_gzgetc
182# define gzgetc_ z_gzgetc_
183# define gzgets z_gzgets
184# define gzoffset z_gzoffset
185# define gzoffset64 z_gzoffset64
186# define gzopen z_gzopen
187# define gzopen64 z_gzopen64
188# ifdef _WIN32
189# define gzopen_w z_gzopen_w
190# endif
191# define gzprintf z_gzprintf
192# define gzvprintf z_gzvprintf
193# define gzputc z_gzputc
194# define gzputs z_gzputs
195# define gzread z_gzread
196# define gzrewind z_gzrewind
197# define gzseek z_gzseek
198# define gzseek64 z_gzseek64
199# define gzsetparams z_gzsetparams
200# define gztell z_gztell
201# define gztell64 z_gztell64
202# define gzungetc z_gzungetc
203# define gzwrite z_gzwrite
204# endif
205# define inflate z_inflate
206# define inflateBack z_inflateBack
207# define inflateBackEnd z_inflateBackEnd
208# define inflateBackInit_ z_inflateBackInit_
209# define inflateCopy z_inflateCopy
210# define inflateEnd z_inflateEnd
211# define inflateGetHeader z_inflateGetHeader
212# define inflateInit2_ z_inflateInit2_
213# define inflateInit_ z_inflateInit_
214# define inflateMark z_inflateMark
215# define inflatePrime z_inflatePrime
216# define inflateReset z_inflateReset
217# define inflateReset2 z_inflateReset2
218# define inflateSetDictionary z_inflateSetDictionary
219# define inflateGetDictionary z_inflateGetDictionary
220# define inflateSync z_inflateSync
221# define inflateSyncPoint z_inflateSyncPoint
222# define inflateUndermine z_inflateUndermine
223# define inflateResetKeep z_inflateResetKeep
224# define inflate_copyright z_inflate_copyright
225# define inflate_fast z_inflate_fast
226# define inflate_table z_inflate_table
227# ifndef Z_SOLO
228# define uncompress z_uncompress
229# endif
230# define zError z_zError
231# ifndef Z_SOLO
232# define zcalloc z_zcalloc
233# define zcfree z_zcfree
234# endif
235# define zlibCompileFlags z_zlibCompileFlags
236# define zlibVersion z_zlibVersion
237
238/* all zlib typedefs in zlib.h and zconf.h */
239# define Byte z_Byte
240# define Bytef z_Bytef
241# define alloc_func z_alloc_func
242# define charf z_charf
243# define free_func z_free_func
244# ifndef Z_SOLO
245# define gzFile z_gzFile
246# endif
247# define gz_header z_gz_header
248# define gz_headerp z_gz_headerp
249# define in_func z_in_func
250# define intf z_intf
251# define out_func z_out_func
252# define uInt z_uInt
253# define uIntf z_uIntf
254# define uLong z_uLong
255# define uLongf z_uLongf
256# define voidp z_voidp
257# define voidpc z_voidpc
258# define voidpf z_voidpf
259
260/* all zlib structs in zlib.h and zconf.h */
261# define gz_header_s z_gz_header_s
262# define internal_state z_internal_state
263
264# endif
265#endif /*!VBOX*/
266
267#if defined(__MSDOS__) && !defined(MSDOS)
268# define MSDOS
269#endif
270#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
271# define OS2
272#endif
273#if defined(_WINDOWS) && !defined(WINDOWS)
274# define WINDOWS
275#endif
276#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
277# ifndef WIN32
278# define WIN32
279# endif
280#endif
281#if (defined(_WIN64) || defined(__WIN64__)) && !defined(WIN64)
282# define WIN64
283#endif
284#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
285# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
286# ifndef SYS16BIT
287# define SYS16BIT
288# endif
289# endif
290#endif
291
292/*
293 * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
294 * than 64k bytes at a time (needed on systems with 16-bit int).
295 */
296#ifdef SYS16BIT
297# define MAXSEG_64K
298#endif
299#ifdef MSDOS
300# define UNALIGNED_OK
301#endif
302
303#ifdef __STDC_VERSION__
304# ifndef STDC
305# define STDC
306# endif
307# if __STDC_VERSION__ >= 199901L
308# ifndef STDC99
309# define STDC99
310# endif
311# endif
312#endif
313#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
314# define STDC
315#endif
316#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
317# define STDC
318#endif
319#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32) || defined(WIN64))
320# define STDC
321#endif
322#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
323# define STDC
324#endif
325
326#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */
327# define STDC
328#endif
329
330#ifndef STDC
331# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
332# define const /* note: need a more gentle solution here */
333# endif
334#endif
335
336#if defined(ZLIB_CONST) && !defined(z_const)
337# define z_const const
338#else
339# define z_const
340#endif
341
342/* Some Mac compilers merge all .h files incorrectly: */
343#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
344# define NO_DUMMY_DECL
345#endif
346
347/* Maximum value for memLevel in deflateInit2 */
348#ifndef MAX_MEM_LEVEL
349# ifdef MAXSEG_64K
350# define MAX_MEM_LEVEL 8
351# else
352# define MAX_MEM_LEVEL 9
353# endif
354#endif
355
356/* Maximum value for windowBits in deflateInit2 and inflateInit2.
357 * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
358 * created by gzip. (Files created by minigzip can still be extracted by
359 * gzip.)
360 */
361#ifndef MAX_WBITS
362# define MAX_WBITS 15 /* 32K LZ77 window */
363#endif
364
365/* The memory requirements for deflate are (in bytes):
366 (1 << (windowBits+2)) + (1 << (memLevel+9))
367 that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
368 plus a few kilobytes for small objects. For example, if you want to reduce
369 the default memory requirements from 256K to 128K, compile with
370 make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
371 Of course this will generally degrade compression (there's no free lunch).
372
373 The memory requirements for inflate are (in bytes) 1 << windowBits
374 that is, 32K for windowBits=15 (default value) plus a few kilobytes
375 for small objects.
376*/
377
378 /* Type declarations */
379
380#ifndef OF /* function prototypes */
381# ifdef STDC
382# define OF(args) args
383# else
384# define OF(args) ()
385# endif
386#endif
387
388#ifndef Z_ARG /* function prototypes for stdarg */
389# if defined(STDC) || defined(Z_HAVE_STDARG_H)
390# define Z_ARG(args) args
391# else
392# define Z_ARG(args) ()
393# endif
394#endif
395
396/* The following definitions for FAR are needed only for MSDOS mixed
397 * model programming (small or medium model with some far allocations).
398 * This was tested only with MSC; for other MSDOS compilers you may have
399 * to define NO_MEMCPY in zutil.h. If you don't need the mixed model,
400 * just define FAR to be empty.
401 */
402#ifdef SYS16BIT
403# if defined(M_I86SM) || defined(M_I86MM)
404 /* MSC small or medium model */
405# define SMALL_MEDIUM
406# ifdef _MSC_VER
407# define FAR _far
408# else
409# define FAR far
410# endif
411# endif
412# if (defined(__SMALL__) || defined(__MEDIUM__))
413 /* Turbo C small or medium model */
414# define SMALL_MEDIUM
415# ifdef __BORLANDC__
416# define FAR _far
417# else
418# define FAR far
419# endif
420# endif
421#endif
422
423#if defined(WINDOWS) || defined(WIN32) || defined(WIN64)
424 /* If building or using zlib as a DLL, define ZLIB_DLL.
425 * This is not mandatory, but it offers a little performance increase.
426 */
427# ifdef ZLIB_DLL
428# if (defined(WIN32) || defined(WIN64)) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
429# ifdef ZLIB_INTERNAL
430# define ZEXTERN extern __declspec(dllexport)
431# else
432# define ZEXTERN extern __declspec(dllimport)
433# endif
434# endif
435# endif /* ZLIB_DLL */
436 /* If building or using zlib with the WINAPI/WINAPIV calling convention,
437 * define ZLIB_WINAPI.
438 * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
439 */
440# ifdef ZLIB_WINAPI
441# ifdef FAR
442# undef FAR
443# endif
444# include <windows.h>
445 /* No need for _export, use ZLIB.DEF instead. */
446 /* For complete Windows compatibility, use WINAPI, not __stdcall. */
447# define ZEXPORT WINAPI
448# if defined(WIN32) || defined(WIN64)
449# define ZEXPORTVA WINAPIV
450# else
451# define ZEXPORTVA FAR CDECL
452# endif
453# endif
454#endif
455
456#if defined (__BEOS__)
457# ifdef ZLIB_DLL
458# ifdef ZLIB_INTERNAL
459# define ZEXPORT __declspec(dllexport)
460# define ZEXPORTVA __declspec(dllexport)
461# else
462# define ZEXPORT __declspec(dllimport)
463# define ZEXPORTVA __declspec(dllimport)
464# endif
465# endif
466#endif
467
468#ifndef ZEXTERN
469# define ZEXTERN extern
470#endif
471#ifndef ZEXPORT
472# define ZEXPORT
473#endif
474#ifndef ZEXPORTVA
475# define ZEXPORTVA
476#endif
477
478#ifndef FAR
479# define FAR
480#endif
481
482#if !defined(__MACTYPES__)
483typedef unsigned char Byte; /* 8 bits */
484#endif
485typedef unsigned int uInt; /* 16 bits or more */
486typedef unsigned long uLong; /* 32 bits or more */
487
488#ifdef SMALL_MEDIUM
489 /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
490# define Bytef Byte FAR
491#else
492 typedef Byte FAR Bytef;
493#endif
494typedef char FAR charf;
495typedef int FAR intf;
496typedef uInt FAR uIntf;
497typedef uLong FAR uLongf;
498
499#ifdef STDC
500 typedef void const *voidpc;
501 typedef void FAR *voidpf;
502 typedef void *voidp;
503#else
504 typedef Byte const *voidpc;
505 typedef Byte FAR *voidpf;
506 typedef Byte *voidp;
507#endif
508
509#if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC)
510# include <limits.h>
511# if (UINT_MAX == 0xffffffffUL)
512# define Z_U4 unsigned
513# elif (ULONG_MAX == 0xffffffffUL)
514# define Z_U4 unsigned long
515# elif (USHRT_MAX == 0xffffffffUL)
516# define Z_U4 unsigned short
517# endif
518#endif
519
520#ifdef Z_U4
521 typedef Z_U4 z_crc_t;
522#else
523 typedef unsigned long z_crc_t;
524#endif
525
526#if !defined(WIN32) && !defined(WIN64)
527# define Z_HAVE_UNISTD_H
528#endif
529
530#if 1 /* by ./configure */
531# define Z_HAVE_STDARG_H
532#endif
533
534#ifdef STDC
535# ifndef Z_SOLO
536# include <sys/types.h> /* for off_t */
537# endif
538#endif
539
540#if defined(STDC) || defined(Z_HAVE_STDARG_H)
541# ifndef Z_SOLO
542# include <stdarg.h> /* for va_list */
543# endif
544#endif
545
546#ifdef _WIN32
547# ifndef Z_SOLO
548# include <stddef.h> /* for wchar_t */
549# endif
550#endif
551
552/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and
553 * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even
554 * though the former does not conform to the LFS document), but considering
555 * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as
556 * equivalently requesting no 64-bit operations
557 */
558#if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1
559# undef _LARGEFILE64_SOURCE
560#endif
561
562#if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H)
563# define Z_HAVE_UNISTD_H
564#endif
565#ifndef Z_SOLO
566# if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE)
567# include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */
568# ifdef VMS
569# include <unixio.h> /* for off_t */
570# endif
571# ifndef z_off_t
572# define z_off_t off_t
573# endif
574# endif
575#endif
576
577#if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0
578# define Z_LFS64
579#endif
580
581#if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64)
582# define Z_LARGE64
583#endif
584
585#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64)
586# define Z_WANT64
587#endif
588
589#if !defined(SEEK_SET) && !defined(Z_SOLO)
590# define SEEK_SET 0 /* Seek from beginning of file. */
591# define SEEK_CUR 1 /* Seek from current position. */
592# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
593#endif
594
595#ifndef z_off_t
596# define z_off_t long
597#endif
598
599#if !defined(_WIN32) && defined(Z_LARGE64)
600# define z_off64_t off64_t
601#else
602# if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO)
603# define z_off64_t __int64
604# else
605# define z_off64_t z_off_t
606# endif
607#endif
608
609/* MVS linker does not support external names larger than 8 bytes */
610#if defined(__MVS__)
611 #pragma map(deflateInit_,"DEIN")
612 #pragma map(deflateInit2_,"DEIN2")
613 #pragma map(deflateEnd,"DEEND")
614 #pragma map(deflateBound,"DEBND")
615 #pragma map(inflateInit_,"ININ")
616 #pragma map(inflateInit2_,"ININ2")
617 #pragma map(inflateEnd,"INEND")
618 #pragma map(inflateSync,"INSY")
619 #pragma map(inflateSetDictionary,"INSEDI")
620 #pragma map(compressBound,"CMBND")
621 #pragma map(inflate_table,"INTABL")
622 #pragma map(inflate_fast,"INFA")
623 #pragma map(inflate_copyright,"INCOPY")
624#endif
625
626#endif /* ZCONF_H */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette