diff options
author | maximius <none@none> | 2009-10-17 15:51:44 -0700 |
---|---|---|
committer | maximius <none@none> | 2009-10-17 15:51:44 -0700 |
commit | e585187b248f48b3c6e9247b49fa07c6565d65e5 (patch) | |
tree | 637c5b7ddacf41040bef4ea4f75a97da64c6a9bc /dep/src/zlib/zconf.h | |
parent | 26b5e033ffde3d161382fc9addbfa99738379641 (diff) |
*Backed out changeset 3be01fb200a5
--HG--
branch : trunk
Diffstat (limited to 'dep/src/zlib/zconf.h')
-rw-r--r-- | dep/src/zlib/zconf.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/dep/src/zlib/zconf.h b/dep/src/zlib/zconf.h index 6c3086b96d7..719855a60d4 100644 --- a/dep/src/zlib/zconf.h +++ b/dep/src/zlib/zconf.h @@ -2,9 +2,12 @@ * Copyright (C) 1995-2005 Jean-loup Gailly. * For conditions of distribution and use, see copyright notice in zlib.h */ + /* @(#) $Id$ */ + #ifndef ZCONF_H #define ZCONF_H + /* * If you *really* need a unique prefix for all types and library functions, * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. @@ -39,6 +42,7 @@ # define crc32 z_crc32 # define get_crc_table z_get_crc_table # define zError z_zError + # define alloc_func z_alloc_func # define free_func z_free_func # define in_func z_in_func @@ -54,6 +58,7 @@ # define voidpf z_voidpf # define voidp z_voidp #endif + #if defined(__MSDOS__) && !defined(MSDOS) # define MSDOS #endif @@ -75,6 +80,7 @@ # endif # endif #endif + /* * Compile with -DMAXSEG_64K if the alloc function cannot allocate more * than 64k bytes at a time (needed on systems with 16-bit int). @@ -85,6 +91,7 @@ #ifdef MSDOS # define UNALIGNED_OK #endif + #ifdef __STDC_VERSION__ # ifndef STDC # define STDC @@ -107,18 +114,22 @@ #if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__)) # define STDC #endif + #if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */ # define STDC #endif + #ifndef STDC # ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */ # define const /* note: need a more gentle solution here */ # endif #endif + /* Some Mac compilers merge all .h files incorrectly: */ #if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__) # define NO_DUMMY_DECL #endif + /* Maximum value for memLevel in deflateInit2 */ #ifndef MAX_MEM_LEVEL # ifdef MAXSEG_64K @@ -127,6 +138,7 @@ # define MAX_MEM_LEVEL 9 # endif #endif + /* Maximum value for windowBits in deflateInit2 and inflateInit2. * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files * created by gzip. (Files created by minigzip can still be extracted by @@ -135,6 +147,7 @@ #ifndef MAX_WBITS # define MAX_WBITS 15 /* 32K LZ77 window */ #endif + /* The memory requirements for deflate are (in bytes): (1 << (windowBits+2)) + (1 << (memLevel+9)) that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) @@ -142,11 +155,14 @@ the default memory requirements from 256K to 128K, compile with make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" Of course this will generally degrade compression (there's no free lunch). + The memory requirements for inflate are (in bytes) 1 << windowBits that is, 32K for windowBits=15 (default value) plus a few kilobytes for small objects. */ + /* Type declarations */ + #ifndef OF /* function prototypes */ # ifdef STDC # define OF(args) args @@ -154,6 +170,7 @@ # define OF(args) () # endif #endif + /* The following definitions for FAR are needed only for MSDOS mixed * model programming (small or medium model with some far allocations). * This was tested only with MSC; for other MSDOS compilers you may have @@ -180,6 +197,7 @@ # endif # endif #endif + #if defined(WINDOWS) || defined(WIN32) /* If building or using zlib as a DLL, define ZLIB_DLL. * This is not mandatory, but it offers a little performance increase. @@ -212,6 +230,7 @@ # endif # endif #endif + #if defined (__BEOS__) # ifdef ZLIB_DLL # ifdef ZLIB_INTERNAL @@ -223,6 +242,7 @@ # endif # endif #endif + #ifndef ZEXTERN # define ZEXTERN extern #endif @@ -232,14 +252,17 @@ #ifndef ZEXPORTVA # define ZEXPORTVA #endif + #ifndef FAR # define FAR #endif + #if !defined(__MACTYPES__) typedef unsigned char Byte; /* 8 bits */ #endif typedef unsigned int uInt; /* 16 bits or more */ typedef unsigned long uLong; /* 32 bits or more */ + #ifdef SMALL_MEDIUM /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */ # define Bytef Byte FAR @@ -250,6 +273,7 @@ typedef char FAR charf; typedef int FAR intf; typedef uInt FAR uIntf; typedef uLong FAR uLongf; + #ifdef STDC typedef void const *voidpc; typedef void FAR *voidpf; @@ -259,6 +283,7 @@ typedef uLong FAR uLongf; typedef Byte FAR *voidpf; typedef Byte *voidp; #endif + #if 0 /* HAVE_UNISTD_H -- this line is updated by ./configure */ # include <sys/types.h> /* for off_t */ # include <unistd.h> /* for SEEK_* and off_t */ @@ -275,15 +300,18 @@ typedef uLong FAR uLongf; #ifndef z_off_t # define z_off_t long #endif + #if defined(__OS400__) # define NO_vsnprintf #endif + #if defined(__MVS__) # define NO_vsnprintf # ifdef FAR # undef FAR # endif #endif + /* MVS linker does not support external names larger than 8 bytes */ #if defined(__MVS__) # pragma map(deflateInit_,"DEIN") @@ -300,5 +328,6 @@ typedef uLong FAR uLongf; # pragma map(inflate_fast,"INFA") # pragma map(inflate_copyright,"INCOPY") #endif + #endif /* ZCONF_H */ |