]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Remove legacy 16-bit workarounds
authorhansr <hk-git@circlestorm.org>
Thu, 9 Oct 2014 12:35:50 +0000 (14:35 +0200)
committerhansr <hk-git@circlestorm.org>
Thu, 9 Oct 2014 12:35:50 +0000 (14:35 +0200)
compress.c
uncompr.c
zconf.h
zconf.h.cmakein
zconf.h.in

index 6e9762676a0d052ac224b72dac12f2b5ffffaba5..9b93ab486422195af2c7e4cf9ec08f7ca5f30115 100644 (file)
@@ -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;
index 242e9493dff5c26d7f06104b6dd1ca22d8201215..ed427db395847b9f69d15c625a2e743b1d6deabf 100644 (file)
--- 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 46662177f60ff19394406b622f0d25223fa18dd7..3d6fc37fc6327da78c64a7507d9f9c8e50f44cd6 100644 (file)
--- a/zconf.h
+++ b/zconf.h
 
 /* 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.
index c5a7638d6cf413ccfd2b7b120ee27abc0b78d40f..0bd76d8e814a0b2ec2b49a4dcd3df0c47dcbe183 100644 (file)
 
 /* 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.
index 46662177f60ff19394406b622f0d25223fa18dd7..3d6fc37fc6327da78c64a7507d9f9c8e50f44cd6 100644 (file)
 
 /* 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.