-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add workaround for regression in java's jar util; rel 2
see madler/zlib#613
- Loading branch information
Showing
2 changed files
with
28 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
diff --git a/crc32.c b/crc32.c | ||
index a1bdce5..748b7ba 100644 | ||
--- a/crc32.c | ||
+++ b/crc32.c | ||
@@ -19,6 +19,7 @@ | ||
MAKECRCH can be #defined to write out crc32.h. A main() routine is also | ||
produced, so that this one source file can be compiled to an executable. | ||
*/ | ||
+#include <limits.h> | ||
|
||
#ifdef MAKECRCH | ||
# include <stdio.h> | ||
@@ -1065,7 +1066,12 @@ unsigned long ZEXPORT crc32(crc, buf, len) | ||
const unsigned char FAR *buf; | ||
uInt len; | ||
{ | ||
+/* if sizeof(unsigned long) > 4 */ | ||
+#if ULONG_MAX > 0xffffffffUL | ||
+ return crc32_z(crc & 0xffffffffUL, buf, len); | ||
+#else | ||
return crc32_z(crc, buf, len); | ||
+#endif | ||
} | ||
|
||
/* ========================================================================= */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters