compressionlibs/ziplib/test/oldezlib/inc/zconf.h
changeset 31 ce057bb09d0b
parent 0 e4d67989cc36
equal deleted inserted replaced
30:e20de85af2ee 31:ce057bb09d0b
       
     1 /* zconf.h -- configuration of the zlib compression library
       
     2  * Copyright (C) 1995-1998 Jean-loup Gailly.
       
     3  * For conditions of distribution and use, see copyright notice in zlib.h 
       
     4  */
       
     5 
       
     6 /**
       
     7  @file
       
     8  Contains macro definitions for ezlib library (included from zlib.h)
       
     9  @internalAll
       
    10  */
       
    11 
       
    12 /* @(#) $Id$ */
       
    13 
       
    14 #ifndef _ZCONF_H
       
    15 #define _ZCONF_H
       
    16 
       
    17 /*
       
    18  * If you *really* need a unique prefix for all types and library functions,
       
    19  * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
       
    20  */
       
    21 #ifdef Z_PREFIX
       
    22 #  define deflateInit_	z_deflateInit_
       
    23 #  define deflate	z_deflate
       
    24 #  define deflateEnd	z_deflateEnd
       
    25 #  define inflateInit_ 	z_inflateInit_
       
    26 #  define inflate	z_inflate
       
    27 #  define inflateEnd	z_inflateEnd
       
    28 #  define deflateInit2_	z_deflateInit2_
       
    29 #  define deflateSetDictionary z_deflateSetDictionary
       
    30 #  define deflateCopy	z_deflateCopy
       
    31 #  define deflateReset	z_deflateReset
       
    32 #  define deflateParams	z_deflateParams
       
    33 #  define inflateInit2_	z_inflateInit2_
       
    34 #  define inflateSetDictionary z_inflateSetDictionary
       
    35 #  define inflateSync	z_inflateSync
       
    36 #  define inflateSyncPoint z_inflateSyncPoint
       
    37 #  define inflateReset	z_inflateReset
       
    38 #  define compress	z_compress
       
    39 #  define compress2	z_compress2
       
    40 #  define uncompress	z_uncompress
       
    41 #  define adler32	z_adler32
       
    42 #  define crc32		z_crc32
       
    43 #  define get_crc_table z_get_crc_table
       
    44 
       
    45 #  define Byte		z_Byte
       
    46 #  define uInt		z_uInt
       
    47 #  define uLong		z_uLong
       
    48 #  define Bytef	        z_Bytef
       
    49 #  define charf		z_charf
       
    50 #  define intf		z_intf
       
    51 #  define uIntf		z_uIntf
       
    52 #  define uLongf	z_uLongf
       
    53 #  define voidpf	z_voidpf
       
    54 #  define voidp		z_voidp
       
    55 #endif
       
    56 
       
    57 #if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32)
       
    58 #  define WIN32
       
    59 #endif
       
    60 #if defined(__GNUC__) || defined(WIN32) || defined(__386__) || defined(i386)
       
    61 #  ifndef __32BIT__
       
    62 #    define __32BIT__
       
    63 #  endif
       
    64 #endif
       
    65 #if defined(__MSDOS__) && !defined(MSDOS)
       
    66 #  define MSDOS
       
    67 #endif
       
    68 
       
    69 /*
       
    70  * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
       
    71  * than 64k bytes at a time (needed on systems with 16-bit int).
       
    72  */
       
    73 #if defined(MSDOS) && !defined(__32BIT__)
       
    74 #  define MAXSEG_64K
       
    75 #endif
       
    76 #ifdef MSDOS
       
    77 #  define UNALIGNED_OK
       
    78 #endif
       
    79 
       
    80 #if (defined(MSDOS) || defined(_WINDOWS) || defined(WIN32))  && !defined(STDC)
       
    81 #  define STDC
       
    82 #endif
       
    83 #if defined(__STDC__) || defined(__cplusplus) || defined(__OS2__)
       
    84 #  ifndef STDC
       
    85 #    define STDC
       
    86 #  endif
       
    87 #endif
       
    88 
       
    89 #ifndef STDC
       
    90 #  ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
       
    91 #    define const
       
    92 #  endif
       
    93 #endif
       
    94 
       
    95 /* Some Mac compilers merge all .h files incorrectly: */
       
    96 #if defined(__MWERKS__) || defined(applec) ||defined(THINK_C) ||defined(__SC__)
       
    97 #  define NO_DUMMY_DECL
       
    98 #endif
       
    99 
       
   100 /* Old Borland C incorrectly complains about missing returns: */
       
   101 #if defined(__BORLANDC__) && (__BORLANDC__ < 0x500)
       
   102 #  define NEED_DUMMY_RETURN
       
   103 #endif
       
   104 
       
   105 
       
   106 /* Maximum value for memLevel in deflateInit2 */
       
   107 #ifndef MAX_MEM_LEVEL
       
   108 #  ifdef MAXSEG_64K
       
   109 #    define MAX_MEM_LEVEL 8
       
   110 #  else
       
   111 #    define MAX_MEM_LEVEL 9
       
   112 #  endif
       
   113 #endif
       
   114 
       
   115 /* Maximum value for windowBits in deflateInit2 and inflateInit2.
       
   116  * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
       
   117  * created by gzip. (Files created by minigzip can still be extracted by
       
   118  * gzip.)
       
   119  */
       
   120 #ifndef MAX_WBITS
       
   121 #  define MAX_WBITS   15 /* 32K LZ77 window */
       
   122 #endif
       
   123 
       
   124 /* The memory requirements for deflate are (in bytes):
       
   125             (1 << (windowBits+2)) +  (1 << (memLevel+9))
       
   126  that is: 128K for windowBits=15  +  128K for memLevel = 8  (default values)
       
   127  plus a few kilobytes for small objects. For example, if you want to reduce
       
   128  the default memory requirements from 256K to 128K, compile with
       
   129      make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
       
   130  Of course this will generally degrade compression (there's no free lunch).
       
   131 
       
   132    The memory requirements for inflate are (in bytes) 1 << windowBits
       
   133  that is, 32K for windowBits=15 (default value) plus a few kilobytes
       
   134  for small objects.
       
   135 */
       
   136 
       
   137                         /* Type declarations */
       
   138 
       
   139 #ifndef OF /* function prototypes */
       
   140 #  ifdef STDC
       
   141 #    define OF(args)  args
       
   142 #  else
       
   143 #    define OF(args)  ()
       
   144 #  endif
       
   145 #endif
       
   146 
       
   147 /* The following definitions for FAR are needed only for MSDOS mixed
       
   148  * model programming (small or medium model with some far allocations).
       
   149  * This was tested only with MSC; for other MSDOS compilers you may have
       
   150  * to define NO_MEMCPY in zutil.h.  If you don't need the mixed model,
       
   151  * just define FAR to be empty.
       
   152  */
       
   153 #if (defined(M_I86SM) || defined(M_I86MM)) && !defined(__32BIT__)
       
   154    /* MSC small or medium model */
       
   155 #  define SMALL_MEDIUM
       
   156 #  ifdef _MSC_VER
       
   157 #    define FAR _far
       
   158 #  else
       
   159 #    define FAR far
       
   160 #  endif
       
   161 #endif
       
   162 #if defined(__BORLANDC__) && (defined(__SMALL__) || defined(__MEDIUM__))
       
   163 #  ifndef __32BIT__
       
   164 #    define SMALL_MEDIUM
       
   165 #    define FAR _far
       
   166 #  endif
       
   167 #endif
       
   168 
       
   169 /* Compile with -DZLIB_DLL for Windows DLL support */
       
   170 #if defined(ZLIB_DLL)
       
   171 #  if defined(_WINDOWS) || defined(WINDOWS)
       
   172 #    ifdef FAR
       
   173 #      undef FAR
       
   174 #    endif
       
   175 #    include <windows.h>
       
   176 #    define ZEXPORT  WINAPI
       
   177 #    ifdef WIN32
       
   178 #      define ZEXPORTVA  WINAPIV
       
   179 #    else
       
   180 #      define ZEXPORTVA  FAR _cdecl _export
       
   181 #    endif
       
   182 #  endif
       
   183 #  if defined (__BORLANDC__)
       
   184 #    if (__BORLANDC__ >= 0x0500) && defined (WIN32)
       
   185 #      include <windows.h>
       
   186 #      define ZEXPORT __declspec(dllexport) WINAPI
       
   187 #      define ZEXPORTRVA __declspec(dllexport) WINAPIV
       
   188 #    else
       
   189 #      if defined (_Windows) && defined (__DLL__)
       
   190 #        define ZEXPORT _export
       
   191 #        define ZEXPORTVA _export
       
   192 #      endif
       
   193 #    endif
       
   194 #  endif
       
   195 #endif
       
   196 
       
   197 #if defined (__BEOS__)
       
   198 #  if defined (ZLIB_DLL)
       
   199 #    define ZEXTERN extern __declspec(dllexport)
       
   200 #  else
       
   201 #    define ZEXTERN extern __declspec(dllimport)
       
   202 #  endif
       
   203 #endif
       
   204 
       
   205 
       
   206 #ifndef ZEXPORT
       
   207 #  define ZEXPORT
       
   208 #endif
       
   209 #ifndef ZEXPORTVA
       
   210 #  define ZEXPORTVA
       
   211 #endif
       
   212 #ifndef ZEXTERN
       
   213 #  define ZEXTERN extern
       
   214 #endif
       
   215 
       
   216 #ifndef FAR
       
   217 #   define FAR
       
   218 #endif
       
   219 
       
   220 #if !defined(MACOS) && !defined(TARGET_OS_MAC)
       
   221 typedef unsigned char  Byte;  /* 8 bits */
       
   222 #endif
       
   223 typedef unsigned int   uInt;  /* 16 bits or more */
       
   224 typedef unsigned long  uLong; /* 32 bits or more */
       
   225 
       
   226 #ifdef SMALL_MEDIUM
       
   227    /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
       
   228 #  define Bytef Byte FAR
       
   229 #else
       
   230    typedef Byte  FAR Bytef;
       
   231 #endif
       
   232 typedef char  FAR charf;
       
   233 typedef int   FAR intf;
       
   234 typedef uInt  FAR uIntf;
       
   235 typedef uLong FAR uLongf;
       
   236 
       
   237 #ifdef STDC
       
   238    typedef void FAR *voidpf;
       
   239    typedef void     *voidp;
       
   240 #else
       
   241    typedef Byte FAR *voidpf;
       
   242    typedef Byte     *voidp;
       
   243 #endif
       
   244 
       
   245 #ifdef HAVE_UNISTD_H
       
   246 #  include <sys/types.h> /* for off_t */
       
   247 #  include <unistd.h>    /* for SEEK_* and off_t */
       
   248 #  define z_off_t  off_t
       
   249 #endif
       
   250 #ifndef SEEK_SET
       
   251 #  define SEEK_SET        0       /* Seek from beginning of file.  */
       
   252 #  define SEEK_CUR        1       /* Seek from current position.  */
       
   253 #  define SEEK_END        2       /* Set file pointer to EOF plus "offset" */
       
   254 #endif
       
   255 #ifndef z_off_t
       
   256 #  define  z_off_t long
       
   257 #endif
       
   258 
       
   259 /* MVS linker does not support external names larger than 8 bytes */
       
   260 #if defined(__MVS__)
       
   261 #   pragma map(deflateInit_,"DEIN")
       
   262 #   pragma map(deflateInit2_,"DEIN2")
       
   263 #   pragma map(deflateEnd,"DEEND")
       
   264 #   pragma map(inflateInit_,"ININ")
       
   265 #   pragma map(inflateInit2_,"ININ2")
       
   266 #   pragma map(inflateEnd,"INEND")
       
   267 #   pragma map(inflateSync,"INSY")
       
   268 #   pragma map(inflateSetDictionary,"INSEDI")
       
   269 #   pragma map(inflate_blocks,"INBL")
       
   270 #   pragma map(inflate_blocks_new,"INBLNE")
       
   271 #   pragma map(inflate_blocks_free,"INBLFR")
       
   272 #   pragma map(inflate_blocks_reset,"INBLRE")
       
   273 #   pragma map(inflate_codes_free,"INCOFR")
       
   274 #   pragma map(inflate_codes,"INCO")
       
   275 #   pragma map(inflate_fast,"INFA")
       
   276 #   pragma map(inflate_flush,"INFLU")
       
   277 #   pragma map(inflate_mask,"INMA")
       
   278 #   pragma map(inflate_set_dictionary,"INSEDI2")
       
   279 #   pragma map(inflate_copyright,"INCOPY")
       
   280 #   pragma map(inflate_trees_bits,"INTRBI")
       
   281 #   pragma map(inflate_trees_dynamic,"INTRDY")
       
   282 #   pragma map(inflate_trees_fixed,"INTRFI")
       
   283 #   pragma map(inflate_trees_free,"INTRFR")
       
   284 #endif
       
   285 
       
   286 #endif /* _ZCONF_H */