Back to index

lightning-sunbird  0.9+nobinonly
jzconf.h
Go to the documentation of this file.
00001 /* zconf.h -- configuration of the zlib compression library
00002  * Copyright (C) 1995-1996 Jean-loup Gailly.
00003  * For conditions of distribution and use, see copyright notice in zlib.h 
00004  */
00005 /* This file was modified since it was taken from the zlib distribution */
00006 /* $Id: jzconf.h,v 1.1 2000/03/31 20:01:15 relyea%netscape.com Exp $ */
00007 
00008 #ifndef _ZCONF_H
00009 #define _ZCONF_H
00010 
00011 /*
00012  * If you *really* need a unique prefix for all types and library functions,
00013  * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
00014  */
00015 #ifdef Z_PREFIX
00016 #  define deflateInit_      z_deflateInit_
00017 #  define deflate    z_deflate
00018 #  define deflateEnd z_deflateEnd
00019 #  define inflateInit_      z_inflateInit_
00020 #  define inflate    z_inflate
00021 #  define inflateEnd z_inflateEnd
00022 #  define deflateInit2_     z_deflateInit2_
00023 #  define deflateSetDictionary z_deflateSetDictionary
00024 #  define deflateCopy       z_deflateCopy
00025 #  define deflateReset      z_deflateReset
00026 #  define deflateParams     z_deflateParams
00027 #  define inflateInit2_     z_inflateInit2_
00028 #  define inflateSetDictionary z_inflateSetDictionary
00029 #  define inflateSync       z_inflateSync
00030 #  define inflateReset      z_inflateReset
00031 #  define compress   z_compress
00032 #  define uncompress z_uncompress
00033 #  define adler32    z_adler32
00034 #  define crc32             z_crc32
00035 #  define get_crc_table z_get_crc_table
00036 
00037 #  define Byte              z_Byte
00038 #  define uInt              z_uInt
00039 #  define uLong             z_uLong
00040 #  define Bytef              z_Bytef
00041 #  define charf             z_charf
00042 #  define intf              z_intf
00043 #  define uIntf             z_uIntf
00044 #  define uLongf     z_uLongf
00045 #  define voidpf     z_voidpf
00046 #  define voidp             z_voidp
00047 #endif
00048 
00049 #if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32)
00050 #  define WIN32
00051 #endif
00052 #if defined(__GNUC__) || defined(WIN32) || defined(__386__) || defined(i386)
00053 #  ifndef __32BIT__
00054 #    define __32BIT__
00055 #  endif
00056 #endif
00057 #if defined(__MSDOS__) && !defined(MSDOS)
00058 #  define MSDOS
00059 #endif
00060 
00061 /*
00062  * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
00063  * than 64k bytes at a time (needed on systems with 16-bit int).
00064  */
00065 #if defined(MSDOS) && !defined(__32BIT__)
00066 #  define MAXSEG_64K
00067 #endif
00068 #ifdef MSDOS
00069 #  define UNALIGNED_OK
00070 #endif
00071 
00072 #if (defined(MSDOS) || defined(_WINDOWS) || defined(WIN32) || defined(XP_OS2))  && !defined(STDC)
00073 #  define STDC
00074 #endif
00075 #if (defined(__STDC__) || defined(__cplusplus)) && !defined(STDC)
00076 #  define STDC
00077 #endif
00078 
00079 #ifndef STDC
00080 #  ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
00081 #    define const
00082 #  endif
00083 #endif
00084 
00085 /* Some Mac compilers merge all .h files incorrectly: */
00086 #if defined(__MWERKS__) || defined(applec) ||defined(THINK_C) ||defined(__SC__)
00087 #  define NO_DUMMY_DECL
00088 #endif
00089 
00090 /* Maximum value for memLevel in deflateInit2 */
00091 #ifndef MAX_MEM_LEVEL
00092 #  ifdef MAXSEG_64K
00093 #    define MAX_MEM_LEVEL 8
00094 #  else
00095 #    define MAX_MEM_LEVEL 9
00096 #  endif
00097 #endif
00098 
00099 /* Maximum value for windowBits in deflateInit2 and inflateInit2 */
00100 #ifndef MAX_WBITS
00101 #  define MAX_WBITS   15 /* 32K LZ77 window */
00102 #endif
00103 
00104 /* The memory requirements for deflate are (in bytes):
00105             1 << (windowBits+2)   +  1 << (memLevel+9)
00106  that is: 128K for windowBits=15  +  128K for memLevel = 8  (default values)
00107  plus a few kilobytes for small objects. For example, if you want to reduce
00108  the default memory requirements from 256K to 128K, compile with
00109      make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
00110  Of course this will generally degrade compression (there's no free lunch).
00111 
00112    The memory requirements for inflate are (in bytes) 1 << windowBits
00113  that is, 32K for windowBits=15 (default value) plus a few kilobytes
00114  for small objects.
00115 */
00116 
00117                         /* Type declarations */
00118 
00119 #ifndef OF /* function prototypes */
00120 #  ifdef STDC
00121 #    define OF(args)  args
00122 #  else
00123 #    define OF(args)  ()
00124 #  endif
00125 #endif
00126 
00127 /* The following definitions for FAR are needed only for MSDOS mixed
00128  * model programming (small or medium model with some far allocations).
00129  * This was tested only with MSC; for other MSDOS compilers you may have
00130  * to define NO_MEMCPY in zutil.h.  If you don't need the mixed model,
00131  * just define FAR to be empty.
00132  */
00133 #if (defined(M_I86SM) || defined(M_I86MM)) && !defined(__32BIT__)
00134    /* MSC small or medium model */
00135 #  define SMALL_MEDIUM
00136 #  ifdef _MSC_VER
00137 #    define FAR __far
00138 #  else
00139 #    define FAR far
00140 #  endif
00141 #endif
00142 #if defined(__BORLANDC__) && (defined(__SMALL__) || defined(__MEDIUM__))
00143 #  ifndef __32BIT__
00144 #    define SMALL_MEDIUM
00145 #    define FAR __far
00146 #  endif
00147 #endif
00148 #ifndef FAR
00149 #   define FAR
00150 #endif
00151 
00152 typedef unsigned char  Byte;  /* 8 bits */
00153 typedef unsigned int   uInt;  /* 16 bits or more */
00154 typedef unsigned long  uLong; /* 32 bits or more */
00155 
00156 #if defined(__BORLANDC__) && defined(SMALL_MEDIUM)
00157    /* Borland C/C++ ignores FAR inside typedef */
00158 #  define Bytef Byte FAR
00159 #else
00160    typedef Byte  FAR Bytef;
00161 #endif
00162 typedef char  FAR charf;
00163 typedef int   FAR intf;
00164 typedef uInt  FAR uIntf;
00165 typedef uLong FAR uLongf;
00166 
00167 #ifdef STDC
00168    typedef void FAR *voidpf;
00169    typedef void     *voidp;
00170 #else
00171    typedef Byte FAR *voidpf;
00172    typedef Byte     *voidp;
00173 #endif
00174 
00175 #ifdef MOZILLA_CLIENT
00176 #include "prtypes.h"
00177 #else
00178 /* Compile with -DZLIB_DLL for Windows DLL support */
00179 #if (defined(_WINDOWS) || defined(WINDOWS)) && defined(ZLIB_DLL)
00180 #  include <windows.h>
00181 #  define EXPORT  WINAPI
00182 #else
00183 #  define EXPORT
00184 #endif
00185 
00186 #define PR_PUBLIC_API(type) type
00187 
00188 #endif /* MOZILLA_CLIENT */
00189 
00190 #endif /* _ZCONF_H */