aboutsummaryrefslogtreecommitdiff
path: root/zutil.c
diff options
context:
space:
mode:
Diffstat (limited to 'zutil.c')
-rw-r--r--zutil.c29
1 files changed, 18 insertions, 11 deletions
diff --git a/zutil.c b/zutil.c
index c85e1d5..0ef4f99 100644
--- a/zutil.c
+++ b/zutil.c
@@ -1,6 +1,6 @@
1/* zutil.c -- target dependent utility functions for the compression library 1/* zutil.c -- target dependent utility functions for the compression library
2 * Copyright (C) 1995-2003 Jean-loup Gailly. 2 * Copyright (C) 1995-2003 Jean-loup Gailly.
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$ */ 6/* @(#) $Id$ */
@@ -65,13 +65,19 @@ uLong ZEXPORT zlibCompileFlags()
65#ifdef DEBUG 65#ifdef DEBUG
66 flags += 1 << 8; 66 flags += 1 << 8;
67#endif 67#endif
68#if defined(ASMV) || defined(ASMINF)
69 flags += 1 << 9;
70#endif
71#ifdef ZLIB_WINAPI
72 flags += 1 << 10;
73#endif
68#ifdef BUILDFIXED 74#ifdef BUILDFIXED
69 flags += 1 << 12; 75 flags += 1 << 12;
70#endif 76#endif
71#ifdef DYNAMIC_CRC_TABLE 77#ifdef DYNAMIC_CRC_TABLE
72 flags += 1 << 13; 78 flags += 1 << 13;
73#endif 79#endif
74#ifdef NO_DEFLATE 80#ifdef NO_GZCOMPRESS
75 flags += 1 << 16; 81 flags += 1 << 16;
76#endif 82#endif
77#ifdef NO_GZIP 83#ifdef NO_GZIP
@@ -176,12 +182,12 @@ void zmemzero(dest, len)
176} 182}
177#endif 183#endif
178 184
185
186#ifdef SYS16BIT
187
179#ifdef __TURBOC__ 188#ifdef __TURBOC__
180#if (defined( __BORLANDC__) || !defined(SMALL_MEDIUM)) && !defined(__32BIT__) 189/* Turbo C in 16-bit mode */
181#if !defined(__linux) 190
182/* Small and medium model in Turbo C are for now limited to near allocation
183 * with reduced MAX_WBITS and MAX_MEM_LEVEL
184 */
185# define MY_ZCALLOC 191# define MY_ZCALLOC
186 192
187/* Turbo C malloc() does not allow dynamic allocation of 64K bytes 193/* Turbo C malloc() does not allow dynamic allocation of 64K bytes
@@ -253,12 +259,11 @@ void zcfree (voidpf opaque, voidpf ptr)
253 ptr = opaque; /* just to make some compilers happy */ 259 ptr = opaque; /* just to make some compilers happy */
254 Assert(0, "zcfree: ptr not found"); 260 Assert(0, "zcfree: ptr not found");
255} 261}
256#endif 262
257#endif
258#endif /* __TURBOC__ */ 263#endif /* __TURBOC__ */
259 264
260 265
261#if defined(M_I86) && !defined(__32BIT__) 266#ifdef M_I86
262/* Microsoft C in 16-bit mode */ 267/* Microsoft C in 16-bit mode */
263 268
264# define MY_ZCALLOC 269# define MY_ZCALLOC
@@ -280,7 +285,9 @@ void zcfree (voidpf opaque, voidpf ptr)
280 _hfree(ptr); 285 _hfree(ptr);
281} 286}
282 287
283#endif /* MSC */ 288#endif /* M_I86 */
289
290#endif /* SYS16BIT */
284 291
285 292
286#ifndef MY_ZCALLOC /* Any system without a special alloc function */ 293#ifndef MY_ZCALLOC /* Any system without a special alloc function */