other bug fixes from the 1.5.0 jdk src.
This commit is contained in:
kurt 2005-08-10 22:36:26 +00:00
parent 5fde06cb73
commit 3a793e5c14
6 changed files with 101 additions and 6 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.13 2005/07/14 17:29:08 kurt Exp $
# $OpenBSD: Makefile,v 1.14 2005/08/10 22:36:26 kurt Exp $
# $FreeBSD: ports/java/jdk12/Makefile,v 1.11 2002/08/19 20:47:04 glewis Exp $
ONLY_FOR_ARCHS= arm i386 powerpc
@ -7,8 +7,8 @@ COMMENT= "Java2(TM) Standard Edition Dev Kit v${V}"
COMMENT-jre= "Java2(TM) Standard Edition Runtime Environment v${V}"
V= 1.3.1
DISTNAME= j2sdk-1_3_1-src
PKGNAME= jdk-${V}p1
PKGNAME-jre= jre-${V}p1
PKGNAME= jdk-${V}p2
PKGNAME-jre= jre-${V}p2
CATEGORIES= devel/jdk java

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-j2sdk1_3_1_make_java_verify_Makefile,v 1.1 2004/06/02 15:23:20 sturm Exp $
--- j2sdk1.3.1/make/java/verify/Makefile.orig 2004-05-30 16:54:51.000000000 -0400
+++ j2sdk1.3.1/make/java/verify/Makefile 2004-05-30 16:55:11.000000000 -0400
$OpenBSD: patch-j2sdk1_3_1_make_java_verify_Makefile,v 1.2 2005/08/10 22:36:27 kurt Exp $
--- j2sdk1.3.1/make/java/verify/Makefile.orig Tue Aug 9 18:15:58 2005
+++ j2sdk1.3.1/make/java/verify/Makefile Tue Aug 9 18:16:01 2005
@@ -29,7 +29,7 @@ endif
# We want to privatize libverify.so internals.
#

View File

@ -0,0 +1,43 @@
$OpenBSD: patch-j2sdk1_3_1_src_share_native_java_util_zip_zlib-1_1_3_infblock_c,v 1.1 2005/08/10 22:36:27 kurt Exp $
--- j2sdk1.3.1/src/share/native/java/util/zip/zlib-1.1.3/infblock.c.orig Sun May 6 08:20:27 2001
+++ j2sdk1.3.1/src/share/native/java/util/zip/zlib-1.1.3/infblock.c Tue Aug 9 18:20:33 2005
@@ -249,10 +249,13 @@ int r;
&s->sub.trees.tb, s->hufts, z);
if (t != Z_OK)
{
- ZFREE(z, s->sub.trees.blens);
+
r = t;
if (r == Z_DATA_ERROR)
+ {
+ ZFREE(z, s->sub.trees.blens);
s->mode = BAD;
+ }
LEAVE
}
s->sub.trees.index = 0;
@@ -313,11 +316,14 @@ int r;
t = inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f),
s->sub.trees.blens, &bl, &bd, &tl, &td,
s->hufts, z);
- ZFREE(z, s->sub.trees.blens);
+
if (t != Z_OK)
{
if (t == (uInt)Z_DATA_ERROR)
- s->mode = BAD;
+ {
+ ZFREE(z, s->sub.trees.blens);
+ s->mode = BAD;
+ }
r = t;
LEAVE
}
@@ -329,6 +335,7 @@ int r;
}
s->sub.decode.codes = c;
}
+ ZFREE(z, s->sub.trees.blens);
s->mode = CODES;
case CODES:
UPDATE

View File

@ -0,0 +1,15 @@
$OpenBSD: patch-j2sdk1_3_1_src_share_native_java_util_zip_zlib-1_1_3_inflate_c,v 1.1 2005/08/10 22:36:27 kurt Exp $
--- j2sdk1.3.1/src/share/native/java/util/zip/zlib-1.1.3/inflate.c.orig Sun May 6 08:20:31 2001
+++ j2sdk1.3.1/src/share/native/java/util/zip/zlib-1.1.3/inflate.c Tue Aug 9 18:20:33 2005
@@ -231,6 +231,11 @@ int f;
return r;
r = f;
inflate_blocks_reset(z->state->blocks, z, &z->state->sub.check.was);
+
+ /* zlib.h inflate() doc states that z->adler contains a checksum
+ of all uncompressed output even when returning Z_STREAM_END. */
+ z->adler = z->state->sub.check.was;
+
if (z->state->nowrap)
{
z->state->mode = DONE;

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-j2sdk1_3_1_src_share_native_java_util_zip_zlib-1_1_3_inftrees_c,v 1.1 2005/08/10 22:36:27 kurt Exp $
--- j2sdk1.3.1/src/share/native/java/util/zip/zlib-1.1.3/inftrees.c.orig Sun May 6 08:20:30 2001
+++ j2sdk1.3.1/src/share/native/java/util/zip/zlib-1.1.3/inftrees.c Tue Aug 9 18:20:33 2005
@@ -214,7 +214,7 @@ uIntf *v; /* working area:
/* compute minimum size table less than or equal to l bits */
z = g - w;
- z = z > (uInt)l ? l : z; /* table size upper limit */
+ z = z > (uInt)l ? (uInt)l : z; /* table size upper limit */
if ((f = 1 << (j = k - w)) > a + 1) /* try a k-w bit table */
{ /* too few codes for k-w bit table */
f -= a + 1; /* deduct codes from patterns left */

View File

@ -0,0 +1,25 @@
$OpenBSD: patch-j2sdk1_3_1_src_share_native_java_util_zip_zlib-1_1_3_zconf_h,v 1.1 2005/08/10 22:36:27 kurt Exp $
--- j2sdk1.3.1/src/share/native/java/util/zip/zlib-1.1.3/zconf.h.orig Sun May 6 08:20:35 2001
+++ j2sdk1.3.1/src/share/native/java/util/zip/zlib-1.1.3/zconf.h Tue Aug 9 18:20:33 2005
@@ -8,6 +8,9 @@
#ifndef _ZCONF_H
#define _ZCONF_H
+/* for _LP64 */
+#include <sys/types.h>
+
/*
* If you *really* need a unique prefix for all types and library functions,
* compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
@@ -214,7 +217,11 @@
typedef unsigned char Byte; /* 8 bits */
#endif
typedef unsigned int uInt; /* 16 bits or more */
+#ifdef _LP64
+typedef unsigned int uLong; /* 32 bits or more */
+#else
typedef unsigned long uLong; /* 32 bits or more */
+#endif
#ifdef SMALL_MEDIUM
/* Borland C/C++ and some old MSC versions ignore FAR inside typedef */