michael@0: /* zconf.h -- configuration of the zlib compression library michael@0: * Copyright (C) 1995-1996 Jean-loup Gailly. michael@0: * For conditions of distribution and use, see copyright notice in zlib.h michael@0: */ michael@0: /* This file was modified since it was taken from the zlib distribution */ michael@0: michael@0: #ifndef _ZCONF_H michael@0: #define _ZCONF_H michael@0: michael@0: /* michael@0: * If you *really* need a unique prefix for all types and library functions, michael@0: * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. michael@0: */ michael@0: #ifdef Z_PREFIX michael@0: # define deflateInit_ z_deflateInit_ michael@0: # define deflate z_deflate michael@0: # define deflateEnd z_deflateEnd michael@0: # define inflateInit_ z_inflateInit_ michael@0: # define inflate z_inflate michael@0: # define inflateEnd z_inflateEnd michael@0: # define deflateInit2_ z_deflateInit2_ michael@0: # define deflateSetDictionary z_deflateSetDictionary michael@0: # define deflateCopy z_deflateCopy michael@0: # define deflateReset z_deflateReset michael@0: # define deflateParams z_deflateParams michael@0: # define inflateInit2_ z_inflateInit2_ michael@0: # define inflateSetDictionary z_inflateSetDictionary michael@0: # define inflateSync z_inflateSync michael@0: # define inflateReset z_inflateReset michael@0: # define compress z_compress michael@0: # define uncompress z_uncompress michael@0: # define adler32 z_adler32 michael@0: # define crc32 z_crc32 michael@0: # define get_crc_table z_get_crc_table michael@0: michael@0: # define Byte z_Byte michael@0: # define uInt z_uInt michael@0: # define uLong z_uLong michael@0: # define Bytef z_Bytef michael@0: # define charf z_charf michael@0: # define intf z_intf michael@0: # define uIntf z_uIntf michael@0: # define uLongf z_uLongf michael@0: # define voidpf z_voidpf michael@0: # define voidp z_voidp michael@0: #endif michael@0: michael@0: #if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32) michael@0: # define WIN32 michael@0: #endif michael@0: #if defined(__GNUC__) || defined(WIN32) || defined(__386__) || defined(i386) michael@0: # ifndef __32BIT__ michael@0: # define __32BIT__ michael@0: # endif michael@0: #endif michael@0: #if defined(__MSDOS__) && !defined(MSDOS) michael@0: # define MSDOS michael@0: #endif michael@0: michael@0: /* michael@0: * Compile with -DMAXSEG_64K if the alloc function cannot allocate more michael@0: * than 64k bytes at a time (needed on systems with 16-bit int). michael@0: */ michael@0: #if defined(MSDOS) && !defined(__32BIT__) michael@0: # define MAXSEG_64K michael@0: #endif michael@0: #ifdef MSDOS michael@0: # define UNALIGNED_OK michael@0: #endif michael@0: michael@0: #if (defined(MSDOS) || defined(_WINDOWS) || defined(WIN32) || defined(XP_OS2)) && !defined(STDC) michael@0: # define STDC michael@0: #endif michael@0: #if (defined(__STDC__) || defined(__cplusplus)) && !defined(STDC) michael@0: # define STDC michael@0: #endif michael@0: michael@0: #ifndef STDC michael@0: # ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */ michael@0: # define const michael@0: # endif michael@0: #endif michael@0: michael@0: /* Some Mac compilers merge all .h files incorrectly: */ michael@0: #if defined(__MWERKS__) || defined(applec) ||defined(THINK_C) ||defined(__SC__) michael@0: # define NO_DUMMY_DECL michael@0: #endif michael@0: michael@0: /* Maximum value for memLevel in deflateInit2 */ michael@0: #ifndef MAX_MEM_LEVEL michael@0: # ifdef MAXSEG_64K michael@0: # define MAX_MEM_LEVEL 8 michael@0: # else michael@0: # define MAX_MEM_LEVEL 9 michael@0: # endif michael@0: #endif michael@0: michael@0: /* Maximum value for windowBits in deflateInit2 and inflateInit2 */ michael@0: #ifndef MAX_WBITS michael@0: # define MAX_WBITS 15 /* 32K LZ77 window */ michael@0: #endif michael@0: michael@0: /* The memory requirements for deflate are (in bytes): michael@0: 1 << (windowBits+2) + 1 << (memLevel+9) michael@0: that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) michael@0: plus a few kilobytes for small objects. For example, if you want to reduce michael@0: the default memory requirements from 256K to 128K, compile with michael@0: make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" michael@0: Of course this will generally degrade compression (there's no free lunch). michael@0: michael@0: The memory requirements for inflate are (in bytes) 1 << windowBits michael@0: that is, 32K for windowBits=15 (default value) plus a few kilobytes michael@0: for small objects. michael@0: */ michael@0: michael@0: /* Type declarations */ michael@0: michael@0: #ifndef OF /* function prototypes */ michael@0: # ifdef STDC michael@0: # define OF(args) args michael@0: # else michael@0: # define OF(args) () michael@0: # endif michael@0: #endif michael@0: michael@0: /* The following definitions for FAR are needed only for MSDOS mixed michael@0: * model programming (small or medium model with some far allocations). michael@0: * This was tested only with MSC; for other MSDOS compilers you may have michael@0: * to define NO_MEMCPY in zutil.h. If you don't need the mixed model, michael@0: * just define FAR to be empty. michael@0: */ michael@0: #if (defined(M_I86SM) || defined(M_I86MM)) && !defined(__32BIT__) michael@0: /* MSC small or medium model */ michael@0: # define SMALL_MEDIUM michael@0: # ifdef _MSC_VER michael@0: # define FAR __far michael@0: # else michael@0: # define FAR far michael@0: # endif michael@0: #endif michael@0: #if defined(__BORLANDC__) && (defined(__SMALL__) || defined(__MEDIUM__)) michael@0: # ifndef __32BIT__ michael@0: # define SMALL_MEDIUM michael@0: # define FAR __far michael@0: # endif michael@0: #endif michael@0: #ifndef FAR michael@0: # define FAR michael@0: #endif michael@0: michael@0: typedef unsigned char Byte; /* 8 bits */ michael@0: typedef unsigned int uInt; /* 16 bits or more */ michael@0: typedef unsigned long uLong; /* 32 bits or more */ michael@0: michael@0: #if defined(__BORLANDC__) && defined(SMALL_MEDIUM) michael@0: /* Borland C/C++ ignores FAR inside typedef */ michael@0: # define Bytef Byte FAR michael@0: #else michael@0: typedef Byte FAR Bytef; michael@0: #endif michael@0: typedef char FAR charf; michael@0: typedef int FAR intf; michael@0: typedef uInt FAR uIntf; michael@0: typedef uLong FAR uLongf; michael@0: michael@0: #ifdef STDC michael@0: typedef void FAR *voidpf; michael@0: typedef void *voidp; michael@0: #else michael@0: typedef Byte FAR *voidpf; michael@0: typedef Byte *voidp; michael@0: #endif michael@0: michael@0: #ifdef MOZILLA_CLIENT michael@0: #include "prtypes.h" michael@0: #else michael@0: /* Compile with -DZLIB_DLL for Windows DLL support */ michael@0: #if (defined(_WINDOWS) || defined(WINDOWS)) && defined(ZLIB_DLL) michael@0: # include michael@0: # define EXPORT WINAPI michael@0: #else michael@0: # define EXPORT michael@0: #endif michael@0: michael@0: #define PR_PUBLIC_API(type) type michael@0: michael@0: #endif /* MOZILLA_CLIENT */ michael@0: michael@0: #endif /* _ZCONF_H */