dbf-halloween2015

annotate libs/zlib/zconf.h @ 1:c3f5c32cb210

barfed all the libraries in the source tree to make porting easier
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 01 Nov 2015 00:36:56 +0200
parents
children
rev   line source
nuclear@1 1 /* zconf.h -- configuration of the zlib compression library
nuclear@1 2 * Copyright (C) 1995-2005 Jean-loup Gailly.
nuclear@1 3 * For conditions of distribution and use, see copyright notice in zlib.h
nuclear@1 4 */
nuclear@1 5
nuclear@1 6 /* @(#) $Id$ */
nuclear@1 7
nuclear@1 8 #ifndef ZCONF_H
nuclear@1 9 #define ZCONF_H
nuclear@1 10
nuclear@1 11 /*
nuclear@1 12 * If you *really* need a unique prefix for all types and library functions,
nuclear@1 13 * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
nuclear@1 14 */
nuclear@1 15 #ifdef Z_PREFIX
nuclear@1 16 # define deflateInit_ z_deflateInit_
nuclear@1 17 # define deflate z_deflate
nuclear@1 18 # define deflateEnd z_deflateEnd
nuclear@1 19 # define inflateInit_ z_inflateInit_
nuclear@1 20 # define inflate z_inflate
nuclear@1 21 # define inflateEnd z_inflateEnd
nuclear@1 22 # define deflateInit2_ z_deflateInit2_
nuclear@1 23 # define deflateSetDictionary z_deflateSetDictionary
nuclear@1 24 # define deflateCopy z_deflateCopy
nuclear@1 25 # define deflateReset z_deflateReset
nuclear@1 26 # define deflateParams z_deflateParams
nuclear@1 27 # define deflateBound z_deflateBound
nuclear@1 28 # define deflatePrime z_deflatePrime
nuclear@1 29 # define inflateInit2_ z_inflateInit2_
nuclear@1 30 # define inflateSetDictionary z_inflateSetDictionary
nuclear@1 31 # define inflateSync z_inflateSync
nuclear@1 32 # define inflateSyncPoint z_inflateSyncPoint
nuclear@1 33 # define inflateCopy z_inflateCopy
nuclear@1 34 # define inflateReset z_inflateReset
nuclear@1 35 # define inflateBack z_inflateBack
nuclear@1 36 # define inflateBackEnd z_inflateBackEnd
nuclear@1 37 # define compress z_compress
nuclear@1 38 # define compress2 z_compress2
nuclear@1 39 # define compressBound z_compressBound
nuclear@1 40 # define uncompress z_uncompress
nuclear@1 41 # define adler32 z_adler32
nuclear@1 42 # define crc32 z_crc32
nuclear@1 43 # define get_crc_table z_get_crc_table
nuclear@1 44 # define zError z_zError
nuclear@1 45
nuclear@1 46 # define alloc_func z_alloc_func
nuclear@1 47 # define free_func z_free_func
nuclear@1 48 # define in_func z_in_func
nuclear@1 49 # define out_func z_out_func
nuclear@1 50 # define Byte z_Byte
nuclear@1 51 # define uInt z_uInt
nuclear@1 52 # define uLong z_uLong
nuclear@1 53 # define Bytef z_Bytef
nuclear@1 54 # define charf z_charf
nuclear@1 55 # define intf z_intf
nuclear@1 56 # define uIntf z_uIntf
nuclear@1 57 # define uLongf z_uLongf
nuclear@1 58 # define voidpf z_voidpf
nuclear@1 59 # define voidp z_voidp
nuclear@1 60 #endif
nuclear@1 61
nuclear@1 62 #if defined(__MSDOS__) && !defined(MSDOS)
nuclear@1 63 # define MSDOS
nuclear@1 64 #endif
nuclear@1 65 #if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
nuclear@1 66 # define OS2
nuclear@1 67 #endif
nuclear@1 68 #if defined(_WINDOWS) && !defined(WINDOWS)
nuclear@1 69 # define WINDOWS
nuclear@1 70 #endif
nuclear@1 71 #if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
nuclear@1 72 # ifndef WIN32
nuclear@1 73 # define WIN32
nuclear@1 74 # endif
nuclear@1 75 #endif
nuclear@1 76 #if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
nuclear@1 77 # if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
nuclear@1 78 # ifndef SYS16BIT
nuclear@1 79 # define SYS16BIT
nuclear@1 80 # endif
nuclear@1 81 # endif
nuclear@1 82 #endif
nuclear@1 83
nuclear@1 84 /*
nuclear@1 85 * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
nuclear@1 86 * than 64k bytes at a time (needed on systems with 16-bit int).
nuclear@1 87 */
nuclear@1 88 #ifdef SYS16BIT
nuclear@1 89 # define MAXSEG_64K
nuclear@1 90 #endif
nuclear@1 91 #ifdef MSDOS
nuclear@1 92 # define UNALIGNED_OK
nuclear@1 93 #endif
nuclear@1 94
nuclear@1 95 #ifdef __STDC_VERSION__
nuclear@1 96 # ifndef STDC
nuclear@1 97 # define STDC
nuclear@1 98 # endif
nuclear@1 99 # if __STDC_VERSION__ >= 199901L
nuclear@1 100 # ifndef STDC99
nuclear@1 101 # define STDC99
nuclear@1 102 # endif
nuclear@1 103 # endif
nuclear@1 104 #endif
nuclear@1 105 #if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
nuclear@1 106 # define STDC
nuclear@1 107 #endif
nuclear@1 108 #if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
nuclear@1 109 # define STDC
nuclear@1 110 #endif
nuclear@1 111 #if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
nuclear@1 112 # define STDC
nuclear@1 113 #endif
nuclear@1 114 #if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
nuclear@1 115 # define STDC
nuclear@1 116 #endif
nuclear@1 117
nuclear@1 118 #if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */
nuclear@1 119 # define STDC
nuclear@1 120 #endif
nuclear@1 121
nuclear@1 122 #ifndef STDC
nuclear@1 123 # ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
nuclear@1 124 # define const /* note: need a more gentle solution here */
nuclear@1 125 # endif
nuclear@1 126 #endif
nuclear@1 127
nuclear@1 128 /* Some Mac compilers merge all .h files incorrectly: */
nuclear@1 129 #if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
nuclear@1 130 # define NO_DUMMY_DECL
nuclear@1 131 #endif
nuclear@1 132
nuclear@1 133 /* Maximum value for memLevel in deflateInit2 */
nuclear@1 134 #ifndef MAX_MEM_LEVEL
nuclear@1 135 # ifdef MAXSEG_64K
nuclear@1 136 # define MAX_MEM_LEVEL 8
nuclear@1 137 # else
nuclear@1 138 # define MAX_MEM_LEVEL 9
nuclear@1 139 # endif
nuclear@1 140 #endif
nuclear@1 141
nuclear@1 142 /* Maximum value for windowBits in deflateInit2 and inflateInit2.
nuclear@1 143 * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
nuclear@1 144 * created by gzip. (Files created by minigzip can still be extracted by
nuclear@1 145 * gzip.)
nuclear@1 146 */
nuclear@1 147 #ifndef MAX_WBITS
nuclear@1 148 # define MAX_WBITS 15 /* 32K LZ77 window */
nuclear@1 149 #endif
nuclear@1 150
nuclear@1 151 /* The memory requirements for deflate are (in bytes):
nuclear@1 152 (1 << (windowBits+2)) + (1 << (memLevel+9))
nuclear@1 153 that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
nuclear@1 154 plus a few kilobytes for small objects. For example, if you want to reduce
nuclear@1 155 the default memory requirements from 256K to 128K, compile with
nuclear@1 156 make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
nuclear@1 157 Of course this will generally degrade compression (there's no free lunch).
nuclear@1 158
nuclear@1 159 The memory requirements for inflate are (in bytes) 1 << windowBits
nuclear@1 160 that is, 32K for windowBits=15 (default value) plus a few kilobytes
nuclear@1 161 for small objects.
nuclear@1 162 */
nuclear@1 163
nuclear@1 164 /* Type declarations */
nuclear@1 165
nuclear@1 166 #ifndef OF /* function prototypes */
nuclear@1 167 # ifdef STDC
nuclear@1 168 # define OF(args) args
nuclear@1 169 # else
nuclear@1 170 # define OF(args) ()
nuclear@1 171 # endif
nuclear@1 172 #endif
nuclear@1 173
nuclear@1 174 /* The following definitions for FAR are needed only for MSDOS mixed
nuclear@1 175 * model programming (small or medium model with some far allocations).
nuclear@1 176 * This was tested only with MSC; for other MSDOS compilers you may have
nuclear@1 177 * to define NO_MEMCPY in zutil.h. If you don't need the mixed model,
nuclear@1 178 * just define FAR to be empty.
nuclear@1 179 */
nuclear@1 180 #ifdef SYS16BIT
nuclear@1 181 # if defined(M_I86SM) || defined(M_I86MM)
nuclear@1 182 /* MSC small or medium model */
nuclear@1 183 # define SMALL_MEDIUM
nuclear@1 184 # ifdef _MSC_VER
nuclear@1 185 # define FAR _far
nuclear@1 186 # else
nuclear@1 187 # define FAR far
nuclear@1 188 # endif
nuclear@1 189 # endif
nuclear@1 190 # if (defined(__SMALL__) || defined(__MEDIUM__))
nuclear@1 191 /* Turbo C small or medium model */
nuclear@1 192 # define SMALL_MEDIUM
nuclear@1 193 # ifdef __BORLANDC__
nuclear@1 194 # define FAR _far
nuclear@1 195 # else
nuclear@1 196 # define FAR far
nuclear@1 197 # endif
nuclear@1 198 # endif
nuclear@1 199 #endif
nuclear@1 200
nuclear@1 201 #if defined(WINDOWS) || defined(WIN32)
nuclear@1 202 /* If building or using zlib as a DLL, define ZLIB_DLL.
nuclear@1 203 * This is not mandatory, but it offers a little performance increase.
nuclear@1 204 */
nuclear@1 205 # ifdef ZLIB_DLL
nuclear@1 206 # if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
nuclear@1 207 # ifdef ZLIB_INTERNAL
nuclear@1 208 # define ZEXTERN extern __declspec(dllexport)
nuclear@1 209 # else
nuclear@1 210 # define ZEXTERN extern __declspec(dllimport)
nuclear@1 211 # endif
nuclear@1 212 # endif
nuclear@1 213 # endif /* ZLIB_DLL */
nuclear@1 214 /* If building or using zlib with the WINAPI/WINAPIV calling convention,
nuclear@1 215 * define ZLIB_WINAPI.
nuclear@1 216 * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
nuclear@1 217 */
nuclear@1 218 # ifdef ZLIB_WINAPI
nuclear@1 219 # ifdef FAR
nuclear@1 220 # undef FAR
nuclear@1 221 # endif
nuclear@1 222 # include <windows.h>
nuclear@1 223 /* No need for _export, use ZLIB.DEF instead. */
nuclear@1 224 /* For complete Windows compatibility, use WINAPI, not __stdcall. */
nuclear@1 225 # define ZEXPORT WINAPI
nuclear@1 226 # ifdef WIN32
nuclear@1 227 # define ZEXPORTVA WINAPIV
nuclear@1 228 # else
nuclear@1 229 # define ZEXPORTVA FAR CDECL
nuclear@1 230 # endif
nuclear@1 231 # endif
nuclear@1 232 #endif
nuclear@1 233
nuclear@1 234 #if defined (__BEOS__)
nuclear@1 235 # ifdef ZLIB_DLL
nuclear@1 236 # ifdef ZLIB_INTERNAL
nuclear@1 237 # define ZEXPORT __declspec(dllexport)
nuclear@1 238 # define ZEXPORTVA __declspec(dllexport)
nuclear@1 239 # else
nuclear@1 240 # define ZEXPORT __declspec(dllimport)
nuclear@1 241 # define ZEXPORTVA __declspec(dllimport)
nuclear@1 242 # endif
nuclear@1 243 # endif
nuclear@1 244 #endif
nuclear@1 245
nuclear@1 246 #ifndef ZEXTERN
nuclear@1 247 # define ZEXTERN extern
nuclear@1 248 #endif
nuclear@1 249 #ifndef ZEXPORT
nuclear@1 250 # define ZEXPORT
nuclear@1 251 #endif
nuclear@1 252 #ifndef ZEXPORTVA
nuclear@1 253 # define ZEXPORTVA
nuclear@1 254 #endif
nuclear@1 255
nuclear@1 256 #ifndef FAR
nuclear@1 257 # define FAR
nuclear@1 258 #endif
nuclear@1 259
nuclear@1 260 #if !defined(__MACTYPES__)
nuclear@1 261 typedef unsigned char Byte; /* 8 bits */
nuclear@1 262 #endif
nuclear@1 263 typedef unsigned int uInt; /* 16 bits or more */
nuclear@1 264 typedef unsigned long uLong; /* 32 bits or more */
nuclear@1 265
nuclear@1 266 #ifdef SMALL_MEDIUM
nuclear@1 267 /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
nuclear@1 268 # define Bytef Byte FAR
nuclear@1 269 #else
nuclear@1 270 typedef Byte FAR Bytef;
nuclear@1 271 #endif
nuclear@1 272 typedef char FAR charf;
nuclear@1 273 typedef int FAR intf;
nuclear@1 274 typedef uInt FAR uIntf;
nuclear@1 275 typedef uLong FAR uLongf;
nuclear@1 276
nuclear@1 277 #ifdef STDC
nuclear@1 278 typedef void const *voidpc;
nuclear@1 279 typedef void FAR *voidpf;
nuclear@1 280 typedef void *voidp;
nuclear@1 281 #else
nuclear@1 282 typedef Byte const *voidpc;
nuclear@1 283 typedef Byte FAR *voidpf;
nuclear@1 284 typedef Byte *voidp;
nuclear@1 285 #endif
nuclear@1 286
nuclear@1 287 #if 0 /* HAVE_UNISTD_H -- this line is updated by ./configure */
nuclear@1 288 # include <sys/types.h> /* for off_t */
nuclear@1 289 # include <unistd.h> /* for SEEK_* and off_t */
nuclear@1 290 # ifdef VMS
nuclear@1 291 # include <unixio.h> /* for off_t */
nuclear@1 292 # endif
nuclear@1 293 # define z_off_t off_t
nuclear@1 294 #endif
nuclear@1 295 #ifndef SEEK_SET
nuclear@1 296 # define SEEK_SET 0 /* Seek from beginning of file. */
nuclear@1 297 # define SEEK_CUR 1 /* Seek from current position. */
nuclear@1 298 # define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
nuclear@1 299 #endif
nuclear@1 300 #ifndef z_off_t
nuclear@1 301 # define z_off_t long
nuclear@1 302 #endif
nuclear@1 303
nuclear@1 304 #if defined(__OS400__)
nuclear@1 305 # define NO_vsnprintf
nuclear@1 306 #endif
nuclear@1 307
nuclear@1 308 #if defined(__MVS__)
nuclear@1 309 # define NO_vsnprintf
nuclear@1 310 # ifdef FAR
nuclear@1 311 # undef FAR
nuclear@1 312 # endif
nuclear@1 313 #endif
nuclear@1 314
nuclear@1 315 /* MVS linker does not support external names larger than 8 bytes */
nuclear@1 316 #if defined(__MVS__)
nuclear@1 317 # pragma map(deflateInit_,"DEIN")
nuclear@1 318 # pragma map(deflateInit2_,"DEIN2")
nuclear@1 319 # pragma map(deflateEnd,"DEEND")
nuclear@1 320 # pragma map(deflateBound,"DEBND")
nuclear@1 321 # pragma map(inflateInit_,"ININ")
nuclear@1 322 # pragma map(inflateInit2_,"ININ2")
nuclear@1 323 # pragma map(inflateEnd,"INEND")
nuclear@1 324 # pragma map(inflateSync,"INSY")
nuclear@1 325 # pragma map(inflateSetDictionary,"INSEDI")
nuclear@1 326 # pragma map(compressBound,"CMBND")
nuclear@1 327 # pragma map(inflate_table,"INTABL")
nuclear@1 328 # pragma map(inflate_fast,"INFA")
nuclear@1 329 # pragma map(inflate_copyright,"INCOPY")
nuclear@1 330 #endif
nuclear@1 331
nuclear@1 332 #endif /* ZCONF_H */