sl@0: /* Portions Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0:  * All rights reserved.
sl@0:  */
sl@0: 
sl@0: /* zconf.h -- configuration of the zlib compression library
sl@0:  * Copyright (C) 1995-2005 Jean-loup Gailly.
sl@0:  * For conditions of distribution and use, see copyright notice in zlib.h
sl@0:  */
sl@0:  
sl@0: /** 
sl@0: @file
sl@0: @publishedAll
sl@0: @externallyDefinedApi
sl@0: */
sl@0: 
sl@0: /* @(#) $Id$ */
sl@0: 
sl@0: #ifndef _ZCONF_H
sl@0: #define _ZCONF_H
sl@0: 
sl@0: #if (defined(__TOOLS2__) || defined(__TOOLS__))
sl@0: 	/** Defined as nothing for tools builds, as EXPORT_C keyword not supported on these platforms  */
sl@0: 	#define EXPORT_C	
sl@0: #else
sl@0: #ifdef __SYMBIAN32__
sl@0: 	#include <e32def.h> 		/* Include for definition of IMPORT_C below */
sl@0: 	/** This macro is used in function prototypes in zlib.h and libzcore.h.  Use Symbian definition IMPORT_C instead of ZEXTERN */ 
sl@0: 	#define ZEXTERN IMPORT_C	
sl@0: 	/** This macro is used for EZLIB component */
sl@0: 	#define SYMBIAN_EZLIB_DEVICE
sl@0: #endif /* __SYMBIAN32__ */
sl@0: #endif /* __TOOLS2__ || __TOOLS__ */
sl@0: 
sl@0: 
sl@0: /*
sl@0:  * If you *really* need a unique prefix for all types and library functions,
sl@0:  * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
sl@0:  */
sl@0: #ifdef Z_PREFIX
sl@0: #  define deflateInit_          z_deflateInit_
sl@0: #  define deflate               z_deflate
sl@0: #  define deflateEnd            z_deflateEnd
sl@0: #  define inflateInit_          z_inflateInit_
sl@0: #  define inflate               z_inflate
sl@0: #  define inflateEnd            z_inflateEnd
sl@0: #  define deflateInit2_         z_deflateInit2_
sl@0: #  define deflateSetDictionary  z_deflateSetDictionary
sl@0: #  define deflateCopy           z_deflateCopy
sl@0: #  define deflateReset          z_deflateReset
sl@0: #  define deflateParams         z_deflateParams
sl@0: #  define deflateBound          z_deflateBound
sl@0: #  define deflatePrime          z_deflatePrime
sl@0: #  define inflateInit2_         z_inflateInit2_
sl@0: #  define inflateSetDictionary  z_inflateSetDictionary
sl@0: #  define inflateSync           z_inflateSync
sl@0: #  define inflateSyncPoint      z_inflateSyncPoint
sl@0: #  define inflateCopy           z_inflateCopy
sl@0: #  define inflateReset          z_inflateReset
sl@0: #  define inflateBack           z_inflateBack
sl@0: #  define inflateBackEnd        z_inflateBackEnd
sl@0: #  define compress              z_compress
sl@0: #  define compress2             z_compress2
sl@0: #  define compressBound         z_compressBound
sl@0: #  define uncompress            z_uncompress
sl@0: #  define adler32               z_adler32
sl@0: #  define crc32                 z_crc32
sl@0: #  define get_crc_table         z_get_crc_table
sl@0: #  define zError                z_zError
sl@0: 
sl@0: #  define alloc_func            z_alloc_func
sl@0: #  define free_func             z_free_func
sl@0: #  define in_func               z_in_func
sl@0: #  define out_func              z_out_func
sl@0: #  define Byte                  z_Byte
sl@0: #  define uInt                  z_uInt
sl@0: #  define uLong                 z_uLong
sl@0: #  define Bytef                 z_Bytef
sl@0: #  define charf                 z_charf
sl@0: #  define intf                  z_intf
sl@0: #  define uIntf                 z_uIntf
sl@0: #  define uLongf                z_uLongf
sl@0: #  define voidpf                z_voidpf
sl@0: #  define voidp                 z_voidp
sl@0: #endif
sl@0: 
sl@0: #if defined(__MSDOS__) && !defined(MSDOS)
sl@0: #  define MSDOS
sl@0: #endif
sl@0: #if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
sl@0: #  define OS2
sl@0: #endif
sl@0: #if defined(_WINDOWS) && !defined(WINDOWS)
sl@0: #  define WINDOWS
sl@0: #endif
sl@0: #if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
sl@0: #  ifndef WIN32
sl@0: #    define WIN32
sl@0: #  endif
sl@0: #endif
sl@0: #if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
sl@0: #  if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
sl@0: #    ifndef SYS16BIT
sl@0: #      define SYS16BIT
sl@0: #    endif
sl@0: #  endif
sl@0: #endif
sl@0: 
sl@0: /*
sl@0:  * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
sl@0:  * than 64k bytes at a time (needed on systems with 16-bit int).
sl@0:  */
sl@0: #ifdef SYS16BIT
sl@0: #  define MAXSEG_64K
sl@0: #endif
sl@0: #ifdef MSDOS
sl@0: #  define UNALIGNED_OK
sl@0: #endif
sl@0: 
sl@0: #ifdef __STDC_VERSION__
sl@0: #  ifndef STDC
sl@0: #    define STDC
sl@0: #  endif
sl@0: #  if __STDC_VERSION__ >= 199901L
sl@0: #    ifndef STDC99
sl@0: #      define STDC99
sl@0: #    endif
sl@0: #  endif
sl@0: #endif
sl@0: #if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
sl@0: /** define STDC i.e. Standard C */
sl@0: #  define STDC
sl@0: #endif
sl@0: #if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
sl@0: #  define STDC
sl@0: #endif
sl@0: #if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
sl@0: #  define STDC
sl@0: #endif
sl@0: #if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
sl@0: #  define STDC
sl@0: #endif
sl@0: 
sl@0: #if defined(__OS400__) && !defined(STDC)    /* iSeries (formerly AS/400). */
sl@0: #  define STDC
sl@0: #endif
sl@0: 
sl@0: #ifndef STDC
sl@0: #  ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
sl@0: #    define const       /* note: need a more gentle solution here */
sl@0: #  endif
sl@0: #endif
sl@0: 
sl@0: /* Some Mac compilers merge all .h files incorrectly: */
sl@0: #if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
sl@0: #  define NO_DUMMY_DECL
sl@0: #endif
sl@0: 
sl@0: #ifndef MAX_MEM_LEVEL
sl@0: #  ifdef MAXSEG_64K
sl@0: /** Maximum value for memLevel in deflateInit2 */
sl@0: #    define MAX_MEM_LEVEL 8
sl@0: #  else
sl@0: /** Maximum value for memLevel in deflateInit2 */
sl@0: #    define MAX_MEM_LEVEL 9
sl@0: #  endif
sl@0: #endif
sl@0: 
sl@0: /* Maximum value for windowBits in deflateInit2 and inflateInit2.
sl@0:  * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
sl@0:  * created by gzip. (Files created by minigzip can still be extracted by
sl@0:  * gzip.)
sl@0:  */
sl@0: #ifndef MAX_WBITS
sl@0: /** 32K LZ77 window */
sl@0: #  define MAX_WBITS   15 
sl@0: #endif
sl@0: 
sl@0: /* The memory requirements for deflate are (in bytes):
sl@0:             (1 << (windowBits+2)) +  (1 << (memLevel+9))
sl@0:  that is: 128K for windowBits=15  +  128K for memLevel = 8  (default values)
sl@0:  plus a few kilobytes for small objects. For example, if you want to reduce
sl@0:  the default memory requirements from 256K to 128K, compile with
sl@0:      make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
sl@0:  Of course this will generally degrade compression (there's no free lunch).
sl@0: 
sl@0:    The memory requirements for inflate are (in bytes) 1 << windowBits
sl@0:  that is, 32K for windowBits=15 (default value) plus a few kilobytes
sl@0:  for small objects.
sl@0: */
sl@0: 
sl@0:                         /* Type declarations */
sl@0: 
sl@0: #ifndef OF /* function prototypes */
sl@0: #  ifdef STDC
sl@0: /** 
sl@0: 	Function prototypes 
sl@0: 	@param args arguments ...
sl@0: */
sl@0: #    define OF(args)  args
sl@0: #  else
sl@0: /** Function prototypes */
sl@0: #    define OF(args)  ()
sl@0: #  endif
sl@0: #endif
sl@0: 
sl@0: /* The following definitions for FAR are needed only for MSDOS mixed
sl@0:  * model programming (small or medium model with some far allocations).
sl@0:  * This was tested only with MSC; for other MSDOS compilers you may have
sl@0:  * to define NO_MEMCPY in zutil.h.  If you don't need the mixed model,
sl@0:  * just define FAR to be empty.
sl@0:  */
sl@0: #ifdef SYS16BIT
sl@0: #  if defined(M_I86SM) || defined(M_I86MM)
sl@0:      /* MSC small or medium model */
sl@0: #    define SMALL_MEDIUM
sl@0: #    ifdef _MSC_VER
sl@0: #      define FAR _far
sl@0: #    else
sl@0: #      define FAR far
sl@0: #    endif
sl@0: #  endif
sl@0: #  if (defined(__SMALL__) || defined(__MEDIUM__))
sl@0:      /* Turbo C small or medium model */
sl@0: #    define SMALL_MEDIUM
sl@0: #    ifdef __BORLANDC__
sl@0: #      define FAR _far
sl@0: #    else
sl@0: #      define FAR far
sl@0: #    endif
sl@0: #  endif
sl@0: #endif
sl@0: 
sl@0: #if defined(WINDOWS) || defined(WIN32)
sl@0:    /* If building or using zlib as a DLL, define ZLIB_DLL.
sl@0:     * This is not mandatory, but it offers a little performance increase.
sl@0:     */
sl@0: #  ifdef ZLIB_DLL
sl@0: #    if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
sl@0: #      ifdef ZLIB_INTERNAL
sl@0: #        define ZEXTERN extern __declspec(dllexport)
sl@0: #      else
sl@0: #        define ZEXTERN extern __declspec(dllimport)
sl@0: #      endif
sl@0: #    endif
sl@0: #  endif  /* ZLIB_DLL */
sl@0:    /* If building or using zlib with the WINAPI/WINAPIV calling convention,
sl@0:     * define ZLIB_WINAPI.
sl@0:     * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
sl@0:     */
sl@0: #  ifdef ZLIB_WINAPI
sl@0: #    ifdef FAR
sl@0: #      undef FAR
sl@0: #    endif
sl@0: #    include <windows.h>
sl@0:      /* No need for _export, use ZLIB.DEF instead. */
sl@0:      /* For complete Windows compatibility, use WINAPI, not __stdcall. */
sl@0: #    define ZEXPORT WINAPI
sl@0: #    ifdef WIN32
sl@0: #      define ZEXPORTVA WINAPIV
sl@0: #    else
sl@0: #      define ZEXPORTVA FAR CDECL
sl@0: #    endif
sl@0: #  endif
sl@0: #endif
sl@0: 
sl@0: #if defined (__BEOS__)
sl@0: #  ifdef ZLIB_DLL
sl@0: #    ifdef ZLIB_INTERNAL
sl@0: #      define ZEXPORT   __declspec(dllexport)
sl@0: #      define ZEXPORTVA __declspec(dllexport)
sl@0: #    else
sl@0: #      define ZEXPORT   __declspec(dllimport)
sl@0: #      define ZEXPORTVA __declspec(dllimport)
sl@0: #    endif
sl@0: #  endif
sl@0: #endif
sl@0: 
sl@0: #ifndef ZEXTERN
sl@0: /** extern defined as ZEXTERN */
sl@0: #  define ZEXTERN extern
sl@0: #endif
sl@0: #ifndef ZEXPORT
sl@0: #  define ZEXPORT
sl@0: #endif
sl@0: #ifndef ZEXPORTVA
sl@0: #  define ZEXPORTVA
sl@0: #endif
sl@0: 
sl@0: 
sl@0: #ifndef FAR
sl@0: #  define FAR
sl@0: #endif
sl@0: 
sl@0: #if !defined(__MACTYPES__)
sl@0: /** 8 bits */
sl@0: typedef unsigned char  Byte;  
sl@0: #endif
sl@0: /** 16 bits or more */
sl@0: typedef unsigned int   uInt;  
sl@0: /** 32 bits or more */
sl@0: typedef unsigned long  uLong; 
sl@0: 
sl@0: #ifdef SMALL_MEDIUM
sl@0:    /** Borland C/C++ and some old MSC versions ignore FAR inside typedef */
sl@0: #  define Bytef Byte FAR
sl@0: #else
sl@0:    /** Borland C/C++ and some old MSC versions ignore FAR inside typedef */
sl@0:    typedef Byte  FAR Bytef;
sl@0: #endif
sl@0: /** char typedef to charf */
sl@0: typedef char  FAR charf;
sl@0: /** int typedef to intf */
sl@0: typedef int   FAR intf;
sl@0: /** uInt typedef to uIntf */
sl@0: typedef uInt  FAR uIntf;
sl@0: /** uLong typedef to uLongf */
sl@0: typedef uLong FAR uLongf;
sl@0: 
sl@0: #ifdef STDC
sl@0:    /** typedef void const* to voidpc */
sl@0:    typedef void const *voidpc;
sl@0:    /** typedef void FAR* to voidpf */
sl@0:    typedef void FAR   *voidpf;
sl@0:    /** typedef void* to voidp */
sl@0:    typedef void       *voidp;
sl@0: #else
sl@0:    /** typedef Byte const* to voidpc */
sl@0:    typedef Byte const *voidpc;
sl@0:    /** typedef Byte FAR* to voidpf */
sl@0:    typedef Byte FAR   *voidpf;
sl@0:    /** typedef Byte* to voidp */
sl@0:    typedef Byte       *voidp;
sl@0: #endif
sl@0: 
sl@0: #if 0           /* HAVE_UNISTD_H -- this line is updated by ./configure */
sl@0: #  include <sys/types.h> /* for off_t */
sl@0: #  include <unistd.h>    /* for SEEK_* and off_t */
sl@0: #  ifdef VMS
sl@0: #    include <unixio.h>   /* for off_t */
sl@0: #  endif
sl@0: #  define z_off_t off_t
sl@0: #endif
sl@0: #ifndef SEEK_SET
sl@0: /** Seek from beginning of file.  */
sl@0: #  define SEEK_SET        0       
sl@0: /** Seek from current position.  */
sl@0: #  define SEEK_CUR        1       
sl@0: /** Set file pointer to EOF plus "offset" */
sl@0: #  define SEEK_END        2       
sl@0: #endif
sl@0: #ifndef z_off_t
sl@0: /** define z_off_t as long */
sl@0: #  define z_off_t long
sl@0: #endif
sl@0: 
sl@0: #if defined(__OS400__)
sl@0: #  define NO_vsnprintf
sl@0: #endif
sl@0: 
sl@0: #if defined(__MVS__)
sl@0: #  define NO_vsnprintf
sl@0: #  ifdef FAR
sl@0: #    undef FAR
sl@0: #  endif
sl@0: #endif
sl@0: 
sl@0: /* MVS linker does not support external names larger than 8 bytes */
sl@0: #if defined(__MVS__)
sl@0: #   pragma map(deflateInit_,"DEIN")
sl@0: #   pragma map(deflateInit2_,"DEIN2")
sl@0: #   pragma map(deflateEnd,"DEEND")
sl@0: #   pragma map(deflateBound,"DEBND")
sl@0: #   pragma map(inflateInit_,"ININ")
sl@0: #   pragma map(inflateInit2_,"ININ2")
sl@0: #   pragma map(inflateEnd,"INEND")
sl@0: #   pragma map(inflateSync,"INSY")
sl@0: #   pragma map(inflateSetDictionary,"INSEDI")
sl@0: #   pragma map(compressBound,"CMBND")
sl@0: #   pragma map(inflate_table,"INTABL")
sl@0: #   pragma map(inflate_fast,"INFA")
sl@0: #   pragma map(inflate_copyright,"INCOPY")
sl@0: #endif
sl@0: 
sl@0: #endif /* _ZCONF_H */