aboutsummaryrefslogtreecommitdiff
path: root/zconf.h
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2011-09-09 23:11:37 -0700
committerMark Adler <madler@alumni.caltech.edu>2011-09-09 23:11:37 -0700
commit56bcb184fac036a45cb8937238d51778d0a796aa (patch)
tree7b127418b30e135f8ce27ec136038b5090540820 /zconf.h
parent25e5325501edade156e897f95afdaa2be78ad9a3 (diff)
downloadzlib-56bcb184fac036a45cb8937238d51778d0a796aa.tar.gz
zlib-56bcb184fac036a45cb8937238d51778d0a796aa.tar.bz2
zlib-56bcb184fac036a45cb8937238d51778d0a796aa.zip
zlib 0.99v0.99
Diffstat (limited to 'zconf.h')
-rw-r--r--zconf.h86
1 files changed, 63 insertions, 23 deletions
diff --git a/zconf.h b/zconf.h
index 3898094..e17520c 100644
--- a/zconf.h
+++ b/zconf.h
@@ -1,5 +1,5 @@
1/* zconf.h -- configuration of the zlib compression library 1/* zconf.h -- configuration of the zlib compression library
2 * Copyright (C) 1995 Jean-loup Gailly. 2 * Copyright (C) 1995-1996 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
@@ -9,22 +9,55 @@
9#define _ZCONF_H 9#define _ZCONF_H
10 10
11/* 11/*
12 The library does not install any signal handler. It is recommended to 12 * People prefering a unique prefix for all types and library functions
13 add at least a handler for SIGSEGV when decompressing; the library checks 13 * should compile with -DZ_PREFIX
14 the consistency of the input data whenever possible but may go nuts
15 for some forms of corrupted input.
16 */ 14 */
15#ifdef Z_PREFIX
16# define deflateInit_ z_deflateInit_
17# define deflate z_deflate
18# define deflateEnd z_deflateEnd
19# define inflateInit_ z_inflateInit_
20# define inflate z_inflate
21# define inflateEnd z_inflateEnd
22# define deflateInit2_ z_deflateInit2_
23# define deflateCopy z_deflateCopy
24# define deflateReset z_deflateReset
25# define deflateParams z_deflateParams
26# define inflateInit2_ z_inflateInit2_
27# define inflateSync z_inflateSync
28# define inflateReset z_inflateReset
29# define compress z_compress
30# define uncompress z_uncompress
31# define adler32 z_adler32
32# define crc32 z_crc32
33# define get_crc_table z_get_crc_table
34
35# define Byte z_Byte
36# define uInt z_uInt
37# define uLong z_uLong
38# define Bytef z_Bytef
39# define charf z_charf
40# define intf z_intf
41# define uIntf z_uIntf
42# define uLongf z_uLongf
43# define voidpf z_voidpf
44# define voidp z_voidp
45#endif
17 46
18/* 47#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32)
19 * Compile with -DMAXSEG_64K if the alloc function cannot allocate more 48# define WIN32
20 * than 64k bytes at a time (needed on systems with 16-bit int). 49#endif
21 */ 50#if (defined(__GNUC__) || defined(WIN32)) && !defined(__32BIT__)
22#if defined(_GNUC__) && !defined(__32BIT__)
23# define __32BIT__ 51# define __32BIT__
24#endif 52#endif
25#if defined(__MSDOS__) && !defined(MSDOS) 53#if defined(__MSDOS__) && !defined(MSDOS)
26# define MSDOS 54# define MSDOS
27#endif 55#endif
56
57/*
58 * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
59 * than 64k bytes at a time (needed on systems with 16-bit int).
60 */
28#if defined(MSDOS) && !defined(__32BIT__) 61#if defined(MSDOS) && !defined(__32BIT__)
29# define MAXSEG_64K 62# define MAXSEG_64K
30#endif 63#endif
@@ -32,20 +65,20 @@
32# define UNALIGNED_OK 65# define UNALIGNED_OK
33#endif 66#endif
34 67
35#ifndef STDC 68#if (defined(MSDOS) || defined(_WINDOWS) || defined(WIN32)) && !defined(STDC)
36# if defined(MSDOS) || defined(__STDC__) || defined(__cplusplus) 69# define STDC
37# define STDC 70#endif
38# endif 71#if (defined(__STDC__) || defined(__cplusplus)) && !defined(STDC)
72# define STDC
39#endif 73#endif
40 74
41#ifndef STDC 75#if !defined(STDC) && !defined(const)
42# ifndef const 76# define const
43# define const
44# endif
45#endif 77#endif
46 78
47#ifdef __MWERKS__ /* Metrowerks CodeWarrior declares fileno() in unix.h */ 79#ifdef __MWERKS__ /* Metrowerks CodeWarrior declares fileno() in unix.h */
48# include <unix.h> 80# include <unix.h>
81# define Byte _Byte /* Byte already used on Mac */
49#endif 82#endif
50 83
51/* Maximum value for memLevel in deflateInit2 */ 84/* Maximum value for memLevel in deflateInit2 */
@@ -92,6 +125,7 @@
92 * just define FAR to be empty. 125 * just define FAR to be empty.
93 */ 126 */
94#if defined(M_I86SM) || defined(M_I86MM) /* MSC small or medium model */ 127#if defined(M_I86SM) || defined(M_I86MM) /* MSC small or medium model */
128# define SMALL_MEDIUM
95# ifdef _MSC_VER 129# ifdef _MSC_VER
96# define FAR __far 130# define FAR __far
97# else 131# else
@@ -99,20 +133,26 @@
99# endif 133# endif
100#endif 134#endif
101#if defined(__BORLANDC__) && (defined(__SMALL__) || defined(__MEDIUM__)) 135#if defined(__BORLANDC__) && (defined(__SMALL__) || defined(__MEDIUM__))
102# define FAR __far /* completely untested, just a best guess */ 136# define SMALL_MEDIUM
137# define FAR __far
103#endif 138#endif
104#ifndef FAR 139#ifndef FAR
105# define FAR 140# define FAR
106#endif 141#endif
142/* The Watcom compiler defines M_I86SM and __SMALL__ even in 32 bit mode */
143#if defined(__WATCOMC__) && defined(__386__)
144# undef FAR
145# undef SMALL_MEDIUM
146#endif
107 147
108typedef unsigned char Byte; /* 8 bits */ 148typedef unsigned char Byte; /* 8 bits */
109typedef unsigned int uInt; /* 16 bits or more */ 149typedef unsigned int uInt; /* 16 bits or more */
110typedef unsigned long uLong; /* 32 bits or more */ 150typedef unsigned long uLong; /* 32 bits or more */
111 151
112typedef Byte FAR Bytef; 152typedef Byte FAR Bytef;
113typedef char FAR charf; 153typedef char FAR charf;
114typedef int FAR intf; 154typedef int FAR intf;
115typedef uInt FAR uIntf; 155typedef uInt FAR uIntf;
116typedef uLong FAR uLongf; 156typedef uLong FAR uLongf;
117 157
118#ifdef STDC 158#ifdef STDC