aboutsummaryrefslogtreecommitdiff
path: root/zconf.h
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2011-09-09 23:14:39 -0700
committerMark Adler <madler@alumni.caltech.edu>2011-09-09 23:14:39 -0700
commit423eb40306489f9c88f7dba32c2f69179166730b (patch)
treeb5a83b0b1e52bbe0de973dcbc7ec008c1d7cf7d9 /zconf.h
parent8a2acbffc86012de3523ecf91db2c4ea1b1c4ea2 (diff)
downloadzlib-423eb40306489f9c88f7dba32c2f69179166730b.tar.gz
zlib-423eb40306489f9c88f7dba32c2f69179166730b.tar.bz2
zlib-423eb40306489f9c88f7dba32c2f69179166730b.zip
zlib 1.0.1v1.0.1
Diffstat (limited to 'zconf.h')
-rw-r--r--zconf.h67
1 files changed, 55 insertions, 12 deletions
diff --git a/zconf.h b/zconf.h
index 3d78742..6ab1e4f 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,11 +9,42 @@
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 * If you *really* need a unique prefix for all types and library functions,
13 add at least a handler for SIGSEGV when decompressing; the library checks 13 * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
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 deflateSetDictionary z_deflateSetDictionary
24# define deflateCopy z_deflateCopy
25# define deflateReset z_deflateReset
26# define deflateParams z_deflateParams
27# define inflateInit2_ z_inflateInit2_
28# define inflateSetDictionary z_inflateSetDictionary
29# define inflateSync z_inflateSync
30# define inflateReset z_inflateReset
31# define compress z_compress
32# define uncompress z_uncompress
33# define adler32 z_adler32
34# define crc32 z_crc32
35# define get_crc_table z_get_crc_table
36
37# define Byte z_Byte
38# define uInt z_uInt
39# define uLong z_uLong
40/* # define Bytef z_Bytef */
41# define charf z_charf
42# define intf z_intf
43# define uIntf z_uIntf
44# define uLongf z_uLongf
45# define voidpf z_voidpf
46# define voidp z_voidp
47#endif
17 48
18#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32) 49#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32)
19# define WIN32 50# define WIN32
@@ -43,12 +74,15 @@
43# define STDC 74# define STDC
44#endif 75#endif
45 76
46#if !defined(STDC) && !defined(const) 77#ifndef STDC
47# define const 78# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
79# define const
80# endif
48#endif 81#endif
49 82
50#ifdef __MWERKS__ /* Metrowerks CodeWarrior declares fileno() in unix.h */ 83#ifdef __MWERKS__ /* Metrowerks CodeWarrior declares fileno() in unix.h */
51# include <unix.h> 84# include <unix.h>
85# define NO_DUMMY_DECL /* buggy compiler merges all .h files incorrectly */
52#endif 86#endif
53 87
54/* Maximum value for memLevel in deflateInit2 */ 88/* Maximum value for memLevel in deflateInit2 */
@@ -95,6 +129,7 @@
95 * just define FAR to be empty. 129 * just define FAR to be empty.
96 */ 130 */
97#if defined(M_I86SM) || defined(M_I86MM) /* MSC small or medium model */ 131#if defined(M_I86SM) || defined(M_I86MM) /* MSC small or medium model */
132# define SMALL_MEDIUM
98# ifdef _MSC_VER 133# ifdef _MSC_VER
99# define FAR __far 134# define FAR __far
100# else 135# else
@@ -102,20 +137,28 @@
102# endif 137# endif
103#endif 138#endif
104#if defined(__BORLANDC__) && (defined(__SMALL__) || defined(__MEDIUM__)) 139#if defined(__BORLANDC__) && (defined(__SMALL__) || defined(__MEDIUM__))
105# define FAR _far /* completely untested, just a best guess */ 140# define SMALL_MEDIUM
141# define FAR __far
106#endif 142#endif
107#ifndef FAR 143#ifndef FAR
108# define FAR 144# define FAR
109#endif 145#endif
146/* The Watcom compiler defines M_I86SM and __SMALL__ even in 32 bit mode */
147#if defined(__WATCOMC__) && defined(__386__)
148# undef FAR
149# define FAR
150# undef SMALL_MEDIUM
151#endif
110 152
111typedef unsigned char Byte; /* 8 bits */ 153typedef unsigned char Byte; /* 8 bits */
112typedef unsigned int uInt; /* 16 bits or more */ 154typedef unsigned int uInt; /* 16 bits or more */
113typedef unsigned long uLong; /* 32 bits or more */ 155typedef unsigned long uLong; /* 32 bits or more */
114 156
115typedef Byte FAR Bytef; 157/* "typedef Byte FAR Bytef;" doesn't work with Borland C/C++ */
116typedef char FAR charf; 158#define Bytef Byte FAR
117typedef int FAR intf; 159typedef char FAR charf;
118typedef uInt FAR uIntf; 160typedef int FAR intf;
161typedef uInt FAR uIntf;
119typedef uLong FAR uLongf; 162typedef uLong FAR uLongf;
120 163
121#ifdef STDC 164#ifdef STDC