VirtualBox

source: vbox/trunk/src/libs/zlib-1.2.6/zconf.h@ 54136

最後變更 在這個檔案從54136是 40354,由 vboxsync 提交於 13 年 前

libs/zlib-1.2.6: fix OSE

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

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