ex
Fork of mbed-os-example-mbed5-blinky by
DuerOS-Light-SDK-v1.1.0/duer-os-light/src/iot-baidu-ota/baidu_ota_unpack/zliblite/zconf.h@47:9e361da97763, 2017-07-18 (annotated)
- Committer:
- TMBOY
- Date:
- Tue Jul 18 16:54:45 2017 +0800
- Revision:
- 47:9e361da97763
?
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| TMBOY | 47:9e361da97763 | 1 | /* zconf.h -- configuration of the zlib compression library |
| TMBOY | 47:9e361da97763 | 2 | * Copyright (C) 1995-2013 Jean-loup Gailly. |
| TMBOY | 47:9e361da97763 | 3 | * For conditions of distribution and use, see copyright notice in zlib.h |
| TMBOY | 47:9e361da97763 | 4 | */ |
| TMBOY | 47:9e361da97763 | 5 | |
| TMBOY | 47:9e361da97763 | 6 | /* @(#) $Id$ */ |
| TMBOY | 47:9e361da97763 | 7 | |
| TMBOY | 47:9e361da97763 | 8 | #ifndef ZCONF_H |
| TMBOY | 47:9e361da97763 | 9 | #define ZCONF_H |
| TMBOY | 47:9e361da97763 | 10 | |
| TMBOY | 47:9e361da97763 | 11 | /* |
| TMBOY | 47:9e361da97763 | 12 | * If you *really* need a unique prefix for all types and library functions, |
| TMBOY | 47:9e361da97763 | 13 | * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. |
| TMBOY | 47:9e361da97763 | 14 | * Even better than compiling with -DZ_PREFIX would be to use configure to set |
| TMBOY | 47:9e361da97763 | 15 | * this permanently in zconf.h using "./configure --zprefix". |
| TMBOY | 47:9e361da97763 | 16 | */ |
| TMBOY | 47:9e361da97763 | 17 | #ifdef Z_PREFIX /* may be set to #if 1 by ./configure */ |
| TMBOY | 47:9e361da97763 | 18 | # define Z_PREFIX_SET |
| TMBOY | 47:9e361da97763 | 19 | |
| TMBOY | 47:9e361da97763 | 20 | /* all linked symbols */ |
| TMBOY | 47:9e361da97763 | 21 | # define _dist_code z__dist_code |
| TMBOY | 47:9e361da97763 | 22 | # define _length_code z__length_code |
| TMBOY | 47:9e361da97763 | 23 | # define _tr_align z__tr_align |
| TMBOY | 47:9e361da97763 | 24 | # define _tr_flush_bits z__tr_flush_bits |
| TMBOY | 47:9e361da97763 | 25 | # define _tr_flush_block z__tr_flush_block |
| TMBOY | 47:9e361da97763 | 26 | # define _tr_init z__tr_init |
| TMBOY | 47:9e361da97763 | 27 | # define _tr_stored_block z__tr_stored_block |
| TMBOY | 47:9e361da97763 | 28 | # define _tr_tally z__tr_tally |
| TMBOY | 47:9e361da97763 | 29 | # define adler32 z_adler32 |
| TMBOY | 47:9e361da97763 | 30 | # define adler32_combine z_adler32_combine |
| TMBOY | 47:9e361da97763 | 31 | # define adler32_combine64 z_adler32_combine64 |
| TMBOY | 47:9e361da97763 | 32 | # ifndef Z_SOLO |
| TMBOY | 47:9e361da97763 | 33 | # define compress z_compress |
| TMBOY | 47:9e361da97763 | 34 | # define compress2 z_compress2 |
| TMBOY | 47:9e361da97763 | 35 | # define compressBound z_compressBound |
| TMBOY | 47:9e361da97763 | 36 | # endif |
| TMBOY | 47:9e361da97763 | 37 | # define crc32 z_crc32 |
| TMBOY | 47:9e361da97763 | 38 | # define crc32_combine z_crc32_combine |
| TMBOY | 47:9e361da97763 | 39 | # define crc32_combine64 z_crc32_combine64 |
| TMBOY | 47:9e361da97763 | 40 | # define deflate z_deflate |
| TMBOY | 47:9e361da97763 | 41 | # define deflateBound z_deflateBound |
| TMBOY | 47:9e361da97763 | 42 | # define deflateCopy z_deflateCopy |
| TMBOY | 47:9e361da97763 | 43 | # define deflateEnd z_deflateEnd |
| TMBOY | 47:9e361da97763 | 44 | # define deflateInit2_ z_deflateInit2_ |
| TMBOY | 47:9e361da97763 | 45 | # define deflateInit_ z_deflateInit_ |
| TMBOY | 47:9e361da97763 | 46 | # define deflateParams z_deflateParams |
| TMBOY | 47:9e361da97763 | 47 | # define deflatePending z_deflatePending |
| TMBOY | 47:9e361da97763 | 48 | # define deflatePrime z_deflatePrime |
| TMBOY | 47:9e361da97763 | 49 | # define deflateReset z_deflateReset |
| TMBOY | 47:9e361da97763 | 50 | # define deflateResetKeep z_deflateResetKeep |
| TMBOY | 47:9e361da97763 | 51 | # define deflateSetDictionary z_deflateSetDictionary |
| TMBOY | 47:9e361da97763 | 52 | # define deflateSetHeader z_deflateSetHeader |
| TMBOY | 47:9e361da97763 | 53 | # define deflateTune z_deflateTune |
| TMBOY | 47:9e361da97763 | 54 | # define deflate_copyright z_deflate_copyright |
| TMBOY | 47:9e361da97763 | 55 | # define get_crc_table z_get_crc_table |
| TMBOY | 47:9e361da97763 | 56 | # ifndef Z_SOLO |
| TMBOY | 47:9e361da97763 | 57 | # define gz_error z_gz_error |
| TMBOY | 47:9e361da97763 | 58 | # define gz_intmax z_gz_intmax |
| TMBOY | 47:9e361da97763 | 59 | # define gz_strwinerror z_gz_strwinerror |
| TMBOY | 47:9e361da97763 | 60 | # define gzbuffer z_gzbuffer |
| TMBOY | 47:9e361da97763 | 61 | # define gzclearerr z_gzclearerr |
| TMBOY | 47:9e361da97763 | 62 | # define gzclose z_gzclose |
| TMBOY | 47:9e361da97763 | 63 | # define gzclose_r z_gzclose_r |
| TMBOY | 47:9e361da97763 | 64 | # define gzclose_w z_gzclose_w |
| TMBOY | 47:9e361da97763 | 65 | # define gzdirect z_gzdirect |
| TMBOY | 47:9e361da97763 | 66 | # define gzdopen z_gzdopen |
| TMBOY | 47:9e361da97763 | 67 | # define gzeof z_gzeof |
| TMBOY | 47:9e361da97763 | 68 | # define gzerror z_gzerror |
| TMBOY | 47:9e361da97763 | 69 | # define gzflush z_gzflush |
| TMBOY | 47:9e361da97763 | 70 | # define gzgetc z_gzgetc |
| TMBOY | 47:9e361da97763 | 71 | # define gzgetc_ z_gzgetc_ |
| TMBOY | 47:9e361da97763 | 72 | # define gzgets z_gzgets |
| TMBOY | 47:9e361da97763 | 73 | # define gzoffset z_gzoffset |
| TMBOY | 47:9e361da97763 | 74 | # define gzoffset64 z_gzoffset64 |
| TMBOY | 47:9e361da97763 | 75 | # define gzopen z_gzopen |
| TMBOY | 47:9e361da97763 | 76 | # define gzopen64 z_gzopen64 |
| TMBOY | 47:9e361da97763 | 77 | # ifdef _WIN32 |
| TMBOY | 47:9e361da97763 | 78 | # define gzopen_w z_gzopen_w |
| TMBOY | 47:9e361da97763 | 79 | # endif |
| TMBOY | 47:9e361da97763 | 80 | # define gzprintf z_gzprintf |
| TMBOY | 47:9e361da97763 | 81 | # define gzvprintf z_gzvprintf |
| TMBOY | 47:9e361da97763 | 82 | # define gzputc z_gzputc |
| TMBOY | 47:9e361da97763 | 83 | # define gzputs z_gzputs |
| TMBOY | 47:9e361da97763 | 84 | # define gzread z_gzread |
| TMBOY | 47:9e361da97763 | 85 | # define gzrewind z_gzrewind |
| TMBOY | 47:9e361da97763 | 86 | # define gzseek z_gzseek |
| TMBOY | 47:9e361da97763 | 87 | # define gzseek64 z_gzseek64 |
| TMBOY | 47:9e361da97763 | 88 | # define gzsetparams z_gzsetparams |
| TMBOY | 47:9e361da97763 | 89 | # define gztell z_gztell |
| TMBOY | 47:9e361da97763 | 90 | # define gztell64 z_gztell64 |
| TMBOY | 47:9e361da97763 | 91 | # define gzungetc z_gzungetc |
| TMBOY | 47:9e361da97763 | 92 | # define gzwrite z_gzwrite |
| TMBOY | 47:9e361da97763 | 93 | # endif |
| TMBOY | 47:9e361da97763 | 94 | # define inflate z_inflate |
| TMBOY | 47:9e361da97763 | 95 | # define inflateBack z_inflateBack |
| TMBOY | 47:9e361da97763 | 96 | # define inflateBackEnd z_inflateBackEnd |
| TMBOY | 47:9e361da97763 | 97 | # define inflateBackInit_ z_inflateBackInit_ |
| TMBOY | 47:9e361da97763 | 98 | # define inflateCopy z_inflateCopy |
| TMBOY | 47:9e361da97763 | 99 | # define inflateEnd z_inflateEnd |
| TMBOY | 47:9e361da97763 | 100 | # define inflateGetHeader z_inflateGetHeader |
| TMBOY | 47:9e361da97763 | 101 | # define inflateInit2_ z_inflateInit2_ |
| TMBOY | 47:9e361da97763 | 102 | # define inflateInit_ z_inflateInit_ |
| TMBOY | 47:9e361da97763 | 103 | # define inflateMark z_inflateMark |
| TMBOY | 47:9e361da97763 | 104 | # define inflatePrime z_inflatePrime |
| TMBOY | 47:9e361da97763 | 105 | # define inflateReset z_inflateReset |
| TMBOY | 47:9e361da97763 | 106 | # define inflateReset2 z_inflateReset2 |
| TMBOY | 47:9e361da97763 | 107 | # define inflateSetDictionary z_inflateSetDictionary |
| TMBOY | 47:9e361da97763 | 108 | # define inflateGetDictionary z_inflateGetDictionary |
| TMBOY | 47:9e361da97763 | 109 | # define inflateSync z_inflateSync |
| TMBOY | 47:9e361da97763 | 110 | # define inflateSyncPoint z_inflateSyncPoint |
| TMBOY | 47:9e361da97763 | 111 | # define inflateUndermine z_inflateUndermine |
| TMBOY | 47:9e361da97763 | 112 | # define inflateResetKeep z_inflateResetKeep |
| TMBOY | 47:9e361da97763 | 113 | # define inflate_copyright z_inflate_copyright |
| TMBOY | 47:9e361da97763 | 114 | # define inflate_fast z_inflate_fast |
| TMBOY | 47:9e361da97763 | 115 | # define inflate_table z_inflate_table |
| TMBOY | 47:9e361da97763 | 116 | # ifndef Z_SOLO |
| TMBOY | 47:9e361da97763 | 117 | # define uncompress z_uncompress |
| TMBOY | 47:9e361da97763 | 118 | # endif |
| TMBOY | 47:9e361da97763 | 119 | # define zError z_zError |
| TMBOY | 47:9e361da97763 | 120 | # ifndef Z_SOLO |
| TMBOY | 47:9e361da97763 | 121 | # define zcalloc z_zcalloc |
| TMBOY | 47:9e361da97763 | 122 | # define zcfree z_zcfree |
| TMBOY | 47:9e361da97763 | 123 | # endif |
| TMBOY | 47:9e361da97763 | 124 | # define zlibCompileFlags z_zlibCompileFlags |
| TMBOY | 47:9e361da97763 | 125 | # define zlibVersion z_zlibVersion |
| TMBOY | 47:9e361da97763 | 126 | |
| TMBOY | 47:9e361da97763 | 127 | /* all zlib typedefs in zlib.h and zconf.h */ |
| TMBOY | 47:9e361da97763 | 128 | # define Byte z_Byte |
| TMBOY | 47:9e361da97763 | 129 | # define Bytef z_Bytef |
| TMBOY | 47:9e361da97763 | 130 | # define alloc_func z_alloc_func |
| TMBOY | 47:9e361da97763 | 131 | # define charf z_charf |
| TMBOY | 47:9e361da97763 | 132 | # define free_func z_free_func |
| TMBOY | 47:9e361da97763 | 133 | # ifndef Z_SOLO |
| TMBOY | 47:9e361da97763 | 134 | # define gzFile z_gzFile |
| TMBOY | 47:9e361da97763 | 135 | # endif |
| TMBOY | 47:9e361da97763 | 136 | # define gz_header z_gz_header |
| TMBOY | 47:9e361da97763 | 137 | # define gz_headerp z_gz_headerp |
| TMBOY | 47:9e361da97763 | 138 | # define in_func z_in_func |
| TMBOY | 47:9e361da97763 | 139 | # define intf z_intf |
| TMBOY | 47:9e361da97763 | 140 | # define out_func z_out_func |
| TMBOY | 47:9e361da97763 | 141 | # define uInt z_uInt |
| TMBOY | 47:9e361da97763 | 142 | # define uIntf z_uIntf |
| TMBOY | 47:9e361da97763 | 143 | # define uLong z_uLong |
| TMBOY | 47:9e361da97763 | 144 | # define uLongf z_uLongf |
| TMBOY | 47:9e361da97763 | 145 | # define voidp z_voidp |
| TMBOY | 47:9e361da97763 | 146 | # define voidpc z_voidpc |
| TMBOY | 47:9e361da97763 | 147 | # define voidpf z_voidpf |
| TMBOY | 47:9e361da97763 | 148 | |
| TMBOY | 47:9e361da97763 | 149 | /* all zlib structs in zlib.h and zconf.h */ |
| TMBOY | 47:9e361da97763 | 150 | # define gz_header_s z_gz_header_s |
| TMBOY | 47:9e361da97763 | 151 | # define internal_state z_internal_state |
| TMBOY | 47:9e361da97763 | 152 | |
| TMBOY | 47:9e361da97763 | 153 | #endif |
| TMBOY | 47:9e361da97763 | 154 | |
| TMBOY | 47:9e361da97763 | 155 | #if defined(__MSDOS__) && !defined(MSDOS) |
| TMBOY | 47:9e361da97763 | 156 | # define MSDOS |
| TMBOY | 47:9e361da97763 | 157 | #endif |
| TMBOY | 47:9e361da97763 | 158 | #if (defined(OS_2) || defined(__OS2__)) && !defined(OS2) |
| TMBOY | 47:9e361da97763 | 159 | # define OS2 |
| TMBOY | 47:9e361da97763 | 160 | #endif |
| TMBOY | 47:9e361da97763 | 161 | #if defined(_WINDOWS) && !defined(WINDOWS) |
| TMBOY | 47:9e361da97763 | 162 | # define WINDOWS |
| TMBOY | 47:9e361da97763 | 163 | #endif |
| TMBOY | 47:9e361da97763 | 164 | #if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__) |
| TMBOY | 47:9e361da97763 | 165 | # ifndef WIN32 |
| TMBOY | 47:9e361da97763 | 166 | # define WIN32 |
| TMBOY | 47:9e361da97763 | 167 | # endif |
| TMBOY | 47:9e361da97763 | 168 | #endif |
| TMBOY | 47:9e361da97763 | 169 | #if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32) |
| TMBOY | 47:9e361da97763 | 170 | # if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__) |
| TMBOY | 47:9e361da97763 | 171 | # ifndef SYS16BIT |
| TMBOY | 47:9e361da97763 | 172 | # define SYS16BIT |
| TMBOY | 47:9e361da97763 | 173 | # endif |
| TMBOY | 47:9e361da97763 | 174 | # endif |
| TMBOY | 47:9e361da97763 | 175 | #endif |
| TMBOY | 47:9e361da97763 | 176 | |
| TMBOY | 47:9e361da97763 | 177 | /* |
| TMBOY | 47:9e361da97763 | 178 | * Compile with -DMAXSEG_64K if the alloc function cannot allocate more |
| TMBOY | 47:9e361da97763 | 179 | * than 64k bytes at a time (needed on systems with 16-bit int). |
| TMBOY | 47:9e361da97763 | 180 | */ |
| TMBOY | 47:9e361da97763 | 181 | #ifdef SYS16BIT |
| TMBOY | 47:9e361da97763 | 182 | # define MAXSEG_64K |
| TMBOY | 47:9e361da97763 | 183 | #endif |
| TMBOY | 47:9e361da97763 | 184 | #ifdef MSDOS |
| TMBOY | 47:9e361da97763 | 185 | # define UNALIGNED_OK |
| TMBOY | 47:9e361da97763 | 186 | #endif |
| TMBOY | 47:9e361da97763 | 187 | |
| TMBOY | 47:9e361da97763 | 188 | #ifdef __STDC_VERSION__ |
| TMBOY | 47:9e361da97763 | 189 | # ifndef STDC |
| TMBOY | 47:9e361da97763 | 190 | # define STDC |
| TMBOY | 47:9e361da97763 | 191 | # endif |
| TMBOY | 47:9e361da97763 | 192 | # if __STDC_VERSION__ >= 199901L |
| TMBOY | 47:9e361da97763 | 193 | # ifndef STDC99 |
| TMBOY | 47:9e361da97763 | 194 | # define STDC99 |
| TMBOY | 47:9e361da97763 | 195 | # endif |
| TMBOY | 47:9e361da97763 | 196 | # endif |
| TMBOY | 47:9e361da97763 | 197 | #endif |
| TMBOY | 47:9e361da97763 | 198 | #if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus)) |
| TMBOY | 47:9e361da97763 | 199 | # define STDC |
| TMBOY | 47:9e361da97763 | 200 | #endif |
| TMBOY | 47:9e361da97763 | 201 | #if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__)) |
| TMBOY | 47:9e361da97763 | 202 | # define STDC |
| TMBOY | 47:9e361da97763 | 203 | #endif |
| TMBOY | 47:9e361da97763 | 204 | #if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32)) |
| TMBOY | 47:9e361da97763 | 205 | # define STDC |
| TMBOY | 47:9e361da97763 | 206 | #endif |
| TMBOY | 47:9e361da97763 | 207 | #if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__)) |
| TMBOY | 47:9e361da97763 | 208 | # define STDC |
| TMBOY | 47:9e361da97763 | 209 | #endif |
| TMBOY | 47:9e361da97763 | 210 | |
| TMBOY | 47:9e361da97763 | 211 | #if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */ |
| TMBOY | 47:9e361da97763 | 212 | # define STDC |
| TMBOY | 47:9e361da97763 | 213 | #endif |
| TMBOY | 47:9e361da97763 | 214 | |
| TMBOY | 47:9e361da97763 | 215 | #ifndef STDC |
| TMBOY | 47:9e361da97763 | 216 | # ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */ |
| TMBOY | 47:9e361da97763 | 217 | # define const /* note: need a more gentle solution here */ |
| TMBOY | 47:9e361da97763 | 218 | # endif |
| TMBOY | 47:9e361da97763 | 219 | #endif |
| TMBOY | 47:9e361da97763 | 220 | |
| TMBOY | 47:9e361da97763 | 221 | #if defined(ZLIB_CONST) && !defined(z_const) |
| TMBOY | 47:9e361da97763 | 222 | # define z_const const |
| TMBOY | 47:9e361da97763 | 223 | #else |
| TMBOY | 47:9e361da97763 | 224 | # define z_const |
| TMBOY | 47:9e361da97763 | 225 | #endif |
| TMBOY | 47:9e361da97763 | 226 | |
| TMBOY | 47:9e361da97763 | 227 | /* Some Mac compilers merge all .h files incorrectly: */ |
| TMBOY | 47:9e361da97763 | 228 | #if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__) |
| TMBOY | 47:9e361da97763 | 229 | # define NO_DUMMY_DECL |
| TMBOY | 47:9e361da97763 | 230 | #endif |
| TMBOY | 47:9e361da97763 | 231 | |
| TMBOY | 47:9e361da97763 | 232 | /* Maximum value for memLevel in deflateInit2 */ |
| TMBOY | 47:9e361da97763 | 233 | #ifndef MAX_MEM_LEVEL |
| TMBOY | 47:9e361da97763 | 234 | # ifdef MAXSEG_64K |
| TMBOY | 47:9e361da97763 | 235 | # define MAX_MEM_LEVEL 8 |
| TMBOY | 47:9e361da97763 | 236 | # else |
| TMBOY | 47:9e361da97763 | 237 | # define MAX_MEM_LEVEL 9 |
| TMBOY | 47:9e361da97763 | 238 | # endif |
| TMBOY | 47:9e361da97763 | 239 | #endif |
| TMBOY | 47:9e361da97763 | 240 | |
| TMBOY | 47:9e361da97763 | 241 | /* Maximum value for windowBits in deflateInit2 and inflateInit2. |
| TMBOY | 47:9e361da97763 | 242 | * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files |
| TMBOY | 47:9e361da97763 | 243 | * created by gzip. (Files created by minigzip can still be extracted by |
| TMBOY | 47:9e361da97763 | 244 | * gzip.) |
| TMBOY | 47:9e361da97763 | 245 | */ |
| TMBOY | 47:9e361da97763 | 246 | #ifndef MAX_WBITS |
| TMBOY | 47:9e361da97763 | 247 | # define MAX_WBITS 9 /* default is 32K LZ77 window, here alter to 512 byte for minimum memory */ |
| TMBOY | 47:9e361da97763 | 248 | #endif |
| TMBOY | 47:9e361da97763 | 249 | |
| TMBOY | 47:9e361da97763 | 250 | /* The memory requirements for deflate are (in bytes): |
| TMBOY | 47:9e361da97763 | 251 | (1 << (windowBits+2)) + (1 << (memLevel+9)) |
| TMBOY | 47:9e361da97763 | 252 | that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) |
| TMBOY | 47:9e361da97763 | 253 | plus a few kilobytes for small objects. For example, if you want to reduce |
| TMBOY | 47:9e361da97763 | 254 | the default memory requirements from 256K to 128K, compile with |
| TMBOY | 47:9e361da97763 | 255 | make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" |
| TMBOY | 47:9e361da97763 | 256 | Of course this will generally degrade compression (there's no free lunch). |
| TMBOY | 47:9e361da97763 | 257 | |
| TMBOY | 47:9e361da97763 | 258 | The memory requirements for inflate are (in bytes) 1 << windowBits |
| TMBOY | 47:9e361da97763 | 259 | that is, 32K for windowBits=15 (default value) plus a few kilobytes |
| TMBOY | 47:9e361da97763 | 260 | for small objects. |
| TMBOY | 47:9e361da97763 | 261 | */ |
| TMBOY | 47:9e361da97763 | 262 | |
| TMBOY | 47:9e361da97763 | 263 | /* Type declarations */ |
| TMBOY | 47:9e361da97763 | 264 | |
| TMBOY | 47:9e361da97763 | 265 | #ifndef OF /* function prototypes */ |
| TMBOY | 47:9e361da97763 | 266 | # ifdef STDC |
| TMBOY | 47:9e361da97763 | 267 | # define OF(args) args |
| TMBOY | 47:9e361da97763 | 268 | # else |
| TMBOY | 47:9e361da97763 | 269 | # define OF(args) () |
| TMBOY | 47:9e361da97763 | 270 | # endif |
| TMBOY | 47:9e361da97763 | 271 | #endif |
| TMBOY | 47:9e361da97763 | 272 | |
| TMBOY | 47:9e361da97763 | 273 | #ifndef Z_ARG /* function prototypes for stdarg */ |
| TMBOY | 47:9e361da97763 | 274 | # if defined(STDC) || defined(Z_HAVE_STDARG_H) |
| TMBOY | 47:9e361da97763 | 275 | # define Z_ARG(args) args |
| TMBOY | 47:9e361da97763 | 276 | # else |
| TMBOY | 47:9e361da97763 | 277 | # define Z_ARG(args) () |
| TMBOY | 47:9e361da97763 | 278 | # endif |
| TMBOY | 47:9e361da97763 | 279 | #endif |
| TMBOY | 47:9e361da97763 | 280 | |
| TMBOY | 47:9e361da97763 | 281 | /* The following definitions for FAR are needed only for MSDOS mixed |
| TMBOY | 47:9e361da97763 | 282 | * model programming (small or medium model with some far allocations). |
| TMBOY | 47:9e361da97763 | 283 | * This was tested only with MSC; for other MSDOS compilers you may have |
| TMBOY | 47:9e361da97763 | 284 | * to define NO_MEMCPY in zutil.h. If you don't need the mixed model, |
| TMBOY | 47:9e361da97763 | 285 | * just define FAR to be empty. |
| TMBOY | 47:9e361da97763 | 286 | */ |
| TMBOY | 47:9e361da97763 | 287 | #ifdef SYS16BIT |
| TMBOY | 47:9e361da97763 | 288 | # if defined(M_I86SM) || defined(M_I86MM) |
| TMBOY | 47:9e361da97763 | 289 | /* MSC small or medium model */ |
| TMBOY | 47:9e361da97763 | 290 | # define SMALL_MEDIUM |
| TMBOY | 47:9e361da97763 | 291 | # ifdef _MSC_VER |
| TMBOY | 47:9e361da97763 | 292 | # define FAR _far |
| TMBOY | 47:9e361da97763 | 293 | # else |
| TMBOY | 47:9e361da97763 | 294 | # define FAR far |
| TMBOY | 47:9e361da97763 | 295 | # endif |
| TMBOY | 47:9e361da97763 | 296 | # endif |
| TMBOY | 47:9e361da97763 | 297 | # if (defined(__SMALL__) || defined(__MEDIUM__)) |
| TMBOY | 47:9e361da97763 | 298 | /* Turbo C small or medium model */ |
| TMBOY | 47:9e361da97763 | 299 | # define SMALL_MEDIUM |
| TMBOY | 47:9e361da97763 | 300 | # ifdef __BORLANDC__ |
| TMBOY | 47:9e361da97763 | 301 | # define FAR _far |
| TMBOY | 47:9e361da97763 | 302 | # else |
| TMBOY | 47:9e361da97763 | 303 | # define FAR far |
| TMBOY | 47:9e361da97763 | 304 | # endif |
| TMBOY | 47:9e361da97763 | 305 | # endif |
| TMBOY | 47:9e361da97763 | 306 | #endif |
| TMBOY | 47:9e361da97763 | 307 | |
| TMBOY | 47:9e361da97763 | 308 | #if defined(WINDOWS) || defined(WIN32) |
| TMBOY | 47:9e361da97763 | 309 | /* If building or using zlib as a DLL, define ZLIB_DLL. |
| TMBOY | 47:9e361da97763 | 310 | * This is not mandatory, but it offers a little performance increase. |
| TMBOY | 47:9e361da97763 | 311 | */ |
| TMBOY | 47:9e361da97763 | 312 | # ifdef ZLIB_DLL |
| TMBOY | 47:9e361da97763 | 313 | # if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500)) |
| TMBOY | 47:9e361da97763 | 314 | # ifdef ZLIB_INTERNAL |
| TMBOY | 47:9e361da97763 | 315 | # define ZEXTERN extern __declspec(dllexport) |
| TMBOY | 47:9e361da97763 | 316 | # else |
| TMBOY | 47:9e361da97763 | 317 | # define ZEXTERN extern __declspec(dllimport) |
| TMBOY | 47:9e361da97763 | 318 | # endif |
| TMBOY | 47:9e361da97763 | 319 | # endif |
| TMBOY | 47:9e361da97763 | 320 | # endif /* ZLIB_DLL */ |
| TMBOY | 47:9e361da97763 | 321 | /* If building or using zlib with the WINAPI/WINAPIV calling convention, |
| TMBOY | 47:9e361da97763 | 322 | * define ZLIB_WINAPI. |
| TMBOY | 47:9e361da97763 | 323 | * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI. |
| TMBOY | 47:9e361da97763 | 324 | */ |
| TMBOY | 47:9e361da97763 | 325 | # ifdef ZLIB_WINAPI |
| TMBOY | 47:9e361da97763 | 326 | # ifdef FAR |
| TMBOY | 47:9e361da97763 | 327 | # undef FAR |
| TMBOY | 47:9e361da97763 | 328 | # endif |
| TMBOY | 47:9e361da97763 | 329 | # include <windows.h> |
| TMBOY | 47:9e361da97763 | 330 | /* No need for _export, use ZLIB.DEF instead. */ |
| TMBOY | 47:9e361da97763 | 331 | /* For complete Windows compatibility, use WINAPI, not __stdcall. */ |
| TMBOY | 47:9e361da97763 | 332 | # define ZEXPORT WINAPI |
| TMBOY | 47:9e361da97763 | 333 | # ifdef WIN32 |
| TMBOY | 47:9e361da97763 | 334 | # define ZEXPORTVA WINAPIV |
| TMBOY | 47:9e361da97763 | 335 | # else |
| TMBOY | 47:9e361da97763 | 336 | # define ZEXPORTVA FAR CDECL |
| TMBOY | 47:9e361da97763 | 337 | # endif |
| TMBOY | 47:9e361da97763 | 338 | # endif |
| TMBOY | 47:9e361da97763 | 339 | #endif |
| TMBOY | 47:9e361da97763 | 340 | |
| TMBOY | 47:9e361da97763 | 341 | #if defined (__BEOS__) |
| TMBOY | 47:9e361da97763 | 342 | # ifdef ZLIB_DLL |
| TMBOY | 47:9e361da97763 | 343 | # ifdef ZLIB_INTERNAL |
| TMBOY | 47:9e361da97763 | 344 | # define ZEXPORT __declspec(dllexport) |
| TMBOY | 47:9e361da97763 | 345 | # define ZEXPORTVA __declspec(dllexport) |
| TMBOY | 47:9e361da97763 | 346 | # else |
| TMBOY | 47:9e361da97763 | 347 | # define ZEXPORT __declspec(dllimport) |
| TMBOY | 47:9e361da97763 | 348 | # define ZEXPORTVA __declspec(dllimport) |
| TMBOY | 47:9e361da97763 | 349 | # endif |
| TMBOY | 47:9e361da97763 | 350 | # endif |
| TMBOY | 47:9e361da97763 | 351 | #endif |
| TMBOY | 47:9e361da97763 | 352 | |
| TMBOY | 47:9e361da97763 | 353 | #ifndef ZEXTERN |
| TMBOY | 47:9e361da97763 | 354 | # define ZEXTERN extern |
| TMBOY | 47:9e361da97763 | 355 | #endif |
| TMBOY | 47:9e361da97763 | 356 | #ifndef ZEXPORT |
| TMBOY | 47:9e361da97763 | 357 | # define ZEXPORT |
| TMBOY | 47:9e361da97763 | 358 | #endif |
| TMBOY | 47:9e361da97763 | 359 | #ifndef ZEXPORTVA |
| TMBOY | 47:9e361da97763 | 360 | # define ZEXPORTVA |
| TMBOY | 47:9e361da97763 | 361 | #endif |
| TMBOY | 47:9e361da97763 | 362 | |
| TMBOY | 47:9e361da97763 | 363 | #ifndef FAR |
| TMBOY | 47:9e361da97763 | 364 | # define FAR |
| TMBOY | 47:9e361da97763 | 365 | #endif |
| TMBOY | 47:9e361da97763 | 366 | |
| TMBOY | 47:9e361da97763 | 367 | #if !defined(__MACTYPES__) |
| TMBOY | 47:9e361da97763 | 368 | typedef unsigned char Byte; /* 8 bits */ |
| TMBOY | 47:9e361da97763 | 369 | #endif |
| TMBOY | 47:9e361da97763 | 370 | typedef unsigned int uInt; /* 16 bits or more */ |
| TMBOY | 47:9e361da97763 | 371 | typedef unsigned long uLong; /* 32 bits or more */ |
| TMBOY | 47:9e361da97763 | 372 | |
| TMBOY | 47:9e361da97763 | 373 | #ifdef SMALL_MEDIUM |
| TMBOY | 47:9e361da97763 | 374 | /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */ |
| TMBOY | 47:9e361da97763 | 375 | # define Bytef Byte FAR |
| TMBOY | 47:9e361da97763 | 376 | #else |
| TMBOY | 47:9e361da97763 | 377 | typedef Byte FAR Bytef; |
| TMBOY | 47:9e361da97763 | 378 | #endif |
| TMBOY | 47:9e361da97763 | 379 | typedef char FAR charf; |
| TMBOY | 47:9e361da97763 | 380 | typedef int FAR intf; |
| TMBOY | 47:9e361da97763 | 381 | typedef uInt FAR uIntf; |
| TMBOY | 47:9e361da97763 | 382 | typedef uLong FAR uLongf; |
| TMBOY | 47:9e361da97763 | 383 | |
| TMBOY | 47:9e361da97763 | 384 | #ifdef STDC |
| TMBOY | 47:9e361da97763 | 385 | typedef void const *voidpc; |
| TMBOY | 47:9e361da97763 | 386 | typedef void FAR *voidpf; |
| TMBOY | 47:9e361da97763 | 387 | typedef void *voidp; |
| TMBOY | 47:9e361da97763 | 388 | #else |
| TMBOY | 47:9e361da97763 | 389 | typedef Byte const *voidpc; |
| TMBOY | 47:9e361da97763 | 390 | typedef Byte FAR *voidpf; |
| TMBOY | 47:9e361da97763 | 391 | typedef Byte *voidp; |
| TMBOY | 47:9e361da97763 | 392 | #endif |
| TMBOY | 47:9e361da97763 | 393 | |
| TMBOY | 47:9e361da97763 | 394 | #if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC) |
| TMBOY | 47:9e361da97763 | 395 | # include <limits.h> |
| TMBOY | 47:9e361da97763 | 396 | # if (UINT_MAX == 0xffffffffUL) |
| TMBOY | 47:9e361da97763 | 397 | # define Z_U4 unsigned |
| TMBOY | 47:9e361da97763 | 398 | # elif (ULONG_MAX == 0xffffffffUL) |
| TMBOY | 47:9e361da97763 | 399 | # define Z_U4 unsigned long |
| TMBOY | 47:9e361da97763 | 400 | # elif (USHRT_MAX == 0xffffffffUL) |
| TMBOY | 47:9e361da97763 | 401 | # define Z_U4 unsigned short |
| TMBOY | 47:9e361da97763 | 402 | # endif |
| TMBOY | 47:9e361da97763 | 403 | #endif |
| TMBOY | 47:9e361da97763 | 404 | |
| TMBOY | 47:9e361da97763 | 405 | #ifdef Z_U4 |
| TMBOY | 47:9e361da97763 | 406 | typedef Z_U4 z_crc_t; |
| TMBOY | 47:9e361da97763 | 407 | #else |
| TMBOY | 47:9e361da97763 | 408 | typedef unsigned long z_crc_t; |
| TMBOY | 47:9e361da97763 | 409 | #endif |
| TMBOY | 47:9e361da97763 | 410 | |
| TMBOY | 47:9e361da97763 | 411 | #if 1 /* was set to #if 1 by ./configure */ |
| TMBOY | 47:9e361da97763 | 412 | # define Z_HAVE_UNISTD_H |
| TMBOY | 47:9e361da97763 | 413 | #endif |
| TMBOY | 47:9e361da97763 | 414 | |
| TMBOY | 47:9e361da97763 | 415 | #if 1 /* was set to #if 1 by ./configure */ |
| TMBOY | 47:9e361da97763 | 416 | # define Z_HAVE_STDARG_H |
| TMBOY | 47:9e361da97763 | 417 | #endif |
| TMBOY | 47:9e361da97763 | 418 | |
| TMBOY | 47:9e361da97763 | 419 | #ifdef STDC |
| TMBOY | 47:9e361da97763 | 420 | # ifndef Z_SOLO |
| TMBOY | 47:9e361da97763 | 421 | # include <sys/types.h> /* for off_t */ |
| TMBOY | 47:9e361da97763 | 422 | # endif |
| TMBOY | 47:9e361da97763 | 423 | #endif |
| TMBOY | 47:9e361da97763 | 424 | |
| TMBOY | 47:9e361da97763 | 425 | #if defined(STDC) || defined(Z_HAVE_STDARG_H) |
| TMBOY | 47:9e361da97763 | 426 | # ifndef Z_SOLO |
| TMBOY | 47:9e361da97763 | 427 | # include <stdarg.h> /* for va_list */ |
| TMBOY | 47:9e361da97763 | 428 | # endif |
| TMBOY | 47:9e361da97763 | 429 | #endif |
| TMBOY | 47:9e361da97763 | 430 | |
| TMBOY | 47:9e361da97763 | 431 | #ifdef _WIN32 |
| TMBOY | 47:9e361da97763 | 432 | # ifndef Z_SOLO |
| TMBOY | 47:9e361da97763 | 433 | # include <stddef.h> /* for wchar_t */ |
| TMBOY | 47:9e361da97763 | 434 | # endif |
| TMBOY | 47:9e361da97763 | 435 | #endif |
| TMBOY | 47:9e361da97763 | 436 | |
| TMBOY | 47:9e361da97763 | 437 | /* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and |
| TMBOY | 47:9e361da97763 | 438 | * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even |
| TMBOY | 47:9e361da97763 | 439 | * though the former does not conform to the LFS document), but considering |
| TMBOY | 47:9e361da97763 | 440 | * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as |
| TMBOY | 47:9e361da97763 | 441 | * equivalently requesting no 64-bit operations |
| TMBOY | 47:9e361da97763 | 442 | */ |
| TMBOY | 47:9e361da97763 | 443 | #if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1 |
| TMBOY | 47:9e361da97763 | 444 | # undef _LARGEFILE64_SOURCE |
| TMBOY | 47:9e361da97763 | 445 | #endif |
| TMBOY | 47:9e361da97763 | 446 | |
| TMBOY | 47:9e361da97763 | 447 | #if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H) |
| TMBOY | 47:9e361da97763 | 448 | # define Z_HAVE_UNISTD_H |
| TMBOY | 47:9e361da97763 | 449 | #endif |
| TMBOY | 47:9e361da97763 | 450 | #ifndef Z_SOLO |
| TMBOY | 47:9e361da97763 | 451 | # if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE) |
| TMBOY | 47:9e361da97763 | 452 | # include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */ |
| TMBOY | 47:9e361da97763 | 453 | # ifdef VMS |
| TMBOY | 47:9e361da97763 | 454 | # include <unixio.h> /* for off_t */ |
| TMBOY | 47:9e361da97763 | 455 | # endif |
| TMBOY | 47:9e361da97763 | 456 | # ifndef z_off_t |
| TMBOY | 47:9e361da97763 | 457 | # define z_off_t off_t |
| TMBOY | 47:9e361da97763 | 458 | # endif |
| TMBOY | 47:9e361da97763 | 459 | # endif |
| TMBOY | 47:9e361da97763 | 460 | #endif |
| TMBOY | 47:9e361da97763 | 461 | |
| TMBOY | 47:9e361da97763 | 462 | #if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0 |
| TMBOY | 47:9e361da97763 | 463 | # define Z_LFS64 |
| TMBOY | 47:9e361da97763 | 464 | #endif |
| TMBOY | 47:9e361da97763 | 465 | |
| TMBOY | 47:9e361da97763 | 466 | #if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64) |
| TMBOY | 47:9e361da97763 | 467 | # define Z_LARGE64 |
| TMBOY | 47:9e361da97763 | 468 | #endif |
| TMBOY | 47:9e361da97763 | 469 | |
| TMBOY | 47:9e361da97763 | 470 | #if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64) |
| TMBOY | 47:9e361da97763 | 471 | # define Z_WANT64 |
| TMBOY | 47:9e361da97763 | 472 | #endif |
| TMBOY | 47:9e361da97763 | 473 | |
| TMBOY | 47:9e361da97763 | 474 | #if !defined(SEEK_SET) && !defined(Z_SOLO) |
| TMBOY | 47:9e361da97763 | 475 | # define SEEK_SET 0 /* Seek from beginning of file. */ |
| TMBOY | 47:9e361da97763 | 476 | # define SEEK_CUR 1 /* Seek from current position. */ |
| TMBOY | 47:9e361da97763 | 477 | # define SEEK_END 2 /* Set file pointer to EOF plus "offset" */ |
| TMBOY | 47:9e361da97763 | 478 | #endif |
| TMBOY | 47:9e361da97763 | 479 | |
| TMBOY | 47:9e361da97763 | 480 | #ifndef z_off_t |
| TMBOY | 47:9e361da97763 | 481 | # define z_off_t long |
| TMBOY | 47:9e361da97763 | 482 | #endif |
| TMBOY | 47:9e361da97763 | 483 | |
| TMBOY | 47:9e361da97763 | 484 | #if !defined(_WIN32) && defined(Z_LARGE64) |
| TMBOY | 47:9e361da97763 | 485 | # define z_off64_t off64_t |
| TMBOY | 47:9e361da97763 | 486 | #else |
| TMBOY | 47:9e361da97763 | 487 | # if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO) |
| TMBOY | 47:9e361da97763 | 488 | # define z_off64_t __int64 |
| TMBOY | 47:9e361da97763 | 489 | # else |
| TMBOY | 47:9e361da97763 | 490 | # define z_off64_t z_off_t |
| TMBOY | 47:9e361da97763 | 491 | # endif |
| TMBOY | 47:9e361da97763 | 492 | #endif |
| TMBOY | 47:9e361da97763 | 493 | |
| TMBOY | 47:9e361da97763 | 494 | /* MVS linker does not support external names larger than 8 bytes */ |
| TMBOY | 47:9e361da97763 | 495 | #if defined(__MVS__) |
| TMBOY | 47:9e361da97763 | 496 | #pragma map(deflateInit_,"DEIN") |
| TMBOY | 47:9e361da97763 | 497 | #pragma map(deflateInit2_,"DEIN2") |
| TMBOY | 47:9e361da97763 | 498 | #pragma map(deflateEnd,"DEEND") |
| TMBOY | 47:9e361da97763 | 499 | #pragma map(deflateBound,"DEBND") |
| TMBOY | 47:9e361da97763 | 500 | #pragma map(inflateInit_,"ININ") |
| TMBOY | 47:9e361da97763 | 501 | #pragma map(inflateInit2_,"ININ2") |
| TMBOY | 47:9e361da97763 | 502 | #pragma map(inflateEnd,"INEND") |
| TMBOY | 47:9e361da97763 | 503 | #pragma map(inflateSync,"INSY") |
| TMBOY | 47:9e361da97763 | 504 | #pragma map(inflateSetDictionary,"INSEDI") |
| TMBOY | 47:9e361da97763 | 505 | #pragma map(compressBound,"CMBND") |
| TMBOY | 47:9e361da97763 | 506 | #pragma map(inflate_table,"INTABL") |
| TMBOY | 47:9e361da97763 | 507 | #pragma map(inflate_fast,"INFA") |
| TMBOY | 47:9e361da97763 | 508 | #pragma map(inflate_copyright,"INCOPY") |
| TMBOY | 47:9e361da97763 | 509 | #endif |
| TMBOY | 47:9e361da97763 | 510 | |
| TMBOY | 47:9e361da97763 | 511 | #endif /* ZCONF_H */ |
