Deleted Added
full compact
zconf.h (92111) zconf.h (131377)
1/* zconf.h -- configuration of the zlib compression library
1/* zconf.h -- configuration of the zlib compression library
2 * Copyright (C) 1995-2002 Jean-loup Gailly.
3 * For conditions of distribution and use, see copyright notice in zlib.h
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$ */
7
4 */
5
6/* @(#) $Id$ */
7
8#ifndef _ZCONF_H
9#define _ZCONF_H
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 Z_PREFIX
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 Z_PREFIX
16# define deflateInit_ z_deflateInit_
17# define deflate z_deflate
18# define deflateEnd z_deflateEnd
19# define inflateInit_ z_inflateInit_
20# define inflate z_inflate
21# define inflateEnd z_inflateEnd
22# define deflateInit2_ z_deflateInit2_
16# define deflateInit_ z_deflateInit_
17# define deflate z_deflate
18# define deflateEnd z_deflateEnd
19# define inflateInit_ z_inflateInit_
20# define inflate z_inflate
21# define inflateEnd z_inflateEnd
22# define deflateInit2_ z_deflateInit2_
23# define deflateSetDictionary z_deflateSetDictionary
23# define deflateSetDictionary z_deflateSetDictionary
24# define deflateCopy z_deflateCopy
25# define deflateReset z_deflateReset
26# define deflateParams z_deflateParams
27# define inflateInit2_ z_inflateInit2_
24# define deflateCopy z_deflateCopy
25# define deflateReset z_deflateReset
26# define deflatePrime z_deflatePrime
27# define deflateParams z_deflateParams
28# define deflateBound z_deflateBound
29# define inflateInit2_ z_inflateInit2_
28# define inflateSetDictionary z_inflateSetDictionary
30# define inflateSetDictionary z_inflateSetDictionary
29# define inflateSync z_inflateSync
31# define inflateSync z_inflateSync
30# define inflateSyncPoint z_inflateSyncPoint
32# define inflateSyncPoint z_inflateSyncPoint
31# define inflateReset z_inflateReset
32# define compress z_compress
33# define compress2 z_compress2
34# define uncompress z_uncompress
35# define adler32 z_adler32
36# define crc32 z_crc32
33# define inflateCopy z_inflateCopy
34# define inflateReset z_inflateReset
35# define compress z_compress
36# define compress2 z_compress2
37# define compressBound z_compressBound
38# define uncompress z_uncompress
39# define adler32 z_adler32
40# define crc32 z_crc32
37# define get_crc_table z_get_crc_table
38
41# define get_crc_table z_get_crc_table
42
39# define Byte z_Byte
40# define uInt z_uInt
41# define uLong z_uLong
42# define Bytef z_Bytef
43# define charf z_charf
44# define intf z_intf
45# define uIntf z_uIntf
46# define uLongf z_uLongf
47# define voidpf z_voidpf
48# define voidp z_voidp
43# define Byte z_Byte
44# define uInt z_uInt
45# define uLong z_uLong
46# define Bytef z_Bytef
47# define charf z_charf
48# define intf z_intf
49# define uIntf z_uIntf
50# define uLongf z_uLongf
51# define voidpf z_voidpf
52# define voidp z_voidp
49#endif
50
53#endif
54
55#if defined(__MSDOS__) && !defined(MSDOS)
56# define MSDOS
57#endif
58#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
59# define OS2
60#endif
61#if defined(_WINDOWS) && !defined(WINDOWS)
62# define WINDOWS
63#endif
51#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32)
52# define WIN32
53#endif
64#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32)
65# define WIN32
66#endif
54#if defined(__GNUC__) || defined(WIN32) || defined(__386__) || defined(i386)
55# ifndef __32BIT__
56# define __32BIT__
67#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
68# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
69# ifndef SYS16BIT
70# define SYS16BIT
71# endif
57# endif
58#endif
72# endif
73#endif
59#if defined(__MSDOS__) && !defined(MSDOS)
60# define MSDOS
61#endif
62
63/*
64 * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
65 * than 64k bytes at a time (needed on systems with 16-bit int).
66 */
74
75/*
76 * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
77 * than 64k bytes at a time (needed on systems with 16-bit int).
78 */
67#if defined(MSDOS) && !defined(__32BIT__)
79#ifdef SYS16BIT
68# define MAXSEG_64K
69#endif
70#ifdef MSDOS
71# define UNALIGNED_OK
72#endif
73
80# define MAXSEG_64K
81#endif
82#ifdef MSDOS
83# define UNALIGNED_OK
84#endif
85
74#if (defined(MSDOS) || defined(_WINDOWS) || defined(WIN32)) && !defined(STDC)
75# define STDC
76#endif
77#if defined(__STDC__) || defined(__cplusplus) || defined(__OS2__)
86#ifdef __STDC_VERSION__
78# ifndef STDC
79# define STDC
80# endif
87# ifndef STDC
88# define STDC
89# endif
90# if __STDC_VERSION__ >= 199901L
91# ifndef STDC99
92# define STDC99
93# endif
94# endif
81#endif
95#endif
96#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
97# define STDC
98#endif
99#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
100# define STDC
101#endif
102#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
103# define STDC
104#endif
105#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
106# define STDC
107#endif
82
108
109#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */
110# define STDC
111#endif
112
83#ifndef STDC
84# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
113#ifndef STDC
114# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
85# define const
115# define const /* note: need a more gentle solution here */
86# endif
87#endif
88
89/* Some Mac compilers merge all .h files incorrectly: */
116# endif
117#endif
118
119/* Some Mac compilers merge all .h files incorrectly: */
90#if defined(__MWERKS__) || defined(applec) ||defined(THINK_C) ||defined(__SC__)
120#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
91# define NO_DUMMY_DECL
92#endif
93
121# define NO_DUMMY_DECL
122#endif
123
94/* Old Borland C incorrectly complains about missing returns: */
95#if defined(__BORLANDC__) && (__BORLANDC__ < 0x500)
96# define NEED_DUMMY_RETURN
97#endif
98
99
100/* Maximum value for memLevel in deflateInit2 */
101#ifndef MAX_MEM_LEVEL
102# ifdef MAXSEG_64K
103# define MAX_MEM_LEVEL 8
104# else
105# define MAX_MEM_LEVEL 9
106# endif
107#endif

