VirtualBox

source: vbox/trunk/src/libs/zlib-1.2.1/zconf.h@ 39119

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

zlib: Wrap all public symbols.

  • 屬性 svn:eol-style 設為 native
檔案大小: 12.9 KB
 
1/* zconf.h -- configuration of the zlib compression library
2 * Copyright (C) 1995-2003 Jean-loup Gailly.
3 * For conditions of distribution and use, see copyright notice in zlib.h
4 */
5
6/* @(#) $Id: zconf.h,v 1.1 2004/11/15 16:42:25 bird Exp $ */
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 */
15#ifdef VBOX /* Map public symbols to make sure the build is sane. */
16# define deflateInit_ vboxzlib_deflateInit_
17# define deflate vboxzlib_deflate
18# define deflateEnd vboxzlib_deflateEnd
19# define inflateInit_ vboxzlib_inflateInit_
20# define inflate vboxzlib_inflate
21# define inflateEnd vboxzlib_inflateEnd
22# define deflateInit2_ vboxzlib_deflateInit2_
23# define deflateSetDictionary vboxzlib_deflateSetDictionary
24# define deflateCopy vboxzlib_deflateCopy
25# define deflateReset vboxzlib_deflateReset
26# define deflatePrime vboxzlib_deflatePrime
27# define deflateParams vboxzlib_deflateParams
28# define deflateBound vboxzlib_deflateBound
29# define inflateInit2_ vboxzlib_inflateInit2_
30# define inflateSetDictionary vboxzlib_inflateSetDictionary
31# define inflateSync vboxzlib_inflateSync
32# define inflateSyncPoint vboxzlib_inflateSyncPoint
33# define inflateCopy vboxzlib_inflateCopy
34# define inflateReset vboxzlib_inflateReset
35# define compress vboxzlib_compress
36# define compress2 vboxzlib_compress2
37# define compressBound vboxzlib_compressBound
38# define uncompress vboxzlib_uncompress
39# define adler32 vboxzlib_adler32
40# define crc32 vboxzlib_crc32
41# define get_crc_table vboxzlib_get_crc_table
42
43# define inflateBackInit_ vboxzlib_inflateBackInit_
44# define inflate_fast vboxzlib_inflate_fast
45# define inflate_table vboxzlib_inflate_table
46# define zlibVersion vboxzlib_zlibVersion
47# define zlibCompileFlags vboxzlib_zlibCompileFlags
48# define z_error vboxzlib_z_error
49# define zError vboxzlib_zError
50# define zcalloc vboxzlib_zcalloc
51# define zcfree vboxzlib_zcfree
52# define inflateBack vboxzlib_inflateBack
53# define _tr_init vboxzlib__tr_init
54# define gzopen vboxzlib_gzopen
55# define gzdopen vboxzlib_gzdopen
56# define gzsetparams vboxzlib_gzsetparams
57# define gzread vboxzlib_gzread
58# define gzgetc vboxzlib_gzgetc
59# define gzungetc vboxzlib_gzungetc
60# define gzgets vboxzlib_gzgets
61# define gzwrite vboxzlib_gzwrite
62# define gzprintf vboxzlib_gzprintf
63# define gzputc vboxzlib_gzputc
64# define gzputs vboxzlib_gzputs
65# define gzflush vboxzlib_gzflush
66# define _tr_stored_block vboxzlib__tr_stored_block
67# define gzseek vboxzlib_gzseek
68# define _tr_align vboxzlib__tr_align
69# define inflateBackEnd vboxzlib_inflateBackEnd
70# define _tr_flush_block vboxzlib__tr_flush_block
71# define gzrewind vboxzlib_gzrewind
72# define gztell vboxzlib_gztell
73# define gzeof vboxzlib_gzeof
74# define _tr_tally vboxzlib__tr_tally
75# define gzclose vboxzlib_gzclose
76# define gzerror vboxzlib_gzerror
77# define gzclearerr vboxzlib_gzclearerr
78# define z_verbose vboxzlib_z_verbose
79# define deflate_copyright vboxzlib_deflate_copyright
80# define inflate_copyright vboxzlib_inflate_copyright
81# define _dist_code vboxzlib__dist_code
82# define _length_code vboxzlib__length_code
83# define z_errmsg vboxzlib_z_errmsg
84
85# define Byte vboxzlib_Byte
86# define uInt vboxzlib_uInt
87# define uLong vboxzlib_uLong
88# define Bytef vboxzlib_Bytef
89# define charf vboxzlib_charf
90# define intf vboxzlib_intf
91# define uIntf vboxzlib_uIntf
92# define uLongf vboxzlib_uLongf
93# define voidpf vboxzlib_voidpf
94# define voidp vboxzlib_voidp
95#else /* !VBOX */
96#ifdef Z_PREFIX
97# define deflateInit_ z_deflateInit_
98# define deflate z_deflate
99# define deflateEnd z_deflateEnd
100# define inflateInit_ z_inflateInit_
101# define inflate z_inflate
102# define inflateEnd z_inflateEnd
103# define deflateInit2_ z_deflateInit2_
104# define deflateSetDictionary z_deflateSetDictionary
105# define deflateCopy z_deflateCopy
106# define deflateReset z_deflateReset
107# define deflatePrime z_deflatePrime
108# define deflateParams z_deflateParams
109# define deflateBound z_deflateBound
110# define inflateInit2_ z_inflateInit2_
111# define inflateSetDictionary z_inflateSetDictionary
112# define inflateSync z_inflateSync
113# define inflateSyncPoint z_inflateSyncPoint
114# define inflateCopy z_inflateCopy
115# define inflateReset z_inflateReset
116# define compress z_compress
117# define compress2 z_compress2
118# define compressBound z_compressBound
119# define uncompress z_uncompress
120# define adler32 z_adler32
121# define crc32 z_crc32
122# define get_crc_table z_get_crc_table
123
124# define Byte z_Byte
125# define uInt z_uInt
126# define uLong z_uLong
127# define Bytef z_Bytef
128# define charf z_charf
129# define intf z_intf
130# define uIntf z_uIntf
131# define uLongf z_uLongf
132# define voidpf z_voidpf
133# define voidp z_voidp
134#endif
135#endif /*!VBOX*/
136
137#if defined(__MSDOS__) && !defined(MSDOS)
138# define MSDOS
139#endif
140#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
141# define OS2
142#endif
143#if defined(_WINDOWS) && !defined(WINDOWS)
144# define WINDOWS
145#endif
146#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32)
147# define WIN32
148#endif
149#if (defined(_WIN64) || defined(__WIN64__)) && !defined(WIN64)
150# define WIN64
151#endif
152#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
153# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
154# ifndef SYS16BIT
155# define SYS16BIT
156# endif
157# endif
158#endif
159
160/*
161 * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
162 * than 64k bytes at a time (needed on systems with 16-bit int).
163 */
164#ifdef SYS16BIT
165# define MAXSEG_64K
166#endif
167#ifdef MSDOS
168# define UNALIGNED_OK
169#endif
170
171#ifdef __STDC_VERSION__
172# ifndef STDC
173# define STDC
174# endif
175# if __STDC_VERSION__ >= 199901L
176# ifndef STDC99
177# define STDC99
178# endif
179# endif
180#endif
181#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
182# define STDC
183#endif
184#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
185# define STDC
186#endif
187#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32) || defined(WIN64))
188# define STDC
189#endif
190#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
191# define STDC
192#endif
193
194#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */
195# define STDC
196#endif
197
198#ifndef STDC
199# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
200# define const /* note: need a more gentle solution here */
201# endif
202#endif
203
204/* Some Mac compilers merge all .h files incorrectly: */
205#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
206# define NO_DUMMY_DECL
207#endif
208
209/* Maximum value for memLevel in deflateInit2 */
210#ifndef MAX_MEM_LEVEL
211# ifdef MAXSEG_64K
212# define MAX_MEM_LEVEL 8
213# else
214# define MAX_MEM_LEVEL 9
215# endif
216#endif
217
218/* Maximum value for windowBits in deflateInit2 and inflateInit2.
219 * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
220 * created by gzip. (Files created by minigzip can still be extracted by
221 * gzip.)
222 */
223#ifndef MAX_WBITS
224# define MAX_WBITS 15 /* 32K LZ77 window */
225#endif
226
227/* The memory requirements for deflate are (in bytes):
228 (1 << (windowBits+2)) + (1 << (memLevel+9))
229 that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
230 plus a few kilobytes for small objects. For example, if you want to reduce
231 the default memory requirements from 256K to 128K, compile with
232 make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
233 Of course this will generally degrade compression (there's no free lunch).
234
235 The memory requirements for inflate are (in bytes) 1 << windowBits
236 that is, 32K for windowBits=15 (default value) plus a few kilobytes
237 for small objects.
238*/
239
240 /* Type declarations */
241
242#ifndef OF /* function prototypes */
243# ifdef STDC
244# define OF(args) args
245# else
246# define OF(args) ()
247# endif
248#endif
249
250/* The following definitions for FAR are needed only for MSDOS mixed
251 * model programming (small or medium model with some far allocations).
252 * This was tested only with MSC; for other MSDOS compilers you may have
253 * to define NO_MEMCPY in zutil.h. If you don't need the mixed model,
254 * just define FAR to be empty.
255 */
256#ifdef SYS16BIT
257# if defined(M_I86SM) || defined(M_I86MM)
258 /* MSC small or medium model */
259# define SMALL_MEDIUM
260# ifdef _MSC_VER
261# define FAR _far
262# else
263# define FAR far
264# endif
265# endif
266# if (defined(__SMALL__) || defined(__MEDIUM__))
267 /* Turbo C small or medium model */
268# define SMALL_MEDIUM
269# ifdef __BORLANDC__
270# define FAR _far
271# else
272# define FAR far
273# endif
274# endif
275#endif
276
277#if defined(WINDOWS) || defined(WIN32) || defined(WIN64)
278 /* If building or using zlib as a DLL, define ZLIB_DLL.
279 * This is not mandatory, but it offers a little performance increase.
280 */
281# ifdef ZLIB_DLL
282# if (defined(WIN32) || defined(WIN64)) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
283# ifdef ZLIB_INTERNAL
284# define ZEXTERN extern __declspec(dllexport)
285# else
286# define ZEXTERN extern __declspec(dllimport)
287# endif
288# endif
289# endif /* ZLIB_DLL */
290 /* If building or using zlib with the WINAPI/WINAPIV calling convention,
291 * define ZLIB_WINAPI.
292 * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
293 */
294# ifdef ZLIB_WINAPI
295# ifdef FAR
296# undef FAR
297# endif
298# include <windows.h>
299 /* No need for _export, use ZLIB.DEF instead. */
300 /* For complete Windows compatibility, use WINAPI, not __stdcall. */
301# define ZEXPORT WINAPI
302# if defined(WIN32) || defined(WIN64)
303# define ZEXPORTVA WINAPIV
304# else
305# define ZEXPORTVA FAR CDECL
306# endif
307# endif
308#endif
309
310#if defined (__BEOS__)
311# ifdef ZLIB_DLL
312# ifdef ZLIB_INTERNAL
313# define ZEXPORT __declspec(dllexport)
314# define ZEXPORTVA __declspec(dllexport)
315# else
316# define ZEXPORT __declspec(dllimport)
317# define ZEXPORTVA __declspec(dllimport)
318# endif
319# endif
320#endif
321
322#ifndef ZEXTERN
323# define ZEXTERN extern
324#endif
325#ifndef ZEXPORT
326# define ZEXPORT
327#endif
328#ifndef ZEXPORTVA
329# define ZEXPORTVA
330#endif
331
332#ifndef FAR
333# define FAR
334#endif
335
336#if !defined(__MACTYPES__)
337typedef unsigned char Byte; /* 8 bits */
338#endif
339typedef unsigned int uInt; /* 16 bits or more */
340typedef unsigned long uLong; /* 32 bits or more */
341
342#ifdef SMALL_MEDIUM
343 /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
344# define Bytef Byte FAR
345#else
346 typedef Byte FAR Bytef;
347#endif
348typedef char FAR charf;
349typedef int FAR intf;
350typedef uInt FAR uIntf;
351typedef uLong FAR uLongf;
352
353#ifdef STDC
354 typedef void const *voidpc;
355 typedef void FAR *voidpf;
356 typedef void *voidp;
357#else
358 typedef Byte const *voidpc;
359 typedef Byte FAR *voidpf;
360 typedef Byte *voidp;
361#endif
362
363#if 0 /* HAVE_UNISTD_H -- this line is updated by ./configure */
364# include <sys/types.h> /* for off_t */
365# include <unistd.h> /* for SEEK_* and off_t */
366# ifdef VMS
367# include <unixio.h> /* for off_t */
368# endif
369# define z_off_t off_t
370#endif
371#ifndef SEEK_SET
372# define SEEK_SET 0 /* Seek from beginning of file. */
373# define SEEK_CUR 1 /* Seek from current position. */
374# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
375#endif
376#ifndef z_off_t
377# define z_off_t long
378#endif
379
380#if defined(__OS400__)
381#define NO_vsnprintf
382#endif
383
384#if defined(__MVS__)
385# define NO_vsnprintf
386# ifdef FAR
387# undef FAR
388# endif
389#endif
390
391/* MVS linker does not support external names larger than 8 bytes */
392#if defined(__MVS__)
393# pragma map(deflateInit_,"DEIN")
394# pragma map(deflateInit2_,"DEIN2")
395# pragma map(deflateEnd,"DEEND")
396# pragma map(deflateBound,"DEBND")
397# pragma map(inflateInit_,"ININ")
398# pragma map(inflateInit2_,"ININ2")
399# pragma map(inflateEnd,"INEND")
400# pragma map(inflateSync,"INSY")
401# pragma map(inflateSetDictionary,"INSEDI")
402# pragma map(compressBound,"CMBND")
403# pragma map(inflate_table,"INTABL")
404# pragma map(inflate_fast,"INFA")
405# pragma map(inflate_copyright,"INCOPY")
406#endif
407
408#endif /* ZCONF_H */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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