re GNATS libgcj/226 (implicit __builtin_expect) and GNATS gcj/228 (compressed JAR files)

2000-05-20  Bryce McKinlay  <bryce@albatross.co.nz>

	Fix for PR libgcj/226:
	* java/lang/Class.h (_Jv_InitClass): Don't call __builtin_expect,
	since this is an installed header.

	Fix for PR libgcj/228:
	* java/util/zip/ZipFile (getInputStream): Create inflater with
	nowrapper option.

	* java/util/zip/natInflater.cc (inflate): Throw zlib's error message
	with DataFormatException.

From-SVN: r34064
This commit is contained in:
Bryce McKinlay 2000-05-20 23:30:46 +00:00 committed by Bryce McKinlay
parent dcfa721dcf
commit 1c02a3d964
4 changed files with 21 additions and 4 deletions

View File

@ -1,3 +1,16 @@
2000-05-20 Bryce McKinlay <bryce@albatross.co.nz>
Fix for PR libgcj/226:
* java/lang/Class.h (_Jv_InitClass): Don't call __builtin_expect,
since this is an installed header.
Fix for PR libgcj/228:
* java/util/zip/ZipFile (getInputStream): Create inflater with
nowrapper option.
* java/util/zip/natInflater.cc (inflate): Throw zlib's error message
with DataFormatException.
2000-05-20 Tom Tromey <tromey@cygnus.com>
* Makefile.in: Rebuilt.

View File

@ -206,8 +206,9 @@ private:
inline friend void
_Jv_InitClass (jclass klass)
{
if (__builtin_expect (klass->state != JV_STATE_DONE, false))
klass->initializeClass ();
if (klass->state == JV_STATE_DONE)
return;
klass->initializeClass ();
}
friend _Jv_Method* _Jv_LookupDeclaredMethod (jclass, _Jv_Utf8Const *,

View File

@ -133,7 +133,9 @@ public class ZipFile implements ZipConstants
InputStream is = new ByteArrayInputStream (buffer);
if (ze.getMethod() == ZipEntry.DEFLATED)
is = new InflaterInputStream (is);
// Data in zipfile entries does not have a zlib header, so construct
// an Inflater with the `nowrapper' option.
is = new InflaterInputStream (is, new Inflater (true), 512);
return is;
}

View File

@ -117,7 +117,8 @@ java::util::zip::Inflater::inflate (jbyteArray buf, jint off, jint len)
break;
case Z_DATA_ERROR:
_Jv_Throw (new java::util::zip::DataFormatException);
_Jv_Throw (new java::util::zip::DataFormatException
(s->msg == NULL ? NULL : JvNewStringLatin1 (s->msg)));
break;
case Z_MEM_ERROR: