aboutsummaryrefslogtreecommitdiff
path: root/zlib.h
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2012-08-12 18:08:52 -0700
committerMark Adler <madler@alumni.caltech.edu>2012-08-13 00:02:40 -0700
commit62d6112a7981ad7c34f3b43cffdf00d4662a4f25 (patch)
treeaed93070f7e1be31868dce1d62a1de6ffc1360f9 /zlib.h
parentfb4e0599a5ddaef9eee726f786b9edef4943432b (diff)
downloadzlib-62d6112a7981ad7c34f3b43cffdf00d4662a4f25.tar.gz
zlib-62d6112a7981ad7c34f3b43cffdf00d4662a4f25.tar.bz2
zlib-62d6112a7981ad7c34f3b43cffdf00d4662a4f25.zip
Clean up the usage of z_const and respect const usage within zlib.
This patch allows zlib to compile cleanly with the -Wcast-qual gcc warning enabled, but only if ZLIB_CONST is defined, which adds const to next_in and msg in z_stream and in the in_func prototype. A --const option is added to ./configure which adds -DZLIB_CONST to the compile flags, and adds -Wcast-qual to the compile flags when ZLIBGCCWARN is set in the environment.
Diffstat (limited to 'zlib.h')
-rw-r--r--zlib.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/zlib.h b/zlib.h
index cd47df5..55e3c2c 100644
--- a/zlib.h
+++ b/zlib.h
@@ -1022,7 +1022,8 @@ ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits,
1022 the version of the header file. 1022 the version of the header file.
1023*/ 1023*/
1024 1024
1025typedef unsigned (*in_func) OF((void FAR *, unsigned char FAR * FAR *)); 1025typedef unsigned (*in_func) OF((void FAR *,
1026 z_const unsigned char FAR * FAR *));
1026typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned)); 1027typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned));
1027 1028
1028ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm, 1029ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm,