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