summaryrefslogtreecommitdiff
path: root/zconf.h
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2011-09-09 23:13:27 -0700
committerMark Adler <madler@alumni.caltech.edu>2011-09-09 23:13:27 -0700
commit8a2acbffc86012de3523ecf91db2c4ea1b1c4ea2 (patch)
treec461eb314065024b6cb87d136e107dca2cc09a33 /zconf.h
parent56bcb184fac036a45cb8937238d51778d0a796aa (diff)
downloadzlib-8a2acbffc86012de3523ecf91db2c4ea1b1c4ea2.tar.gz
zlib 1.0-prev1.0-pre
Diffstat (limited to 'zconf.h')
-rw-r--r--zconf.h57
1 files changed, 10 insertions, 47 deletions
diff --git a/zconf.h b/zconf.h
index e17520c..3d78742 100644
--- a/zconf.h
+++ b/zconf.h
@@ -1,5 +1,5 @@
/* zconf.h -- configuration of the zlib compression library
- * Copyright (C) 1995-1996 Jean-loup Gailly.
+ * Copyright (C) 1995 Jean-loup Gailly.
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -9,40 +9,11 @@
#define _ZCONF_H
/*
- * People prefering a unique prefix for all types and library functions
- * should compile with -DZ_PREFIX
+ The library does not install any signal handler. It is recommended to
+ add at least a handler for SIGSEGV when decompressing; the library checks
+ the consistency of the input data whenever possible but may go nuts
+ for some forms of corrupted input.
*/
-#ifdef Z_PREFIX
-# define deflateInit_ z_deflateInit_
-# define deflate z_deflate
-# define deflateEnd z_deflateEnd
-# define inflateInit_ z_inflateInit_
-# define inflate z_inflate
-# define inflateEnd z_inflateEnd
-# define deflateInit2_ z_deflateInit2_
-# define deflateCopy z_deflateCopy
-# define deflateReset z_deflateReset
-# define deflateParams z_deflateParams
-# define inflateInit2_ z_inflateInit2_
-# define inflateSync z_inflateSync
-# define inflateReset z_inflateReset
-# define compress z_compress
-# define uncompress z_uncompress
-# define adler32 z_adler32
-# define crc32 z_crc32
-# define get_crc_table z_get_crc_table
-
-# define Byte z_Byte
-# define uInt z_uInt
-# define uLong z_uLong
-# define Bytef z_Bytef
-# define charf z_charf
-# define intf z_intf
-# define uIntf z_uIntf
-# define uLongf z_uLongf
-# define voidpf z_voidpf
-# define voidp z_voidp
-#endif
#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32)
# define WIN32
@@ -78,7 +49,6 @@
#ifdef __MWERKS__ /* Metrowerks CodeWarrior declares fileno() in unix.h */
# include <unix.h>
-# define Byte _Byte /* Byte already used on Mac */
#endif
/* Maximum value for memLevel in deflateInit2 */
@@ -125,7 +95,6 @@
* just define FAR to be empty.
*/
#if defined(M_I86SM) || defined(M_I86MM) /* MSC small or medium model */
-# define SMALL_MEDIUM
# ifdef _MSC_VER
# define FAR __far
# else
@@ -133,26 +102,20 @@
# endif
#endif
#if defined(__BORLANDC__) && (defined(__SMALL__) || defined(__MEDIUM__))
-# define SMALL_MEDIUM
-# define FAR __far
+# define FAR _far /* completely untested, just a best guess */
#endif
#ifndef FAR
# define FAR
#endif
-/* The Watcom compiler defines M_I86SM and __SMALL__ even in 32 bit mode */
-#if defined(__WATCOMC__) && defined(__386__)
-# undef FAR
-# undef SMALL_MEDIUM
-#endif
typedef unsigned char Byte; /* 8 bits */
typedef unsigned int uInt; /* 16 bits or more */
typedef unsigned long uLong; /* 32 bits or more */
-typedef Byte FAR Bytef;
-typedef char FAR charf;
-typedef int FAR intf;
-typedef uInt FAR uIntf;
+typedef Byte FAR Bytef;
+typedef char FAR charf;
+typedef int FAR intf;
+typedef uInt FAR uIntf;
typedef uLong FAR uLongf;
#ifdef STDC