(zlib) Some build fixes for Apple

This commit is contained in:
twinaphex 2014-01-11 09:25:59 +01:00
parent b006fcef82
commit 9c2a39f9c9
10 changed files with 13 additions and 13 deletions

View File

@ -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);
}

View File

@ -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: */

View File

@ -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;

View File

@ -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;

View File

@ -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 */

View File

@ -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 */

View File

@ -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;

2
deps/rzlib/unzip.c vendored
View File

@ -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;

2
deps/rzlib/zutil.c vendored
View File

@ -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 */

2
deps/rzlib/zutil.h vendored
View File

@ -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)]