From: hansr Date: Thu, 9 Oct 2014 12:35:50 +0000 (+0200) Subject: Remove legacy 16-bit workarounds X-Git-Tag: 1.9.9-b1~926 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=279e637d951d3101d5509e60f4ca8c39178e3518;p=thirdparty%2Fzlib-ng.git Remove legacy 16-bit workarounds --- diff --git a/compress.c b/compress.c index 6e9762676..9b93ab486 100644 --- a/compress.c +++ b/compress.c @@ -31,10 +31,6 @@ int ZEXPORT compress2 (dest, destLen, source, sourceLen, level) stream.next_in = (z_const Bytef *)source; stream.avail_in = (uInt)sourceLen; -#ifdef MAXSEG_64K - /* Check for source > 64K on 16-bit machine: */ - if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR; -#endif stream.next_out = dest; stream.avail_out = (uInt)*destLen; if ((uLong)stream.avail_out != *destLen) return Z_BUF_ERROR; diff --git a/uncompr.c b/uncompr.c index 242e9493d..ed427db39 100644 --- a/uncompr.c +++ b/uncompr.c @@ -32,9 +32,6 @@ int ZEXPORT uncompress (dest, destLen, source, sourceLen) stream.next_in = (z_const 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; - stream.next_out = dest; stream.avail_out = (uInt)*destLen; if ((uLong)stream.avail_out != *destLen) return Z_BUF_ERROR; diff --git a/zconf.h b/zconf.h index 46662177f..3d6fc37fc 100644 --- a/zconf.h +++ b/zconf.h @@ -203,11 +203,7 @@ /* Maximum value for memLevel in deflateInit2 */ #ifndef MAX_MEM_LEVEL -# ifdef MAXSEG_64K -# define MAX_MEM_LEVEL 8 -# else -# define MAX_MEM_LEVEL 9 -# endif +# define MAX_MEM_LEVEL 9 #endif /* Maximum value for windowBits in deflateInit2 and inflateInit2. diff --git a/zconf.h.cmakein b/zconf.h.cmakein index c5a7638d6..0bd76d8e8 100644 --- a/zconf.h.cmakein +++ b/zconf.h.cmakein @@ -205,11 +205,7 @@ /* Maximum value for memLevel in deflateInit2 */ #ifndef MAX_MEM_LEVEL -# ifdef MAXSEG_64K -# define MAX_MEM_LEVEL 8 -# else -# define MAX_MEM_LEVEL 9 -# endif +# define MAX_MEM_LEVEL 9 #endif /* Maximum value for windowBits in deflateInit2 and inflateInit2. diff --git a/zconf.h.in b/zconf.h.in index 46662177f..3d6fc37fc 100644 --- a/zconf.h.in +++ b/zconf.h.in @@ -203,11 +203,7 @@ /* Maximum value for memLevel in deflateInit2 */ #ifndef MAX_MEM_LEVEL -# ifdef MAXSEG_64K -# define MAX_MEM_LEVEL 8 -# else -# define MAX_MEM_LEVEL 9 -# endif +# define MAX_MEM_LEVEL 9 #endif /* Maximum value for windowBits in deflateInit2 and inflateInit2.