annotate zlib/zconf.h @ 1929:c7e3e3ebb64a

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