summaryrefslogtreecommitdiff
path: root/zconf.h
diff options
context:
space:
mode:
Diffstat (limited to 'zconf.h')
-rw-r--r--zconf.h77
1 files changed, 70 insertions, 7 deletions
diff --git a/zconf.h b/zconf.h
index 5f6e887..d95edb6 100644
--- a/zconf.h
+++ b/zconf.h
@@ -1,9 +1,9 @@
1/* zconf.h -- configuration of the zlib compression library 1/* zconf.h -- configuration of the zlib compression library
2 * Copyright (C) 1995-1996 Jean-loup Gailly. 2 * Copyright (C) 1995-1998 Jean-loup Gailly.
3 * For conditions of distribution and use, see copyright notice in zlib.h 3 * For conditions of distribution and use, see copyright notice in zlib.h
4 */ 4 */
5 5
6/* $Id: zconf.h,v 1.20 1996/07/02 15:09:28 me Exp $ */ 6/* @(#) $Id$ */
7 7
8#ifndef _ZCONF_H 8#ifndef _ZCONF_H
9#define _ZCONF_H 9#define _ZCONF_H
@@ -27,6 +27,7 @@
27# define inflateInit2_ z_inflateInit2_ 27# define inflateInit2_ z_inflateInit2_
28# define inflateSetDictionary z_inflateSetDictionary 28# define inflateSetDictionary z_inflateSetDictionary
29# define inflateSync z_inflateSync 29# define inflateSync z_inflateSync
30# define inflateSyncPoint z_inflateSyncPoint
30# define inflateReset z_inflateReset 31# define inflateReset z_inflateReset
31# define compress z_compress 32# define compress z_compress
32# define uncompress z_uncompress 33# define uncompress z_uncompress
@@ -72,8 +73,10 @@
72#if (defined(MSDOS) || defined(_WINDOWS) || defined(WIN32)) && !defined(STDC) 73#if (defined(MSDOS) || defined(_WINDOWS) || defined(WIN32)) && !defined(STDC)
73# define STDC 74# define STDC
74#endif 75#endif
75#if (defined(__STDC__) || defined(__cplusplus)) && !defined(STDC) 76#if defined(__STDC__) || defined(__cplusplus) || defined(__OS2__)
76# define STDC 77# ifndef STDC
78# define STDC
79# endif
77#endif 80#endif
78 81
79#ifndef STDC 82#ifndef STDC
@@ -87,6 +90,12 @@
87# define NO_DUMMY_DECL 90# define NO_DUMMY_DECL
88#endif 91#endif
89 92
93/* Borland C incorrectly complains about missing returns: */
94#if defined(__BORLANDC__)
95# define NEED_DUMMY_RETURN
96#endif
97
98
90/* Maximum value for memLevel in deflateInit2 */ 99/* Maximum value for memLevel in deflateInit2 */
91#ifndef MAX_MEM_LEVEL 100#ifndef MAX_MEM_LEVEL
92# ifdef MAXSEG_64K 101# ifdef MAXSEG_64K
@@ -96,13 +105,17 @@
96# endif 105# endif
97#endif 106#endif
98 107
99/* Maximum value for windowBits in deflateInit2 and inflateInit2 */ 108/* Maximum value for windowBits in deflateInit2 and inflateInit2.
109 * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
110 * created by gzip. (Files created by minigzip can still be extracted by
111 * gzip.)
112 */
100#ifndef MAX_WBITS 113#ifndef MAX_WBITS
101# define MAX_WBITS 15 /* 32K LZ77 window */ 114# define MAX_WBITS 15 /* 32K LZ77 window */
102#endif 115#endif
103 116
104/* The memory requirements for deflate are (in bytes): 117/* The memory requirements for deflate are (in bytes):
105 1 << (windowBits+2) + 1 << (memLevel+9) 118 (1 << (windowBits+2)) + (1 << (memLevel+9))
106 that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) 119 that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
107 plus a few kilobytes for small objects. For example, if you want to reduce 120 plus a few kilobytes for small objects. For example, if you want to reduce
108 the default memory requirements from 256K to 128K, compile with 121 the default memory requirements from 256K to 128K, compile with
@@ -172,13 +185,63 @@ typedef uLong FAR uLongf;
172 typedef Byte *voidp; 185 typedef Byte *voidp;
173#endif 186#endif
174 187
188#ifdef HAVE_UNISTD_H
189# include <unistd.h> /* for SEEK_* and off_t */
190# define z_off_t off_t
191#endif
192#ifndef SEEK_SET
193# define SEEK_SET 0 /* Seek from beginning of file. */
194# define SEEK_CUR 1 /* Seek from current position. */
195#endif
196#ifndef z_off_t
197# define z_off_t long
198#endif
175 199
176/* Compile with -DZLIB_DLL for Windows DLL support */ 200/* Compile with -DZLIB_DLL for Windows DLL support */
177#if (defined(_WINDOWS) || defined(WINDOWS)) && defined(ZLIB_DLL) 201#if (defined(_WINDOWS) || defined(WINDOWS)) && defined(ZLIB_DLL)
202# undef FAR
178# include <windows.h> 203# include <windows.h>
179# define EXPORT WINAPI 204# define EXPORT WINAPI
205# ifdef WIN32
206# define EXPORTVA WINAPIV
207# else
208# define EXPORTVA FAR _cdecl _export
209# endif
180#else 210#else
181# define EXPORT 211# if defined (__BORLANDC__) && defined (_Windows) && defined (__DLL__)
212# define EXPORT _export
213# define EXPORTVA _export
214# else
215# define EXPORT
216# define EXPORTVA
217# endif
218#endif
219
220/* MVS linker does not support external names larger than 8 bytes */
221#if defined(__MVS__)
222# pragma map(deflateInit_,"DEIN")
223# pragma map(deflateInit2_,"DEIN2")
224# pragma map(deflateEnd,"DEEND")
225# pragma map(inflateInit_,"ININ")
226# pragma map(inflateInit2_,"ININ2")
227# pragma map(inflateEnd,"INEND")
228# pragma map(inflateSync,"INSY")
229# pragma map(inflateSetDictionary,"INSEDI")
230# pragma map(inflate_blocks,"INBL")
231# pragma map(inflate_blocks_new,"INBLNE")
232# pragma map(inflate_blocks_free,"INBLFR")
233# pragma map(inflate_blocks_reset,"INBLRE")
234# pragma map(inflate_codes_free,"INCOFR")
235# pragma map(inflate_codes,"INCO")
236# pragma map(inflate_fast,"INFA")
237# pragma map(inflate_flush,"INFLU")
238# pragma map(inflate_mask,"INMA")
239# pragma map(inflate_set_dictionary,"INSEDI2")
240# pragma map(inflate_copyright,"INCOPY")
241# pragma map(inflate_trees_bits,"INTRBI")
242# pragma map(inflate_trees_dynamic,"INTRDY")
243# pragma map(inflate_trees_fixed,"INTRFI")
244# pragma map(inflate_trees_free,"INTRFR")
182#endif 245#endif
183 246
184#endif /* _ZCONF_H */ 247#endif /* _ZCONF_H */