diff options
Diffstat (limited to 'zconf.h')
-rw-r--r-- | zconf.h | 28 |
1 files changed, 22 insertions, 6 deletions
@@ -3,7 +3,7 @@ | |||
3 | * For conditions of distribution and use, see copyright notice in zlib.h | 3 | * For conditions of distribution and use, see copyright notice in zlib.h |
4 | */ | 4 | */ |
5 | 5 | ||
6 | /* $Id: zconf.h,v 1.12 1995/05/03 17:27:12 jloup Exp $ */ | 6 | /* $Id: zconf.h,v 1.18 1996/05/23 16:51:18 me Exp $ */ |
7 | 7 | ||
8 | #ifndef _ZCONF_H | 8 | #ifndef _ZCONF_H |
9 | #define _ZCONF_H | 9 | #define _ZCONF_H |
@@ -37,7 +37,7 @@ | |||
37 | # define Byte z_Byte | 37 | # define Byte z_Byte |
38 | # define uInt z_uInt | 38 | # define uInt z_uInt |
39 | # define uLong z_uLong | 39 | # define uLong z_uLong |
40 | /* # define Bytef z_Bytef */ | 40 | # define Bytef z_Bytef |
41 | # define charf z_charf | 41 | # define charf z_charf |
42 | # define intf z_intf | 42 | # define intf z_intf |
43 | # define uIntf z_uIntf | 43 | # define uIntf z_uIntf |
@@ -128,7 +128,8 @@ | |||
128 | * to define NO_MEMCPY in zutil.h. If you don't need the mixed model, | 128 | * to define NO_MEMCPY in zutil.h. If you don't need the mixed model, |
129 | * just define FAR to be empty. | 129 | * just define FAR to be empty. |
130 | */ | 130 | */ |
131 | #if defined(M_I86SM) || defined(M_I86MM) /* MSC small or medium model */ | 131 | #if (defined(M_I86SM) || defined(M_I86MM)) && !defined(__32BIT__) |
132 | /* MSC small or medium model */ | ||
132 | # define SMALL_MEDIUM | 133 | # define SMALL_MEDIUM |
133 | # ifdef _MSC_VER | 134 | # ifdef _MSC_VER |
134 | # define FAR __far | 135 | # define FAR __far |
@@ -137,14 +138,16 @@ | |||
137 | # endif | 138 | # endif |
138 | #endif | 139 | #endif |
139 | #if defined(__BORLANDC__) && (defined(__SMALL__) || defined(__MEDIUM__)) | 140 | #if defined(__BORLANDC__) && (defined(__SMALL__) || defined(__MEDIUM__)) |
141 | # ifndef __32BIT__ | ||
140 | # define SMALL_MEDIUM | 142 | # define SMALL_MEDIUM |
141 | # define FAR __far | 143 | # define FAR __far |
144 | # endif | ||
142 | #endif | 145 | #endif |
143 | #ifndef FAR | 146 | #ifndef FAR |
144 | # define FAR | 147 | # define FAR |
145 | #endif | 148 | #endif |
146 | /* The Watcom compiler defines M_I86SM and __SMALL__ even in 32 bit mode */ | 149 | /* The Watcom compiler defines M_I86SM and __SMALL__ even in 32 bit mode */ |
147 | #if defined(__WATCOMC__) && defined(__386__) | 150 | #if defined(__WATCOMC__) && defined(__386__) && defined(SMALL_MEDIUM) |
148 | # undef FAR | 151 | # undef FAR |
149 | # define FAR | 152 | # define FAR |
150 | # undef SMALL_MEDIUM | 153 | # undef SMALL_MEDIUM |
@@ -154,8 +157,12 @@ typedef unsigned char Byte; /* 8 bits */ | |||
154 | typedef unsigned int uInt; /* 16 bits or more */ | 157 | typedef unsigned int uInt; /* 16 bits or more */ |
155 | typedef unsigned long uLong; /* 32 bits or more */ | 158 | typedef unsigned long uLong; /* 32 bits or more */ |
156 | 159 | ||
157 | /* "typedef Byte FAR Bytef;" doesn't work with Borland C/C++ */ | 160 | #if defined(__BORLANDC__) && defined(SMALL_MEDIUM) |
158 | #define Bytef Byte FAR | 161 | /* Borland C/C++ ignores FAR inside typedef */ |
162 | # define Bytef Byte FAR | ||
163 | #else | ||
164 | typedef Byte FAR Bytef; | ||
165 | #endif | ||
159 | typedef char FAR charf; | 166 | typedef char FAR charf; |
160 | typedef int FAR intf; | 167 | typedef int FAR intf; |
161 | typedef uInt FAR uIntf; | 168 | typedef uInt FAR uIntf; |
@@ -169,4 +176,13 @@ typedef uLong FAR uLongf; | |||
169 | typedef Byte *voidp; | 176 | typedef Byte *voidp; |
170 | #endif | 177 | #endif |
171 | 178 | ||
179 | |||
180 | /* Compile with -DZLIB_DLL for Windows DLL support */ | ||
181 | #if (defined(_WINDOWS) || defined(WINDOWS)) && defined(ZLIB_DLL) | ||
182 | # include <windows.h> | ||
183 | # define EXPORT WINAPI | ||
184 | #else | ||
185 | # define EXPORT | ||
186 | #endif | ||
187 | |||
172 | #endif /* _ZCONF_H */ | 188 | #endif /* _ZCONF_H */ |