diff options
author | Mark Adler <madler@alumni.caltech.edu> | 2011-10-07 01:57:07 -0700 |
---|---|---|
committer | Mark Adler <madler@alumni.caltech.edu> | 2011-10-07 02:11:56 -0700 |
commit | f442c1e89e99ae5a0068a2d32e7284c2623f09fd (patch) | |
tree | 1bc659f486af707673c36916c4d75ef7f517dece /zutil.c | |
parent | 518ad0177ae2f1aaefc49285b3536a6bd8d9973c (diff) | |
download | zlib-f442c1e89e99ae5a0068a2d32e7284c2623f09fd.tar.gz zlib-f442c1e89e99ae5a0068a2d32e7284c2623f09fd.tar.bz2 zlib-f442c1e89e99ae5a0068a2d32e7284c2623f09fd.zip |
Add a ./config --solo option to make zlib subset with no libary use
A common request has been the ability to compile zlib to require no
other libraries. This --solo option provides that ability. The price
is that the gz*, compress*, and uncompress functions are eliminated,
and that the user must provide memory allocation and free routines to
deflate and inflate when initializing.
Diffstat (limited to 'zutil.c')
-rw-r--r-- | zutil.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -85,7 +85,11 @@ uLong ZEXPORT zlibCompileFlags() | |||
85 | #ifdef FASTEST | 85 | #ifdef FASTEST |
86 | flags += 1L << 21; | 86 | flags += 1L << 21; |
87 | #endif | 87 | #endif |
88 | #ifdef Z_SOLO | ||
89 | return flags; | ||
90 | #else | ||
88 | return flags + gzflags(); | 91 | return flags + gzflags(); |
92 | #endif | ||
89 | } | 93 | } |
90 | 94 | ||
91 | #ifdef DEBUG | 95 | #ifdef DEBUG |
@@ -157,6 +161,7 @@ void ZLIB_INTERNAL zmemzero(dest, len) | |||
157 | } | 161 | } |
158 | #endif | 162 | #endif |
159 | 163 | ||
164 | #ifndef Z_SOLO | ||
160 | 165 | ||
161 | #ifdef SYS16BIT | 166 | #ifdef SYS16BIT |
162 | 167 | ||
@@ -292,3 +297,5 @@ void ZLIB_INTERNAL zcfree (opaque, ptr) | |||
292 | } | 297 | } |
293 | 298 | ||
294 | #endif /* MY_ZCALLOC */ | 299 | #endif /* MY_ZCALLOC */ |
300 | |||
301 | #endif /* !Z_SOLO */ | ||