hammer2 - Merge Daniel Flores's HAMMER2 GSOC project into the main tree
[dragonfly.git] / sys / vfs / hammer2 / zlib / hammer2_zlib_zconf.h
1 /* zconf.h -- configuration of the zlib compression library
2  * Copyright (C) 1995-2013 Jean-loup Gailly.
3  * For conditions of distribution and use, see copyright notice in zlib.h
4  */
5
6 /* @(#) $Id$ */
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  * Even better than compiling with -DZ_PREFIX would be to use configure to set
15  * this permanently in zconf.h using "./configure --zprefix".
16  */
17 #ifdef Z_PREFIX     /* may be set to #if 1 by ./configure */
18 #  define Z_PREFIX_SET
19
20 /* all linked symbols */
21 #  define _dist_code            z__dist_code
22 #  define _length_code          z__length_code
23 #  define _tr_align             z__tr_align
24 #  define _tr_flush_bits        z__tr_flush_bits
25 #  define _tr_flush_block       z__tr_flush_block
26 #  define _tr_init              z__tr_init
27 #  define _tr_stored_block      z__tr_stored_block
28 #  define _tr_tally             z__tr_tally
29 #  define adler32               z_adler32
30 #  define adler32_combine       z_adler32_combine
31 #  define adler32_combine64     z_adler32_combine64
32 #  define deflate               z_deflate
33 #  define deflateBound          z_deflateBound
34 #  define deflateCopy           z_deflateCopy
35 #  define deflateEnd            z_deflateEnd
36 #  define deflateInit2_         z_deflateInit2_
37 #  define deflateInit_          z_deflateInit_
38 #  define deflateParams         z_deflateParams
39 #  define deflatePending        z_deflatePending
40 #  define deflatePrime          z_deflatePrime
41 #  define deflateReset          z_deflateReset
42 #  define deflateResetKeep      z_deflateResetKeep
43 #  define deflateSetDictionary  z_deflateSetDictionary
44 #  define deflateSetHeader      z_deflateSetHeader
45 #  define deflateTune           z_deflateTune
46 #  define deflate_copyright     z_deflate_copyright
47 #  define inflate               z_inflate
48 #  define inflateCopy           z_inflateCopy
49 #  define inflateEnd            z_inflateEnd
50 #  define inflateGetHeader      z_inflateGetHeader
51 #  define inflateInit2_         z_inflateInit2_
52 #  define inflateInit_          z_inflateInit_
53 #  define inflateMark           z_inflateMark
54 #  define inflatePrime          z_inflatePrime
55 #  define inflateReset          z_inflateReset
56 #  define inflateReset2         z_inflateReset2
57 #  define inflateSetDictionary  z_inflateSetDictionary
58 #  define inflateGetDictionary  z_inflateGetDictionary
59 #  define inflateSync           z_inflateSync
60 #  define inflateSyncPoint      z_inflateSyncPoint
61 #  define inflateUndermine      z_inflateUndermine
62 #  define inflateResetKeep      z_inflateResetKeep
63 #  define inflate_copyright     z_inflate_copyright
64 #  define inflate_fast          z_inflate_fast
65 #  define inflate_table         z_inflate_table
66 #  define zError                z_zError
67 #  define zlibCompileFlags      z_zlibCompileFlags
68 #  define zlibVersion           z_zlibVersion
69
70 /* all zlib typedefs in zlib.h and zconf.h */
71 #  define Byte                  z_Byte
72 #  define Bytef                 z_Bytef
73 #  define alloc_func            z_alloc_func
74 #  define charf                 z_charf
75 #  define free_func             z_free_func
76 #  define in_func               z_in_func
77 #  define intf                  z_intf
78 #  define out_func              z_out_func
79 #  define uInt                  z_uInt
80 #  define uIntf                 z_uIntf
81 #  define uLong                 z_uLong
82 #  define uLongf                z_uLongf
83 #  define voidp                 z_voidp
84 #  define voidpc                z_voidpc
85 #  define voidpf                z_voidpf
86
87 /* all zlib structs in zlib.h and zconf.h */
88 #  define internal_state        z_internal_state
89
90 #endif
91
92 #ifdef __STDC_VERSION__
93 #  ifndef STDC
94 #    define STDC
95 #  endif
96 #  if __STDC_VERSION__ >= 199901L
97 #    ifndef STDC99
98 #      define STDC99
99 #    endif
100 #  endif
101 #endif
102 #if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
103 #  define STDC
104 #endif
105 #if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
106 #  define STDC
107 #endif
108
109 #if defined(__OS400__) && !defined(STDC)    /* iSeries (formerly AS/400). */
110 #  define STDC
111 #endif
112
113 #ifndef STDC
114 #  ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
115 #    define const       /* note: need a more gentle solution here */
116 #  endif
117 #endif
118
119 #if defined(ZLIB_CONST) && !defined(z_const)
120 #  define z_const const
121 #else
122 #  define z_const
123 #endif
124
125 /* Maximum value for memLevel in deflateInit2 */
126 #ifndef MAX_MEM_LEVEL
127 #  ifdef MAXSEG_64K
128 #    define MAX_MEM_LEVEL 8
129 #  else
130 #    define MAX_MEM_LEVEL 9
131 #  endif
132 #endif
133
134 /* Maximum value for windowBits in deflateInit2 and inflateInit2.
135  * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
136  * created by gzip. (Files created by minigzip can still be extracted by
137  * gzip.)
138  */
139 #ifndef MAX_WBITS
140 #  define MAX_WBITS   15 /* 32K LZ77 window */
141 #endif
142
143 /* The memory requirements for deflate are (in bytes):
144             (1 << (windowBits+2)) +  (1 << (memLevel+9))
145  that is: 128K for windowBits=15  +  128K for memLevel = 8  (default values)
146  plus a few kilobytes for small objects. For example, if you want to reduce
147  the default memory requirements from 256K to 128K, compile with
148      make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
149  Of course this will generally degrade compression (there's no free lunch).
150
151    The memory requirements for inflate are (in bytes) 1 << windowBits
152  that is, 32K for windowBits=15 (default value) plus a few kilobytes
153  for small objects.
154 */
155
156                         /* Type declarations */
157
158 #ifndef Z_ARG /* function prototypes for stdarg */
159 #  if defined(STDC) || defined(Z_HAVE_STDARG_H)
160 #    define Z_ARG(args)  args
161 #  else
162 #    define Z_ARG(args)  ()
163 #  endif
164 #endif
165
166 #ifndef ZEXTERN
167 #  define ZEXTERN extern
168 #endif
169 #ifndef ZEXPORT
170 #  define ZEXPORT
171 #endif
172 #ifndef ZEXPORTVA
173 #  define ZEXPORTVA
174 #endif
175
176 #ifndef FAR
177 #  define FAR
178 #endif
179
180 #if !defined(__MACTYPES__)
181 typedef unsigned char  Byte;  /* 8 bits */
182 #endif
183 typedef unsigned int   uInt;  /* 16 bits or more */
184 typedef unsigned long  uLong; /* 32 bits or more */
185
186 #ifdef SMALL_MEDIUM
187    /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
188 #  define Bytef Byte FAR
189 #else
190    typedef Byte  FAR Bytef;
191 #endif
192 typedef char  FAR charf;
193 typedef int   FAR intf;
194 typedef uInt  FAR uIntf;
195 typedef uLong FAR uLongf;
196
197 #ifdef STDC
198    typedef void const *voidpc;
199    typedef void FAR   *voidpf;
200    typedef void       *voidp;
201 #else
202    typedef Byte const *voidpc;
203    typedef Byte FAR   *voidpf;
204    typedef Byte       *voidp;
205 #endif
206
207 #if !defined(Z_U4) && defined(STDC)
208 #  include <limits.h>
209 #  if (UINT_MAX == 0xffffffffUL)
210 #    define Z_U4 unsigned
211 #  elif (ULONG_MAX == 0xffffffffUL)
212 #    define Z_U4 unsigned long
213 #  elif (USHRT_MAX == 0xffffffffUL)
214 #    define Z_U4 unsigned short
215 #  endif
216 #endif
217
218 #ifdef Z_U4
219    typedef Z_U4 z_crc_t;
220 #else
221    typedef unsigned long z_crc_t;
222 #endif
223
224 #if 1    /* was set to #if 1 by ./configure */
225 #  define Z_HAVE_UNISTD_H
226 #endif
227
228 #if 1    /* was set to #if 1 by ./configure */
229 #  define Z_HAVE_STDARG_H
230 #endif
231
232 #if defined(STDC) || defined(Z_HAVE_STDARG_H)
233 #    include <stdarg.h>         /* for va_list */
234 #endif
235
236 /* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and
237  * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even
238  * though the former does not conform to the LFS document), but considering
239  * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as
240  * equivalently requesting no 64-bit operations
241  */
242 #if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1
243 #  undef _LARGEFILE64_SOURCE
244 #endif
245
246 #if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H)
247 #  define Z_HAVE_UNISTD_H
248 #endif
249
250 #if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0
251 #  define Z_LFS64
252 #endif
253
254 #if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64)
255 #  define Z_LARGE64
256 #endif
257
258 #if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64)
259 #  define Z_WANT64
260 #endif
261
262 #ifndef z_off_t
263 #  define z_off_t long
264 #endif
265
266 #if !defined(_WIN32) && defined(Z_LARGE64)
267 #  define z_off64_t off64_t
268 #else
269 #    define z_off64_t z_off_t
270 #endif
271
272 /* MVS linker does not support external names larger than 8 bytes */
273 #if defined(__MVS__)
274   #pragma map(deflateInit_,"DEIN")
275   #pragma map(deflateInit2_,"DEIN2")
276   #pragma map(deflateEnd,"DEEND")
277   #pragma map(deflateBound,"DEBND")
278   #pragma map(inflateInit_,"ININ")
279   #pragma map(inflateInit2_,"ININ2")
280   #pragma map(inflateEnd,"INEND")
281   #pragma map(inflateSync,"INSY")
282   #pragma map(inflateSetDictionary,"INSEDI")
283   //#pragma map(compressBound,"CMBND")
284   #pragma map(inflate_table,"INTABL")
285   #pragma map(inflate_fast,"INFA")
286   #pragma map(inflate_copyright,"INCOPY")
287 #endif
288
289 #endif /* ZCONF_H */