epoc32/include/stdapis/zconf.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
     1.1 --- a/epoc32/include/stdapis/zconf.h	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/stdapis/zconf.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,374 @@
     1.4 -zconf.h
     1.5 +/* zconf.h -- configuration of the zlib compression library
     1.6 + * Copyright (C) 1995-2005 Jean-loup Gailly.
     1.7 + * For conditions of distribution and use, see copyright notice in zlib.h
     1.8 + */
     1.9 +
    1.10 +/* @(#) $Id: zconf.h,v 1.1.2.1 2008/08/14 15:26:57 e0222316 Exp $ */
    1.11 +
    1.12 +#ifndef _ZCONF_H
    1.13 +#define _ZCONF_H
    1.14 +
    1.15 +#if (defined(__TOOLS2__) || defined(__TOOLS__))
    1.16 +	/** Defined as nothing for tools builds, as EXPORT_C keyword not supported on these platforms  */
    1.17 +	#define EXPORT_C	
    1.18 +#else
    1.19 +#ifdef __SYMBIAN32__
    1.20 +	#include <e32def.h> 		/* Include for definition of IMPORT_C below */
    1.21 +	/** This macro is used in function prototypes in zlib.h and libzcore.h.  Use Symbian definition IMPORT_C instead of ZEXTERN */ 
    1.22 +	#define ZEXTERN IMPORT_C	
    1.23 +	/** This macro is used for EZLIB component */
    1.24 +	#define SYMBIAN_EZLIB_DEVICE
    1.25 +#endif /* __SYMBIAN32__ */
    1.26 +#endif /* __TOOLS2__ || __TOOLS__ */
    1.27 +
    1.28 +
    1.29 +/*
    1.30 + * If you *really* need a unique prefix for all types and library functions,
    1.31 + * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
    1.32 + */
    1.33 +#ifdef Z_PREFIX
    1.34 +#  define deflateInit_          z_deflateInit_
    1.35 +#  define deflate               z_deflate
    1.36 +#  define deflateEnd            z_deflateEnd
    1.37 +#  define inflateInit_          z_inflateInit_
    1.38 +#  define inflate               z_inflate
    1.39 +#  define inflateEnd            z_inflateEnd
    1.40 +#  define deflateInit2_         z_deflateInit2_
    1.41 +#  define deflateSetDictionary  z_deflateSetDictionary
    1.42 +#  define deflateCopy           z_deflateCopy
    1.43 +#  define deflateReset          z_deflateReset
    1.44 +#  define deflateParams         z_deflateParams
    1.45 +#  define deflateBound          z_deflateBound
    1.46 +#  define deflatePrime          z_deflatePrime
    1.47 +#  define inflateInit2_         z_inflateInit2_
    1.48 +#  define inflateSetDictionary  z_inflateSetDictionary
    1.49 +#  define inflateSync           z_inflateSync
    1.50 +#  define inflateSyncPoint      z_inflateSyncPoint
    1.51 +#  define inflateCopy           z_inflateCopy
    1.52 +#  define inflateReset          z_inflateReset
    1.53 +#  define inflateBack           z_inflateBack
    1.54 +#  define inflateBackEnd        z_inflateBackEnd
    1.55 +#  define compress              z_compress
    1.56 +#  define compress2             z_compress2
    1.57 +#  define compressBound         z_compressBound
    1.58 +#  define uncompress            z_uncompress
    1.59 +#  define adler32               z_adler32
    1.60 +#  define crc32                 z_crc32
    1.61 +#  define get_crc_table         z_get_crc_table
    1.62 +#  define zError                z_zError
    1.63 +
    1.64 +#  define alloc_func            z_alloc_func
    1.65 +#  define free_func             z_free_func
    1.66 +#  define in_func               z_in_func
    1.67 +#  define out_func              z_out_func
    1.68 +#  define Byte                  z_Byte
    1.69 +#  define uInt                  z_uInt
    1.70 +#  define uLong                 z_uLong
    1.71 +#  define Bytef                 z_Bytef
    1.72 +#  define charf                 z_charf
    1.73 +#  define intf                  z_intf
    1.74 +#  define uIntf                 z_uIntf
    1.75 +#  define uLongf                z_uLongf
    1.76 +#  define voidpf                z_voidpf
    1.77 +#  define voidp                 z_voidp
    1.78 +#endif
    1.79 +
    1.80 +#if defined(__MSDOS__) && !defined(MSDOS)
    1.81 +#  define MSDOS
    1.82 +#endif
    1.83 +#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
    1.84 +#  define OS2
    1.85 +#endif
    1.86 +#if defined(_WINDOWS) && !defined(WINDOWS)
    1.87 +#  define WINDOWS
    1.88 +#endif
    1.89 +#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
    1.90 +#  ifndef WIN32
    1.91 +#    define WIN32
    1.92 +#  endif
    1.93 +#endif
    1.94 +#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
    1.95 +#  if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
    1.96 +#    ifndef SYS16BIT
    1.97 +#      define SYS16BIT
    1.98 +#    endif
    1.99 +#  endif
   1.100 +#endif
   1.101 +
   1.102 +/*
   1.103 + * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
   1.104 + * than 64k bytes at a time (needed on systems with 16-bit int).
   1.105 + */
   1.106 +#ifdef SYS16BIT
   1.107 +#  define MAXSEG_64K
   1.108 +#endif
   1.109 +#ifdef MSDOS
   1.110 +#  define UNALIGNED_OK
   1.111 +#endif
   1.112 +
   1.113 +#ifdef __STDC_VERSION__
   1.114 +#  ifndef STDC
   1.115 +#    define STDC
   1.116 +#  endif
   1.117 +#  if __STDC_VERSION__ >= 199901L
   1.118 +#    ifndef STDC99
   1.119 +#      define STDC99
   1.120 +#    endif
   1.121 +#  endif
   1.122 +#endif
   1.123 +#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
   1.124 +/** define STDC i.e. Standard C */
   1.125 +#  define STDC
   1.126 +#endif
   1.127 +#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
   1.128 +#  define STDC
   1.129 +#endif
   1.130 +#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
   1.131 +#  define STDC
   1.132 +#endif
   1.133 +#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
   1.134 +#  define STDC
   1.135 +#endif
   1.136 +
   1.137 +#if defined(__OS400__) && !defined(STDC)    /* iSeries (formerly AS/400). */
   1.138 +#  define STDC
   1.139 +#endif
   1.140 +
   1.141 +#ifndef STDC
   1.142 +#  ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
   1.143 +#    define const       /* note: need a more gentle solution here */
   1.144 +#  endif
   1.145 +#endif
   1.146 +
   1.147 +/* Some Mac compilers merge all .h files incorrectly: */
   1.148 +#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
   1.149 +#  define NO_DUMMY_DECL
   1.150 +#endif
   1.151 +
   1.152 +#ifndef MAX_MEM_LEVEL
   1.153 +#  ifdef MAXSEG_64K
   1.154 +/** Maximum value for memLevel in deflateInit2 */
   1.155 +#    define MAX_MEM_LEVEL 8
   1.156 +#  else
   1.157 +/** Maximum value for memLevel in deflateInit2 */
   1.158 +#    define MAX_MEM_LEVEL 9
   1.159 +#  endif
   1.160 +#endif
   1.161 +
   1.162 +/* Maximum value for windowBits in deflateInit2 and inflateInit2.
   1.163 + * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
   1.164 + * created by gzip. (Files created by minigzip can still be extracted by
   1.165 + * gzip.)
   1.166 + */
   1.167 +#ifndef MAX_WBITS
   1.168 +/** 32K LZ77 window */
   1.169 +#  define MAX_WBITS   15 
   1.170 +#endif
   1.171 +
   1.172 +/* The memory requirements for deflate are (in bytes):
   1.173 +            (1 << (windowBits+2)) +  (1 << (memLevel+9))
   1.174 + that is: 128K for windowBits=15  +  128K for memLevel = 8  (default values)
   1.175 + plus a few kilobytes for small objects. For example, if you want to reduce
   1.176 + the default memory requirements from 256K to 128K, compile with
   1.177 +     make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
   1.178 + Of course this will generally degrade compression (there's no free lunch).
   1.179 +
   1.180 +   The memory requirements for inflate are (in bytes) 1 << windowBits
   1.181 + that is, 32K for windowBits=15 (default value) plus a few kilobytes
   1.182 + for small objects.
   1.183 +*/
   1.184 +
   1.185 +                        /* Type declarations */
   1.186 +
   1.187 +#ifndef OF /* function prototypes */
   1.188 +#  ifdef STDC
   1.189 +/** 
   1.190 +	Function prototypes 
   1.191 +	@param args arguments ...
   1.192 +*/
   1.193 +#    define OF(args)  args
   1.194 +#  else
   1.195 +/** Function prototypes */
   1.196 +#    define OF(args)  ()
   1.197 +#  endif
   1.198 +#endif
   1.199 +
   1.200 +/* The following definitions for FAR are needed only for MSDOS mixed
   1.201 + * model programming (small or medium model with some far allocations).
   1.202 + * This was tested only with MSC; for other MSDOS compilers you may have
   1.203 + * to define NO_MEMCPY in zutil.h.  If you don't need the mixed model,
   1.204 + * just define FAR to be empty.
   1.205 + */
   1.206 +#ifdef SYS16BIT
   1.207 +#  if defined(M_I86SM) || defined(M_I86MM)
   1.208 +     /* MSC small or medium model */
   1.209 +#    define SMALL_MEDIUM
   1.210 +#    ifdef _MSC_VER
   1.211 +#      define FAR _far
   1.212 +#    else
   1.213 +#      define FAR far
   1.214 +#    endif
   1.215 +#  endif
   1.216 +#  if (defined(__SMALL__) || defined(__MEDIUM__))
   1.217 +     /* Turbo C small or medium model */
   1.218 +#    define SMALL_MEDIUM
   1.219 +#    ifdef __BORLANDC__
   1.220 +#      define FAR _far
   1.221 +#    else
   1.222 +#      define FAR far
   1.223 +#    endif
   1.224 +#  endif
   1.225 +#endif
   1.226 +
   1.227 +#if defined(WINDOWS) || defined(WIN32)
   1.228 +   /* If building or using zlib as a DLL, define ZLIB_DLL.
   1.229 +    * This is not mandatory, but it offers a little performance increase.
   1.230 +    */
   1.231 +#  ifdef ZLIB_DLL
   1.232 +#    if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
   1.233 +#      ifdef ZLIB_INTERNAL
   1.234 +#        define ZEXTERN extern __declspec(dllexport)
   1.235 +#      else
   1.236 +#        define ZEXTERN extern __declspec(dllimport)
   1.237 +#      endif
   1.238 +#    endif
   1.239 +#  endif  /* ZLIB_DLL */
   1.240 +   /* If building or using zlib with the WINAPI/WINAPIV calling convention,
   1.241 +    * define ZLIB_WINAPI.
   1.242 +    * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
   1.243 +    */
   1.244 +#  ifdef ZLIB_WINAPI
   1.245 +#    ifdef FAR
   1.246 +#      undef FAR
   1.247 +#    endif
   1.248 +#    include <windows.h>
   1.249 +     /* No need for _export, use ZLIB.DEF instead. */
   1.250 +     /* For complete Windows compatibility, use WINAPI, not __stdcall. */
   1.251 +#    define ZEXPORT WINAPI
   1.252 +#    ifdef WIN32
   1.253 +#      define ZEXPORTVA WINAPIV
   1.254 +#    else
   1.255 +#      define ZEXPORTVA FAR CDECL
   1.256 +#    endif
   1.257 +#  endif
   1.258 +#endif
   1.259 +
   1.260 +#if defined (__BEOS__)
   1.261 +#  ifdef ZLIB_DLL
   1.262 +#    ifdef ZLIB_INTERNAL
   1.263 +#      define ZEXPORT   __declspec(dllexport)
   1.264 +#      define ZEXPORTVA __declspec(dllexport)
   1.265 +#    else
   1.266 +#      define ZEXPORT   __declspec(dllimport)
   1.267 +#      define ZEXPORTVA __declspec(dllimport)
   1.268 +#    endif
   1.269 +#  endif
   1.270 +#endif
   1.271 +
   1.272 +#ifndef ZEXTERN
   1.273 +/** extern defined as ZEXTERN */
   1.274 +#  define ZEXTERN extern
   1.275 +#endif
   1.276 +#ifndef ZEXPORT
   1.277 +#  define ZEXPORT
   1.278 +#endif
   1.279 +#ifndef ZEXPORTVA
   1.280 +#  define ZEXPORTVA
   1.281 +#endif
   1.282 +
   1.283 +
   1.284 +#ifndef FAR
   1.285 +#  define FAR
   1.286 +#endif
   1.287 +
   1.288 +#if !defined(__MACTYPES__)
   1.289 +/** 8 bits */
   1.290 +typedef unsigned char  Byte;  
   1.291 +#endif
   1.292 +/** 16 bits or more */
   1.293 +typedef unsigned int   uInt;  
   1.294 +/** 32 bits or more */
   1.295 +typedef unsigned long  uLong; 
   1.296 +
   1.297 +#ifdef SMALL_MEDIUM
   1.298 +   /** Borland C/C++ and some old MSC versions ignore FAR inside typedef */
   1.299 +#  define Bytef Byte FAR
   1.300 +#else
   1.301 +   /** Borland C/C++ and some old MSC versions ignore FAR inside typedef */
   1.302 +   typedef Byte  FAR Bytef;
   1.303 +#endif
   1.304 +/** char typedef to charf */
   1.305 +typedef char  FAR charf;
   1.306 +/** int typedef to intf */
   1.307 +typedef int   FAR intf;
   1.308 +/** uInt typedef to uIntf */
   1.309 +typedef uInt  FAR uIntf;
   1.310 +/** uLong typedef to uLongf */
   1.311 +typedef uLong FAR uLongf;
   1.312 +
   1.313 +#ifdef STDC
   1.314 +   /** typedef void const* to voidpc */
   1.315 +   typedef void const *voidpc;
   1.316 +   /** typedef void FAR* to voidpf */
   1.317 +   typedef void FAR   *voidpf;
   1.318 +   /** typedef void* to voidp */
   1.319 +   typedef void       *voidp;
   1.320 +#else
   1.321 +   /** typedef Byte const* to voidpc */
   1.322 +   typedef Byte const *voidpc;
   1.323 +   /** typedef Byte FAR* to voidpf */
   1.324 +   typedef Byte FAR   *voidpf;
   1.325 +   /** typedef Byte* to voidp */
   1.326 +   typedef Byte       *voidp;
   1.327 +#endif
   1.328 +
   1.329 +#if 0           /* HAVE_UNISTD_H -- this line is updated by ./configure */
   1.330 +#  include <sys/types.h> /* for off_t */
   1.331 +#  include <unistd.h>    /* for SEEK_* and off_t */
   1.332 +#  ifdef VMS
   1.333 +#    include <unixio.h>   /* for off_t */
   1.334 +#  endif
   1.335 +#  define z_off_t off_t
   1.336 +#endif
   1.337 +#ifndef SEEK_SET
   1.338 +/** Seek from beginning of file.  */
   1.339 +#  define SEEK_SET        0       
   1.340 +/** Seek from current position.  */
   1.341 +#  define SEEK_CUR        1       
   1.342 +/** Set file pointer to EOF plus "offset" */
   1.343 +#  define SEEK_END        2       
   1.344 +#endif
   1.345 +#ifndef z_off_t
   1.346 +/** define z_off_t as long */
   1.347 +#  define z_off_t long
   1.348 +#endif
   1.349 +
   1.350 +#if defined(__OS400__)
   1.351 +#  define NO_vsnprintf
   1.352 +#endif
   1.353 +
   1.354 +#if defined(__MVS__)
   1.355 +#  define NO_vsnprintf
   1.356 +#  ifdef FAR
   1.357 +#    undef FAR
   1.358 +#  endif
   1.359 +#endif
   1.360 +
   1.361 +/* MVS linker does not support external names larger than 8 bytes */
   1.362 +#if defined(__MVS__)
   1.363 +#   pragma map(deflateInit_,"DEIN")
   1.364 +#   pragma map(deflateInit2_,"DEIN2")
   1.365 +#   pragma map(deflateEnd,"DEEND")
   1.366 +#   pragma map(deflateBound,"DEBND")
   1.367 +#   pragma map(inflateInit_,"ININ")
   1.368 +#   pragma map(inflateInit2_,"ININ2")
   1.369 +#   pragma map(inflateEnd,"INEND")
   1.370 +#   pragma map(inflateSync,"INSY")
   1.371 +#   pragma map(inflateSetDictionary,"INSEDI")
   1.372 +#   pragma map(compressBound,"CMBND")
   1.373 +#   pragma map(inflate_table,"INTABL")
   1.374 +#   pragma map(inflate_fast,"INFA")
   1.375 +#   pragma map(inflate_copyright,"INCOPY")
   1.376 +#endif
   1.377 +
   1.378 +#endif /* _ZCONF_H */