From 9c2a39f9c94bdcdcc7527aa235e98d1304033c1d Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 11 Jan 2014 09:25:59 +0100 Subject: [PATCH] (zlib) Some build fixes for Apple --- deps/rzlib/adler32.c | 4 ++-- deps/rzlib/compress.c | 2 +- deps/rzlib/deflate.c | 4 ++-- deps/rzlib/gzwrite.c | 2 +- deps/rzlib/inffast.c | 4 ++-- deps/rzlib/inflate.c | 2 +- deps/rzlib/uncompr.c | 2 +- deps/rzlib/unzip.c | 2 +- deps/rzlib/zutil.c | 2 +- deps/rzlib/zutil.h | 2 +- 10 files changed, 13 insertions(+), 13 deletions(-) diff --git a/deps/rzlib/adler32.c b/deps/rzlib/adler32.c index eeadf98d08..328449d5e1 100644 --- a/deps/rzlib/adler32.c +++ b/deps/rzlib/adler32.c @@ -156,12 +156,12 @@ local uLong adler32_combine_(uLong adler1, uLong adler2, z_off64_t len2) } /* ========================================================================= */ -uLong ZEXPORT adler32_combine(uLong adler1, uLong adler2, z_off_t len2) +uLong adler32_combine(uLong adler1, uLong adler2, z_off_t len2) { return adler32_combine_(adler1, adler2, len2); } -uLong ZEXPORT adler32_combine64(uLong adler1, uLong adler2, z_off64_t len2) +uLong adler32_combine64(uLong adler1, uLong adler2, z_off64_t len2) { return adler32_combine_(adler1, adler2, len2); } diff --git a/deps/rzlib/compress.c b/deps/rzlib/compress.c index b161b05ddd..20e374b738 100644 --- a/deps/rzlib/compress.c +++ b/deps/rzlib/compress.c @@ -24,7 +24,7 @@ int ZEXPORT compress2 (Bytef *dest, uLongf *destLen, const Bytef *source, uLong z_stream stream; int err; - stream.next_in = (z_const Bytef *)source; + stream.next_in = (Bytef *)source; stream.avail_in = (uInt)sourceLen; #ifdef MAXSEG_64K /* Check for source > 64K on 16-bit machine: */ diff --git a/deps/rzlib/deflate.c b/deps/rzlib/deflate.c index 15bfef9552..772d0b5aac 100644 --- a/deps/rzlib/deflate.c +++ b/deps/rzlib/deflate.c @@ -310,7 +310,7 @@ int ZEXPORT deflateSetDictionary (z_streamp strm, const Bytef *dictionary, uInt uInt str, n; int wrap; unsigned avail; - z_const unsigned char *next; + unsigned char *next; if (strm == Z_NULL || strm->state == Z_NULL || dictionary == Z_NULL) return Z_STREAM_ERROR; @@ -340,7 +340,7 @@ int ZEXPORT deflateSetDictionary (z_streamp strm, const Bytef *dictionary, uInt avail = strm->avail_in; next = strm->next_in; strm->avail_in = dictLength; - strm->next_in = (z_const Bytef *)dictionary; + strm->next_in = (Bytef *)dictionary; fill_window(s); while (s->lookahead >= MIN_MATCH) { str = s->strstart; diff --git a/deps/rzlib/gzwrite.c b/deps/rzlib/gzwrite.c index 2f3d4260d8..9ee2af66e9 100644 --- a/deps/rzlib/gzwrite.c +++ b/deps/rzlib/gzwrite.c @@ -223,7 +223,7 @@ int ZEXPORT gzwrite(gzFile file, voidpc buf, unsigned len) /* directly compress user buffer to file */ strm->avail_in = len; - strm->next_in = (z_const Bytef *)buf; + strm->next_in = (Bytef *)buf; state->x.pos += len; if (gz_comp(state, Z_NO_FLUSH) == -1) return 0; diff --git a/deps/rzlib/inffast.c b/deps/rzlib/inffast.c index 6c1e9de3b0..690b156c3c 100644 --- a/deps/rzlib/inffast.c +++ b/deps/rzlib/inffast.c @@ -67,8 +67,8 @@ void ZLIB_INTERNAL inflate_fast(z_streamp strm, unsigned start) { struct inflate_state FAR *state; - z_const unsigned char FAR *in; /* local strm->next_in */ - z_const unsigned char FAR *last; /* have enough input while in < last */ + unsigned char FAR *in; /* local strm->next_in */ + unsigned char FAR *last; /* have enough input while in < last */ unsigned char FAR *out; /* local strm->next_out */ unsigned char FAR *beg; /* inflate()'s initial strm->next_out */ unsigned char FAR *end; /* while out < end, enough space available */ diff --git a/deps/rzlib/inflate.c b/deps/rzlib/inflate.c index a07345093d..b65283ac45 100644 --- a/deps/rzlib/inflate.c +++ b/deps/rzlib/inflate.c @@ -587,7 +587,7 @@ local int updatewindow(z_streamp strm, const Bytef *end, unsigned copy) int ZEXPORT inflate(z_streamp strm, int flush) { struct inflate_state FAR *state; - z_const unsigned char FAR *next; /* next input */ + unsigned char FAR *next; /* next input */ unsigned char FAR *put; /* next output */ unsigned have, left; /* available input and output */ unsigned long hold; /* bit buffer */ diff --git a/deps/rzlib/uncompr.c b/deps/rzlib/uncompr.c index 606cbe22fe..76a424aaea 100644 --- a/deps/rzlib/uncompr.c +++ b/deps/rzlib/uncompr.c @@ -26,7 +26,7 @@ int ZEXPORT uncompress (Bytef *dest, uLongf *destLen, const Bytef *source, uLong z_stream stream; int err; - stream.next_in = (z_const Bytef *)source; + stream.next_in = (Bytef *)source; stream.avail_in = (uInt)sourceLen; /* Check for source > 64K on 16-bit machine: */ if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR; diff --git a/deps/rzlib/unzip.c b/deps/rzlib/unzip.c index 0689c99c18..0b94c13e6a 100644 --- a/deps/rzlib/unzip.c +++ b/deps/rzlib/unzip.c @@ -1696,7 +1696,7 @@ extern int ZEXPORT unzReadCurrentFile (unzFile file, voidp buf, unsigned len) return UNZ_PARAMERROR; - if ((pfile_in_zip_read_info->read_buffer == NULL)) + if (pfile_in_zip_read_info->read_buffer == NULL) return UNZ_END_OF_LIST_OF_FILE; if (len==0) return 0; diff --git a/deps/rzlib/zutil.c b/deps/rzlib/zutil.c index 41ad02ca29..822556f1c9 100644 --- a/deps/rzlib/zutil.c +++ b/deps/rzlib/zutil.c @@ -10,7 +10,7 @@ # include "gzguts.h" #endif -z_const char * const z_errmsg[10] = { +char * const z_errmsg[10] = { "need dictionary", /* Z_NEED_DICT 2 */ "stream end", /* Z_STREAM_END 1 */ "", /* Z_OK 0 */ diff --git a/deps/rzlib/zutil.h b/deps/rzlib/zutil.h index 24ab06b1cf..5c6929f40b 100644 --- a/deps/rzlib/zutil.h +++ b/deps/rzlib/zutil.h @@ -44,7 +44,7 @@ typedef unsigned short ush; typedef ush FAR ushf; typedef unsigned long ulg; -extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ +extern char * const z_errmsg[10]; /* indexed by 2-zlib_error */ /* (size given to avoid silly warnings with Visual C++) */ #define ERR_MSG(err) z_errmsg[Z_NEED_DICT-(err)]