--- 31 unchanged lines hidden (view full) ---

139#endif
140
141/* The following definitions for FAR are needed only for MSDOS mixed
142 * model programming (small or medium model with some far allocations).
143 * This was tested only with MSC; for other MSDOS compilers you may have
144 * to define NO_MEMCPY in zutil.h. If you don't need the mixed model,
145 * just define FAR to be empty.
146 */
124/* Maximum value for memLevel in deflateInit2 */
125#ifndef MAX_MEM_LEVEL
126# ifdef MAXSEG_64K
127# define MAX_MEM_LEVEL 8
128# else
129# define MAX_MEM_LEVEL 9
130# endif
131#endif

--- 31 unchanged lines hidden (view full) ---

163#endif
164
165/* The following definitions for FAR are needed only for MSDOS mixed
166 * model programming (small or medium model with some far allocations).
167 * This was tested only with MSC; for other MSDOS compilers you may have
168 * to define NO_MEMCPY in zutil.h. If you don't need the mixed model,
169 * just define FAR to be empty.
170 */
147#if (defined(M_I86SM) || defined(M_I86MM)) && !defined(__32BIT__)
148 /* MSC small or medium model */
149# define SMALL_MEDIUM
150# ifdef _MSC_VER
151# define FAR _far
152# else
153# define FAR far
171#ifdef SYS16BIT
172# if defined(M_I86SM) || defined(M_I86MM)
173 /* MSC small or medium model */
174# define SMALL_MEDIUM
175# ifdef _MSC_VER
176# define FAR _far
177# else
178# define FAR far
179# endif
154# endif
180# endif
155#endif
156#if defined(__BORLANDC__) && (defined(__SMALL__) || defined(__MEDIUM__))
157# ifndef __32BIT__
181# if (defined(__SMALL__) || defined(__MEDIUM__))
182 /* Turbo C small or medium model */
158# define SMALL_MEDIUM
183# define SMALL_MEDIUM
159# define FAR _far
184# ifdef __BORLANDC__
185# define FAR _far
186# else
187# define FAR far
188# endif
160# endif
161#endif
162
189# endif
190#endif
191
163/* Compile with -DZLIB_DLL for Windows DLL support */
164#if defined(ZLIB_DLL)
165# if defined(_WINDOWS) || defined(WINDOWS)
192#if defined(WINDOWS) || defined(WIN32)
193 /* If building or using zlib as a DLL, define ZLIB_DLL.
194 * This is not mandatory, but it offers a little performance increase.
195 */
196# ifdef ZLIB_DLL
197# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
198# ifdef ZLIB_INTERNAL
199# define ZEXTERN extern __declspec(dllexport)
200# else
201# define ZEXTERN extern __declspec(dllimport)
202# endif
203# endif
204# endif /* ZLIB_DLL */
205 /* If building or using zlib with the WINAPI/WINAPIV calling convention,
206 * define ZLIB_WINAPI.
207 * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
208 */
209# ifdef ZLIB_WINAPI
166# ifdef FAR
167# undef FAR
168# endif
169# include <windows.h>
210# ifdef FAR
211# undef FAR
212# endif
213# include <windows.h>
170# define ZEXPORT WINAPI
214 /* No need for _export, use ZLIB.DEF instead. */
215 /* For complete Windows compatibility, use WINAPI, not __stdcall. */
216# define ZEXPORT WINAPI
171# ifdef WIN32
217# ifdef WIN32
172# define ZEXPORTVA WINAPIV
218# define ZEXPORTVA WINAPIV
173# else
219# else
174# define ZEXPORTVA FAR _cdecl _export
220# define ZEXPORTVA FAR CDECL
175# endif
176# endif
221# endif
222# endif
177# if defined (__BORLANDC__)
178# if (__BORLANDC__ >= 0x0500) && defined (WIN32)
179# include <windows.h>
180# define ZEXPORT __declspec(dllexport) WINAPI
181# define ZEXPORTRVA __declspec(dllexport) WINAPIV
182# else
183# if defined (_Windows) && defined (__DLL__)
184# define ZEXPORT _export
185# define ZEXPORTVA _export
186# endif
187# endif
188# endif
189#endif
190
191#if defined (__BEOS__)
223#endif
224
225#if defined (__BEOS__)
192# if defined (ZLIB_DLL)
193# define ZEXTERN extern __declspec(dllexport)
194# else
195# define ZEXTERN extern __declspec(dllimport)
226# ifdef ZLIB_DLL
227# ifdef ZLIB_INTERNAL
228# define ZEXPORT __declspec(dllexport)
229# define ZEXPORTVA __declspec(dllexport)
230# else
231# define ZEXPORT __declspec(dllimport)
232# define ZEXPORTVA __declspec(dllimport)
233# endif
196# endif
197#endif
198
234# endif
235#endif
236
237#ifndef ZEXTERN
238# define ZEXTERN extern
239#endif
199#ifndef ZEXPORT
200# define ZEXPORT
201#endif
202#ifndef ZEXPORTVA
203# define ZEXPORTVA
204#endif
240#ifndef ZEXPORT
241# define ZEXPORT
242#endif
243#ifndef ZEXPORTVA
244# define ZEXPORTVA
245#endif
205#ifndef ZEXTERN
206# define ZEXTERN extern
207#endif
208
209#ifndef FAR
246
247#ifndef FAR
210# define FAR
248# define FAR
211#endif
212
249#endif
250
213#if !defined(MACOS) && !defined(TARGET_OS_MAC)
251#if !defined(__MACTYPES__)
214typedef unsigned char Byte; /* 8 bits */
215#endif
216typedef unsigned int uInt; /* 16 bits or more */
217typedef unsigned long uLong; /* 32 bits or more */
218
219#ifdef SMALL_MEDIUM
220 /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
221# define Bytef Byte FAR
222#else
223 typedef Byte FAR Bytef;
224#endif
225typedef char FAR charf;
226typedef int FAR intf;
227typedef uInt FAR uIntf;
228typedef uLong FAR uLongf;
229
230#ifdef STDC
252typedef unsigned char Byte; /* 8 bits */
253#endif
254typedef unsigned int uInt; /* 16 bits or more */
255typedef unsigned long uLong; /* 32 bits or more */
256
257#ifdef SMALL_MEDIUM
258 /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
259# define Bytef Byte FAR
260#else
261 typedef Byte FAR Bytef;
262#endif
263typedef char FAR charf;
264typedef int FAR intf;
265typedef uInt FAR uIntf;
266typedef uLong FAR uLongf;
267
268#ifdef STDC
231 typedef void FAR *voidpf;
232 typedef void *voidp;
269 typedef void const *voidpc;
270 typedef void FAR *voidpf;
271 typedef void *voidp;
233#else
272#else
234 typedef Byte FAR *voidpf;
235 typedef Byte *voidp;
273 typedef Byte const *voidpc;
274 typedef Byte FAR *voidpf;
275 typedef Byte *voidp;
236#endif
237
276#endif
277
238#ifdef HAVE_UNISTD_H
278#if 0 /* HAVE_UNISTD_H -- this line is updated by ./configure */
239# include <sys/types.h> /* for off_t */
240# include <unistd.h> /* for SEEK_* and off_t */
279# include <sys/types.h> /* for off_t */
280# include <unistd.h> /* for SEEK_* and off_t */
281# ifdef VMS
282# include <unixio.h> /* for off_t */
283# endif
241# define z_off_t off_t
242#endif
243#ifndef SEEK_SET
244# define SEEK_SET 0 /* Seek from beginning of file. */
245# define SEEK_CUR 1 /* Seek from current position. */
246# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
247#endif
248#ifndef z_off_t
249# define z_off_t long
250#endif
251
284# define z_off_t off_t
285#endif
286#ifndef SEEK_SET
287# define SEEK_SET 0 /* Seek from beginning of file. */
288# define SEEK_CUR 1 /* Seek from current position. */
289# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
290#endif
291#ifndef z_off_t
292# define z_off_t long
293#endif
294
295#if defined(__OS400__)
296#define NO_vsnprintf
297#endif
298
299#if defined(__MVS__)
300# define NO_vsnprintf
301# ifdef FAR
302# undef FAR
303# endif
304#endif
305
252/* MVS linker does not support external names larger than 8 bytes */
253#if defined(__MVS__)
254# pragma map(deflateInit_,"DEIN")
255# pragma map(deflateInit2_,"DEIN2")
256# pragma map(deflateEnd,"DEEND")
306/* MVS linker does not support external names larger than 8 bytes */
307#if defined(__MVS__)
308# pragma map(deflateInit_,"DEIN")
309# pragma map(deflateInit2_,"DEIN2")
310# pragma map(deflateEnd,"DEEND")
311# pragma map(deflateBound,"DEBND")
257# pragma map(inflateInit_,"ININ")
258# pragma map(inflateInit2_,"ININ2")
259# pragma map(inflateEnd,"INEND")
260# pragma map(inflateSync,"INSY")
261# pragma map(inflateSetDictionary,"INSEDI")
312# pragma map(inflateInit_,"ININ")
313# pragma map(inflateInit2_,"ININ2")
314# pragma map(inflateEnd,"INEND")
315# pragma map(inflateSync,"INSY")
316# pragma map(inflateSetDictionary,"INSEDI")
262# pragma map(inflate_blocks,"INBL")
263# pragma map(inflate_blocks_new,"INBLNE")
264# pragma map(inflate_blocks_free,"INBLFR")
265# pragma map(inflate_blocks_reset,"INBLRE")
266# pragma map(inflate_codes_free,"INCOFR")
267# pragma map(inflate_codes,"INCO")
317# pragma map(compressBound,"CMBND")
318# pragma map(inflate_table,"INTABL")
268# pragma map(inflate_fast,"INFA")
319# pragma map(inflate_fast,"INFA")
269# pragma map(inflate_flush,"INFLU")
270# pragma map(inflate_mask,"INMA")
271# pragma map(inflate_set_dictionary,"INSEDI2")
272# pragma map(inflate_copyright,"INCOPY")
320# pragma map(inflate_copyright,"INCOPY")
273# pragma map(inflate_trees_bits,"INTRBI")
274# pragma map(inflate_trees_dynamic,"INTRDY")
275# pragma map(inflate_trees_fixed,"INTRFI")
276# pragma map(inflate_trees_free,"INTRFR")
277#endif
278
321#endif
322
279#endif /* _ZCONF_H */
323#endif /* ZCONF_H */