OSDN Git Service

Success build TortoiseMerge.
[tortoisegit/TortoiseGitJp.git] / src / TortoiseMerge / libsvn_diff / zconf.h
1 /* zconf.h -- configuration of the zlib compression library\r
2  * Copyright (C) 1995-2002 Jean-loup Gailly.\r
3  * For conditions of distribution and use, see copyright notice in zlib.h \r
4  */\r
5 \r
6 /* @(#) $Id: zconf.h,v 1.1 2003/05/23 21:05:30 steveking Exp $ */\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 deflateParams z_deflateParams\r
27 #  define inflateInit2_ z_inflateInit2_\r
28 #  define inflateSetDictionary z_inflateSetDictionary\r
29 #  define inflateSync   z_inflateSync\r
30 #  define inflateSyncPoint z_inflateSyncPoint\r
31 #  define inflateReset  z_inflateReset\r
32 #  define compress      z_compress\r
33 #  define compress2     z_compress2\r
34 #  define uncompress    z_uncompress\r
35 #  define adler32       z_adler32\r
36 #  define crc32         z_crc32\r
37 #  define get_crc_table z_get_crc_table\r
38 \r
39 #  define Byte          z_Byte\r
40 #  define uInt          z_uInt\r
41 #  define uLong         z_uLong\r
42 #  define Bytef         z_Bytef\r
43 #  define charf         z_charf\r
44 #  define intf          z_intf\r
45 #  define uIntf         z_uIntf\r
46 #  define uLongf        z_uLongf\r
47 #  define voidpf        z_voidpf\r
48 #  define voidp         z_voidp\r
49 #endif\r
50 \r
51 #if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32)\r
52 #  define WIN32\r
53 #endif\r
54 #if defined(__GNUC__) || defined(WIN32) || defined(__386__) || defined(i386)\r
55 #  ifndef __32BIT__\r
56 #    define __32BIT__\r
57 #  endif\r
58 #endif\r
59 #if defined(__MSDOS__) && !defined(MSDOS)\r
60 #  define MSDOS\r
61 #endif\r
62 \r
63 /*\r
64  * Compile with -DMAXSEG_64K if the alloc function cannot allocate more\r
65  * than 64k bytes at a time (needed on systems with 16-bit int).\r
66  */\r
67 #if defined(MSDOS) && !defined(__32BIT__)\r
68 #  define MAXSEG_64K\r
69 #endif\r
70 #ifdef MSDOS\r
71 #  define UNALIGNED_OK\r
72 #endif\r
73 \r
74 #if (defined(MSDOS) || defined(_WINDOWS) || defined(WIN32))  && !defined(STDC)\r
75 #  define STDC\r
76 #endif\r
77 #if defined(__STDC__) || defined(__cplusplus) || defined(__OS2__)\r
78 #  ifndef STDC\r
79 #    define STDC\r
80 #  endif\r
81 #endif\r
82 \r
83 #ifndef STDC\r
84 #  ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */\r
85 #    define const\r
86 #  endif\r
87 #endif\r
88 \r
89 /* Some Mac compilers merge all .h files incorrectly: */\r
90 #if defined(__MWERKS__) || defined(applec) ||defined(THINK_C) ||defined(__SC__)\r
91 #  define NO_DUMMY_DECL\r
92 #endif\r
93 \r
94 /* Old Borland C incorrectly complains about missing returns: */\r
95 #if defined(__BORLANDC__) && (__BORLANDC__ < 0x500)\r
96 #  define NEED_DUMMY_RETURN\r
97 #endif\r
98 \r
99 \r
100 /* Maximum value for memLevel in deflateInit2 */\r
101 #ifndef MAX_MEM_LEVEL\r
102 #  ifdef MAXSEG_64K\r
103 #    define MAX_MEM_LEVEL 8\r
104 #  else\r
105 #    define MAX_MEM_LEVEL 9\r
106 #  endif\r
107 #endif\r
108 \r
109 /* Maximum value for windowBits in deflateInit2 and inflateInit2.\r
110  * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files\r
111  * created by gzip. (Files created by minigzip can still be extracted by\r
112  * gzip.)\r
113  */\r
114 #ifndef MAX_WBITS\r
115 #  define MAX_WBITS   15 /* 32K LZ77 window */\r
116 #endif\r
117 \r
118 /* The memory requirements for deflate are (in bytes):\r
119             (1 << (windowBits+2)) +  (1 << (memLevel+9))\r
120  that is: 128K for windowBits=15  +  128K for memLevel = 8  (default values)\r
121  plus a few kilobytes for small objects. For example, if you want to reduce\r
122  the default memory requirements from 256K to 128K, compile with\r
123      make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"\r
124  Of course this will generally degrade compression (there's no free lunch).\r
125 \r
126    The memory requirements for inflate are (in bytes) 1 << windowBits\r
127  that is, 32K for windowBits=15 (default value) plus a few kilobytes\r
128  for small objects.\r
129 */\r
130 \r
131                         /* Type declarations */\r
132 \r
133 #ifndef OF /* function prototypes */\r
134 #  ifdef STDC\r
135 #    define OF(args)  args\r
136 #  else\r
137 #    define OF(args)  ()\r
138 #  endif\r
139 #endif\r
140 \r
141 /* The following definitions for FAR are needed only for MSDOS mixed\r
142  * model programming (small or medium model with some far allocations).\r
143  * This was tested only with MSC; for other MSDOS compilers you may have\r
144  * to define NO_MEMCPY in zutil.h.  If you don't need the mixed model,\r
145  * just define FAR to be empty.\r
146  */\r
147 #if (defined(M_I86SM) || defined(M_I86MM)) && !defined(__32BIT__)\r
148    /* MSC small or medium model */\r
149 #  define SMALL_MEDIUM\r
150 #  ifdef _MSC_VER\r
151 #    define FAR _far\r
152 #  else\r
153 #    define FAR far\r
154 #  endif\r
155 #endif\r
156 #if defined(__BORLANDC__) && (defined(__SMALL__) || defined(__MEDIUM__))\r
157 #  ifndef __32BIT__\r
158 #    define SMALL_MEDIUM\r
159 #    define FAR _far\r
160 #  endif\r
161 #endif\r
162 \r
163 /* Compile with -DZLIB_DLL for Windows DLL support */\r
164 #if defined(ZLIB_DLL)\r
165 #  if defined(_WINDOWS) || defined(WINDOWS)\r
166 #    ifdef FAR\r
167 #      undef FAR\r
168 #    endif\r
169 #    include <windows.h>\r
170 #    define ZEXPORT  WINAPI\r
171 #    ifdef WIN32\r
172 #      define ZEXPORTVA  WINAPIV\r
173 #    else\r
174 #      define ZEXPORTVA  FAR _cdecl _export\r
175 #    endif\r
176 #  endif\r
177 #  if defined (__BORLANDC__)\r
178 #    if (__BORLANDC__ >= 0x0500) && defined (WIN32)\r
179 #      include <windows.h>\r
180 #      define ZEXPORT __declspec(dllexport) WINAPI\r
181 #      define ZEXPORTRVA __declspec(dllexport) WINAPIV\r
182 #    else\r
183 #      if defined (_Windows) && defined (__DLL__)\r
184 #        define ZEXPORT _export\r
185 #        define ZEXPORTVA _export\r
186 #      endif\r
187 #    endif\r
188 #  endif\r
189 #endif\r
190 \r
191 #if defined (__BEOS__)\r
192 #  if defined (ZLIB_DLL)\r
193 #    define ZEXTERN extern __declspec(dllexport)\r
194 #  else\r
195 #    define ZEXTERN extern __declspec(dllimport)\r
196 #  endif\r
197 #endif\r
198 \r
199 #ifndef ZEXPORT\r
200 #  define ZEXPORT\r
201 #endif\r
202 #ifndef ZEXPORTVA\r
203 #  define ZEXPORTVA\r
204 #endif\r
205 #ifndef ZEXTERN\r
206 #  define ZEXTERN extern\r
207 #endif\r
208 \r
209 #ifndef FAR\r
210 #   define FAR\r
211 #endif\r
212 \r
213 #if !defined(MACOS) && !defined(TARGET_OS_MAC)\r
214 typedef unsigned char  Byte;  /* 8 bits */\r
215 #endif\r
216 typedef unsigned int   uInt;  /* 16 bits or more */\r
217 typedef unsigned long  uLong; /* 32 bits or more */\r
218 \r
219 #ifdef SMALL_MEDIUM\r
220    /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */\r
221 #  define Bytef Byte FAR\r
222 #else\r
223    typedef Byte  FAR Bytef;\r
224 #endif\r
225 typedef char  FAR charf;\r
226 typedef int   FAR intf;\r
227 typedef uInt  FAR uIntf;\r
228 typedef uLong FAR uLongf;\r
229 \r
230 #ifdef STDC\r
231    typedef void FAR *voidpf;\r
232    typedef void     *voidp;\r
233 #else\r
234    typedef Byte FAR *voidpf;\r
235    typedef Byte     *voidp;\r
236 #endif\r
237 \r
238 #ifdef HAVE_UNISTD_H\r
239 #  include <sys/types.h> /* for off_t */\r
240 #  include <unistd.h>    /* for SEEK_* and off_t */\r
241 #  define z_off_t  off_t\r
242 #endif\r
243 #ifndef SEEK_SET\r
244 #  define SEEK_SET        0       /* Seek from beginning of file.  */\r
245 #  define SEEK_CUR        1       /* Seek from current position.  */\r
246 #  define SEEK_END        2       /* Set file pointer to EOF plus "offset" */\r
247 #endif\r
248 #ifndef z_off_t\r
249 #  define  z_off_t long\r
250 #endif\r
251 \r
252 /* MVS linker does not support external names larger than 8 bytes */\r
253 #if defined(__MVS__)\r
254 #   pragma map(deflateInit_,"DEIN")\r
255 #   pragma map(deflateInit2_,"DEIN2")\r
256 #   pragma map(deflateEnd,"DEEND")\r
257 #   pragma map(inflateInit_,"ININ")\r
258 #   pragma map(inflateInit2_,"ININ2")\r
259 #   pragma map(inflateEnd,"INEND")\r
260 #   pragma map(inflateSync,"INSY")\r
261 #   pragma map(inflateSetDictionary,"INSEDI")\r
262 #   pragma map(inflate_blocks,"INBL")\r
263 #   pragma map(inflate_blocks_new,"INBLNE")\r
264 #   pragma map(inflate_blocks_free,"INBLFR")\r
265 #   pragma map(inflate_blocks_reset,"INBLRE")\r
266 #   pragma map(inflate_codes_free,"INCOFR")\r
267 #   pragma map(inflate_codes,"INCO")\r
268 #   pragma map(inflate_fast,"INFA")\r
269 #   pragma map(inflate_flush,"INFLU")\r
270 #   pragma map(inflate_mask,"INMA")\r
271 #   pragma map(inflate_set_dictionary,"INSEDI2")\r
272 #   pragma map(inflate_copyright,"INCOPY")\r
273 #   pragma map(inflate_trees_bits,"INTRBI")\r
274 #   pragma map(inflate_trees_dynamic,"INTRDY")\r
275 #   pragma map(inflate_trees_fixed,"INTRFI")\r
276 #   pragma map(inflate_trees_free,"INTRFR")\r
277 #endif\r
278 \r
279 #endif /* _ZCONF_H */\r