diff options
author | Hans Kristian Rosbach <hk-git@circlestorm.org> | 2018-01-31 10:24:35 +0100 |
---|---|---|
committer | Hans Kristian Rosbach <hk-git@circlestorm.org> | 2018-01-31 10:45:29 +0100 |
commit | f5e888a6a6763da6570c95eac78f1436b6d78494 (patch) | |
tree | e109b39712572ed03f9a3f8484df1d73931ef86a /infback.c | |
parent | dfdb082b2fd190b7d3a1cec966cf8c82d0e98458 (diff) |
Add function prefix (zng_) to all exported functions to allow zlib-ng
to co-exist in an application that has been linked to something that
depends on stock zlib. Previously, that would cause random problems
since there is no way to guarantee what zlib version is being used
for each dynamically linked function.
Add the corresponding zlib-ng.h.
Tests, example and minigzip will not compile before they have been
adapted to use the correct functions as well.
Either duplicate them, so we have minigzip-ng.c for example, or add
compile-time detection in the source code.
Diffstat (limited to 'infback.c')
-rw-r--r-- | infback.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -25,7 +25,7 @@ static void fixedtables(struct inflate_state *state); windowBits is in the range 8..15, and window is a user-supplied window and output buffer that is 2**windowBits bytes. */ -int ZEXPORT inflateBackInit_(z_stream *strm, int windowBits, unsigned char *window, +int ZEXPORT PREFIX(inflateBackInit_)(z_stream *strm, int windowBits, unsigned char *window, const char *version, int stream_size) { struct inflate_state *state; @@ -230,7 +230,7 @@ static void fixedtables(struct inflate_state *state) { inflateBack() can also return Z_STREAM_ERROR if the input parameters are not correct, i.e. strm is NULL or the state was not initialized. */ -int ZEXPORT inflateBack(z_stream *strm, in_func in, void *in_desc, out_func out, void *out_desc) { +int ZEXPORT PREFIX(inflateBack)(z_stream *strm, in_func in, void *in_desc, out_func out, void *out_desc) { struct inflate_state *state; const unsigned char *next; /* next input */ unsigned char *put; /* next output */ @@ -602,7 +602,7 @@ int ZEXPORT inflateBack(z_stream *strm, in_func in, void *in_desc, out_func out, return ret; } -int ZEXPORT inflateBackEnd(z_stream *strm) { +int ZEXPORT PREFIX(inflateBackEnd)(z_stream *strm) { if (strm == NULL || strm->state == NULL || strm->zfree == NULL) return Z_STREAM_ERROR; ZFREE(strm, strm->state); |