Commit 5ab9f47745fe9353291b217f705086b6070575d5

Mark Adler 2011-10-18T23:05:37

Add #define ZLIB_CONST option to use const in the z_stream interface. This permits compilers to check for the proper treatment of next_in and msg in the z_stream structure. This is an option instead of the default in order to preserve backward compatibility. Some applications make use of the z_stream structure outside of zlib, and perform operations such as free(strm->next_in), which would not be permitted when next_in is const. The #define ZLIB_CONST needs to precede the #include "zlib.h">, in order to make next_in and msg const pointers in the z_stream type.