Annotation of embedaddon/sudo/zlib/zconf.h.in, revision 1.1.1.1
1.1 misho 1: /* zconf.h -- configuration of the zlib compression library
2: * Copyright (C) 1995-2010 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: /* The following four defines are enabled by sudo's configure script. */
12: #undef HAVE_UNISTD_H
13: #undef HAVE_VSNPRINTF
14: #undef HAVE_MEMCPY
15: #undef _FILE_OFFSET_BITS
16: #undef _LARGE_FILES
17: #undef const
18:
19: /*
20: * If you *really* need a unique prefix for all types and library functions,
21: * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
22: * Even better than compiling with -DZ_PREFIX would be to use configure to set
23: * this permanently in zconf.h using "./configure --zprefix".
24: */
25: #ifdef Z_PREFIX /* may be set to #if 1 by ./configure */
26:
27: /* all linked symbols */
28: # define _dist_code z__dist_code
29: # define _length_code z__length_code
30: # define _tr_align z__tr_align
31: # define _tr_flush_block z__tr_flush_block
32: # define _tr_init z__tr_init
33: # define _tr_stored_block z__tr_stored_block
34: # define _tr_tally z__tr_tally
35: # define adler32 z_adler32
36: # define adler32_combine z_adler32_combine
37: # define adler32_combine64 z_adler32_combine64
38: # define compress z_compress
39: # define compress2 z_compress2
40: # define compressBound z_compressBound
41: # define crc32 z_crc32
42: # define crc32_combine z_crc32_combine
43: # define crc32_combine64 z_crc32_combine64
44: # define deflate z_deflate
45: # define deflateBound z_deflateBound
46: # define deflateCopy z_deflateCopy
47: # define deflateEnd z_deflateEnd
48: # define deflateInit2_ z_deflateInit2_
49: # define deflateInit_ z_deflateInit_
50: # define deflateParams z_deflateParams
51: # define deflatePrime z_deflatePrime
52: # define deflateReset z_deflateReset
53: # define deflateSetDictionary z_deflateSetDictionary
54: # define deflateSetHeader z_deflateSetHeader
55: # define deflateTune z_deflateTune
56: # define deflate_copyright z_deflate_copyright
57: # define get_crc_table z_get_crc_table
58: # define gz_error z_gz_error
59: # define gz_intmax z_gz_intmax
60: # define gz_strwinerror z_gz_strwinerror
61: # define gzbuffer z_gzbuffer
62: # define gzclearerr z_gzclearerr
63: # define gzclose z_gzclose
64: # define gzclose_r z_gzclose_r
65: # define gzclose_w z_gzclose_w
66: # define gzdirect z_gzdirect
67: # define gzdopen z_gzdopen
68: # define gzeof z_gzeof
69: # define gzerror z_gzerror
70: # define gzflush z_gzflush
71: # define gzgetc z_gzgetc
72: # define gzgets z_gzgets
73: # define gzoffset z_gzoffset
74: # define gzoffset64 z_gzoffset64
75: # define gzopen z_gzopen
76: # define gzopen64 z_gzopen64
77: # define gzprintf z_gzprintf
78: # define gzputc z_gzputc
79: # define gzputs z_gzputs
80: # define gzread z_gzread
81: # define gzrewind z_gzrewind
82: # define gzseek z_gzseek
83: # define gzseek64 z_gzseek64
84: # define gzsetparams z_gzsetparams
85: # define gztell z_gztell
86: # define gztell64 z_gztell64
87: # define gzungetc z_gzungetc
88: # define gzwrite z_gzwrite
89: # define inflate z_inflate
90: # define inflateBack z_inflateBack
91: # define inflateBackEnd z_inflateBackEnd
92: # define inflateBackInit_ z_inflateBackInit_
93: # define inflateCopy z_inflateCopy
94: # define inflateEnd z_inflateEnd
95: # define inflateGetHeader z_inflateGetHeader
96: # define inflateInit2_ z_inflateInit2_
97: # define inflateInit_ z_inflateInit_
98: # define inflateMark z_inflateMark
99: # define inflatePrime z_inflatePrime
100: # define inflateReset z_inflateReset
101: # define inflateReset2 z_inflateReset2
102: # define inflateSetDictionary z_inflateSetDictionary
103: # define inflateSync z_inflateSync
104: # define inflateSyncPoint z_inflateSyncPoint
105: # define inflateUndermine z_inflateUndermine
106: # define inflate_copyright z_inflate_copyright
107: # define inflate_fast z_inflate_fast
108: # define inflate_table z_inflate_table
109: # define uncompress z_uncompress
110: # define zError z_zError
111: # define zcalloc z_zcalloc
112: # define zcfree z_zcfree
113: # define zlibCompileFlags z_zlibCompileFlags
114: # define zlibVersion z_zlibVersion
115:
116: /* all zlib typedefs in zlib.h and zconf.h */
117: # define Byte z_Byte
118: # define Bytef z_Bytef
119: # define alloc_func z_alloc_func
120: # define charf z_charf
121: # define free_func z_free_func
122: # define gzFile z_gzFile
123: # define gz_header z_gz_header
124: # define gz_headerp z_gz_headerp
125: # define in_func z_in_func
126: # define intf z_intf
127: # define out_func z_out_func
128: # define uInt z_uInt
129: # define uIntf z_uIntf
130: # define uLong z_uLong
131: # define uLongf z_uLongf
132: # define voidp z_voidp
133: # define voidpc z_voidpc
134: # define voidpf z_voidpf
135:
136: /* all zlib structs in zlib.h and zconf.h */
137: # define gz_header_s z_gz_header_s
138: # define internal_state z_internal_state
139:
140: #endif
141:
142: #if defined(__MSDOS__) && !defined(MSDOS)
143: # define MSDOS
144: #endif
145: #if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
146: # define OS2
147: #endif
148: #if defined(_WINDOWS) && !defined(WINDOWS)
149: # define WINDOWS
150: #endif
151: #if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
152: # ifndef WIN32
153: # define WIN32
154: # endif
155: #endif
156: #if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
157: # if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
158: # ifndef SYS16BIT
159: # define SYS16BIT
160: # endif
161: # endif
162: #endif
163:
164: /*
165: * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
166: * than 64k bytes at a time (needed on systems with 16-bit int).
167: */
168: #ifdef SYS16BIT
169: # define MAXSEG_64K
170: #endif
171: #ifdef MSDOS
172: # define UNALIGNED_OK
173: #endif
174:
175: #ifdef __STDC_VERSION__
176: # ifndef STDC
177: # define STDC
178: # endif
179: # if __STDC_VERSION__ >= 199901L
180: # ifndef STDC99
181: # define STDC99
182: # endif
183: # endif
184: #endif
185: #if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
186: # define STDC
187: #endif
188: #if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
189: # define STDC
190: #endif
191: #if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
192: # define STDC
193: #endif
194: #if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
195: # define STDC
196: #endif
197:
198: #if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */
199: # define STDC
200: #endif
201:
202: #ifndef STDC
203: # ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
204: # define const /* note: need a more gentle solution here */
205: # endif
206: #endif
207:
208: /* Some Mac compilers merge all .h files incorrectly: */
209: #if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
210: # define NO_DUMMY_DECL
211: #endif
212:
213: /* Maximum value for memLevel in deflateInit2 */
214: #ifndef MAX_MEM_LEVEL
215: # ifdef MAXSEG_64K
216: # define MAX_MEM_LEVEL 8
217: # else
218: # define MAX_MEM_LEVEL 9
219: # endif
220: #endif
221:
222: /* Maximum value for windowBits in deflateInit2 and inflateInit2.
223: * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
224: * created by gzip. (Files created by minigzip can still be extracted by
225: * gzip.)
226: */
227: #ifndef MAX_WBITS
228: # define MAX_WBITS 15 /* 32K LZ77 window */
229: #endif
230:
231: /* The memory requirements for deflate are (in bytes):
232: (1 << (windowBits+2)) + (1 << (memLevel+9))
233: that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
234: plus a few kilobytes for small objects. For example, if you want to reduce
235: the default memory requirements from 256K to 128K, compile with
236: make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
237: Of course this will generally degrade compression (there's no free lunch).
238:
239: The memory requirements for inflate are (in bytes) 1 << windowBits
240: that is, 32K for windowBits=15 (default value) plus a few kilobytes
241: for small objects.
242: */
243:
244: /* Type declarations */
245:
246: #ifndef OF /* function prototypes */
247: # ifdef STDC
248: # define OF(args) args
249: # else
250: # define OF(args) ()
251: # endif
252: #endif
253:
254: /* The following definitions for FAR are needed only for MSDOS mixed
255: * model programming (small or medium model with some far allocations).
256: * This was tested only with MSC; for other MSDOS compilers you may have
257: * to define NO_MEMCPY in zutil.h. If you don't need the mixed model,
258: * just define FAR to be empty.
259: */
260: #ifdef SYS16BIT
261: # if defined(M_I86SM) || defined(M_I86MM)
262: /* MSC small or medium model */
263: # define SMALL_MEDIUM
264: # ifdef _MSC_VER
265: # define FAR _far
266: # else
267: # define FAR far
268: # endif
269: # endif
270: # if (defined(__SMALL__) || defined(__MEDIUM__))
271: /* Turbo C small or medium model */
272: # define SMALL_MEDIUM
273: # ifdef __BORLANDC__
274: # define FAR _far
275: # else
276: # define FAR far
277: # endif
278: # endif
279: #endif
280:
281: #if defined(WINDOWS) || defined(WIN32)
282: /* If building or using zlib as a DLL, define ZLIB_DLL.
283: * This is not mandatory, but it offers a little performance increase.
284: */
285: # ifdef ZLIB_DLL
286: # if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
287: # ifdef ZLIB_INTERNAL
288: # define ZEXTERN extern __declspec(dllexport)
289: # else
290: # define ZEXTERN extern __declspec(dllimport)
291: # endif
292: # endif
293: # endif /* ZLIB_DLL */
294: /* If building or using zlib with the WINAPI/WINAPIV calling convention,
295: * define ZLIB_WINAPI.
296: * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
297: */
298: # ifdef ZLIB_WINAPI
299: # ifdef FAR
300: # undef FAR
301: # endif
302: # include <windows.h>
303: /* No need for _export, use ZLIB.DEF instead. */
304: /* For complete Windows compatibility, use WINAPI, not __stdcall. */
305: # define ZEXPORT WINAPI
306: # ifdef WIN32
307: # define ZEXPORTVA WINAPIV
308: # else
309: # define ZEXPORTVA FAR CDECL
310: # endif
311: # endif
312: #endif
313:
314: #if defined (__BEOS__)
315: # ifdef ZLIB_DLL
316: # ifdef ZLIB_INTERNAL
317: # define ZEXPORT __declspec(dllexport)
318: # define ZEXPORTVA __declspec(dllexport)
319: # else
320: # define ZEXPORT __declspec(dllimport)
321: # define ZEXPORTVA __declspec(dllimport)
322: # endif
323: # endif
324: #endif
325:
326: #ifndef ZEXTERN
327: # define ZEXTERN extern
328: #endif
329: #ifndef ZEXPORT
330: # define ZEXPORT
331: #endif
332: #ifndef ZEXPORTVA
333: # define ZEXPORTVA
334: #endif
335:
336: #ifndef FAR
337: # define FAR
338: #endif
339:
340: #if !defined(__MACTYPES__)
341: typedef unsigned char Byte; /* 8 bits */
342: #endif
343: typedef unsigned int uInt; /* 16 bits or more */
344: typedef unsigned long uLong; /* 32 bits or more */
345:
346: #ifdef SMALL_MEDIUM
347: /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
348: # define Bytef Byte FAR
349: #else
350: typedef Byte FAR Bytef;
351: #endif
352: typedef char FAR charf;
353: typedef int FAR intf;
354: typedef uInt FAR uIntf;
355: typedef uLong FAR uLongf;
356:
357: #ifdef STDC
358: typedef void const *voidpc;
359: typedef void FAR *voidpf;
360: typedef void *voidp;
361: #else
362: typedef Byte const *voidpc;
363: typedef Byte FAR *voidpf;
364: typedef Byte *voidp;
365: #endif
366:
367: #ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */
368: # define Z_HAVE_UNISTD_H
369: #endif
370:
371: #ifdef STDC
372: # include <sys/types.h> /* for off_t */
373: #endif
374:
375: /* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and
376: * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even
377: * though the former does not conform to the LFS document), but considering
378: * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as
379: * equivalently requesting no 64-bit operations
380: */
381: #if -_LARGEFILE64_SOURCE - -1 == 1
382: # undef _LARGEFILE64_SOURCE
383: #endif
384:
385: #if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE)
386: # include <unistd.h> /* for SEEK_* and off_t */
387: # ifdef VMS
388: # include <unixio.h> /* for off_t */
389: # endif
390: # ifndef z_off_t
391: # define z_off_t off_t
392: # endif
393: #endif
394:
395: #ifndef SEEK_SET
396: # define SEEK_SET 0 /* Seek from beginning of file. */
397: # define SEEK_CUR 1 /* Seek from current position. */
398: # define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
399: #endif
400:
401: #ifndef z_off_t
402: # define z_off_t long
403: #endif
404:
405: #if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0
406: # define z_off64_t off64_t
407: #else
408: # define z_off64_t z_off_t
409: #endif
410:
411: #if defined(__OS400__)
412: # define NO_vsnprintf
413: #endif
414:
415: #if defined(__MVS__)
416: # define NO_vsnprintf
417: #endif
418:
419: /* MVS linker does not support external names larger than 8 bytes */
420: #if defined(__MVS__)
421: #pragma map(deflateInit_,"DEIN")
422: #pragma map(deflateInit2_,"DEIN2")
423: #pragma map(deflateEnd,"DEEND")
424: #pragma map(deflateBound,"DEBND")
425: #pragma map(inflateInit_,"ININ")
426: #pragma map(inflateInit2_,"ININ2")
427: #pragma map(inflateEnd,"INEND")
428: #pragma map(inflateSync,"INSY")
429: #pragma map(inflateSetDictionary,"INSEDI")
430: #pragma map(compressBound,"CMBND")
431: #pragma map(inflate_table,"INTABL")
432: #pragma map(inflate_fast,"INFA")
433: #pragma map(inflate_copyright,"INCOPY")
434: #endif
435:
436: #endif /* ZCONF_H */
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>