]>
git.saurik.com Git - apple/security.git/blob - SecurityServer/MacYarrow/zlib/zconf.h
2 * Copyright (c) 2000-2001 Apple Computer, Inc. All Rights Reserved.
4 * The contents of this file constitute Original Code as defined in and are
5 * subject to the Apple Public Source License Version 1.2 (the 'License').
6 * You may not use this file except in compliance with the License. Please obtain
7 * a copy of the License at http://www.apple.com/publicsource and read it before
10 * This Original Code and all software distributed under the License are
11 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS
12 * OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT
13 * LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
14 * PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. Please see the License for the
15 * specific language governing rights and limitations under the License.
19 /* zconf.h -- configuration of the zlib compression library
20 * Copyright (C) 1995-1998 Jean-loup Gailly.
21 * For conditions of distribution and use, see copyright notice in zlib.h
24 /* @(#) $Id: zconf.h,v 1.1.1.1 2001/05/18 23:14:03 mb Exp $ */
30 * If you *really* need a unique prefix for all types and library functions,
31 * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
34 # define deflateInit_ z_deflateInit_
35 # define deflate z_deflate
36 # define deflateEnd z_deflateEnd
37 # define inflateInit_ z_inflateInit_
38 # define inflate z_inflate
39 # define inflateEnd z_inflateEnd
40 # define deflateInit2_ z_deflateInit2_
41 # define deflateSetDictionary z_deflateSetDictionary
42 # define deflateCopy z_deflateCopy
43 # define deflateReset z_deflateReset
44 # define deflateParams z_deflateParams
45 # define inflateInit2_ z_inflateInit2_
46 # define inflateSetDictionary z_inflateSetDictionary
47 # define inflateSync z_inflateSync
48 # define inflateSyncPoint z_inflateSyncPoint
49 # define inflateReset z_inflateReset
50 # define compress z_compress
51 # define compress2 z_compress2
52 # define uncompress z_uncompress
53 # define adler32 z_adler32
54 # define crc32 z_crc32
55 # define get_crc_table z_get_crc_table
59 # define uLong z_uLong
60 # define Bytef z_Bytef
61 # define charf z_charf
63 # define uIntf z_uIntf
64 # define uLongf z_uLongf
65 # define voidpf z_voidpf
66 # define voidp z_voidp
69 #if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32)
72 #if defined(__GNUC__) || defined(WIN32) || defined(__386__) || defined(i386)
77 #if defined(__MSDOS__) && !defined(MSDOS)
82 * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
83 * than 64k bytes at a time (needed on systems with 16-bit int).
85 #if defined(MSDOS) && !defined(__32BIT__)
92 #if (defined(MSDOS) || defined(_WINDOWS) || defined(WIN32)) && !defined(STDC)
95 #if defined(__STDC__) || defined(__cplusplus) || defined(__OS2__)
102 # ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
107 /* Some Mac compilers merge all .h files incorrectly: */
108 #if defined(__MWERKS__) || defined(applec) ||defined(THINK_C) ||defined(__SC__)
109 # define NO_DUMMY_DECL
112 /* Old Borland C incorrectly complains about missing returns: */
113 #if defined(__BORLANDC__) && (__BORLANDC__ < 0x500)
114 # define NEED_DUMMY_RETURN
118 /* Maximum value for memLevel in deflateInit2 */
119 #ifndef MAX_MEM_LEVEL
121 # define MAX_MEM_LEVEL 8
123 # define MAX_MEM_LEVEL 9
127 /* Maximum value for windowBits in deflateInit2 and inflateInit2.
128 * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
129 * created by gzip. (Files created by minigzip can still be extracted by
133 # define MAX_WBITS 15 /* 32K LZ77 window */
136 /* The memory requirements for deflate are (in bytes):
137 (1 << (windowBits+2)) + (1 << (memLevel+9))
138 that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
139 plus a few kilobytes for small objects. For example, if you want to reduce
140 the default memory requirements from 256K to 128K, compile with
141 make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
142 Of course this will generally degrade compression (there's no free lunch).
144 The memory requirements for inflate are (in bytes) 1 << windowBits
145 that is, 32K for windowBits=15 (default value) plus a few kilobytes
149 /* Type declarations */
151 #ifndef OF /* function prototypes */
153 # define OF(args) args
159 /* The following definitions for FAR are needed only for MSDOS mixed
160 * model programming (small or medium model with some far allocations).
161 * This was tested only with MSC; for other MSDOS compilers you may have
162 * to define NO_MEMCPY in zutil.h. If you don't need the mixed model,
163 * just define FAR to be empty.
165 #if (defined(M_I86SM) || defined(M_I86MM)) && !defined(__32BIT__)
166 /* MSC small or medium model */
167 # define SMALL_MEDIUM
174 #if defined(__BORLANDC__) && (defined(__SMALL__) || defined(__MEDIUM__))
176 # define SMALL_MEDIUM
181 /* Compile with -DZLIB_DLL for Windows DLL support */
182 #if defined(ZLIB_DLL)
183 # if defined(_WINDOWS) || defined(WINDOWS)
187 # include <windows.h>
188 # define ZEXPORT WINAPI
190 # define ZEXPORTVA WINAPIV
192 # define ZEXPORTVA FAR _cdecl _export
195 # if defined (__BORLANDC__)
196 # if (__BORLANDC__ >= 0x0500) && defined (WIN32)
197 # include <windows.h>
198 # define ZEXPORT __declspec(dllexport) WINAPI
199 # define ZEXPORTRVA __declspec(dllexport) WINAPIV
201 # if defined (_Windows) && defined (__DLL__)
202 # define ZEXPORT _export
203 # define ZEXPORTVA _export
209 #if defined (__BEOS__)
210 # if defined (ZLIB_DLL)
211 # define ZEXTERN extern __declspec(dllexport)
213 # define ZEXTERN extern __declspec(dllimport)
224 # define ZEXTERN extern
231 #if !defined(MACOS) && !defined(TARGET_OS_MAC)
232 typedef unsigned char Byte
; /* 8 bits */
234 typedef unsigned int uInt
; /* 16 bits or more */
235 typedef unsigned long uLong
; /* 32 bits or more */
238 /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
239 # define Bytef Byte FAR
241 typedef Byte FAR Bytef
;
243 typedef char FAR charf
;
244 typedef int FAR intf
;
245 typedef uInt FAR uIntf
;
246 typedef uLong FAR uLongf
;
249 typedef void FAR
*voidpf
;
252 typedef Byte FAR
*voidpf
;
257 # include <sys/types.h> /* for off_t */
258 # include <unistd.h> /* for SEEK_* and off_t */
259 # define z_off_t off_t
262 # define SEEK_SET 0 /* Seek from beginning of file. */
263 # define SEEK_CUR 1 /* Seek from current position. */
264 # define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
267 # define z_off_t long
270 /* MVS linker does not support external names larger than 8 bytes */
272 # pragma map(deflateInit_,"DEIN")
273 # pragma map(deflateInit2_,"DEIN2")
274 # pragma map(deflateEnd,"DEEND")
275 # pragma map(inflateInit_,"ININ")
276 # pragma map(inflateInit2_,"ININ2")
277 # pragma map(inflateEnd,"INEND")
278 # pragma map(inflateSync,"INSY")
279 # pragma map(inflateSetDictionary,"INSEDI")
280 # pragma map(inflate_blocks,"INBL")
281 # pragma map(inflate_blocks_new,"INBLNE")
282 # pragma map(inflate_blocks_free,"INBLFR")
283 # pragma map(inflate_blocks_reset,"INBLRE")
284 # pragma map(inflate_codes_free,"INCOFR")
285 # pragma map(inflate_codes,"INCO")
286 # pragma map(inflate_fast,"INFA")
287 # pragma map(inflate_flush,"INFLU")
288 # pragma map(inflate_mask,"INMA")
289 # pragma map(inflate_set_dictionary,"INSEDI2")
290 # pragma map(inflate_copyright,"INCOPY")
291 # pragma map(inflate_trees_bits,"INTRBI")
292 # pragma map(inflate_trees_dynamic,"INTRDY")
293 # pragma map(inflate_trees_fixed,"INTRFI")
294 # pragma map(inflate_trees_free,"INTRFR")
297 #endif /* _ZCONF_H */