/hg/icedtea: Make CACAO build (although it doesn't yet bootstrap).
andrew at icedtea.classpath.org
andrew at icedtea.classpath.org
Tue May 11 06:05:39 PDT 2010
changeset 0e1f42ea40cf in /hg/icedtea
details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=0e1f42ea40cf
author: Andrew John Hughes <ahughes at redhat.com>
date: Tue May 11 14:05:30 2010 +0100
Make CACAO build (although it doesn't yet bootstrap).
2010-05-11 Andrew John Hughes <ahughes at redhat.com>
Fix issues with the CACAO build so it at least
builds again (though it still fails to bootstrap).
* patches/icedtea-plugin.patch,
* patches/icedtea-webservices.patch: Remove unused patches.
* Makefile.am: Add new patches.
* patches/cacao/no-strict-aliasing.patch: Always append -fno-
strict-aliasing, even if CFLAGS are specified. Otherwise, a
broken CACAO results.
* patches/cacao/ignore-tests.patch: Regenerated against b89.
* patches/cacao/6714758.patch: Add JVM_FindClassFromBootLoader
introduced by 6714758 and modified in 6864003.
http://server.complang.tuwien.ac.at/cgi-
bin/bugzilla/show_bug.cgi?id=137
* patches/cacao/jsig.patch: Place fake libjsig.so in correct
location for HotSpot 17+.
* patches/sh4-support.patch: Regenerated against b89.
diffstat:
9 files changed, 158 insertions(+), 2757 deletions(-)
ChangeLog | 25
Makefile.am | 8
patches/cacao/6714758.patch | 39
patches/cacao/ignore-tests.patch | 7
patches/cacao/jsig.patch | 36
patches/cacao/no-strict-aliasing.patch | 30
patches/icedtea-plugin.patch | 1301 -----------------------------
patches/icedtea-webservices.patch | 1401 --------------------------------
patches/sh4-support.patch | 68 -
diffs (truncated from 3006 to 500 lines):
diff -r 549c87a321e0 -r 0e1f42ea40cf ChangeLog
--- a/ChangeLog Mon May 10 18:05:11 2010 +0100
+++ b/ChangeLog Tue May 11 14:05:30 2010 +0100
@@ -1,4 +1,27 @@ 2009-01-11 Nobuhiro Iwamatsu <iwamatsu@
-2009-01-11 Nobuhiro Iwamatsu <iwamatsu at nigauri.org>
+2010-05-11 Andrew John Hughes <ahughes at redhat.com>
+
+ Fix issues with the CACAO build so it at
+ least builds again (though it still fails to
+ bootstrap).
+ * patches/icedtea-plugin.patch,
+ * patches/icedtea-webservices.patch:
+ Remove unused patches.
+ * Makefile.am: Add new patches.
+ * patches/cacao/no-strict-aliasing.patch:
+ Always append -fno-strict-aliasing, even if CFLAGS
+ are specified. Otherwise, a broken CACAO results.
+ * patches/cacao/ignore-tests.patch:
+ Regenerated against b89.
+ * patches/cacao/6714758.patch:
+ Add JVM_FindClassFromBootLoader introduced by
+ 6714758 and modified in 6864003.
+ http://server.complang.tuwien.ac.at/cgi-bin/bugzilla/show_bug.cgi?id=137
+ * patches/cacao/jsig.patch:
+ Place fake libjsig.so in correct location for HotSpot 17+.
+ * patches/sh4-support.patch:
+ Regenerated against b89.
+
+2010-01-11 Nobuhiro Iwamatsu <iwamatsu at nigauri.org>
Matthias Klose <doko at ubuntu.com>
* patches/icedtea-sh4-support.patch: Add zero support for Hitachi SH.
diff -r 549c87a321e0 -r 0e1f42ea40cf Makefile.am
--- a/Makefile.am Mon May 10 18:05:11 2010 +0100
+++ b/Makefile.am Tue May 11 14:05:30 2010 +0100
@@ -19,7 +19,7 @@ OPENJDK_SHA256SUM = 93c536e6bc4e962050a0
OPENJDK_SHA256SUM = 93c536e6bc4e962050a00321e88e694fc4e0000e2ad887b8de22830bfda2649f
CACAO_VERSION = 0.99.4
-CACAO_SHA256SUM = c6090c1d2ed3c60acda0076b62563598267be8dab270ce49ee1035002a2510cf
+CACAO_SHA256SUM = 1dfc4903dc0172286df4f1740fd0f12749ac81d51c602290b47cbe83d51e1d56
CACAO_BASE_URL = http://www.complang.tuwien.ac.at
CACAO_URL = $(CACAO_BASE_URL)/cacaojvm/download/cacao-$(CACAO_VERSION)/
CACAO_SRC_ZIP = cacao-$(CACAO_VERSION).tar.bz2
@@ -197,8 +197,6 @@ LIVECONNECT_CLASSES = $(abs_top_builddir
LIVECONNECT_CLASSES = $(abs_top_builddir)/liveconnect
LIVECONNECT_JAR = $(LIVECONNECT_CLASSES)/lib/classes.jar
LIVECONNECT_SRC = $(LIVECONNECT_CLASSES)/lib/src.zip
-else
-PLUGIN_PATCH = patches/icedtea-plugin.patch
endif
endif
@@ -337,7 +335,9 @@ ICEDTEA_PATCHES += \
patches/cacao/openjdk7.patch \
patches/cacao/version.patch \
patches/cacao/versioninfo.patch \
- patches/cacao/arm-arch-defines.patch
+ patches/cacao/arm-arch-defines.patch \
+ patches/cacao/jsig.patch \
+ patches/cacao/6714758.patch
endif
if WITH_CACAO
diff -r 549c87a321e0 -r 0e1f42ea40cf patches/cacao/6714758.patch
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/cacao/6714758.patch Tue May 11 14:05:30 2010 +0100
@@ -0,0 +1,39 @@
+diff -Nru cacao.orig/cacao/src/native/vm/openjdk/jvm.c cacao/cacao/src/native/vm/openjdk/jvm.c
+--- cacao.orig/cacao/src/native/vm/openjdk/jvm.c 2010-05-11 12:19:23.000000000 +0100
++++ cacao/cacao/src/native/vm/openjdk/jvm.c 2010-05-11 12:19:47.000000000 +0100
+@@ -792,6 +792,9 @@
+
+ assert(throwError == false);
+
++ if (name == NULL)
++ return NULL;
++
+ u = utf_new_char(name);
+ cl = loader_hashtable_classloader_add((java_handle_t *) loader);
+
+@@ -809,6 +812,15 @@
+ }
+
+
++/* JVM_FindClassFromBootLoader */
++
++jclass JVM_FindClassFromBootLoader(JNIEnv* env, const char* name)
++{
++ TRACEJVMCALLS(("JVM_FindClassFromBootLoader(name=%s)", name));
++ return JVM_FindClassFromClassLoader(env, name, JNI_FALSE,
++ (jobject)NULL, false);
++}
++
+ /* JVM_FindClassFromClass */
+
+ jclass JVM_FindClassFromClass(JNIEnv *env, const char *name, jboolean init, jclass from)
+--- cacao.orig/cacao/contrib/mapfile-vers-product 2008-08-04 17:51:28.000000000 +0100
++++ cacao/cacao/contrib/mapfile-vers-product 2010-05-11 12:47:51.000000000 +0100
+@@ -86,6 +86,7 @@
+ JVM_EnableCompiler;
+ JVM_Exit;
+ JVM_FillInStackTrace;
++ JVM_FindClassFromBootLoader;
+ JVM_FindClassFromClass;
+ JVM_FindClassFromClassLoader;
+ JVM_FindLibraryEntry;
diff -r 549c87a321e0 -r 0e1f42ea40cf patches/cacao/ignore-tests.patch
--- a/patches/cacao/ignore-tests.patch Mon May 10 18:05:11 2010 +0100
+++ b/patches/cacao/ignore-tests.patch Tue May 11 14:05:30 2010 +0100
@@ -1,7 +1,8 @@
---- openjdk/jdk/test/java/util/concurrent/BlockingQueue/ProducerConsumerLoops.java~ 2008-08-28 10:20:49.000000000 +0200
-+++ openjdk/jdk/test/java/util/concurrent/BlockingQueue/ProducerConsumerLoops.java 2008-10-19 17:02:41.000000000 +0200
+diff -Nru openjdk.orig/jdk/test/java/util/concurrent/BlockingQueue/ProducerConsumerLoops.java openjdk/jdk/test/java/util/concurrent/BlockingQueue/ProducerConsumerLoops.java
+--- openjdk.orig/jdk/test/java/util/concurrent/BlockingQueue/ProducerConsumerLoops.java 2010-05-10 15:04:14.000000000 +0100
++++ openjdk/jdk/test/java/util/concurrent/BlockingQueue/ProducerConsumerLoops.java 2010-05-10 23:42:41.000000000 +0100
@@ -37,6 +37,7 @@
- * @compile -source 1.5 ProducerConsumerLoops.java
+ * @compile ProducerConsumerLoops.java
* @run main/timeout=3600 ProducerConsumerLoops
* @summary multiple producers and consumers using blocking queues
+ * @ignore cacao test hog, ignore for the sake of buildds
diff -r 549c87a321e0 -r 0e1f42ea40cf patches/cacao/jsig.patch
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/cacao/jsig.patch Tue May 11 14:05:30 2010 +0100
@@ -0,0 +1,36 @@
+diff -Nru cacao.orig/Makefile.am cacao/Makefile.am
+--- cacao.orig/cacao/src/cacao/Makefile.am 2008-08-04 17:51:28.000000000 +0100
++++ cacao/cacao/src/cacao/Makefile.am 2010-05-11 10:29:35.000000000 +0100
+@@ -96,12 +96,12 @@
+ $(mkdir_p) $(prefix)/jre/lib/$(JAVA_ARCH)/server
+ $(LN_S) -f $(libdir)/libjvm.so $(prefix)/jre/lib/$(JAVA_ARCH)/server
+ $(ECHO) $(ECHO_N) > $(prefix)/jre/lib/$(JAVA_ARCH)/server/Xusage.txt
+- $(ECHO) $(ECHO_N) > $(prefix)/jre/lib/$(JAVA_ARCH)/server/libjsig.so
++ $(ECHO) $(ECHO_N) > $(prefix)/jre/lib/$(JAVA_ARCH)/libjsig.so
+
+ uninstall-local:
+ rm -f $(prefix)/jre/lib/$(JAVA_ARCH)/server/libjvm.so
+ rm -f $(prefix)/jre/lib/$(JAVA_ARCH)/server/Xusage.txt
+- rm -f $(prefix)/jre/lib/$(JAVA_ARCH)/server/libjsig.so
++ rm -f $(prefix)/jre/lib/$(JAVA_ARCH)/libjsig.so
+ endif
+
+
+diff -Nru cacao.orig/Makefile.in cacao/Makefile.in
+--- cacao.orig/cacao/src/cacao/Makefile.in 2009-03-16 11:44:18.000000000 +0000
++++ cacao/cacao/src/cacao/Makefile.in 2010-05-11 10:30:06.000000000 +0100
+@@ -625,12 +625,12 @@
+ @WITH_JAVA_RUNTIME_LIBRARY_OPENJDK_TRUE@ $(mkdir_p) $(prefix)/jre/lib/$(JAVA_ARCH)/server
+ @WITH_JAVA_RUNTIME_LIBRARY_OPENJDK_TRUE@ $(LN_S) -f $(libdir)/libjvm.so $(prefix)/jre/lib/$(JAVA_ARCH)/server
+ @WITH_JAVA_RUNTIME_LIBRARY_OPENJDK_TRUE@ $(ECHO) $(ECHO_N) > $(prefix)/jre/lib/$(JAVA_ARCH)/server/Xusage.txt
+- at WITH_JAVA_RUNTIME_LIBRARY_OPENJDK_TRUE@ $(ECHO) $(ECHO_N) > $(prefix)/jre/lib/$(JAVA_ARCH)/server/libjsig.so
++ at WITH_JAVA_RUNTIME_LIBRARY_OPENJDK_TRUE@ $(ECHO) $(ECHO_N) > $(prefix)/jre/lib/$(JAVA_ARCH)/libjsig.so
+
+ @WITH_JAVA_RUNTIME_LIBRARY_OPENJDK_TRUE at uninstall-local:
+ @WITH_JAVA_RUNTIME_LIBRARY_OPENJDK_TRUE@ rm -f $(prefix)/jre/lib/$(JAVA_ARCH)/server/libjvm.so
+ @WITH_JAVA_RUNTIME_LIBRARY_OPENJDK_TRUE@ rm -f $(prefix)/jre/lib/$(JAVA_ARCH)/server/Xusage.txt
+- at WITH_JAVA_RUNTIME_LIBRARY_OPENJDK_TRUE@ rm -f $(prefix)/jre/lib/$(JAVA_ARCH)/server/libjsig.so
++ at WITH_JAVA_RUNTIME_LIBRARY_OPENJDK_TRUE@ rm -f $(prefix)/jre/lib/$(JAVA_ARCH)/libjsig.so
+ # Tell versions [3.59,3.63) of GNU make to not export all variables.
+ # Otherwise a system limit (for SysV at least) may be exceeded.
+ .NOEXPORT:
diff -r 549c87a321e0 -r 0e1f42ea40cf patches/cacao/no-strict-aliasing.patch
--- a/patches/cacao/no-strict-aliasing.patch Mon May 10 18:05:11 2010 +0100
+++ b/patches/cacao/no-strict-aliasing.patch Tue May 11 14:05:30 2010 +0100
@@ -1,22 +1,22 @@
---- cacao/cacao/configure.ac~ 2009-03-16 12:42:56.000000000 +0100
-+++ cacao/cacao/configure.ac 2009-06-23 16:19:20.000000000 +0200
-@@ -37,7 +37,7 @@
-
- dnl set optimization and debugging for all architectures and systems
- if test x"$CFLAGS" = "x"; then
-- OPT_CFLAGS="-g -O2"
-+ OPT_CFLAGS="-g -O2 -fno-strict-aliasing"
+diff -Nru cacao/cacao.orig/configure cacao/cacao/configure
+--- cacao/cacao.orig/configure 2009-03-16 11:44:25.000000000 +0000
++++ cacao/cacao/configure 2010-01-09 00:10:59.000000000 +0000
+@@ -2829,6 +2829,7 @@
else
OPT_CFLAGS=$CFLAGS
fi
---- cacao.orig/cacao/configure 2009-03-16 12:44:25.000000000 +0100
-+++ cacao/cacao/configure 2009-06-05 17:58:48.000000000 +0200
-@@ -2825,7 +2825,7 @@
++OPT_CFLAGS="$OPT_CFLAGS -fno-strict-aliasing"
-
- if test x"$CFLAGS" = "x"; then
-- OPT_CFLAGS="-g -O2"
-+ OPT_CFLAGS="-g -O2 -fno-strict-aliasing"
+ case "$host_cpu" in
+ alpha | alphaev56 | alphapca56 )
+diff -Nru cacao/cacao.orig/configure.ac cacao/cacao/configure.ac
+--- cacao/cacao.orig/configure.ac 2009-03-16 11:42:56.000000000 +0000
++++ cacao/cacao/configure.ac 2010-01-09 00:11:06.000000000 +0000
+@@ -41,6 +41,7 @@
else
OPT_CFLAGS=$CFLAGS
fi
++OPT_CFLAGS="$OPT_CFLAGS -fno-strict-aliasing"
+
+ dnl system type
+ case "$host_cpu" in
diff -r 549c87a321e0 -r 0e1f42ea40cf patches/icedtea-plugin.patch
--- a/patches/icedtea-plugin.patch Mon May 10 18:05:11 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1301 +0,0 @@
-diff -urN openjdk.orig/jdk/make/launchers/Makefile openjdk/jdk/make/launchers/Makefile
---- openjdk.orig/jdk/make/launchers/Makefile 2008-06-29 09:40:07.000000000 -0400
-+++ openjdk/jdk/make/launchers/Makefile 2008-06-29 09:40:16.000000000 -0400
-@@ -92,6 +92,7 @@
- -J-Dcom.sun.CORBA.activation.Port=1049 \
- -J-Dcom.sun.CORBA.POA.ORBServerId=1, )
- $(call make-launcher, pack200, com.sun.java.util.jar.pack.Driver, , --pack)
-+$(call make-launcher, pluginappletviewer, sun.applet.PluginMain, , )
- $(call make-launcher, policytool, sun.security.tools.PolicyTool, , )
- $(call make-launcher, rmic, sun.rmi.rmic.Main, , )
- $(call make-launcher, rmid, sun.rmi.server.Activation, , )
-diff -urN openjdk.orig/jdk/src/share/classes/sun/applet/PluginMain.java openjdk/jdk/src/share/classes/sun/applet/PluginMain.java
---- openjdk.orig/jdk/src/share/classes/sun/applet/PluginMain.java 1969-12-31 19:00:00.000000000 -0500
-+++ openjdk/jdk/src/share/classes/sun/applet/PluginMain.java 2008-01-14 14:18:53.000000000 -0500
-@@ -0,0 +1,274 @@
-+/*
-+ * Copyright 1999-2006 Sun Microsystems, Inc. All Rights Reserved.
-+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-+ *
-+ * This code is free software; you can redistribute it and/or modify it
-+ * under the terms of the GNU General Public License version 2 only, as
-+ * published by the Free Software Foundation. Sun designates this
-+ * particular file as subject to the "Classpath" exception as provided
-+ * by Sun in the LICENSE file that accompanied this code.
-+ *
-+ * This code is distributed in the hope that it will be useful, but WITHOUT
-+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-+ * version 2 for more details (a copy is included in the LICENSE file that
-+ * accompanied this code).
-+ *
-+ * You should have received a copy of the GNU General Public License version
-+ * 2 along with this work; if not, write to the Free Software Foundation,
-+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-+ *
-+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
-+ * CA 95054 USA or visit www.sun.com if you need additional information or
-+ * have any questions.
-+ */
-+
-+package sun.applet;
-+
-+import java.io.*;
-+import java.lang.reflect.Method;
-+import java.lang.reflect.InvocationTargetException;
-+import java.net.*;
-+import java.nio.charset.Charset;
-+import java.util.*;
-+import sun.net.www.ParseUtil;
-+
-+class PluginParseRequest
-+{
-+ long handle;
-+ String tag;
-+ String documentbase;
-+ boolean alreadySent;
-+}
-+
-+/**
-+ * The main entry point into PluginAppletViewer.
-+ */
-+public class PluginMain
-+{
-+ // A mapping of instance IDs to PluginAppletViewers.
-+ private static HashMap appletWindows = new HashMap();
-+ private static HashMap parseRequests = new HashMap();
-+ private static String currentKey;
-+ private static PluginAppletViewer currentWindow;
-+ private static PluginParseRequest currentRequest;
-+ private static BufferedReader pluginInputStream;
-+ private static BufferedWriter pluginOutputStream;
-+ // This is used in init(). Getting rid of this is desirable but depends
-+ // on whether the property that uses it is necessary/standard.
-+ public static final String theVersion = System.getProperty("java.version");
-+
-+ /**
-+ * The main entry point into AppletViewer.
-+ */
-+ public static void main(String args[])
-+ throws IOException
-+ {
-+ if(args.length != 2) {
-+ // Indicate to plugin that appletviewer is installed correctly.
-+ System.exit(0);
-+ }
-+ // INSTALL THE SECURITY MANAGER
-+ init();
-+ start(new FileInputStream(args[0]), new FileOutputStream(args[1]));
-+ System.exit(0);
-+ }
-+
-+ private static void init() {
-+ Properties avProps = new Properties();
-+
-+ // ADD OTHER RANDOM PROPERTIES
-+ // XXX 5/18 need to revisit why these are here, is there some
-+ // standard for what is available?
-+
-+ // Standard browser properties
-+ avProps.put("browser", "sun.applet.AppletViewer");
-+ avProps.put("browser.version", "1.06");
-+ avProps.put("browser.vendor", "Sun Microsystems Inc.");
-+ avProps.put("http.agent", "Java(tm) 2 SDK, Standard Edition v" + theVersion);
-+
-+ // Define which packages can be extended by applets
-+ // XXX 5/19 probably not needed, not checked in AppletSecurity
-+ avProps.put("package.restrict.definition.java", "true");
-+ avProps.put("package.restrict.definition.sun", "true");
-+
-+ // Define which properties can be read by applets.
-+ // A property named by "key" can be read only when its twin
-+ // property "key.applet" is true. The following ten properties
-+ // are open by default. Any other property can be explicitly
-+ // opened up by the browser user by calling appletviewer with
-+ // -J-Dkey.applet=true
-+ avProps.put("java.version.applet", "true");
-+ avProps.put("java.vendor.applet", "true");
-+ avProps.put("java.vendor.url.applet", "true");
-+ avProps.put("java.class.version.applet", "true");
-+ avProps.put("os.name.applet", "true");
-+ avProps.put("os.version.applet", "true");
-+ avProps.put("os.arch.applet", "true");
-+ avProps.put("file.separator.applet", "true");
-+ avProps.put("path.separator.applet", "true");
-+ avProps.put("line.separator.applet", "true");
-+
-+ // Read in the System properties. If something is going to be
-+ // over-written, warn about it.
-+ Properties sysProps = System.getProperties();
-+ for (Enumeration e = sysProps.propertyNames(); e.hasMoreElements(); ) {
-+ String key = (String) e.nextElement();
-+ String val = (String) sysProps.getProperty(key);
-+ avProps.setProperty(key, val);
-+ }
-+
-+ // INSTALL THE PROPERTY LIST
-+ System.setProperties(avProps);
-+
-+ // Create and install the security manager
-+ System.setSecurityManager(new AppletSecurity());
-+
-+ // REMIND: Create and install a socket factory!
-+ }
-+
-+ static void registerWindow(PluginAppletViewer pluginappletviewer)
-+ {
-+ appletWindows.put(currentKey, pluginappletviewer);
-+ currentWindow = (PluginAppletViewer)appletWindows.get(currentKey);
-+ }
-+
-+ private static void deregisterWindow(PluginAppletViewer pluginappletviewer)
-+ {
-+ appletWindows.remove(currentWindow);
-+ currentWindow.dispose();
-+ currentWindow = null;
-+ }
-+
-+ static void start(InputStream inputstream, OutputStream outputstream)
-+ throws MalformedURLException, IOException
-+ {
-+ // Set up input and output pipes. Use UTF-8 encoding.
-+ pluginInputStream =
-+ new BufferedReader(new InputStreamReader(inputstream,
-+ Charset.forName("UTF-8")));
-+ pluginOutputStream =
-+ new BufferedWriter(new OutputStreamWriter
-+ (outputstream, Charset.forName("UTF-8")));
-+
-+ write("running");
-+
-+ // Read first message.
-+ String message = read();
-+
-+ while(true) {
-+ if (message.startsWith("instance")) {
-+ // Read applet instance identifier.
-+ currentKey = message.substring("instance".length() + 1);
-+ currentWindow =
-+ (PluginAppletViewer)appletWindows.get(currentKey);
-+ currentRequest = null;
-+ if (currentWindow == null) {
-+ if (!parseRequests.containsKey(currentKey))
-+ parseRequests.put(currentKey, new PluginParseRequest());
-+ currentRequest =
-+ (PluginParseRequest)parseRequests.get(currentKey);
-+ }
-+ } else if (message.startsWith("tag")) {
-+ if (currentRequest != null) {
-+ int index = message.indexOf(' ', "tag".length() + 1);
-+ currentRequest.documentbase =
-+ message.substring("tag".length() + 1, index);
-+ currentRequest.tag = message.substring(index + 1);
-+ if (currentRequest.handle != 0
-+ && !currentRequest.alreadySent) {
-+ PluginAppletViewer.parse
-+ (currentRequest.handle, 1, 1,
-+ new StringReader(currentRequest.tag),
-+ new URL(currentRequest.documentbase));
-+ parseRequests.remove(currentKey);
-+ }
-+ }
-+ } else if (message.startsWith("handle")) {
-+ if (currentRequest != null) {
-+ currentRequest.handle = Long.parseLong
-+ (message.substring("handle".length() + 1,
-+ message.indexOf("width") - 1));
-+ int width = Integer.parseInt(message.substring
-+ (message.indexOf("width") +
-+ "width".length() + 1,
-+ message.indexOf("height") - 1));
-+ int height = Integer.parseInt(message.substring(
-+ message.indexOf("height") +
-+ "height".length() + 1));
-+ if (currentRequest.tag != null
-+ && !currentRequest.alreadySent) {
-+ PluginAppletViewer.parse
-+ (currentRequest.handle, width, height,
-+ new StringReader(currentRequest.tag),
-+ new URL(currentRequest.documentbase));
-+ parseRequests.remove(currentKey);
-+ }
-+ }
-+ } else if (message.startsWith("width")) {
-+ int width =
-+ Integer.parseInt(message.substring("width".length() + 1));
-+ int height = currentWindow.getHeight();
-+ currentWindow.updateAtts(width, height);
-+ currentWindow.setSize(width, height);
-+ } else if (message.startsWith("height")) {
-+ int height =
-+ Integer.parseInt(message.substring("height".length() + 1));
-+ int width = currentWindow.getWidth();
-+ currentWindow.updateAtts(width, height);
-+ currentWindow.setSize(width, height);
-+ } else if (message.startsWith("destroy")
-+ && currentWindow != null) {
-+ deregisterWindow(currentWindow);
-+ }
-+
-+ // Read next message.
-+ message = read();
-+ }
-+ }
-+
-+ /**
-+ * Write string to plugin.
-+ *
-+ * @param message the message to write
-+ *
-+ * @exception IOException if an error occurs
-+ */
-+ static void write(String message)
-+ throws IOException
-+ {
-+ pluginOutputStream.write(message, 0, message.length());
-+ pluginOutputStream.newLine();
-+ pluginOutputStream.flush();
-+
-+ System.err.println(" PIPE: appletviewer wrote: " + message);
-+ }
-+
-+ /**
-+ * Read string from plugin.
-+ *
-+ * @return the read string
-+ *
-+ * @exception IOException if an error occurs
-+ */
-+ static String read()
-+ throws IOException
-+ {
-+ String message = pluginInputStream.readLine();
-+ System.err.println(" PIPE: appletviewer read: " + message);
-+ if (message == null || message.equals("shutdown")) {
-+ try {
-+ // Close input/output channels to plugin.
-+ pluginInputStream.close();
-+ pluginOutputStream.close();
-+ } catch (IOException exception) {
-+ // Deliberately ignore IOException caused by broken
-+ // pipe since plugin may have already detached.
-+ }
-+
-+ System.err.println("APPLETVIEWER: exiting appletviewer");
-+ System.exit(0);
-+ }
-+ return message;
-+ }
-+}
-diff -urN openjdk.orig/jdk/src/share/classes/sun/applet/PluginAppletViewer.java openjdk/jdk/src/share/classes/sun/applet/PluginAppletViewer.java
---- openjdk.orig/jdk/src/share/classes/sun/applet/PluginAppletViewer.java 2008-06-24 22:55:57.286013713 -0400
-+++ openjdk/jdk/src/share/classes/sun/applet/PluginAppletViewer.java 2008-06-29 10:34:07.000000000 -0400
-@@ -0,0 +1,1008 @@
More information about the distro-pkg-dev
mailing list