diff options
Diffstat (limited to 'zconf.h')
-rw-r--r-- | zconf.h | 71 |
1 files changed, 49 insertions, 22 deletions
@@ -91,8 +91,8 @@ | |||
91 | # define NO_DUMMY_DECL | 91 | # define NO_DUMMY_DECL |
92 | #endif | 92 | #endif |
93 | 93 | ||
94 | /* Borland C incorrectly complains about missing returns: */ | 94 | /* Old Borland C incorrectly complains about missing returns: */ |
95 | #if defined(__BORLANDC__) | 95 | #if defined(__BORLANDC__) && (__BORLANDC__ < 0x500) |
96 | # define NEED_DUMMY_RETURN | 96 | # define NEED_DUMMY_RETURN |
97 | #endif | 97 | #endif |
98 | 98 | ||
@@ -148,7 +148,7 @@ | |||
148 | /* MSC small or medium model */ | 148 | /* MSC small or medium model */ |
149 | # define SMALL_MEDIUM | 149 | # define SMALL_MEDIUM |
150 | # ifdef _MSC_VER | 150 | # ifdef _MSC_VER |
151 | # define FAR __far | 151 | # define FAR _far |
152 | # else | 152 | # else |
153 | # define FAR far | 153 | # define FAR far |
154 | # endif | 154 | # endif |
@@ -156,42 +156,68 @@ | |||
156 | #if defined(__BORLANDC__) && (defined(__SMALL__) || defined(__MEDIUM__)) | 156 | #if defined(__BORLANDC__) && (defined(__SMALL__) || defined(__MEDIUM__)) |
157 | # ifndef __32BIT__ | 157 | # ifndef __32BIT__ |
158 | # define SMALL_MEDIUM | 158 | # define SMALL_MEDIUM |
159 | # define FAR __far | 159 | # define FAR _far |
160 | # endif | 160 | # endif |
161 | #endif | 161 | #endif |
162 | 162 | ||
163 | /* Compile with -DZLIB_DLL for Windows DLL support */ | 163 | /* Compile with -DZLIB_DLL for Windows DLL support */ |
164 | #if (defined(_WINDOWS) || defined(WINDOWS)) && defined(ZLIB_DLL) | 164 | #if defined(ZLIB_DLL) |
165 | # ifdef FAR | 165 | # if defined(_WINDOWS) || defined(WINDOWS) |
166 | # undef FAR | 166 | # ifdef FAR |
167 | # undef FAR | ||
168 | # endif | ||
169 | # include <windows.h> | ||
170 | # define ZEXPORT WINAPI | ||
171 | # ifdef WIN32 | ||
172 | # define ZEXPORTVA WINAPIV | ||
173 | # else | ||
174 | # define ZEXPORTVA FAR _cdecl _export | ||
175 | # endif | ||
167 | # endif | 176 | # endif |
168 | # include <windows.h> | 177 | # if defined (__BORLANDC__) |
169 | # define ZEXPORT WINAPI | 178 | # if (__BORLANDC__ >= 0x0500) && defined (WIN32) |
170 | # ifdef WIN32 | 179 | # include <windows.h> |
171 | # define ZEXPORTVA WINAPIV | 180 | # define ZEXPORT __declspec(dllexport) WINAPI |
181 | # define ZEXPORTRVA __declspec(dllexport) WINAPIV | ||
182 | # else | ||
183 | # if defined (_Windows) && defined (__DLL__) | ||
184 | # define ZEXPORT _export | ||
185 | # define ZEXPORTVA _export | ||
186 | # endif | ||
187 | # endif | ||
188 | # endif | ||
189 | #endif | ||
190 | |||
191 | #if defined (__BEOS__) | ||
192 | # if defined (ZLIB_DLL) | ||
193 | # define ZEXTERN extern __declspec(dllexport) | ||
172 | # else | 194 | # else |
173 | # define ZEXPORTVA FAR _cdecl _export | 195 | # define ZEXTERN extern __declspec(dllimport) |
174 | # endif | 196 | # endif |
175 | #else | 197 | #endif |
176 | # if defined (__BORLANDC__) && defined (_Windows) && defined (__DLL__) | 198 | |
177 | # define ZEXPORT _export | 199 | #ifndef ZEXPORT |
178 | # define ZEXPORTVA _export | 200 | # define ZEXPORT |
179 | # else | 201 | #endif |
180 | # define ZEXPORT | 202 | #ifndef ZEXPORTVA |
181 | # define ZEXPORTVA | 203 | # define ZEXPORTVA |
182 | # endif | 204 | #endif |
205 | #ifndef ZEXTERN | ||
206 | # define ZEXTERN extern | ||
183 | #endif | 207 | #endif |
184 | 208 | ||
185 | #ifndef FAR | 209 | #ifndef FAR |
186 | # define FAR | 210 | # define FAR |
187 | #endif | 211 | #endif |
188 | 212 | ||
213 | #if !defined(MACOS) && !defined(TARGET_OS_MAC) | ||
189 | typedef unsigned char Byte; /* 8 bits */ | 214 | typedef unsigned char Byte; /* 8 bits */ |
215 | #endif | ||
190 | typedef unsigned int uInt; /* 16 bits or more */ | 216 | typedef unsigned int uInt; /* 16 bits or more */ |
191 | typedef unsigned long uLong; /* 32 bits or more */ | 217 | typedef unsigned long uLong; /* 32 bits or more */ |
192 | 218 | ||
193 | #if defined(__BORLANDC__) && defined(SMALL_MEDIUM) | 219 | #ifdef SMALL_MEDIUM |
194 | /* Borland C/C++ ignores FAR inside typedef */ | 220 | /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */ |
195 | # define Bytef Byte FAR | 221 | # define Bytef Byte FAR |
196 | #else | 222 | #else |
197 | typedef Byte FAR Bytef; | 223 | typedef Byte FAR Bytef; |
@@ -217,6 +243,7 @@ typedef uLong FAR uLongf; | |||
217 | #ifndef SEEK_SET | 243 | #ifndef SEEK_SET |
218 | # define SEEK_SET 0 /* Seek from beginning of file. */ | 244 | # define SEEK_SET 0 /* Seek from beginning of file. */ |
219 | # define SEEK_CUR 1 /* Seek from current position. */ | 245 | # define SEEK_CUR 1 /* Seek from current position. */ |
246 | # define SEEK_END 2 /* Set file pointer to EOF plus "offset" */ | ||
220 | #endif | 247 | #endif |
221 | #ifndef z_off_t | 248 | #ifndef z_off_t |
222 | # define z_off_t long | 249 | # define z_off_t long |