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.
This commit is contained in:
7
zutil.c
7
zutil.c
@@ -85,7 +85,11 @@ uLong ZEXPORT zlibCompileFlags()
|
||||
#ifdef FASTEST
|
||||
flags += 1L << 21;
|
||||
#endif
|
||||
#ifdef Z_SOLO
|
||||
return flags;
|
||||
#else
|
||||
return flags + gzflags();
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
@@ -157,6 +161,7 @@ void ZLIB_INTERNAL zmemzero(dest, len)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef Z_SOLO
|
||||
|
||||
#ifdef SYS16BIT
|
||||
|
||||
@@ -292,3 +297,5 @@ void ZLIB_INTERNAL zcfree (opaque, ptr)
|
||||
}
|
||||
|
||||
#endif /* MY_ZCALLOC */
|
||||
|
||||
#endif /* !Z_SOLO */
|
||||
|
||||
Reference in New Issue
Block a user