VirtualBox

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

Last change on this file since 35813 was 33894, checked in by vboxsync, 14 years ago

Fixed libpng building on non-windows hosts - it was using the wrong zlib headers.

  • Property svn:eol-style set to native
File size: 10.8 KB
Line 
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 Byte vboxzlib_Byte
44# define uInt vboxzlib_uInt
45# define uLong vboxzlib_uLong
46# define Bytef vboxzlib_Bytef
47# define charf vboxzlib_charf
48# define intf vboxzlib_intf
49# define uIntf vboxzlib_uIntf
50# define uLongf vboxzlib_uLongf
51# define voidpf vboxzlib_voidpf
52# define voidp vboxzlib_voidp
53#else /* !VBOX */
54#ifdef Z_PREFIX
55# define deflateInit_ z_deflateInit_
56# define deflate z_deflate
57# define deflateEnd z_deflateEnd
58# define inflateInit_ z_inflateInit_
59# define inflate z_inflate
60# define inflateEnd z_inflateEnd
61# define deflateInit2_ z_deflateInit2_
62# define deflateSetDictionary z_deflateSetDictionary
63# define deflateCopy z_deflateCopy
64# define deflateReset z_deflateReset
65# define deflatePrime z_deflatePrime
66# define deflateParams z_deflateParams
67# define deflateBound z_deflateBound
68# define inflateInit2_ z_inflateInit2_
69# define inflateSetDictionary z_inflateSetDictionary
70# define inflateSync z_inflateSync
71# define inflateSyncPoint z_inflateSyncPoint
72# define inflateCopy z_inflateCopy
73# define inflateReset z_inflateReset
74# define compress z_compress
75# define compress2 z_compress2
76# define compressBound z_compressBound
77# define uncompress z_uncompress
78# define adler32 z_adler32
79# define crc32 z_crc32
80# define get_crc_table z_get_crc_table
81
82# define Byte z_Byte
83# define uInt z_uInt
84# define uLong z_uLong
85# define Bytef z_Bytef
86# define charf z_charf
87# define intf z_intf
88# define uIntf z_uIntf
89# define uLongf z_uLongf
90# define voidpf z_voidpf
91# define voidp z_voidp
92#endif
93#endif /*!VBOX*/
94
95#if defined(__MSDOS__) && !defined(MSDOS)
96# define MSDOS
97#endif
98#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
99# define OS2
100#endif
101#if defined(_WINDOWS) && !defined(WINDOWS)
102# define WINDOWS
103#endif
104#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32)
105# define WIN32
106#endif
107#if (defined(_WIN64) || defined(__WIN64__)) && !defined(WIN64)
108# define WIN64
109#endif
110#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
111# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
112# ifndef SYS16BIT
113# define SYS16BIT
114# endif
115# endif
116#endif
117
118/*
119 * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
120 * than 64k bytes at a time (needed on systems with 16-bit int).
121 */
122#ifdef SYS16BIT
123# define MAXSEG_64K
124#endif
125#ifdef MSDOS
126# define UNALIGNED_OK
127#endif
128
129#ifdef __STDC_VERSION__
130# ifndef STDC
131# define STDC
132# endif
133# if __STDC_VERSION__ >= 199901L
134# ifndef STDC99
135# define STDC99
136# endif
137# endif
138#endif
139#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
140# define STDC
141#endif
142#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
143# define STDC
144#endif
145#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32) || defined(WIN64))
146# define STDC
147#endif
148#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
149# define STDC
150#endif
151
152#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */
153# define STDC
154#endif
155
156#ifndef STDC
157# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
158# define const /* note: need a more gentle solution here */
159# endif
160#endif
161
162/* Some Mac compilers merge all .h files incorrectly: */
163#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
164# define NO_DUMMY_DECL
165#endif
166
167/* Maximum value for memLevel in deflateInit2 */
168#ifndef MAX_MEM_LEVEL
169# ifdef MAXSEG_64K
170# define MAX_MEM_LEVEL 8
171# else
172# define MAX_MEM_LEVEL 9
173# endif
174#endif
175
176/* Maximum value for windowBits in deflateInit2 and inflateInit2.
177 * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
178 * created by gzip. (Files created by minigzip can still be extracted by
179 * gzip.)
180 */
181#ifndef MAX_WBITS
182# define MAX_WBITS 15 /* 32K LZ77 window */
183#endif
184
185/* The memory requirements for deflate are (in bytes):
186 (1 << (windowBits+2)) + (1 << (memLevel+9))
187 that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
188 plus a few kilobytes for small objects. For example, if you want to reduce
189 the default memory requirements from 256K to 128K, compile with
190 make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
191 Of course this will generally degrade compression (there's no free lunch).
192
193 The memory requirements for inflate are (in bytes) 1 << windowBits
194 that is, 32K for windowBits=15 (default value) plus a few kilobytes
195 for small objects.
196*/
197
198 /* Type declarations */
199
200#ifndef OF /* function prototypes */
201# ifdef STDC
202# define OF(args) args
203# else
204# define OF(args) ()
205# endif
206#endif
207
208/* The following definitions for FAR are needed only for MSDOS mixed
209 * model programming (small or medium model with some far allocations).
210 * This was tested only with MSC; for other MSDOS compilers you may have
211 * to define NO_MEMCPY in zutil.h. If you don't need the mixed model,
212 * just define FAR to be empty.
213 */
214#ifdef SYS16BIT
215# if defined(M_I86SM) || defined(M_I86MM)
216 /* MSC small or medium model */
217# define SMALL_MEDIUM
218# ifdef _MSC_VER
219# define FAR _far
220# else
221# define FAR far
222# endif
223# endif
224# if (defined(__SMALL__) || defined(__MEDIUM__))
225 /* Turbo C small or medium model */
226# define SMALL_MEDIUM
227# ifdef __BORLANDC__
228# define FAR _far
229# else
230# define FAR far
231# endif
232# endif
233#endif
234
235#if defined(WINDOWS) || defined(WIN32) || defined(WIN64)
236 /* If building or using zlib as a DLL, define ZLIB_DLL.
237 * This is not mandatory, but it offers a little performance increase.
238 */
239# ifdef ZLIB_DLL
240# if (defined(WIN32) || defined(WIN64)) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
241# ifdef ZLIB_INTERNAL
242# define ZEXTERN extern __declspec(dllexport)
243# else
244# define ZEXTERN extern __declspec(dllimport)
245# endif
246# endif
247# endif /* ZLIB_DLL */
248 /* If building or using zlib with the WINAPI/WINAPIV calling convention,
249 * define ZLIB_WINAPI.
250 * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
251 */
252# ifdef ZLIB_WINAPI
253# ifdef FAR
254# undef FAR
255# endif
256# include <windows.h>
257 /* No need for _export, use ZLIB.DEF instead. */
258 /* For complete Windows compatibility, use WINAPI, not __stdcall. */
259# define ZEXPORT WINAPI
260# if defined(WIN32) || defined(WIN64)
261# define ZEXPORTVA WINAPIV
262# else
263# define ZEXPORTVA FAR CDECL
264# endif
265# endif
266#endif
267
268#if defined (__BEOS__)
269# ifdef ZLIB_DLL
270# ifdef ZLIB_INTERNAL
271# define ZEXPORT __declspec(dllexport)
272# define ZEXPORTVA __declspec(dllexport)
273# else
274# define ZEXPORT __declspec(dllimport)
275# define ZEXPORTVA __declspec(dllimport)
276# endif
277# endif
278#endif
279
280#ifndef ZEXTERN
281# define ZEXTERN extern
282#endif
283#ifndef ZEXPORT
284# define ZEXPORT
285#endif
286#ifndef ZEXPORTVA
287# define ZEXPORTVA
288#endif
289
290#ifndef FAR
291# define FAR
292#endif
293
294#if !defined(__MACTYPES__)
295typedef unsigned char Byte; /* 8 bits */
296#endif
297typedef unsigned int uInt; /* 16 bits or more */
298typedef unsigned long uLong; /* 32 bits or more */
299
300#ifdef SMALL_MEDIUM
301 /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
302# define Bytef Byte FAR
303#else
304 typedef Byte FAR Bytef;
305#endif
306typedef char FAR charf;
307typedef int FAR intf;
308typedef uInt FAR uIntf;
309typedef uLong FAR uLongf;
310
311#ifdef STDC
312 typedef void const *voidpc;
313 typedef void FAR *voidpf;
314 typedef void *voidp;
315#else
316 typedef Byte const *voidpc;
317 typedef Byte FAR *voidpf;
318 typedef Byte *voidp;
319#endif
320
321#if 0 /* HAVE_UNISTD_H -- this line is updated by ./configure */
322# include <sys/types.h> /* for off_t */
323# include <unistd.h> /* for SEEK_* and off_t */
324# ifdef VMS
325# include <unixio.h> /* for off_t */
326# endif
327# define z_off_t off_t
328#endif
329#ifndef SEEK_SET
330# define SEEK_SET 0 /* Seek from beginning of file. */
331# define SEEK_CUR 1 /* Seek from current position. */
332# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
333#endif
334#ifndef z_off_t
335# define z_off_t long
336#endif
337
338#if defined(__OS400__)
339#define NO_vsnprintf
340#endif
341
342#if defined(__MVS__)
343# define NO_vsnprintf
344# ifdef FAR
345# undef FAR
346# endif
347#endif
348
349/* MVS linker does not support external names larger than 8 bytes */
350#if defined(__MVS__)
351# pragma map(deflateInit_,"DEIN")
352# pragma map(deflateInit2_,"DEIN2")
353# pragma map(deflateEnd,"DEEND")
354# pragma map(deflateBound,"DEBND")
355# pragma map(inflateInit_,"ININ")
356# pragma map(inflateInit2_,"ININ2")
357# pragma map(inflateEnd,"INEND")
358# pragma map(inflateSync,"INSY")
359# pragma map(inflateSetDictionary,"INSEDI")
360# pragma map(compressBound,"CMBND")
361# pragma map(inflate_table,"INTABL")
362# pragma map(inflate_fast,"INFA")
363# pragma map(inflate_copyright,"INCOPY")
364#endif
365
366#endif /* ZCONF_H */
Note: See TracBrowser for help on using the repository browser.

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