summaryrefslogtreecommitdiff
path: root/zlib.h
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2011-10-07 01:57:07 -0700
committerMark Adler <madler@alumni.caltech.edu>2011-10-07 02:11:56 -0700
commitf442c1e89e99ae5a0068a2d32e7284c2623f09fd (patch)
tree1bc659f486af707673c36916c4d75ef7f517dece /zlib.h
parent518ad0177ae2f1aaefc49285b3536a6bd8d9973c (diff)
downloadzlib-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 'zlib.h')
-rw-r--r--zlib.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/zlib.h b/zlib.h
index f77b596..96c2c14 100644
--- a/zlib.h
+++ b/zlib.h
@@ -1112,6 +1112,7 @@ ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void));
1112 27-31: 0 (reserved) 1112 27-31: 0 (reserved)
1113 */ 1113 */
1114 1114
1115#ifndef Z_SOLO
1115 1116
1116 /* utility functions */ 1117 /* utility functions */
1117 1118
@@ -1176,7 +1177,6 @@ ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen,
1176 buffer, or Z_DATA_ERROR if the input data was corrupted or incomplete. 1177 buffer, or Z_DATA_ERROR if the input data was corrupted or incomplete.
1177*/ 1178*/
1178 1179
1179
1180 /* gzip file access functions */ 1180 /* gzip file access functions */
1181 1181
1182/* 1182/*
@@ -1501,6 +1501,7 @@ ZEXTERN void ZEXPORT gzclearerr OF((gzFile file));
1501 file that is being written concurrently. 1501 file that is being written concurrently.
1502*/ 1502*/
1503 1503
1504#endif /* !Z_SOLO */
1504 1505
1505 /* checksum functions */ 1506 /* checksum functions */
1506 1507
@@ -1603,6 +1604,8 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
1603 inflateBackInit_((strm), (windowBits), (window), \ 1604 inflateBackInit_((strm), (windowBits), (window), \
1604 ZLIB_VERSION, (int)sizeof(z_stream)) 1605 ZLIB_VERSION, (int)sizeof(z_stream))
1605 1606
1607#ifndef Z_SOLO
1608
1606/* gzgetc() macro and its supporting function and exposed data structure. Note 1609/* gzgetc() macro and its supporting function and exposed data structure. Note
1607 * that the real internal state is much larger than the exposed structure. 1610 * that the real internal state is much larger than the exposed structure.
1608 * This abbreviated structure exposes just enough for the gzgetc() macro. The 1611 * This abbreviated structure exposes just enough for the gzgetc() macro. The
@@ -1667,6 +1670,13 @@ ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file));
1667 ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t)); 1670 ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t));
1668#endif 1671#endif
1669 1672
1673#else /* Z_SOLO */
1674
1675 ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t));
1676 ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t));
1677
1678#endif /* !Z_SOLO */
1679
1670/* hack for buggy compilers */ 1680/* hack for buggy compilers */
1671#if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL) 1681#if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL)
1672 struct internal_state {int dummy;}; 1682 struct internal_state {int dummy;};
@@ -1677,7 +1687,9 @@ ZEXTERN const char * ZEXPORT zError OF((int));
1677ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp)); 1687ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp));
1678ZEXTERN const uLongf * ZEXPORT get_crc_table OF((void)); 1688ZEXTERN const uLongf * ZEXPORT get_crc_table OF((void));
1679ZEXTERN int ZEXPORT inflateUndermine OF((z_streamp, int)); 1689ZEXTERN int ZEXPORT inflateUndermine OF((z_streamp, int));
1680ZEXTERN unsigned long ZEXPORT gzflags OF((void)); 1690#ifndef Z_SOLO
1691 ZEXTERN unsigned long ZEXPORT gzflags OF((void));
1692#endif
1681 1693
1682#ifdef __cplusplus 1694#ifdef __cplusplus
1683} 1695}