changeset 2478:48d7359c75f6

PR717: Remove all non-bootstrap non-conditional patches. 2011-09-21 Andrew John Hughes <ahughes@redhat.com> PR717: Remove all non-bootstrap non-conditional patches. * patches/6592792.patch, * patches/6733959.patch, * patches/6755943.patch: Remove unused patches. * patches/alpha-fixes.patch, * patches/alt-jar.patch, * patches/cacao/arch.patch, * patches/clean-crypto.patch, * patches/debian/uname.patch, * patches/disable-intree-ec.patch: Moved upstream. * patches/javafiles.patch: Moved to boot. * patches/jtreg-httpTest.patch, * patches/jvmtiEnv.patch, * patches/lc_ctype.patch, * patches/override-redirect-metacity.patch, * patches/params-cast-size_t.patch: Moved upstream. * patches/parisc-opt.patch: Obsolete. * patches/parisc.patch, * patches/samejvm-safe.patch, * patches/security-updates.patch, * patches/security/6592792.patch, * patches/security/6733959.patch, * patches/security/6755943.patch, * patches/sh4-support.patch, * patches/signed-types.patch: Moved upstream. * patches/sources.patch: Obsolete. * patches/sparc-ptracefix.patch, * patches/sparc-trapsfix.patch, * patches/systemtap-gcc-4.5.patch, * patches/tests-jdk.patch, * patches/update-bootclasspath.patch, * patches/use-idx_t.patch: Moved upstream. * Makefile.am: (JDK_CHANGESET): Bring in upstreamed patches. (JDK_SHA256SUM): Likewise. (CORBA_CHANGESET): Likewise. (CORBA_SHA256SUM): Likewise. (HOTSPOT_CHANGESET): Likewise. (HOTSPOT_SHA256SUM): Likewise. (ICEDTEA_PATCHES): Set to empty, bar conditional additions. (ICEDTEA_BOOT_PATCHES): Add javafiles.patch. * patches/boot/javafiles.patch: Only needed for bootstrapping to ensure all classes are included. * patches/nss-config.patch, * patches/nss-not-enabled-config.patch: Updated against upstream disable-intree-ec. * NEWS: Updated.
author Andrew John Hughes <ahughes@redhat.com>
date Fri, 23 Sep 2011 17:30:26 +0100
parents e8227389e2e0
children ee3b02974ac6
files ChangeLog Makefile.am NEWS patches/6592792.patch patches/6733959.patch patches/6755943.patch patches/alpha-fixes.patch patches/alt-jar.patch patches/boot/javafiles.patch patches/cacao/arch.patch patches/clean-crypto.patch patches/debian/uname.patch patches/disable-intree-ec.patch patches/javafiles.patch patches/jtreg-httpTest.patch patches/jvmtiEnv.patch patches/lc_ctype.patch patches/nss-config.patch patches/nss-not-enabled-config.patch patches/override-redirect-metacity.patch patches/params-cast-size_t.patch patches/parisc-opt.patch patches/parisc.patch patches/samejvm-safe.patch patches/security-updates.patch patches/security/6592792.patch patches/security/6733959.patch patches/security/6755943.patch patches/sh4-support.patch patches/signed-types.patch patches/sources.patch patches/sparc-ptracefix.patch patches/sparc-trapsfix.patch patches/systemtap-gcc-4.5.patch patches/tests-jdk.patch patches/update-bootclasspath.patch patches/use-idx_t.patch
diffstat 37 files changed, 245 insertions(+), 3600 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Sep 21 18:56:43 2011 +0100
+++ b/ChangeLog	Fri Sep 23 17:30:26 2011 +0100
@@ -1,3 +1,62 @@
+2011-09-21  Andrew John Hughes  <ahughes@redhat.com>
+
+	PR717: Remove all non-bootstrap non-conditional
+	patches.
+	* patches/6592792.patch,
+	* patches/6733959.patch,
+	* patches/6755943.patch:
+	Remove unused patches.
+	* patches/alpha-fixes.patch,
+	* patches/alt-jar.patch,
+	* patches/cacao/arch.patch,
+	* patches/clean-crypto.patch,
+	* patches/debian/uname.patch,
+	* patches/disable-intree-ec.patch:
+	Moved upstream.
+	* patches/javafiles.patch:
+	Moved to boot.
+	* patches/jtreg-httpTest.patch,
+	* patches/jvmtiEnv.patch,
+	* patches/lc_ctype.patch,
+	* patches/override-redirect-metacity.patch,
+	* patches/params-cast-size_t.patch:
+	Moved upstream.
+	* patches/parisc-opt.patch: Obsolete.
+	* patches/parisc.patch,
+	* patches/samejvm-safe.patch,
+	* patches/security-updates.patch,
+	* patches/security/6592792.patch,
+	* patches/security/6733959.patch,
+	* patches/security/6755943.patch,
+	* patches/sh4-support.patch,
+	* patches/signed-types.patch:
+	Moved upstream.
+	* patches/sources.patch: Obsolete.
+	* patches/sparc-ptracefix.patch,
+	* patches/sparc-trapsfix.patch,
+	* patches/systemtap-gcc-4.5.patch,
+	* patches/tests-jdk.patch,
+	* patches/update-bootclasspath.patch,
+	* patches/use-idx_t.patch:
+	Moved upstream.
+	* Makefile.am:
+	(JDK_CHANGESET): Bring in upstreamed patches.
+	(JDK_SHA256SUM): Likewise.
+	(CORBA_CHANGESET): Likewise.
+	(CORBA_SHA256SUM): Likewise.
+	(HOTSPOT_CHANGESET): Likewise.
+	(HOTSPOT_SHA256SUM): Likewise.
+	(ICEDTEA_PATCHES): Set to empty, bar conditional
+	additions.
+	(ICEDTEA_BOOT_PATCHES): Add javafiles.patch.
+	* patches/boot/javafiles.patch:
+	Only needed for bootstrapping to ensure
+	all classes are included.
+	* patches/nss-config.patch,
+	* patches/nss-not-enabled-config.patch:
+	Updated against upstream disable-intree-ec.
+	* NEWS: Updated.
+
 2011-09-21  Andrew John Hughes  <ahughes@redhat.com>
 
 	* Makefile.am:
--- a/Makefile.am	Wed Sep 21 18:56:43 2011 +0100
+++ b/Makefile.am	Fri Sep 23 17:30:26 2011 +0100
@@ -2,19 +2,19 @@
 
 OPENJDK_VERSION = b147
 
-CORBA_CHANGESET = 616c760dc288
-HOTSPOT_CHANGESET = 1dd9b3d73b22
+CORBA_CHANGESET = d034cc90ecc2
+HOTSPOT_CHANGESET = 7693eb0fce1f
 JAXP_CHANGESET = c40983d6ae70
 JAXWS_CHANGESET = 83db5e316798
-JDK_CHANGESET = 0cb15650412a
+JDK_CHANGESET = 7ec1845521ed
 LANGTOOLS_CHANGESET = fb7fb3071b64
 OPENJDK_CHANGESET = 3defd24c2671
 
-CORBA_SHA256SUM = 7589c42e88b4342750bea5afa306cc662cc9c5f7607fad96f70083ce70f4526e
-HOTSPOT_SHA256SUM = ffb1831a63e950bb7ade46a5382cb71d2603e0f40b3f758eb346833e18fca150
+CORBA_SHA256SUM = 06e7778aa1670f064e2c9fef7bdedc66fc679262ab8ee7aee018329e1ec787a8
+HOTSPOT_SHA256SUM = 6b2c9b21918183a383ab380c57f70d4be6199df0e2127bb762a20b6eca39e3a2
 JAXP_SHA256SUM = 6ab0cab1965edb28e4093b55436abd04fbffe0b0251016043c75246c4ee9dc2d
 JAXWS_SHA256SUM = 5567c90ce2857016365b2e346783a3b16ec0e76b80586a0371f601b4fed01f21
-JDK_SHA256SUM = ef2310b4df9e8a7891b927846badadf5441df8ac6203a215c8ef1a7676dfee36
+JDK_SHA256SUM = 843e7ccd4c2bad5c96aaa983e34f1eb27510229f138115fa0951e05358c50b2b
 LANGTOOLS_SHA256SUM = 9ddc00ec50fd2f5e331dc2bc10da4e23b69bf644eb92d50b39a2003c18fb5aa1
 OPENJDK_SHA256SUM = 4043a75c2c4385dd735f8dbbf2369311ce1b951217c9dbe9bba9609e24eb291e
 
@@ -245,33 +245,7 @@
 
 # Patch list
 
-ICEDTEA_PATCHES = \
-	patches/debian/uname.patch \
-	patches/sparc-ptracefix.patch \
-	patches/sparc-trapsfix.patch \
-	patches/override-redirect-metacity.patch \
-	patches/security-updates.patch \
-	patches/alpha-fixes.patch \
-	patches/alt-jar.patch \
-	patches/use-idx_t.patch \
-	patches/params-cast-size_t.patch \
-	patches/clean-crypto.patch \
-	patches/cacao/arch.patch \
-	patches/signed-types.patch \
-	patches/lc_ctype.patch \
-	patches/tests-jdk.patch \
-	patches/samejvm-safe.patch \
-	patches/parisc-opt.patch \
-        patches/security/6592792.patch \
-        patches/security/6733959.patch \
-        patches/security/6755943.patch \
-	patches/jvmtiEnv.patch \
-	patches/disable-intree-ec.patch \
-	patches/sources.patch \
-	patches/parisc.patch \
-	patches/sh4-support.patch \
-	patches/jtreg-httpTest.patch \
-	patches/update-bootclasspath.patch
+ICEDTEA_PATCHES =
 
 # Conditional patches
 
@@ -306,14 +280,8 @@
 	patches/pulse-soundproperties.patch
 endif
 
-if !USE_CVMI
-ICEDTEA_PATCHES += \
-	patches/javafiles.patch
-endif
-
 if ENABLE_SYSTEMTAP
 ICEDTEA_PATCHES += patches/systemtap.patch \
-	patches/systemtap-gcc-4.5.patch \
 	patches/systemtap-alloc-size-workaround.patch
 endif
 
@@ -327,7 +295,9 @@
 
 # Bootstrapping patches
 
-ICEDTEA_BOOT_PATCHES = patches/boot/ant-javac.patch \
+ICEDTEA_BOOT_PATCHES = \
+	patches/boot/javafiles.patch \
+	patches/boot/ant-javac.patch \
 	patches/boot/corba-defs.patch \
 	patches/boot/corba-idlj.patch \
 	patches/boot/corba-no-gen.patch \
@@ -361,7 +331,7 @@
 	patches/boot/ecj-trywithresources.patch \
 	patches/boot/ecj-autoboxing.patch \
 	patches/boot/xsltproc.patch \
-	patches/boot/use_target_6_for_bootstrap_classes.patch
+	patches/boot/use_target_6_for_bootstrap_classes.patch 
 
 if CP39408_JAVAH
 ICEDTEA_BOOT_PATCHES += patches/boot/pr39408.patch
--- a/NEWS	Wed Sep 21 18:56:43 2011 +0100
+++ b/NEWS	Fri Sep 23 17:30:26 2011 +0100
@@ -17,6 +17,7 @@
   - Fixed regression test runtime/7020373.
   - Convert to optional system library usage via USE_SYSTEM_ZLIB/JPEG/PNG/GIF.
   - PR586: Add missing sources to src.zip.
+  - PR717: All non-bootstrap non-conditional patches in IcedTea7 should be in the forest or dropped.
   - PR767: Annotation Processing Filer.getResource() always throws FileNotFoundException
   - G356743: Support building against libpng 1.5.
   - S7070134: Hotspot crashes with sigsegv from PorterStemmer
--- a/patches/6592792.patch	Wed Sep 21 18:56:43 2011 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,297 +0,0 @@
-diff -Nru openjdk.orig/jaxws/src/share/classes/javax/xml/bind/ContextFinder.java openjdk/jaxws/src/share/classes/javax/xml/bind/ContextFinder.java
---- openjdk.orig/jaxws/src/share/classes/javax/xml/bind/ContextFinder.java	2008-12-02 15:25:05.000000000 +0000
-+++ openjdk/jaxws/src/share/classes/javax/xml/bind/ContextFinder.java	2008-12-02 15:29:09.000000000 +0000
-@@ -1,5 +1,5 @@
- /*
-- * Copyright 2005-2006 Sun Microsystems, Inc.  All Rights Reserved.
-+ * Copyright 2005-2008 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
-@@ -128,12 +128,7 @@
-         throws JAXBException
-     {
-         try {
--            Class spiClass;
--            if (classLoader == null) {
--                spiClass = Class.forName(className);
--            } else {
--                spiClass = classLoader.loadClass(className);
--            }
-+            Class spiClass = safeLoadClass(className,classLoader);
- 
-             /*
-              * javax.xml.bind.context.factory points to a class which has a
-@@ -205,11 +200,7 @@
-         ClassLoader cl = Thread.currentThread().getContextClassLoader();
-         Class spi;
-         try {
--            logger.fine("Trying to load "+className);
--            if (cl != null)
--                spi = cl.loadClass(className);
--            else
--                spi = Class.forName(className);
-+            spi = safeLoadClass(className,cl);
-         } catch (ClassNotFoundException e) {
-             throw new JAXBException(e);
-         }
-@@ -483,4 +474,31 @@
-      * For this reason, we have to hard-code the class name into the API.
-      */
-     private static final String PLATFORM_DEFAULT_FACTORY_CLASS = "com.sun.xml.internal.bind.v2.ContextFactory";
-+
-+    /**
-+     * Loads the class, provided that the calling thread has an access to the class being loaded.
-+     */
-+    private static Class safeLoadClass(String className, ClassLoader classLoader) throws ClassNotFoundException {
-+        logger.fine("Trying to load "+className);
-+        try {
-+            // make sure that the current thread has an access to the package of the given name.
-+            SecurityManager s = System.getSecurityManager();
-+            if (s != null) {
-+                int i = className.lastIndexOf('.');
-+                if (i != -1) {
-+                    s.checkPackageAccess(className.substring(0,i));
-+                }
-+            }
-+
-+            if (classLoader == null)
-+                return Class.forName(className);
-+            else
-+                return classLoader.loadClass(className);
-+        } catch (SecurityException se) {
-+            // anyone can access the platform default factory class without permission
-+            if (PLATFORM_DEFAULT_FACTORY_CLASS.equals(className))
-+                return Class.forName(className);
-+            throw se;
-+        }
-+    }
- }
-diff -Nru openjdk.orig/jaxws/src/share/classes/javax/xml/ws/spi/FactoryFinder.java openjdk/jaxws/src/share/classes/javax/xml/ws/spi/FactoryFinder.java
---- openjdk.orig/jaxws/src/share/classes/javax/xml/ws/spi/FactoryFinder.java	2008-12-02 15:25:04.000000000 +0000
-+++ openjdk/jaxws/src/share/classes/javax/xml/ws/spi/FactoryFinder.java	2008-12-02 15:29:09.000000000 +0000
-@@ -1,5 +1,5 @@
- /*
-- * Copyright 2005-2006 Sun Microsystems, Inc.  All Rights Reserved.
-+ * Copyright 2005-2008 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
-@@ -47,12 +47,7 @@
-                                       ClassLoader classLoader)
-     {
-         try {
--            Class spiClass;
--            if (classLoader == null) {
--                spiClass = Class.forName(className);
--            } else {
--                spiClass = classLoader.loadClass(className);
--            }
-+            Class spiClass = safeLoadClass(className, classLoader);
-             return spiClass.newInstance();
-         } catch (ClassNotFoundException x) {
-             throw new WebServiceException(
-@@ -152,4 +147,33 @@
- 
-         return newInstance(fallbackClassName, classLoader);
-     }
-+
-+
-+    private static final String PLATFORM_DEFAULT_FACTORY_CLASS = "com.sun.xml.internal.ws.spi.ProviderImpl";
-+
-+    /**
-+     * Loads the class, provided that the calling thread has an access to the class being loaded.
-+     */
-+    private static Class safeLoadClass(String className, ClassLoader classLoader) throws ClassNotFoundException {
-+        try {
-+            // make sure that the current thread has an access to the package of the given name.
-+            SecurityManager s = System.getSecurityManager();
-+            if (s != null) {
-+                int i = className.lastIndexOf('.');
-+                if (i != -1) {
-+                    s.checkPackageAccess(className.substring(0,i));
-+                }
-+            }
-+
-+            if (classLoader == null)
-+                return Class.forName(className);
-+            else
-+                return classLoader.loadClass(className);
-+        } catch (SecurityException se) {
-+            // anyone can access the platform default factory class without permission
-+            if (PLATFORM_DEFAULT_FACTORY_CLASS.equals(className))
-+                return Class.forName(className);
-+            throw se;
-+        }
-+    }
- }
-diff -Nru openjdk.orig/jdk/src/share/lib/security/java.security openjdk/jdk/src/share/lib/security/java.security
---- openjdk.orig/jdk/src/share/lib/security/java.security	2008-11-20 08:44:48.000000000 +0000
-+++ openjdk/jdk/src/share/lib/security/java.security	2008-12-02 15:29:09.000000000 +0000
-@@ -127,7 +127,7 @@
- # passed to checkPackageAccess unless the
- # corresponding RuntimePermission ("accessClassInPackage."+package) has
- # been granted.
--package.access=sun.
-+package.access=sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.
- 
- #
- # List of comma-separated packages that start with or equal this string
-diff -Nru openjdk.orig/jdk/src/share/lib/security/java.security-solaris openjdk/jdk/src/share/lib/security/java.security-solaris
---- openjdk.orig/jdk/src/share/lib/security/java.security-solaris	2008-11-20 08:44:48.000000000 +0000
-+++ openjdk/jdk/src/share/lib/security/java.security-solaris	2008-12-02 15:29:09.000000000 +0000
-@@ -128,7 +128,7 @@
- # passed to checkPackageAccess unless the
- # corresponding RuntimePermission ("accessClassInPackage."+package) has
- # been granted.
--package.access=sun.
-+package.access=sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.
- 
- #
- # List of comma-separated packages that start with or equal this string
-diff -Nru openjdk.orig/jdk/src/share/lib/security/java.security-windows openjdk/jdk/src/share/lib/security/java.security-windows
---- openjdk.orig/jdk/src/share/lib/security/java.security-windows	2008-11-20 08:44:48.000000000 +0000
-+++ openjdk/jdk/src/share/lib/security/java.security-windows	2008-12-02 15:29:09.000000000 +0000
-@@ -128,7 +128,7 @@
- # passed to checkPackageAccess unless the
- # corresponding RuntimePermission ("accessClassInPackage."+package) has
- # been granted.
--package.access=sun.
-+package.access=sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.
- 
- #
- # List of comma-separated packages that start with or equal this string
-diff -Nru openjdk.orig/jdk/test/com/sun/org/apache/xml/internal/ws/server/Test6592792.sh openjdk/jdk/test/com/sun/org/apache/xml/internal/ws/server/Test6592792.sh
---- openjdk.orig/jdk/test/com/sun/org/apache/xml/internal/ws/server/Test6592792.sh	1970-01-01 01:00:00.000000000 +0100
-+++ openjdk/jdk/test/com/sun/org/apache/xml/internal/ws/server/Test6592792.sh	2008-12-02 15:29:09.000000000 +0000
-@@ -0,0 +1,61 @@
-+#!/bin/sh
-+
-+if [ "${TESTSRC}" = "" ]
-+then TESTSRC=.
-+fi
-+
-+if [ "${TESTJAVA}" = "" ]
-+then
-+  PARENT=`dirname \`which java\``
-+  TESTJAVA=`dirname ${PARENT}`
-+  echo "TESTJAVA not set, selecting " ${TESTJAVA}
-+  echo "If this is incorrect, try setting the variable manually."
-+fi
-+
-+if [ "${TESTCLASSES}" = "" ]
-+then
-+  echo "TESTCLASSES not set.  Test cannot execute.  Failed."
-+  exit 1
-+fi
-+
-+BIT_FLAG=""
-+
-+# set platform-dependent variables
-+OS=`uname -s`
-+case "$OS" in
-+  SunOS | Linux )
-+    NULL=/dev/null
-+    PS=":"
-+    FS="/"
-+    ## for solaris, linux it's HOME
-+    FILE_LOCATION=$HOME
-+    if [ -f ${FILE_LOCATION}${FS}JDK64BIT -a ${OS} = "SunOS" ]
-+    then
-+        BIT_FLAG=`cat ${FILE_LOCATION}${FS}JDK64BIT`
-+    fi
-+    ;;
-+  Windows_* )
-+    NULL=NUL
-+    PS=";"
-+    FS="\\"
-+    ;;
-+  * )
-+    echo "Unrecognized system!"
-+    exit 1;
-+    ;;
-+esac
-+
-+JEMMYPATH=${CPAPPEND}
-+CLASSPATH=.${PS}${TESTCLASSES}${PS}${JEMMYPATH} ; export CLASSPATH
-+
-+THIS_DIR=`pwd`
-+
-+${TESTJAVA}${FS}bin${FS}java ${BIT_FLAG} -version
-+
-+${TESTJAVA}${FS}bin${FS}javac ${BIT_FLAG} -d . -cp ${TESTJAVA}${FS}jre${FS}lib${FS}rt.jar ${TESTSRC}${FS}Test.java
-+
-+${TESTJAVA}${FS}bin${FS}java ${BIT_FLAG} -cp . Test
-+
-+STATUS=$?
-+
-+exit $STATUS
-diff -Nru openjdk.orig/jdk/test/com/sun/org/apache/xml/internal/ws/server/Test.java openjdk/jdk/test/com/sun/org/apache/xml/internal/ws/server/Test.java
---- openjdk.orig/jdk/test/com/sun/org/apache/xml/internal/ws/server/Test.java	1970-01-01 01:00:00.000000000 +0100
-+++ openjdk/jdk/test/com/sun/org/apache/xml/internal/ws/server/Test.java	2008-12-02 15:29:09.000000000 +0000
-@@ -0,0 +1,65 @@
-+/*
-+ *  @test
-+ *  @bug 6592792
-+ *  @summary Add com.sun.xml.internal to the "package.access" property in $JAVA_HOME/lib/security/java.security
-+ *  @run shell Test6592792.sh
-+ */
-+
-+import java.lang.*;
-+import java.lang.reflect.*;
-+import com.sun.xml.internal.ws.server.*;
-+import com.sun.xml.internal.ws.server.SingletonResolver;
-+import com.sun.xml.internal.ws.api.server.*;
-+
-+public class Test {
-+
-+  public static void main(String[] args) throws Exception{
-+      // Enable the security manager
-+      SecurityManager sm = new SecurityManager();
-+      System.setSecurityManager(sm);
-+      new Test();
-+  }
-+
-+  Object invokeMethod(Object target,Method m,Object args[]) throws Exception {
-+      SingletonResolver r = new SingletonResolver(target);
-+      Invoker invoker = r.createInvoker();
-+      return invoker.invoke(null, m, args);
-+  }
-+
-+  public Test() throws Exception{
-+      try {
-+          Class c=Class.forName("java.lang.Class");
-+
-+          Class ctab[]=new Class[1];
-+          ctab[0]=Class.forName("java.lang.String");
-+          Method forName=c.getMethod("forName",ctab);
-+
-+          Class gtab[]=new Class[2];
-+          gtab[0]=Class.forName("java.lang.String");
-+          gtab[1]=Class[].class;
-+          Method getMethod=c.getMethod("getMethod",gtab);
-+
-+          Method newInstance=c.getMethod("newInstance",(Class[])null);
-+
-+          Object otab[]=new Object[1];
-+          otab[0]="sun.misc.Unsafe";
-+
-+          Object o=invokeMethod(null,forName,otab);
-+          c = (Class)o;		// sun.misc.Unsafe class
-+          // Test FAILED: Should n't have got the reference.   
-+          throw new RuntimeException("Test Failed: Got reference to: "+o);
-+
-+
-+          //o=invokeMethod(c,getMethod, new Object[]{"getUnsafe", (Class[])null});
-+          //System.out.println("Got reference to: "+o);
-+          //throw new RuntimeException("Got reference to: "+o);
-+          //o=invokeMethod(c,(Method)o,null);
-+          //System.out.println("Got reference to: "+o);
-+          //throw new RuntimeException("Got reference to: "+o);
-+   
-+      } catch(java.security.AccessControlException e) {
-+          System.out.println("Test passed");
-+          //e.printStackTrace();
-+      } 
-+   }
-+}
--- a/patches/6733959.patch	Wed Sep 21 18:56:43 2011 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,225 +0,0 @@
-diff -Nru openjdk.orig/jdk/src/share/bin/java.c openjdk/jdk/src/share/bin/java.c
---- openjdk.orig/jdk/src/share/bin/java.c	2008-12-02 16:28:05.000000000 +0000
-+++ openjdk/jdk/src/share/bin/java.c	2008-12-02 17:08:57.000000000 +0000
-@@ -885,8 +885,14 @@
-      * "Valid" returns (other than unrecoverable errors) follow.  Set
-      * main_class as a side-effect of this routine.
-      */
--    if (info.main_class != NULL)
-+    if (info.main_class != NULL) {
-+      if (strlen(info.main_class) <= MAXNAMELEN) {
-         *main_class = JLI_StringDup(info.main_class);
-+      } else {
-+        JLI_ReportErrorMessage("Error: main-class: attribute exceeds system limits\n", JNI_TRUE);
-+	exit(1);
-+      }
-+    }
- 
-     /*
-      * If no version selection information is found either on the command
-diff -Nru openjdk.orig/jdk/test/tools/launcher/MultipleJRE.sh openjdk/jdk/test/tools/launcher/MultipleJRE.sh
---- openjdk.orig/jdk/test/tools/launcher/MultipleJRE.sh	2008-12-03 12:35:03.000000000 +0000
-+++ openjdk/jdk/test/tools/launcher/MultipleJRE.sh	2008-12-02 17:07:57.000000000 +0000
-@@ -49,10 +49,23 @@
-   exit 1
- fi
- 
-+JAVAEXE="$TESTJAVA/bin/java"
- JAVA="$TESTJAVA/bin/java -classpath $TESTCLASSES"
- JAR="$TESTJAVA/bin/jar"
- OS=`uname -s`;
- 
-+# Tests whether we are on windows (true) or not.
-+IsWindows() {
-+    case "$OS" in
-+        Windows* | CYGWIN* )
-+            printf "true"
-+        ;;
-+        * )
-+            printf "false"
-+        ;;
-+    esac
-+}
-+
- #
- # Shell routine to test for the proper rejection of syntactically incorrect
- # version specifications.
-@@ -262,6 +275,29 @@
- 	fi
- }
- 
-+# Tests very long Main-Class attribute in the jar.
-+TestLongMainClass() {
-+    JVER=$1
-+    if [ "$JVER" = "mklink" ]; then
-+        JVER=XX
-+        JDKXX=jdk/j2re$JVER
-+        rm -rf jdk
-+        mkdir jdk
-+        ln -s $TESTJAVA $JDKXX
-+        JAVA_VERSION_PATH="`pwd`/jdk"
-+        export JAVA_VERSION_PATH
-+    fi
-+    $JAVAEXE -cp $TESTCLASSES ZipMeUp UglyBetty.jar 4097 
-+    message="`$JAVAEXE -version:$JVER -jar UglyBetty.jar 2>&1`"
-+    echo $message | grep "Error: main-class: attribute exceeds system limits" > /dev/null 2>&1
-+    if [ $? -ne 0 ]; then
-+        printf "Long manifest test did not get expected error"
-+        exit 1
-+    fi
-+    unset JAVA_VERSION_PATH
-+    rm -rf jdk
-+}
-+
- #
- # Main test sequence starts here
- #
-@@ -280,14 +316,12 @@
- LaunchVM "" "${RELEASE}"
- CreateJar "" "0"
- LaunchVM "" "${RELEASE}"
--case "$OS" in
--	Windows* | CYGWIN* )
--		MAXIMUM_PATH=255;
--	;;
--	*)
--		MAXIMUM_PATH=1024;
--	;;
--esac
-+if [ `IsWindows` = "true" ]; then
-+    MAXIMUM_PATH=115;  # 115 = 255 - 140
-+else
-+    MAXIMUM_PATH=884;  # 884 = 1024 - 140
-+fi
-+
- 
- PATH_LENGTH=`printf "%s" "$UGLYCLASS" | wc -c`
- if [ ${PATH_LENGTH} -lt ${MAXIMUM_PATH} ]; then
-@@ -357,15 +391,28 @@
- TestSyntax "1.2+.3"				# Embedded modifier
- TestSyntax "1.2.4+&1.2*&1++"			# Long and invalid
- 
-+# On windows we see if there is another jre installed, usually
-+# there is, then we test using that, otherwise links are created
-+# to get through to SelectVersion.
-+if [ `IsWindows` = "false" ]; then
-+   TestLongMainClass "mklink"
-+else
-+    $JAVAEXE -version:1.0+
-+    if [ $? -eq 0 ]; then
-+        TestLongMainClass "1.0+"
-+    else
-+        printf  "Warning: TestLongMainClass skipped as there is no"
-+       printf  "viable MJRE installed.\n"
-+    fi
-+fi
-+
- #
- # Because scribbling in the registry can be rather destructive, only a
- # subset of the tests are run on Windows.
- #
--case "$OS" in
--	Windows* | CYGWIN* )
--		exit 0;
--	;;
--esac
-+if [ `IsWindows` = "true" ]; then
-+   exit 0;
-+fi
- 
- #
- # Additional version specifiers containing spaces.  (Sigh, unable to
-diff -Nru openjdk.orig/jdk/test/tools/launcher/ZipMeUp.java openjdk/jdk/test/tools/launcher/ZipMeUp.java
---- openjdk.orig/jdk/test/tools/launcher/ZipMeUp.java	1970-01-01 01:00:00.000000000 +0100
-+++ openjdk/jdk/test/tools/launcher/ZipMeUp.java	2008-12-02 17:07:57.000000000 +0000
-@@ -0,0 +1,90 @@
-+/*
-+ * Copyright 2008 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.
-+ *
-+ * 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.
-+ */
-+
-+/**
-+ * A simple class to create our erring Jar with a very long Main-Class
-+ * attribute in the manifest.
-+ */
-+import java.io.ByteArrayOutputStream;
-+import java.io.FileOutputStream;
-+import java.io.IOException;
-+import java.io.PrintStream;
-+import java.util.zip.CRC32;
-+import java.util.zip.CheckedOutputStream;
-+import java.util.zip.ZipEntry;
-+import java.util.zip.ZipOutputStream;
-+public class ZipMeUp {
-+    
-+    static final CRC32 crc = new CRC32();
-+    
-+    private static String SOME_KLASS = ".Some";
-+    
-+    static byte[] getManifestAsBytes(int nchars) throws IOException {
-+        crc.reset();
-+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-+        CheckedOutputStream cos = new CheckedOutputStream(baos, crc);
-+        PrintStream ps = new PrintStream(cos);
-+        ps.println("Manifest-Version: 1.0");
-+        ps.print("Main-Class: ");
-+        for (int i = 0 ; i < nchars - SOME_KLASS.length(); i++) {
-+            ps.print(i%10);
-+        }
-+        ps.println(SOME_KLASS);
-+        cos.flush();
-+        cos.close();
-+        ps.close();
-+        return baos.toByteArray();
-+    }
-+    /**
-+     * The arguments are: filename_to_create length
-+     * @param args
-+     * @throws java.lang.Exception
-+     */
-+    public static void main(String...args) throws Exception  {
-+        FileOutputStream fos = new FileOutputStream(args[0]);
-+        ZipOutputStream zos = new ZipOutputStream(fos);
-+        byte[] manifest = getManifestAsBytes(Integer.parseInt(args[1]));
-+        ZipEntry ze = new ZipEntry("META-INF/MANIFEST.MF");
-+        ze.setMethod(ZipEntry.STORED);
-+        ze.setSize(manifest.length);
-+        ze.setCompressedSize(manifest.length);
-+        ze.setCrc(crc.getValue());
-+        ze.setTime(System.currentTimeMillis());
-+        zos.putNextEntry(ze);
-+        zos.write(manifest);
-+        zos.flush();
-+        
-+        // add a zero length class
-+        ze = new ZipEntry(SOME_KLASS + ".class");
-+        ze.setMethod(ZipEntry.STORED);
-+        ze.setSize(0);
-+        ze.setCompressedSize(0);
-+        ze.setCrc(0);
-+        ze.setTime(System.currentTimeMillis());
-+        zos.putNextEntry(ze);
-+        zos.flush();
-+        zos.closeEntry();
-+        zos.close();
-+        System.exit(0);
-+    }
-+}
--- a/patches/6755943.patch	Wed Sep 21 18:56:43 2011 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,373 +0,0 @@
-diff -Nru openjdk.orig/jdk/test/tools/pack200/MemoryAllocatorTest.java openjdk/jdk/test/tools/pack200/MemoryAllocatorTest.java
---- openjdk.orig/jdk/test/tools/pack200/MemoryAllocatorTest.java	1970-01-01 01:00:00.000000000 +0100
-+++ openjdk/jdk/test/tools/pack200/MemoryAllocatorTest.java	2008-12-02 15:42:47.000000000 +0000
-@@ -0,0 +1,369 @@
-+/*
-+ * Copyright 2008 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.
-+ *
-+ * 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.
-+ */
-+
-+/*
-+ * @test
-+ * @bug 6755943
-+ * @summary Checks any memory overruns in archive length.
-+ * @run main/timeout=1200 MemoryAllocatorTest
-+ */
-+import java.io.BufferedReader;
-+import java.io.DataOutputStream;
-+import java.io.File;
-+import java.io.FileOutputStream;
-+import java.io.IOException;
-+import java.io.InputStreamReader;
-+import java.io.OutputStream;
-+import java.io.RandomAccessFile;
-+import java.nio.MappedByteBuffer;
-+import java.nio.channels.FileChannel;
-+import java.util.ArrayList;
-+import java.util.List;
-+import java.util.Map;
-+
-+public class MemoryAllocatorTest {
-+
-+    /*
-+     * The smallest possible pack file with 1 empty resource
-+     */
-+    static int[] magic = {
-+        0xCA, 0xFE, 0xD0, 0x0D
-+    };
-+    static int[] version_info = {
-+        0x07, // minor
-+        0x96  // major
-+    };
-+    static int[] option = {
-+        0x10
-+    };
-+    static int[] size_hi = {
-+        0x00
-+    };
-+    static int[] size_lo_ulong = {
-+        0xFF, 0xFC, 0xFC, 0xFC, 0xFC // ULONG_MAX 0xFFFFFFFF
-+    };
-+    static int[] size_lo_correct = {
-+        0x17
-+    };
-+    static int[] data = {
-+        0x00, 0xEC, 0xDA, 0xDE, 0xF8, 0x45, 0x01, 0x02,
-+        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-+        0x00, 0x00, 0x00, 0x01, 0x31, 0x01, 0x00
-+    };
-+    // End of pack file data
-+
-+    static final String JAVA_HOME = System.getProperty("java.home");
-+
-+    static final boolean debug = Boolean.getBoolean("MemoryAllocatorTest.Debug");
-+    static final boolean WINDOWS = System.getProperty("os.name").startsWith("Windows");
-+    static final boolean LINUX = System.getProperty("os.name").startsWith("Linux");
-+    static final boolean SIXTYFOUR_BIT = System.getProperty("sun.arch.data.model", "32").equals("64");
-+    static final private int EXPECTED_EXIT_CODE = (WINDOWS) ? -1 : 255;
-+
-+    static int testExitValue = 0;
-+    
-+    static byte[] bytes(int[] a) {
-+        byte[] b = new byte[a.length];
-+        for (int i = 0; i < b.length; i++) {
-+            b[i] = (byte) a[i];
-+        }
-+        return b;
-+    }
-+    
-+    static void createPackFile(boolean good, File packFile) throws IOException {
-+        FileOutputStream fos = new FileOutputStream(packFile);
-+        fos.write(bytes(magic));
-+        fos.write(bytes(version_info));
-+        fos.write(bytes(option));
-+        fos.write(bytes(size_hi));
-+        if (good) {
-+            fos.write(bytes(size_lo_correct));
-+        } else {
-+            fos.write(bytes(size_lo_ulong));
-+        }
-+        fos.write(bytes(data));
-+    }
-+
-+    /*
-+     * This method modifies the LSB of the size_lo for various wicked
-+     * values between MAXINT-0x3F and MAXINT.
-+     */
-+    static int modifyPackFile(File packFile) throws IOException {
-+        RandomAccessFile raf = new RandomAccessFile(packFile, "rws");
-+        long len = packFile.length();
-+        FileChannel fc = raf.getChannel();
-+        MappedByteBuffer bb = fc.map(FileChannel.MapMode.READ_WRITE, 0, len);
-+        int pos = magic.length + version_info.length + option.length +
-+                size_hi.length;
-+        byte value = bb.get(pos);
-+        value--;
-+        bb.position(pos);
-+        bb.put(value);
-+        bb.force();
-+        fc.truncate(len);
-+        fc.close();
-+        return value & 0xFF;
-+    }
-+
-+    static String getUnpack200Cmd() throws Exception {
-+        File binDir = new File(JAVA_HOME, "bin");
-+        File unpack200File = WINDOWS
-+                ? new File(binDir, "unpack200.exe")
-+                : new File(binDir, "unpack200");
-+
-+        String cmd = unpack200File.getAbsolutePath();
-+        if (!unpack200File.canExecute()) {
-+            throw new Exception("please check" +
-+                    cmd + " exists and is executable");
-+        }
-+        return cmd;
-+    }
-+
-+    static TestResult runUnpacker(File packFile) throws Exception {
-+        if (!packFile.exists()) {
-+            throw new Exception("please check" + packFile + " exists");
-+        }
-+        ArrayList<String> alist = new ArrayList<String>();
-+        ProcessBuilder pb = new ProcessBuilder(getUnpack200Cmd(),
-+                packFile.getName(), "testout.jar");
-+        Map<String, String> env = pb.environment();
-+        pb.directory(new File("."));
-+        int retval = 0;
-+        try {
-+            pb.redirectErrorStream(true);
-+            Process p = pb.start();
-+            BufferedReader rd = new BufferedReader(
-+                    new InputStreamReader(p.getInputStream()), 8192);
-+            String in = rd.readLine();
-+            while (in != null) {
-+                alist.add(in);
-+                System.out.println(in);
-+                in = rd.readLine();
-+            }
-+            retval = p.waitFor();
-+            p.destroy();
-+        } catch (Exception ex) {
-+            ex.printStackTrace();
-+            throw new RuntimeException(ex.getMessage());
-+        }
-+        return new TestResult("", retval, alist);
-+    }
-+
-+    /*
-+     * The debug version builds of unpack200 call abort(3) which might set
-+     * an unexpected return value, therefore this test is to determine
-+     * if we are using a product or non-product build and check the
-+     * return value appropriately.
-+     */
-+    static boolean isNonProductVersion() throws Exception {
-+        ArrayList<String> alist = new ArrayList<String>();
-+        ProcessBuilder pb = new ProcessBuilder(getUnpack200Cmd(), "--version");
-+        Map<String, String> env = pb.environment();
-+        pb.directory(new File("."));
-+        int retval = 0;
-+        try {
-+            pb.redirectErrorStream(true);
-+            Process p = pb.start();
-+            BufferedReader rd = new BufferedReader(
-+                    new InputStreamReader(p.getInputStream()), 8192);
-+            String in = rd.readLine();
-+            while (in != null) {
-+                alist.add(in);
-+                System.out.println(in);
-+                in = rd.readLine();
-+            }
-+            retval = p.waitFor();
-+            p.destroy();
-+        } catch (Exception ex) {
-+            ex.printStackTrace();
-+            throw new RuntimeException(ex.getMessage());
-+        }
-+        for (String x : alist) {
-+            if (x.contains("non-product")) {
-+                return true;
-+            }
-+        }
-+        return false;
-+    }
-+
-+    /**
-+     * @param args the command line arguments
-+     * @throws java.lang.Exception 
-+     */
-+    public static void main(String[] args) throws Exception {
-+
-+        File packFile = new File("tiny.pack");
-+        boolean isNPVersion = isNonProductVersion();
-+
-+        // Create a good pack file and test if everything is ok
-+        createPackFile(true, packFile);
-+        TestResult tr = runUnpacker(packFile);
-+        tr.setDescription("a good pack file");
-+        tr.checkPositive();
-+        tr.isOK();
-+        System.out.println(tr);
-+
-+        /*
-+         * jprt systems on windows and linux seem to have abundant memory
-+         * therefore can take a very long time to run, and even if it does
-+         * the error message is not accurate for us to discern if the test
-+         * passes successfully.
-+         */
-+        if (SIXTYFOUR_BIT && (LINUX || WINDOWS)) {
-+            System.out.println("Warning: Windows/Linux 64bit tests passes vacuously");
-+            return;
-+        }
-+        
-+        /*
-+         * debug builds call abort, the exit code under these conditions
-+         * are not really relevant.
-+         */
-+        if (isNPVersion) {
-+            System.out.println("Warning: non-product build: exit values not checked");
-+        }
-+    
-+        // create a bad pack file
-+        createPackFile(false, packFile);
-+        tr = runUnpacker(packFile);
-+        tr.setDescription("a wicked pack file");
-+        tr.contains("Native allocation failed");
-+        if(!isNPVersion) {
-+            tr.checkValue(EXPECTED_EXIT_CODE);
-+        }
-+        System.out.println(tr);
-+        int value = modifyPackFile(packFile);
-+        tr.setDescription("value=" + value);
-+
-+        // continue creating bad pack files by modifying the specimen pack file.
-+        while (value >= 0xc0) {
-+            tr = runUnpacker(packFile);
-+            tr.contains("Native allocation failed");
-+            if (!isNPVersion) {
-+                tr.checkValue(EXPECTED_EXIT_CODE);
-+            }
-+            tr.setDescription("wicked value=0x" +
-+                    Integer.toHexString(value & 0xFF));
-+            System.out.println(tr);
-+            value = modifyPackFile(packFile);
-+        }
-+        if (testExitValue != 0) {
-+            throw new Exception("Pack200 archive length tests(" +
-+                    testExitValue + ") failed ");
-+        } else {
-+            System.out.println("All tests pass");
-+        }
-+    }
-+
-+    /*
-+     * A class to encapsulate the test results and stuff, with some ease
-+     * of use methods to check the test results.
-+     */
-+    static class TestResult {
-+
-+        StringBuilder status;
-+        int exitValue;
-+        List<String> testOutput;
-+        String description;
-+
-+        public TestResult(String str, int rv, List<String> oList) {
-+            status = new StringBuilder(str);
-+            exitValue = rv;
-+            testOutput = oList;
-+        }
-+
-+        void setDescription(String description) {
-+            this.description = description;
-+        }
-+
-+        void checkValue(int value) {
-+            if (exitValue != value) {
-+                status =
-+                        status.append("  Error: test expected exit value " +
-+                        value + "got " + exitValue);
-+                testExitValue++;
-+            }
-+        }
-+
-+        void checkNegative() {
-+            if (exitValue == 0) {
-+                status = status.append(
-+                        "  Error: test did not expect 0 exit value");
-+
-+                testExitValue++;
-+            }
-+        }
-+
-+        void checkPositive() {
-+            if (exitValue != 0) {
-+                status = status.append(
-+                        "  Error: test did not return 0 exit value");
-+                testExitValue++;
-+            }
-+        }
-+
-+        boolean isOK() {
-+            return exitValue == 0;
-+        }
-+
-+        boolean isZeroOutput() {
-+            if (!testOutput.isEmpty()) {
-+                status = status.append("  Error: No message from cmd please");
-+                testExitValue++;
-+                return false;
-+            }
-+            return true;
-+        }
-+
-+        boolean isNotZeroOutput() {
-+            if (testOutput.isEmpty()) {
-+                status = status.append("  Error: Missing message");
-+                testExitValue++;
-+                return false;
-+            }
-+            return true;
-+        }
-+
-+        public String toString() {
-+            if (debug) {
-+                for (String x : testOutput) {
-+                    status = status.append(x + "\n");
-+                }
-+            }
-+            if (description != null) {
-+                status.insert(0, description);
-+            }
-+            return status.append("\nexitValue = " + exitValue).toString();
-+        }
-+
-+        boolean contains(String str) {
-+            for (String x : testOutput) {
-+                if (x.contains(str)) {
-+                    return true;
-+                }
-+            }
-+            status = status.append("   Error: string <" + str + "> not found ");
-+            testExitValue++;
-+            return false;
-+        }
-+    }
-+}
--- a/patches/alpha-fixes.patch	Wed Sep 21 18:56:43 2011 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-diff -Nru openjdk.orig/hotspot/agent/src/os/linux/Makefile openjdk/hotspot/agent/src/os/linux/Makefile
---- openjdk.orig/hotspot/agent/src/os/linux/Makefile	2010-09-01 09:57:06.000000000 +0100
-+++ openjdk/hotspot/agent/src/os/linux/Makefile	2010-09-01 10:27:09.592191147 +0100
-@@ -40,7 +40,7 @@
- 
- LIBS     = -lthread_db
- 
--CFLAGS   = -c -fPIC -g -D_GNU_SOURCE -D$(ARCH) $(INCLUDES)
-+CFLAGS   = -c -fPIC -g -D_GNU_SOURCE -D_$(ARCH)_ $(if $(filter $(ARCH),alpha),,-D$(ARCH)) $(INCLUDES)
- 
- LIBSA = $(ARCH)/libsaproc.so
- 
-@@ -73,7 +73,7 @@
- 	$(GCC) -shared $(LFLAGS_LIBSA) -o $(LIBSA) $(OBJS) $(LIBS)
- 
- test.o: test.c
--	$(GCC) -c -o test.o -g -D_GNU_SOURCE -D$(ARCH) $(INCLUDES) test.c
-+	$(GCC) -c -o test.o -g -D_GNU_SOURCE -D_$(ARCH)_ $(if $(filter $(ARCH),alpha),,-D$(ARCH)) $(INCLUDES) test.c
- 
- test: test.o
- 	$(GCC) -o test test.o -L$(ARCH) -lsaproc $(LIBS)
-diff -Nru openjdk.orig/hotspot/src/share/vm/oops/generateOopMap.cpp openjdk/hotspot/src/share/vm/oops/generateOopMap.cpp
---- openjdk.orig/hotspot/src/share/vm/oops/generateOopMap.cpp	2010-08-27 19:15:27.000000000 +0100
-+++ openjdk/hotspot/src/share/vm/oops/generateOopMap.cpp	2010-09-01 10:28:08.943025196 +0100
-@@ -2104,7 +2104,7 @@
- void GenerateOopMap::report_error(const char *format, ...) {
-   va_list ap;
-   va_start(ap, format);
--  error_work(format, ap);
-+  report_error(format, ap);
- }
- 
- void GenerateOopMap::verify_error(const char *format, ...) {
--- a/patches/alt-jar.patch	Wed Sep 21 18:56:43 2011 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
---- openjdk.orig/jdk/make/common/shared/Defs-java.gmk	2008-05-30 03:50:36.000000000 -0400
-+++ openjdk/jdk/make/common/shared/Defs-java.gmk	2008-08-06 11:18:26.000000000 -0400
-@@ -187,7 +181,11 @@
- 
- BOOT_JAVA_CMD      = $(BOOTDIR)/bin/java $(JAVA_TOOLS_FLAGS)
- BOOT_JAVAC_CMD     = $(BOOTDIR)/bin/javac $(JAVAC_JVM_FLAGS) $(BOOT_JAVACFLAGS)
--BOOT_JAR_CMD       = $(BOOTDIR)/bin/jar
-+ifdef ALT_JAR_CMD
-+  BOOT_JAR_CMD       = $(ALT_JAR_CMD)
-+else
-+  BOOT_JAR_CMD       = $(BOOTDIR)/bin/jar
-+endif
- BOOT_JARSIGNER_CMD = $(BOOTDIR)/bin/jarsigner
- 
- # Various tools we need to run (FIXUP: Are these the right ones?)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/boot/javafiles.patch	Fri Sep 23 17:30:26 2011 +0100
@@ -0,0 +1,164 @@
+diff -Nru openjdk-boot.origcorba/make/com/sun/corba/minclude/com_sun_corba_se_impl_encoding.jmk openjdk-boot/corba/make/com/sun/corba/minclude/com_sun_corba_se_impl_encoding.jmk
+--- openjdk-boot.origcorba/make/com/sun/corba/minclude/com_sun_corba_se_impl_encoding.jmk	2010-07-29 21:54:09.000000000 +0100
++++ openjdk-boot/corba/make/com/sun/corba/minclude/com_sun_corba_se_impl_encoding.jmk	2011-03-16 20:45:33.914471077 +0000
+@@ -62,7 +62,6 @@
+ 	com/sun/corba/se/impl/encoding/TypeCodeInputStream.java \
+ 	com/sun/corba/se/impl/encoding/TypeCodeOutputStream.java \
+ 	com/sun/corba/se/impl/encoding/TypeCodeReader.java \
+-	com/sun/corba/se/impl/encoding/WrapperInputStream.java
+-
+-
+-
++	com/sun/corba/se/impl/encoding/WrapperInputStream.java \
++	com/sun/corba/se/impl/encoding/IDLJavaSerializationInputStream.java \
++	com/sun/corba/se/impl/encoding/IDLJavaSerializationOutputStream.java
+diff -Nru openjdk-boot.origcorba/make/com/sun/corba/minclude/com_sun_corba_se_impl_ior.jmk openjdk-boot/corba/make/com/sun/corba/minclude/com_sun_corba_se_impl_ior.jmk
+--- openjdk-boot.origcorba/make/com/sun/corba/minclude/com_sun_corba_se_impl_ior.jmk	2010-07-29 21:54:09.000000000 +0100
++++ openjdk-boot/corba/make/com/sun/corba/minclude/com_sun_corba_se_impl_ior.jmk	2011-03-16 20:45:33.922471207 +0000
+@@ -66,4 +66,5 @@
+ 	com/sun/corba/se/impl/ior/iiop/JavaSerializationComponent.java \
+ 	com/sun/corba/se/impl/ior/iiop/MaxStreamFormatVersionComponentImpl.java \
+ 	com/sun/corba/se/impl/ior/iiop/RequestPartitioningComponentImpl.java \
+-	com/sun/corba/se/impl/ior/iiop/ORBTypeComponentImpl.java
++	com/sun/corba/se/impl/ior/iiop/ORBTypeComponentImpl.java \
++	com/sun/corba/se/impl/ior/iiop/JavaSerializationComponent.java
+diff -Nru openjdk-boot.origcorba/make/com/sun/corba/minclude/com_sun_corba_se_impl_orbutil.jmk openjdk-boot/corba/make/com/sun/corba/minclude/com_sun_corba_se_impl_orbutil.jmk
+--- openjdk-boot.origcorba/make/com/sun/corba/minclude/com_sun_corba_se_impl_orbutil.jmk	2010-07-29 21:54:09.000000000 +0100
++++ openjdk-boot/corba/make/com/sun/corba/minclude/com_sun_corba_se_impl_orbutil.jmk	2011-03-16 20:45:33.922471207 +0000
+@@ -81,4 +81,5 @@
+ 	com/sun/corba/se/impl/orbutil/graph/Node.java \
+ 	com/sun/corba/se/impl/orbutil/graph/NodeData.java \
+ 	com/sun/corba/se/impl/orbutil/graph/Graph.java \
+-	com/sun/corba/se/impl/orbutil/graph/GraphImpl.java 
++	com/sun/corba/se/impl/orbutil/graph/GraphImpl.java \
++	com/sun/corba/se/impl/orbutil/GetPropertyAction.java
+diff -Nru openjdk-boot.origcorba/make/com/sun/corba/minclude/com_sun_corba_se_impl_protocol.jmk openjdk-boot/corba/make/com/sun/corba/minclude/com_sun_corba_se_impl_protocol.jmk
+--- openjdk-boot.origcorba/make/com/sun/corba/minclude/com_sun_corba_se_impl_protocol.jmk	2010-07-29 21:54:09.000000000 +0100
++++ openjdk-boot/corba/make/com/sun/corba/minclude/com_sun_corba_se_impl_protocol.jmk	2011-03-16 20:45:33.922471207 +0000
+@@ -81,5 +81,5 @@
+ 	com/sun/corba/se/impl/protocol/giopmsgheaders/RequestMessage_1_1.java \
+ 	com/sun/corba/se/impl/protocol/giopmsgheaders/RequestMessage_1_2.java \
+ 	com/sun/corba/se/impl/protocol/giopmsgheaders/TargetAddress.java \
+-	com/sun/corba/se/impl/protocol/giopmsgheaders/TargetAddressHelper.java
+-
++	com/sun/corba/se/impl/protocol/giopmsgheaders/TargetAddressHelper.java \
++	com/sun/corba/se/impl/protocol/giopmsgheaders/LocateReplyOrReplyMessage.java
+diff -Nru openjdk-boot.origcorba/make/com/sun/corba/minclude/com_sun_corba_se_spi_monitoring.jmk openjdk-boot/corba/make/com/sun/corba/minclude/com_sun_corba_se_spi_monitoring.jmk
+--- openjdk-boot.origcorba/make/com/sun/corba/minclude/com_sun_corba_se_spi_monitoring.jmk	2010-07-29 21:54:09.000000000 +0100
++++ openjdk-boot/corba/make/com/sun/corba/minclude/com_sun_corba_se_spi_monitoring.jmk	2011-03-16 20:45:33.922471207 +0000
+@@ -30,6 +30,7 @@
+ 	com/sun/corba/se/spi/monitoring/StringMonitoredAttributeBase.java \
+ 	com/sun/corba/se/spi/monitoring/LongMonitoredAttributeBase.java \
+ 	com/sun/corba/se/spi/monitoring/MonitoringFactories.java \
++	com/sun/corba/se/spi/monitoring/MonitoringConstants.java \
+ 	com/sun/corba/se/spi/monitoring/MonitoredAttributeInfo.java \
+ 	com/sun/corba/se/spi/monitoring/MonitoredObject.java \
+ 	com/sun/corba/se/spi/monitoring/MonitoredObjectFactory.java \
+diff -Nru openjdk-boot.origcorba/make/com/sun/corba/minclude/com_sun_corba_se_spi_presentation_rmi.jmk openjdk-boot/corba/make/com/sun/corba/minclude/com_sun_corba_se_spi_presentation_rmi.jmk
+--- openjdk-boot.origcorba/make/com/sun/corba/minclude/com_sun_corba_se_spi_presentation_rmi.jmk	2010-07-29 21:54:09.000000000 +0100
++++ openjdk-boot/corba/make/com/sun/corba/minclude/com_sun_corba_se_spi_presentation_rmi.jmk	2011-03-16 20:45:33.922471207 +0000
+@@ -29,5 +29,6 @@
+ 	com/sun/corba/se/spi/presentation/rmi/IDLNameTranslator.java \
+ 	com/sun/corba/se/spi/presentation/rmi/PresentationDefaults.java \
+ 	com/sun/corba/se/spi/presentation/rmi/PresentationManager.java \
++	com/sun/corba/se/spi/presentation/rmi/PresentationDefaults.java \
+ 	com/sun/corba/se/spi/presentation/rmi/StubAdapter.java
+ 
+diff -Nru openjdk-boot.origjdk/make/java/java/FILES_java.gmk openjdk-boot/jdk/make/java/java/FILES_java.gmk
+--- openjdk-boot.origjdk/make/java/java/FILES_java.gmk	2011-03-14 22:10:30.000000000 +0000
++++ openjdk-boot/jdk/make/java/java/FILES_java.gmk	2011-03-16 20:45:33.922471207 +0000
+@@ -29,6 +29,80 @@
+ # will generate header files
+ #
+ JAVA_JAVA_java = \
++    java/lang/reflect/AccessibleObject.java \
++    java/lang/reflect/AnnotatedElement.java \
++    java/lang/reflect/Array.java \
++    java/lang/reflect/Constructor.java \
++    java/lang/reflect/Field.java \
++    java/lang/reflect/GenericArrayType.java \
++    java/lang/reflect/GenericDeclaration.java \
++    java/lang/reflect/GenericSignatureFormatError.java \
++    java/lang/reflect/InvocationHandler.java \
++    java/lang/reflect/InvocationTargetException.java \
++    java/lang/reflect/MalformedParameterizedTypeException.java \
++    java/lang/reflect/Member.java \
++    java/lang/reflect/Method.java \
++    java/lang/reflect/Modifier.java \
++    java/lang/reflect/package-info.java \
++    java/lang/reflect/ParameterizedType.java \
++    java/lang/reflect/Proxy.java \
++    java/lang/reflect/ReflectAccess.java \
++    java/lang/reflect/ReflectPermission.java \
++    java/lang/reflect/Type.java \
++    java/lang/reflect/TypeVariable.java \
++    java/lang/reflect/UndeclaredThrowableException.java \
++    java/lang/reflect/WildcardType.java \
++    java/lang/ref/Finalizer.java \
++    java/lang/ref/FinalReference.java \
++    java/lang/ref/PhantomReference.java \
++    java/lang/ref/Reference.java \
++    java/lang/ref/ReferenceQueue.java \
++    java/lang/ref/SoftReference.java \
++    java/lang/ref/WeakReference.java \
++    java/lang/management/ClassLoadingMXBean.java \
++    java/lang/management/CompilationMXBean.java \
++    java/lang/management/GarbageCollectorMXBean.java \
++    java/lang/management/LockInfo.java \
++    java/lang/management/ManagementFactory.java \
++    java/lang/management/ManagementPermission.java \
++    java/lang/management/MemoryManagerMXBean.java \
++    java/lang/management/MemoryMXBean.java \
++    java/lang/management/MemoryNotificationInfo.java \
++    java/lang/management/MemoryPoolMXBean.java \
++    java/lang/management/MemoryType.java \
++    java/lang/management/MemoryUsage.java \
++    java/lang/management/MonitorInfo.java \
++    java/lang/management/OperatingSystemMXBean.java \
++    java/lang/management/RuntimeMXBean.java \
++    java/lang/management/ThreadInfo.java \
++    java/lang/management/ThreadMXBean.java \
++    java/lang/instrument/ClassDefinition.java \
++    java/lang/instrument/ClassFileTransformer.java \
++    java/lang/instrument/IllegalClassFormatException.java \
++    java/lang/instrument/Instrumentation.java \
++    java/lang/instrument/UnmodifiableClassException.java \
++    java/lang/annotation/AnnotationFormatError.java \
++    java/lang/annotation/Annotation.java \
++    java/lang/annotation/AnnotationTypeMismatchException.java \
++    java/lang/annotation/Documented.java \
++    java/lang/annotation/ElementType.java \
++    java/lang/annotation/IncompleteAnnotationException.java \
++    java/lang/annotation/Inherited.java \
++    java/lang/annotation/package-info.java \
++    java/lang/annotation/Retention.java \
++    java/lang/annotation/RetentionPolicy.java \
++    java/lang/annotation/Target.java \
++    java/io/IOError.java \
++    java/lang/Deprecated.java \
++    java/lang/Iterable.java \
++    java/util/RandomAccess.java \
++    java/lang/CharacterData00.java \
++    java/lang/CharacterData01.java \
++    java/lang/CharacterData02.java \
++    java/lang/CharacterData0E.java \
++    java/lang/CharacterDataLatin1.java \
++    java/lang/CharacterDataPrivateUse.java \
++    java/lang/CharacterDataUndefined.java \
+     java/lang/Object.java \
+     java/lang/AutoCloseable.java \
+     java/lang/Class.java \
+@@ -139,13 +213,6 @@
+     java/lang/Override.java \
+     java/lang/SafeVarargs.java \
+     java/lang/SuppressWarnings.java \
+-    java/lang/ref/Reference.java \
+-        java/lang/ref/SoftReference.java \
+-	java/lang/ref/WeakReference.java \
+-	java/lang/ref/FinalReference.java \
+-	java/lang/ref/PhantomReference.java \
+-    java/lang/ref/ReferenceQueue.java \
+-    java/lang/ref/Finalizer.java \
+     java/util/BitSet.java \
+     java/util/Calendar.java \
+         java/util/GregorianCalendar.java \
--- a/patches/cacao/arch.patch	Wed Sep 21 18:56:43 2011 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,155 +0,0 @@
-diff -Nru openjdk.orig/jdk/make/common/Defs-linux.gmk openjdk/jdk/make/common/Defs-linux.gmk
---- openjdk.orig/jdk/make/common/Defs-linux.gmk	2011-06-11 00:38:06.000000000 +0100
-+++ openjdk/jdk/make/common/Defs-linux.gmk	2011-07-29 08:43:20.137660933 +0100
-@@ -100,9 +100,19 @@
- #    We need this frame pointer to make it easy to walk the stacks.
- #    This should be the default on X86, but ia64 and amd64 may not have this
- #    as the default.
-+CFLAGS_REQUIRED_alpha   += -mieee -D_LITTLE_ENDIAN
- CFLAGS_REQUIRED_amd64   += -fno-omit-frame-pointer -D_LITTLE_ENDIAN
-+CFLAGS_REQUIRED_arm     += -D_LITTLE_ENDIAN
-+CFLAGS_REQUIRED_hppa    +=
- CFLAGS_REQUIRED_i586    += -fno-omit-frame-pointer -D_LITTLE_ENDIAN
- CFLAGS_REQUIRED_ia64    += -fno-omit-frame-pointer -D_LITTLE_ENDIAN
-+CFLAGS_REQUIRED_m68k    +=
-+CFLAGS_REQUIRED_mips    +=
-+CFLAGS_REQUIRED_mipsel  += -D_LITTLE_ENDIAN
-+CFLAGS_REQUIRED_ppc     += -m32
-+CFLAGS_REQUIRED_ppc64   += -m64
-+CFLAGS_REQUIRED_s390    +=
-+CFLAGS_REQUIRED_s390x   += -m64
- CFLAGS_REQUIRED_sparcv9 += -m64 -mcpu=v9
- LDFLAGS_COMMON_sparcv9  += -m64 -mcpu=v9
- CFLAGS_REQUIRED_sparc   += -m32 -mcpu=v9
-diff -Nru openjdk.orig/jdk/make/common/shared/Compiler-gcc.gmk openjdk/jdk/make/common/shared/Compiler-gcc.gmk
---- openjdk.orig/jdk/make/common/shared/Compiler-gcc.gmk	2011-07-29 04:12:27.000000000 +0100
-+++ openjdk/jdk/make/common/shared/Compiler-gcc.gmk	2011-07-29 08:43:20.137660933 +0100
-@@ -76,6 +76,52 @@
-   else
-     CXX            = $(BUILD_CPP)
-   endif
-+  ifeq ($(ARCH), alpha)
-+    # alpha
-+    REQUIRED_CC_VER = 3.2
-+    REQUIRED_GCC_VER = 3.2.*
-+  endif
-+  ifeq ($(ARCH), amd64)
-+    # amd64
-+    REQUIRED_CC_VER = 3.2
-+    REQUIRED_GCC_VER = 3.2.*
-+  endif
-+  ifeq ($(ARCH), arm)
-+    # arm
-+    REQUIRED_CC_VER = 3.2
-+    REQUIRED_GCC_VER = 3.2.*
-+  endif
-+  ifeq ($(ARCH), i586)
-+    # i586
-+    REQUIRED_CC_VER = 3.2
-+    REQUIRED_GCC_VER = 3.2.1*
-+    REQUIRED_GCC_VER_INT = 3.2.1-7a
-+  endif
-+  ifeq ($(ARCH), ia64)
-+    # ia64
-+    REQUIRED_CC_VER = 3.2
-+    REQUIRED_GCC_VER = 2.9[56789].*
-+  endif
-+  ifneq ("$(findstring m68k,$(ARCH))", "")
-+    # m68k
-+    REQUIRED_CC_VER = 3.2
-+    REQUIRED_GCC_VER = 3.2.*
-+  endif
-+  ifneq ("$(findstring mips,$(ARCH))", "")
-+    # mips
-+    REQUIRED_CC_VER = 3.2
-+    REQUIRED_GCC_VER = 3.2.*
-+  endif
-+  ifneq ("$(findstring ppc,$(ARCH))", "")
-+    # ppc or ppc64
-+    REQUIRED_CC_VER = 3.2
-+    REQUIRED_GCC_VER = 3.2.*
-+  endif
-+  ifneq ("$(findstring s390,$(ARCH))", "")
-+    # s390 or s390x
-+    REQUIRED_CC_VER = 3.2
-+    REQUIRED_GCC_VER = 3.2.*
-+  endif
-   # Option used to create a shared library
-   SHARED_LIBRARY_FLAG = -shared -mimpure-text
-   SUN_COMP_VER := $(shell $(CC) --verbose 2>&1 )
-diff -Nru openjdk.orig/jdk/make/javax/sound/SoundDefs.gmk openjdk/jdk/make/javax/sound/SoundDefs.gmk
---- openjdk.orig/jdk/make/javax/sound/SoundDefs.gmk	2011-04-20 04:40:20.000000000 +0100
-+++ openjdk/jdk/make/javax/sound/SoundDefs.gmk	2011-07-29 08:43:20.137660933 +0100
-@@ -58,10 +58,54 @@
- ifeq ($(ZERO_BUILD), true)
-   CPPFLAGS += -DX_ARCH=X_ZERO
- else
-+  ifeq ($(ARCH), alpha)
-+    CPPFLAGS += -DX_ARCH=X_ALPHA
-+  endif # ARCH alpha
-+ 
-+  ifeq ($(ARCH), amd64)
-+    CPPFLAGS += -DX_ARCH=X_AMD64
-+  endif # ARCH amd64
-+
-+  ifeq ($(ARCH), arm)
-+    CPPFLAGS += -DX_ARCH=X_ARM
-+  endif # ARCH arm
-+
-   ifeq ($(ARCH), i586)
-     CPPFLAGS += -DX_ARCH=X_I586
-   endif # ARCH i586
- 
-+  ifeq ($(ARCH), ia64)
-+    CPPFLAGS += -DX_ARCH=X_IA64
-+  endif # ARCH ia64
-+
-+  ifeq ($(ARCH), m68k)
-+    CPPFLAGS += -DX_ARCH=X_M68K
-+  endif # ARCH m68k
-+
-+  ifeq ($(ARCH), mips)
-+    CPPFLAGS += -DX_ARCH=X_MIPS
-+  endif # ARCH mips
-+
-+  ifeq ($(ARCH), mipsel)
-+    CPPFLAGS += -DX_ARCH=X_MIPSEL
-+  endif # ARCH mipsel
-+
-+  ifeq ($(ARCH), ppc)
-+    CPPFLAGS += -DX_ARCH=X_PPC
-+  endif # ARCH ppc
-+
-+  ifeq ($(ARCH), ppc64)
-+    CPPFLAGS += -DX_ARCH=X_PPC64
-+  endif # ARCH ppc64
-+
-+  ifeq ($(ARCH), s390)
-+    CPPFLAGS += -DX_ARCH=X_S390
-+  endif # ARCH s390
-+
-+  ifeq ($(ARCH), s390x)
-+    CPPFLAGS += -DX_ARCH=X_S390X
-+  endif # ARCH s390x
-+
-   ifeq ($(ARCH), sparc)
-     CPPFLAGS += -DX_ARCH=X_SPARC
-   endif # ARCH sparc
-diff -Nru openjdk.orig/jdk/src/share/native/com/sun/media/sound/SoundDefs.h openjdk/jdk/src/share/native/com/sun/media/sound/SoundDefs.h
---- openjdk.orig/jdk/src/share/native/com/sun/media/sound/SoundDefs.h	2011-04-20 04:40:22.000000000 +0100
-+++ openjdk/jdk/src/share/native/com/sun/media/sound/SoundDefs.h	2011-07-29 08:43:20.141660999 +0100
-@@ -41,6 +41,14 @@
- #define X_ZERO          6
- #define X_ARM           7
- #define X_PPC           8
-+#define X_ALPHA         9
-+#define X_M68K          10
-+#define X_MIPS          11
-+#define X_MIPSEL        12
-+#define X_PPC64         13
-+#define X_S390          14
-+#define X_S390X         15
-+
- 
- // **********************************
- // Make sure you set X_PLATFORM and X_ARCH defines correctly.
--- a/patches/clean-crypto.patch	Wed Sep 21 18:56:43 2011 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1078 +0,0 @@
-diff -Nru openjdk.orig/jdk/make/javax/crypto/Makefile openjdk/jdk/make/javax/crypto/Makefile
---- openjdk.orig/jdk/make/javax/crypto/Makefile	2010-07-29 21:55:27.000000000 +0100
-+++ openjdk/jdk/make/javax/crypto/Makefile	2010-09-01 10:37:32.926684780 +0100
-@@ -157,7 +157,8 @@
- #
- 
- ifdef OPENJDK
--all: build-jar install-jar build-policy install-limited
-+# We don't need any policy files.
-+all: build-jar install-jar
- else  # OPENJDK
- ifeq ($(strip $(FILES_java)),)
- all:
-diff -Nru openjdk.orig/jdk/src/share/classes/javax/crypto/Cipher.java openjdk/jdk/src/share/classes/javax/crypto/Cipher.java
---- openjdk.orig/jdk/src/share/classes/javax/crypto/Cipher.java	2010-07-29 21:55:43.000000000 +0100
-+++ openjdk/jdk/src/share/classes/javax/crypto/Cipher.java	2010-09-01 10:37:32.926684780 +0100
-@@ -144,12 +144,6 @@
-     // The transformation
-     private String transformation;
- 
--    // Crypto permission representing the maximum allowable cryptographic
--    // strength that this Cipher object can be used for. (The cryptographic
--    // strength is a function of the keysize and algorithm parameters encoded
--    // in the crypto permission.)
--    private CryptoPermission cryptoPerm;
--
-     // The exemption mechanism that needs to be enforced
-     private ExemptionMechanism exmech;
- 
-@@ -190,16 +184,9 @@
-     protected Cipher(CipherSpi cipherSpi,
-                      Provider provider,
-                      String transformation) {
--        // See bug 4341369 & 4334690 for more info.
--        // If the caller is trusted, then okey.
--        // Otherwise throw a NullPointerException.
--        if (!JceSecurityManager.INSTANCE.isCallerTrusted()) {
--            throw new NullPointerException();
--        }
-         this.spi = cipherSpi;
-         this.provider = provider;
-         this.transformation = transformation;
--        this.cryptoPerm = CryptoAllPermission.INSTANCE;
-         this.lock = null;
-     }
- 
-@@ -212,7 +199,6 @@
-     Cipher(CipherSpi cipherSpi, String transformation) {
-         this.spi = cipherSpi;
-         this.transformation = transformation;
--        this.cryptoPerm = CryptoAllPermission.INSTANCE;
-         this.lock = null;
-     }
- 
-@@ -442,9 +428,6 @@
-         Exception failure = null;
-         while (t.hasNext()) {
-             Service s = (Service)t.next();
--            if (JceSecurity.canUseProvider(s.getProvider()) == false) {
--                continue;
--            }
-             Transform tr = getTransform(s, transforms);
-             if (tr == null) {
-                 // should never happen
-@@ -570,7 +553,6 @@
-         }
-         Exception failure = null;
-         List transforms = getTransforms(transformation);
--        boolean providerChecked = false;
-         String paddingError = null;
-         for (Iterator t = transforms.iterator(); t.hasNext();) {
-             Transform tr = (Transform)t.next();
-@@ -578,19 +560,6 @@
-             if (s == null) {
-                 continue;
-             }
--            if (providerChecked == false) {
--                // for compatibility, first do the lookup and then verify
--                // the provider. this makes the difference between a NSAE
--                // and a SecurityException if the
--                // provider does not support the algorithm.
--                Exception ve = JceSecurity.getVerificationResult(provider);
--                if (ve != null) {
--                    String msg = "JCE cannot authenticate the provider "
--                        + provider.getName();
--                    throw new SecurityException(msg, ve);
--                }
--                providerChecked = true;
--            }
-             if (tr.supportsMode(s) == S_NO) {
-                 continue;
-             }
-@@ -603,7 +572,6 @@
-                 tr.setModePadding(spi);
-                 Cipher cipher = new Cipher(spi, transformation);
-                 cipher.provider = s.getProvider();
--                cipher.initCryptoPermission();
-                 return cipher;
-             } catch (Exception e) {
-                 failure = e;
-@@ -622,22 +590,6 @@
-                 ("No such algorithm: " + transformation, failure);
-     }
- 
--    // If the requested crypto service is export-controlled,
--    // determine the maximum allowable keysize.
--    private void initCryptoPermission() throws NoSuchAlgorithmException {
--        if (JceSecurity.isRestricted() == false) {
--            cryptoPerm = CryptoAllPermission.INSTANCE;
--            exmech = null;
--            return;
--        }
--        cryptoPerm = getConfiguredPermission(transformation);
--        // Instantiate the exemption mechanism (if required)
--        String exmechName = cryptoPerm.getExemptionMechanism();
--        if (exmechName != null) {
--            exmech = ExemptionMechanism.getInstance(exmechName);
--        }
--    }
--
-     // max number of debug warnings to print from chooseFirstProvider()
-     private static int warnCount = 10;
- 
-@@ -679,9 +631,6 @@
-                     s = (Service)serviceIterator.next();
-                     thisSpi = null;
-                 }
--                if (JceSecurity.canUseProvider(s.getProvider()) == false) {
--                    continue;
--                }
-                 Transform tr = getTransform(s, transforms);
-                 if (tr == null) {
-                     // should never happen
-@@ -699,7 +648,6 @@
-                         thisSpi = (CipherSpi)obj;
-                     }
-                     tr.setModePadding(thisSpi);
--                    initCryptoPermission();
-                     spi = thisSpi;
-                     provider = s.getProvider();
-                     // not needed any more
-@@ -731,19 +679,15 @@
-             InvalidAlgorithmParameterException {
-         switch (type) {
-         case I_KEY:
--            checkCryptoPerm(thisSpi, key);
-             thisSpi.engineInit(opmode, key, random);
-             break;
-         case I_PARAMSPEC:
--            checkCryptoPerm(thisSpi, key, paramSpec);
-             thisSpi.engineInit(opmode, key, paramSpec, random);
-             break;
-         case I_PARAMS:
--            checkCryptoPerm(thisSpi, key, params);
-             thisSpi.engineInit(opmode, key, params, random);
-             break;
-         case I_CERT:
--            checkCryptoPerm(thisSpi, key);
-             thisSpi.engineInit(opmode, key, random);
-             break;
-         default:
-@@ -777,9 +721,6 @@
-                 if (s.supportsParameter(key) == false) {
-                     continue;
-                 }
--                if (JceSecurity.canUseProvider(s.getProvider()) == false) {
--                    continue;
--                }
-                 Transform tr = getTransform(s, transforms);
-                 if (tr == null) {
-                     // should never happen
-@@ -793,7 +734,6 @@
-                         thisSpi = (CipherSpi)s.newInstance(null);
-                     }
-                     tr.setModePadding(thisSpi);
--                    initCryptoPermission();
-                     implInit(thisSpi, initType, opmode, key, paramSpec,
-                                                         params, random);
-                     provider = s.getProvider();
-@@ -939,107 +879,6 @@
-         return exmech;
-     }
- 
--    //
--    // Crypto permission check code below
--    //
--    private void checkCryptoPerm(CipherSpi checkSpi, Key key)
--            throws InvalidKeyException {
--        if (cryptoPerm == CryptoAllPermission.INSTANCE) {
--            return;
--        }
--        // Check if key size and default parameters are within legal limits
--        AlgorithmParameterSpec params;
--        try {
--            params = getAlgorithmParameterSpec(checkSpi.engineGetParameters());
--        } catch (InvalidParameterSpecException ipse) {
--            throw new InvalidKeyException
--                ("Unsupported default algorithm parameters");
--        }
--        if (!passCryptoPermCheck(checkSpi, key, params)) {
--            throw new InvalidKeyException(
--                "Illegal key size or default parameters");
--        }
--    }
--
--    private void checkCryptoPerm(CipherSpi checkSpi, Key key,
--            AlgorithmParameterSpec params) throws InvalidKeyException,
--            InvalidAlgorithmParameterException {
--        if (cryptoPerm == CryptoAllPermission.INSTANCE) {
--            return;
--        }
--        // Determine keysize and check if it is within legal limits
--        if (!passCryptoPermCheck(checkSpi, key, null)) {
--            throw new InvalidKeyException("Illegal key size");
--        }
--        if ((params != null) && (!passCryptoPermCheck(checkSpi, key, params))) {
--            throw new InvalidAlgorithmParameterException("Illegal parameters");
--        }
--    }
--
--    private void checkCryptoPerm(CipherSpi checkSpi, Key key,
--            AlgorithmParameters params)
--            throws InvalidKeyException, InvalidAlgorithmParameterException {
--        if (cryptoPerm == CryptoAllPermission.INSTANCE) {
--            return;
--        }
--        // Convert the specified parameters into specs and then delegate.
--        AlgorithmParameterSpec pSpec;
--        try {
--            pSpec = getAlgorithmParameterSpec(params);
--        } catch (InvalidParameterSpecException ipse) {
--            throw new InvalidAlgorithmParameterException
--                ("Failed to retrieve algorithm parameter specification");
--        }
--        checkCryptoPerm(checkSpi, key, pSpec);
--    }
--
--    private boolean passCryptoPermCheck(CipherSpi checkSpi, Key key,
--                                        AlgorithmParameterSpec params)
--            throws InvalidKeyException {
--        String em = cryptoPerm.getExemptionMechanism();
--        int keySize = checkSpi.engineGetKeySize(key);
--        // Use the "algorithm" component of the cipher
--        // transformation so that the perm check would
--        // work when the key has the "aliased" algo.
--        String algComponent;
--        int index = transformation.indexOf('/');
--        if (index != -1) {
--            algComponent = transformation.substring(0, index);
--        } else {
--            algComponent = transformation;
--        }
--        CryptoPermission checkPerm =
--            new CryptoPermission(algComponent, keySize, params, em);
--
--        if (!cryptoPerm.implies(checkPerm)) {
--            if (debug != null) {
--                debug.println("Crypto Permission check failed");
--                debug.println("granted: " + cryptoPerm);
--                debug.println("requesting: " + checkPerm);
--            }
--            return false;
--        }
--        if (exmech == null) {
--            return true;
--        }
--        try {
--            if (!exmech.isCryptoAllowed(key)) {
--                if (debug != null) {
--                    debug.println(exmech.getName() + " isn't enforced");
--                }
--                return false;
--            }
--        } catch (ExemptionMechanismException eme) {
--            if (debug != null) {
--                debug.println("Cannot determine whether "+
--                              exmech.getName() + " has been enforced");
--                eme.printStackTrace();
--            }
--            return false;
--        }
--        return true;
--    }
--
-     // check if opmode is one of the defined constants
-     // throw InvalidParameterExeption if not
-     private static void checkOpmode(int opmode) {
-@@ -1144,7 +983,6 @@
-         checkOpmode(opmode);
- 
-         if (spi != null) {
--            checkCryptoPerm(spi, key);
-             spi.engineInit(opmode, key, random);
-         } else {
-             try {
-@@ -1270,7 +1108,6 @@
-         checkOpmode(opmode);
- 
-         if (spi != null) {
--            checkCryptoPerm(spi, key, params);
-             spi.engineInit(opmode, key, params, random);
-         } else {
-             chooseProvider(I_PARAMSPEC, opmode, key, params, null, random);
-@@ -1391,7 +1228,6 @@
-         checkOpmode(opmode);
- 
-         if (spi != null) {
--            checkCryptoPerm(spi, key, params);
-             spi.engineInit(opmode, key, params, random);
-         } else {
-             chooseProvider(I_PARAMS, opmode, key, null, params, random);
-@@ -1555,7 +1391,6 @@
-             (certificate==null? null:certificate.getPublicKey());
- 
-         if (spi != null) {
--            checkCryptoPerm(spi, publicKey);
-             spi.engineInit(opmode, publicKey, random);
-         } else {
-             try {
-@@ -2361,12 +2196,15 @@
-         return null;
-     }
- 
-+    // Used by getMaxAllowedKeyLength and getMaxAllowedParameterSpec
-+    // always returns CryptoAllPermission. Old stuff from bad old days.
-     private static CryptoPermission getConfiguredPermission(
-             String transformation) throws NullPointerException,
-             NoSuchAlgorithmException {
-         if (transformation == null) throw new NullPointerException();
--        String[] parts = tokenizeTransformation(transformation);
--        return JceSecurityManager.INSTANCE.getCryptoPermission(parts[0]);
-+	// Called to make sure it is a valid transformation.
-+        tokenizeTransformation(transformation);
-+        return CryptoAllPermission.INSTANCE;
-     }
- 
-     /**
-diff -Nru openjdk.orig/jdk/src/share/classes/javax/crypto/JarVerifier.java openjdk/jdk/src/share/classes/javax/crypto/JarVerifier.java
---- openjdk.orig/jdk/src/share/classes/javax/crypto/JarVerifier.java	2010-07-29 21:55:43.000000000 +0100
-+++ openjdk/jdk/src/share/classes/javax/crypto/JarVerifier.java	1970-01-01 01:00:00.000000000 +0100
-@@ -1,157 +0,0 @@
--/*
-- * Copyright (c) 2007, 2009, Oracle and/or its affiliates. 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.  Oracle designates this
-- * particular file as subject to the "Classpath" exception as provided
-- * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-- * or visit www.oracle.com if you need additional information or have any
-- * questions.
-- */
--
--package javax.crypto;
--
--import java.io.*;
--import java.net.*;
--import java.security.*;
--import java.util.jar.*;
--
--/**
-- * This class verifies JAR files (and any supporting JAR files), and
-- * determines whether they may be used in this implementation.
-- *
-- * The JCE in OpenJDK has an open cryptographic interface, meaning it
-- * does not restrict which providers can be used.  Compliance with
-- * United States export controls and with local law governing the
-- * import/export of products incorporating the JCE in the OpenJDK is
-- * the responsibility of the licensee.
-- *
-- * @since 1.7
-- */
--final class JarVerifier {
--
--    // The URL for the JAR file we want to verify.
--    private URL jarURL;
--    private boolean savePerms;
--    private CryptoPermissions appPerms = null;
--
--    /**
--     * Creates a JarVerifier object to verify the given URL.
--     *
--     * @param jarURL the JAR file to be verified.
--     * @param savePerms if true, save the permissions allowed by the
--     *          exemption mechanism
--     */
--    JarVerifier(URL jarURL, boolean savePerms) {
--        this.jarURL = jarURL;
--        this.savePerms = savePerms;
--    }
--
--    /**
--     * Verify the JAR file is signed by an entity which has a certificate
--     * issued by a trusted CA.
--     *
--     * In OpenJDK, we just need to examine the "cryptoperms" file to see
--     * if any permissions were bundled together with this jar file.
--     */
--    void verify() throws JarException, IOException {
--
--        // Short-circuit.  If we weren't asked to save any, we're done.
--        if (!savePerms) {
--            return;
--        }
--
--        // If the protocol of jarURL isn't "jar", we should
--        // construct a JAR URL so we can open a JarURLConnection
--        // for verifying this provider.
--        final URL url = jarURL.getProtocol().equalsIgnoreCase("jar")?
--                        jarURL : new URL("jar:" + jarURL.toString() + "!/");
--
--        JarFile jf = null;
--        try {
--
--            // Get a link to the Jarfile to search.
--            try {
--                jf = (JarFile)
--                    AccessController.doPrivileged(
--                        new PrivilegedExceptionAction() {
--                            public Object run() throws Exception {
--                                JarURLConnection conn =
--                                    (JarURLConnection) url.openConnection();
--                                // You could do some caching here as
--                                // an optimization.
--                                conn.setUseCaches(false);
--                                return conn.getJarFile();
--                            }
--                        });
--            } catch (java.security.PrivilegedActionException pae) {
--                SecurityException se = new SecurityException(
--                    "Cannot load " + url.toString());
--                se.initCause(pae);
--                throw se;
--            }
--
--            if (jf != null) {
--                JarEntry je = jf.getJarEntry("cryptoPerms");
--                if (je == null) {
--                    throw new JarException(
--                        "Can not find cryptoPerms");
--                }
--                try {
--                    appPerms = new CryptoPermissions();
--                    appPerms.load(jf.getInputStream(je));
--                } catch (Exception ex) {
--                    JarException jex =
--                        new JarException("Cannot load/parse" +
--                            jarURL.toString());
--                    jex.initCause(ex);
--                    throw jex;
--                }
--            }
--        } finally {
--            // Only call close() when caching is not enabled.
--            // Otherwise, exceptions will be thrown for all
--            // subsequent accesses of this cached jar.
--            if (jf != null) {
--                jf.close();
--            }
--        }
--    }
--
--    /**
--     * Verify that the provided certs include the
--     * framework signing certificate.
--     *
--     * @param certs the list of certs to be checked.
--     * @throws Exception if the list of certs did not contain
--     *          the framework signing certificate
--     */
--    static void verifyPolicySigned(java.security.cert.Certificate[] certs)
--            throws Exception {
--    }
--
--    /**
--     * Returns the permissions which are bundled with the JAR file,
--     * aka the "cryptoperms" file.
--     *
--     * NOTE: if this JarVerifier instance is constructed with "savePerms"
--     * equal to false, then this method would always return null.
--     */
--    CryptoPermissions getPermissions() {
--        return appPerms;
--    }
--}
-diff -Nru openjdk.orig/jdk/src/share/classes/javax/crypto/JceSecurity.java openjdk/jdk/src/share/classes/javax/crypto/JceSecurity.java
---- openjdk.orig/jdk/src/share/classes/javax/crypto/JceSecurity.java	2010-07-29 21:55:43.000000000 +0100
-+++ openjdk/jdk/src/share/classes/javax/crypto/JceSecurity.java	2010-09-01 10:37:32.934684089 +0100
-@@ -27,8 +27,6 @@
- 
- import java.util.*;
- import java.util.jar.*;
--import java.io.*;
--import java.net.URL;
- import java.security.*;
- 
- import java.security.Provider.Service;
-@@ -47,72 +45,25 @@
- 
- final class JceSecurity {
- 
-+    // Used in KeyGenerator, Cipher and KeyAgreement.
-     static final SecureRandom RANDOM = new SecureRandom();
- 
--    // The defaultPolicy and exemptPolicy will be set up
--    // in the static initializer.
--    private static CryptoPermissions defaultPolicy = null;
--    private static CryptoPermissions exemptPolicy = null;
--
--    // Map<Provider,?> of the providers we already have verified
--    // value == PROVIDER_VERIFIED is successfully verified
--    // value is failure cause Exception in error case
--    private final static Map verificationResults = new IdentityHashMap();
--
--    // Map<Provider,?> of the providers currently being verified
--    private final static Map verifyingProviders = new IdentityHashMap();
--
--    // Set the default value. May be changed in the static initializer.
--    private static boolean isRestricted = true;
--
-     /*
-      * Don't let anyone instantiate this.
-      */
-     private JceSecurity() {
-     }
- 
--    static {
--        try {
--            AccessController.doPrivileged(new PrivilegedExceptionAction() {
--                public Object run() throws Exception {
--                    setupJurisdictionPolicies();
--                    return null;
--                }
--            });
--
--            isRestricted = defaultPolicy.implies(
--                CryptoAllPermission.INSTANCE) ? false : true;
--        } catch (Exception e) {
--            SecurityException se =
--                new SecurityException(
--                    "Can not initialize cryptographic mechanism");
--            se.initCause(e);
--            throw se;
--        }
--    }
--
-     static Instance getInstance(String type, Class clazz, String algorithm,
-             String provider) throws NoSuchAlgorithmException,
-             NoSuchProviderException {
-         Service s = GetInstance.getService(type, algorithm, provider);
--        Exception ve = getVerificationResult(s.getProvider());
--        if (ve != null) {
--            String msg = "JCE cannot authenticate the provider " + provider;
--            throw (NoSuchProviderException)
--                                new NoSuchProviderException(msg).initCause(ve);
--        }
-         return GetInstance.getInstance(s, clazz);
-     }
- 
-     static Instance getInstance(String type, Class clazz, String algorithm,
-             Provider provider) throws NoSuchAlgorithmException {
-         Service s = GetInstance.getService(type, algorithm, provider);
--        Exception ve = JceSecurity.getVerificationResult(provider);
--        if (ve != null) {
--            String msg = "JCE cannot authenticate the provider "
--                + provider.getName();
--            throw new SecurityException(msg, ve);
--        }
-         return GetInstance.getInstance(s, clazz);
-     }
- 
-@@ -122,10 +73,6 @@
-         NoSuchAlgorithmException failure = null;
-         for (Iterator t = services.iterator(); t.hasNext(); ) {
-             Service s = (Service)t.next();
--            if (canUseProvider(s.getProvider()) == false) {
--                // allow only signed providers
--                continue;
--            }
-             try {
-                 Instance instance = GetInstance.getInstance(s, clazz);
-                 return instance;
-@@ -137,198 +84,10 @@
-                 + " not available", failure);
-     }
- 
--    /**
--     * Verify if the JAR at URL codeBase is a signed exempt application
--     * JAR file and returns the permissions bundled with the JAR.
--     *
--     * @throws Exception on error
--     */
--    static CryptoPermissions verifyExemptJar(URL codeBase) throws Exception {
--        JarVerifier jv = new JarVerifier(codeBase, true);
--        jv.verify();
--        return jv.getPermissions();
--    }
--
--    /**
--     * Verify if the JAR at URL codeBase is a signed provider JAR file.
--     *
--     * @throws Exception on error
--     */
--    static void verifyProviderJar(URL codeBase) throws Exception {
--        // Verify the provider JAR file and all
--        // supporting JAR files if there are any.
--        JarVerifier jv = new JarVerifier(codeBase, false);
--        jv.verify();
--    }
--
--    private final static Object PROVIDER_VERIFIED = Boolean.TRUE;
--
--    /*
--     * Verify that the provider JAR files are signed properly, which
--     * means the signer's certificate can be traced back to a
--     * JCE trusted CA.
--     * Return null if ok, failure Exception if verification failed.
--     */
--    static synchronized Exception getVerificationResult(Provider p) {
--        Object o = verificationResults.get(p);
--        if (o == PROVIDER_VERIFIED) {
--            return null;
--        } else if (o != null) {
--            return (Exception)o;
--        }
--        if (verifyingProviders.get(p) != null) {
--            // this method is static synchronized, must be recursion
--            // return failure now but do not save the result
--            return new NoSuchProviderException("Recursion during verification");
--        }
--        try {
--            verifyingProviders.put(p, Boolean.FALSE);
--            URL providerURL = getCodeBase(p.getClass());
--            verifyProviderJar(providerURL);
--            // Verified ok, cache result
--            verificationResults.put(p, PROVIDER_VERIFIED);
--            return null;
--        } catch (Exception e) {
--            verificationResults.put(p, e);
--            return e;
--        } finally {
--            verifyingProviders.remove(p);
--        }
--    }
--
--    // return whether this provider is properly signed and can be used by JCE
-+    // Used to return whether this provider is properly signed and
-+    // can be used by JCE. These days just returns true. Still used
-+    // in SecretKeyFactory, KeyGenerator, Mac and KeyAgreement.
-     static boolean canUseProvider(Provider p) {
--        return getVerificationResult(p) == null;
--    }
--
--    // dummy object to represent null
--    private static final URL NULL_URL;
--
--    static {
--        try {
--            NULL_URL = new URL("http://null.sun.com/");
--        } catch (Exception e) {
--            throw new RuntimeException(e);
--        }
--    }
--
--    // reference to a Map we use as a cache for codebases
--    private static final Map codeBaseCacheRef = new WeakHashMap();
--
--    /*
--     * Retuns the CodeBase for the given class.
--     */
--    static URL getCodeBase(final Class clazz) {
--        URL url = (URL)codeBaseCacheRef.get(clazz);
--        if (url == null) {
--            url = (URL)AccessController.doPrivileged(new PrivilegedAction() {
--                public Object run() {
--                    ProtectionDomain pd = clazz.getProtectionDomain();
--                    if (pd != null) {
--                        CodeSource cs = pd.getCodeSource();
--                        if (cs != null) {
--                            return cs.getLocation();
--                        }
--                    }
--                    return NULL_URL;
--                }
--            });
--            codeBaseCacheRef.put(clazz, url);
--        }
--        return (url == NULL_URL) ? null : url;
--    }
--
--    private static void setupJurisdictionPolicies() throws Exception {
--        String javaHomeDir = System.getProperty("java.home");
--        String sep = File.separator;
--        String pathToPolicyJar = javaHomeDir + sep + "lib" + sep +
--            "security" + sep;
--
--        File exportJar = new File(pathToPolicyJar, "US_export_policy.jar");
--        File importJar = new File(pathToPolicyJar, "local_policy.jar");
--        URL jceCipherURL = ClassLoader.getSystemResource
--                ("javax/crypto/Cipher.class");
--
--        if ((jceCipherURL == null) ||
--                !exportJar.exists() || !importJar.exists()) {
--            throw new SecurityException
--                                ("Cannot locate policy or framework files!");
--        }
--
--        // Read jurisdiction policies.
--        CryptoPermissions defaultExport = new CryptoPermissions();
--        CryptoPermissions exemptExport = new CryptoPermissions();
--        loadPolicies(exportJar, defaultExport, exemptExport);
--
--        CryptoPermissions defaultImport = new CryptoPermissions();
--        CryptoPermissions exemptImport = new CryptoPermissions();
--        loadPolicies(importJar, defaultImport, exemptImport);
--
--        // Merge the export and import policies for default applications.
--        if (defaultExport.isEmpty() || defaultImport.isEmpty()) {
--            throw new SecurityException("Missing mandatory jurisdiction " +
--                                        "policy files");
--        }
--        defaultPolicy = defaultExport.getMinimum(defaultImport);
--
--        // Merge the export and import policies for exempt applications.
--        if (exemptExport.isEmpty())  {
--            exemptPolicy = exemptImport.isEmpty() ? null : exemptImport;
--        } else {
--            exemptPolicy = exemptExport.getMinimum(exemptImport);
--        }
--    }
--
--    /**
--     * Load the policies from the specified file. Also checks that the
--     * policies are correctly signed.
--     */
--    private static void loadPolicies(File jarPathName,
--                                     CryptoPermissions defaultPolicy,
--                                     CryptoPermissions exemptPolicy)
--        throws Exception {
--
--        JarFile jf = new JarFile(jarPathName);
--
--        Enumeration entries = jf.entries();
--        while (entries.hasMoreElements()) {
--            JarEntry je = (JarEntry)entries.nextElement();
--            InputStream is = null;
--            try {
--                if (je.getName().startsWith("default_")) {
--                    is = jf.getInputStream(je);
--                    defaultPolicy.load(is);
--                } else if (je.getName().startsWith("exempt_")) {
--                    is = jf.getInputStream(je);
--                    exemptPolicy.load(is);
--                } else {
--                    continue;
--                }
--            } finally {
--                if (is != null) {
--                    is.close();
--                }
--            }
--
--            // Enforce the signer restraint, i.e. signer of JCE framework
--            // jar should also be the signer of the two jurisdiction policy
--            // jar files.
--            JarVerifier.verifyPolicySigned(je.getCertificates());
--        }
--        // Close and nullify the JarFile reference to help GC.
--        jf.close();
--        jf = null;
--    }
--
--    static CryptoPermissions getDefaultPolicy() {
--        return defaultPolicy;
--    }
--
--    static CryptoPermissions getExemptPolicy() {
--        return exemptPolicy;
--    }
--
--    static boolean isRestricted() {
--        return isRestricted;
-+        return true;
-     }
- }
-diff -Nru openjdk.orig/jdk/src/share/classes/javax/crypto/JceSecurityManager.java openjdk/jdk/src/share/classes/javax/crypto/JceSecurityManager.java
---- openjdk.orig/jdk/src/share/classes/javax/crypto/JceSecurityManager.java	2010-07-29 21:55:43.000000000 +0100
-+++ openjdk/jdk/src/share/classes/javax/crypto/JceSecurityManager.java	1970-01-01 01:00:00.000000000 +0100
-@@ -1,252 +0,0 @@
--/*
-- * Copyright (c) 1999, 2007, Oracle and/or its affiliates. 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.  Oracle designates this
-- * particular file as subject to the "Classpath" exception as provided
-- * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-- * or visit www.oracle.com if you need additional information or have any
-- * questions.
-- */
--
--package javax.crypto;
--
--import java.security.*;
--import java.net.*;
--import java.util.*;
--import java.util.jar.*;
--
--/**
-- * The JCE security manager.
-- *
-- * <p>The JCE security manager is responsible for determining the maximum
-- * allowable cryptographic strength for a given applet/application, for a given
-- * algorithm, by consulting the configured jurisdiction policy files and
-- * the cryptographic permissions bundled with the applet/application.
-- *
-- * <p>Note that this security manager is never installed, only instantiated.
-- *
-- * @author Jan Luehe
-- *
-- * @since 1.4
-- */
--
--final class JceSecurityManager extends SecurityManager {
--
--    private static final CryptoPermissions defaultPolicy;
--    private static final CryptoPermissions exemptPolicy;
--    private static final CryptoAllPermission allPerm;
--    private static final Vector TrustedCallersCache = new Vector(2);
--    private static final Map exemptCache = new HashMap();
--
--    // singleton instance
--    static final JceSecurityManager INSTANCE;
--
--    static {
--        defaultPolicy = JceSecurity.getDefaultPolicy();
--        exemptPolicy = JceSecurity.getExemptPolicy();
--        allPerm = CryptoAllPermission.INSTANCE;
--        INSTANCE = (JceSecurityManager)
--              AccessController.doPrivileged(new PrivilegedAction() {
--                  public Object run() {
--                      return new JceSecurityManager();
--                  }
--              });
--    }
--
--    private JceSecurityManager() {
--        // empty
--    }
--
--    /**
--     * Returns the maximum allowable crypto strength for the given
--     * applet/application, for the given algorithm.
--     */
--    CryptoPermission getCryptoPermission(String alg) {
--        // Need to convert to uppercase since the crypto perm
--        // lookup is case sensitive.
--        alg = alg.toUpperCase(Locale.ENGLISH);
--
--        // If CryptoAllPermission is granted by default, we return that.
--        // Otherwise, this will be the permission we return if anything goes
--        // wrong.
--        CryptoPermission defaultPerm = getDefaultPermission(alg);
--        if (defaultPerm == CryptoAllPermission.INSTANCE) {
--            return defaultPerm;
--        }
--
--        // Determine the codebase of the caller of the JCE API.
--        // This is the codebase of the first class which is not in
--        // javax.crypto.* packages.
--        // NOTE: javax.crypto.* package maybe subject to package
--        // insertion, so need to check its classloader as well.
--        Class[] context = getClassContext();
--        URL callerCodeBase = null;
--        int i;
--        for (i=0; i<context.length; i++) {
--            Class cls = context[i];
--            callerCodeBase = JceSecurity.getCodeBase(cls);
--            if (callerCodeBase != null) {
--                break;
--            } else {
--                if (cls.getName().startsWith("javax.crypto.")) {
--                    // skip jce classes since they aren't the callers
--                    continue;
--                }
--                // use default permission when the caller is system classes
--                return defaultPerm;
--            }
--        }
--
--        if (i == context.length) {
--            return defaultPerm;
--        }
--
--        CryptoPermissions appPerms;
--        synchronized (this.getClass()) {
--            if (exemptCache.containsKey(callerCodeBase)) {
--                appPerms = (CryptoPermissions)exemptCache.get(callerCodeBase);
--            } else {
--                appPerms = getAppPermissions(callerCodeBase);
--                exemptCache.put(callerCodeBase, appPerms);
--            }
--        }
--
--        if (appPerms == null) {
--            return defaultPerm;
--        }
--
--        // If the app was granted the special CryptoAllPermission, return that.
--        if (appPerms.implies(allPerm)) {
--            return allPerm;
--        }
--
--        // Check if the crypto permissions granted to the app contain a
--        // crypto permission for the requested algorithm that does not require
--        // any exemption mechanism to be enforced.
--        // Return that permission, if present.
--        PermissionCollection appPc = appPerms.getPermissionCollection(alg);
--        if (appPc == null) {
--            return defaultPerm;
--        }
--        Enumeration enum_ = appPc.elements();
--        while (enum_.hasMoreElements()) {
--            CryptoPermission cp = (CryptoPermission)enum_.nextElement();
--            if (cp.getExemptionMechanism() == null) {
--                return cp;
--            }
--        }
--
--        // Check if the jurisdiction file for exempt applications contains
--        // any entries for the requested algorithm.
--        // If not, return the default permission.
--        PermissionCollection exemptPc =
--            exemptPolicy.getPermissionCollection(alg);
--        if (exemptPc == null) {
--            return defaultPerm;
--        }
--
--        // In the jurisdiction file for exempt applications, go through the
--        // list of CryptoPermission entries for the requested algorithm, and
--        // stop at the first entry:
--        //  - that is implied by the collection of crypto permissions granted
--        //    to the app, and
--        //  - whose exemption mechanism is available from one of the
--        //    registered CSPs
--        enum_ = exemptPc.elements();
--        while (enum_.hasMoreElements()) {
--            CryptoPermission cp = (CryptoPermission)enum_.nextElement();
--            try {
--                ExemptionMechanism.getInstance(cp.getExemptionMechanism());
--                if (cp.getAlgorithm().equals(
--                                      CryptoPermission.ALG_NAME_WILDCARD)) {
--                    CryptoPermission newCp;
--                    if (cp.getCheckParam()) {
--                        newCp = new CryptoPermission(
--                                alg, cp.getMaxKeySize(),
--                                cp.getAlgorithmParameterSpec(),
--                                cp.getExemptionMechanism());
--                    } else {
--                        newCp = new CryptoPermission(
--                                alg, cp.getMaxKeySize(),
--                                cp.getExemptionMechanism());
--                    }
--                    if (appPerms.implies(newCp)) {
--                        return newCp;
--                    }
--                }
--
--                if (appPerms.implies(cp)) {
--                    return cp;
--                }
--            } catch (Exception e) {
--                continue;
--            }
--        }
--        return defaultPerm;
--    }
--
--    private static CryptoPermissions getAppPermissions(URL callerCodeBase) {
--        // Check if app is exempt, and retrieve the permissions bundled with it
--        try {
--            return JceSecurity.verifyExemptJar(callerCodeBase);
--        } catch (Exception e) {
--            // Jar verification fails
--            return null;
--        }
--
--    }
--
--    /**
--     * Returns the default permission for the given algorithm.
--     */
--    private CryptoPermission getDefaultPermission(String alg) {
--        Enumeration enum_ =
--            defaultPolicy.getPermissionCollection(alg).elements();
--        return (CryptoPermission)enum_.nextElement();
--    }
--
--    // See  bug 4341369 & 4334690 for more info.
--    boolean isCallerTrusted() {
--        // Get the caller and its codebase.
--        Class[] context = getClassContext();
--        URL callerCodeBase = null;
--        int i;
--        for (i=0; i<context.length; i++) {
--            callerCodeBase = JceSecurity.getCodeBase(context[i]);
--            if (callerCodeBase != null) {
--                break;
--            }
--        }
--        // The caller is in the JCE framework.
--        if (i == context.length) {
--            return true;
--        }
--        //The caller has been verified.
--        if (TrustedCallersCache.contains(context[i])) {
--            return true;
--        }
--        // Check whether the caller is a trusted provider.
--        try {
--            JceSecurity.verifyProviderJar(callerCodeBase);
--        } catch (Exception e2) {
--            return false;
--        }
--        TrustedCallersCache.addElement(context[i]);
--        return true;
--    }
--}
-diff -Nru openjdk.orig/jdk/test/com/sun/crypto/provider/Cipher/UTIL/TestUtil.java openjdk/jdk/test/com/sun/crypto/provider/Cipher/UTIL/TestUtil.java
---- openjdk.orig/jdk/test/com/sun/crypto/provider/Cipher/UTIL/TestUtil.java	2010-07-29 21:56:21.000000000 +0100
-+++ openjdk/jdk/test/com/sun/crypto/provider/Cipher/UTIL/TestUtil.java	2010-09-01 10:37:32.934684089 +0100
-@@ -44,18 +44,9 @@
-         }
-     }
- 
--    private static boolean isUnlimitedPolicy() throws IOException {
-+    private static boolean isUnlimitedPolicy() {
-         if (instance == null) {
--            String jreDir = System.getProperty("java.home");
--            String localPolicyPath = jreDir + File.separator + "lib" +
--                File.separator + "security" + File.separator +
--                "local_policy.jar";
--            JarFile localPolicy = new JarFile(localPolicyPath);
--            if (localPolicy.getEntry("exempt_local.policy") == null) {
--                return true;
--            } else {
--                return false;
--            }
-+            return true;
-         } else {
-             return instance.isUnlimited;
-         }
--- a/patches/debian/uname.patch	Wed Sep 21 18:56:43 2011 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-diff -Nru openjdk.orig/corba/make/common/shared/Platform.gmk openjdk/corba/make/common/shared/Platform.gmk
---- openjdk.orig/corba/make/common/shared/Platform.gmk	2011-03-14 22:08:07.000000000 +0000
-+++ openjdk/corba/make/common/shared/Platform.gmk	2011-04-21 10:35:01.629157957 +0100
-@@ -153,6 +153,9 @@
-   OS_VERSION := $(shell uname -r)
-   # Arch and OS name/version
-   mach := $(shell uname -m)
-+  ifneq (,$(wildcard /usr/bin/dpkg-architecture))
-+    mach := $(shell (dpkg-architecture -qDEB_BUILD_ARCH_CPU 2>/dev/null || echo $(mach)) | sed 's/powerpc$$/ppc/;s/hppa/parisc/')
-+  endif
-   archExpr = case "$(mach)" in \
-                 i[3-9]86) \
-                     echo i586 \
-diff -Nru openjdk.orig/jdk/make/common/shared/Platform.gmk openjdk/jdk/make/common/shared/Platform.gmk
---- openjdk.orig/jdk/make/common/shared/Platform.gmk	2011-04-20 04:40:20.000000000 +0100
-+++ openjdk/jdk/make/common/shared/Platform.gmk	2011-04-21 10:35:35.653711575 +0100
-@@ -160,6 +160,9 @@
-   else
-     mach := $(shell uname -m)
-   endif
-+  ifneq (,$(wildcard /usr/bin/dpkg-architecture))
-+    mach := $(shell (dpkg-architecture -qDEB_BUILD_ARCH_CPU 2>/dev/null || echo $(mach)) | sed 's/powerpc$$/ppc/;s/hppa/parisc/')
-+  endif
-   archExpr = case "$(mach)" in \
-                 i[3-9]86) \
-                     echo i586 \
--- a/patches/disable-intree-ec.patch	Wed Sep 21 18:56:43 2011 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-diff -Nru openjdk.orig/jdk/src/share/lib/security/java.security openjdk/jdk/src/share/lib/security/java.security
---- openjdk.orig/jdk/src/share/lib/security/java.security	2009-09-10 19:04:25.000000000 +0100
-+++ openjdk/jdk/src/share/lib/security/java.security	2009-09-11 14:53:07.000000000 +0100
-@@ -45,13 +45,12 @@
- #
- security.provider.1=sun.security.provider.Sun
- security.provider.2=sun.security.rsa.SunRsaSign
--security.provider.3=sun.security.ec.SunEC
--security.provider.4=com.sun.net.ssl.internal.ssl.Provider
--security.provider.5=com.sun.crypto.provider.SunJCE
--security.provider.6=sun.security.jgss.SunProvider
--security.provider.7=com.sun.security.sasl.Provider
--security.provider.8=org.jcp.xml.dsig.internal.dom.XMLDSigRI
--security.provider.9=sun.security.smartcardio.SunPCSC
-+security.provider.3=com.sun.net.ssl.internal.ssl.Provider
-+security.provider.4=com.sun.crypto.provider.SunJCE
-+security.provider.5=sun.security.jgss.SunProvider
-+security.provider.6=com.sun.security.sasl.Provider
-+security.provider.7=org.jcp.xml.dsig.internal.dom.XMLDSigRI
-+security.provider.8=sun.security.smartcardio.SunPCSC
- 
- #
- # Select the source of seed data for SecureRandom. By default an
--- a/patches/javafiles.patch	Wed Sep 21 18:56:43 2011 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,164 +0,0 @@
-diff -Nru openjdk.orig/corba/make/com/sun/corba/minclude/com_sun_corba_se_impl_encoding.jmk openjdk/corba/make/com/sun/corba/minclude/com_sun_corba_se_impl_encoding.jmk
---- openjdk.orig/corba/make/com/sun/corba/minclude/com_sun_corba_se_impl_encoding.jmk	2010-07-29 21:54:09.000000000 +0100
-+++ openjdk/corba/make/com/sun/corba/minclude/com_sun_corba_se_impl_encoding.jmk	2011-03-16 20:45:33.914471077 +0000
-@@ -62,7 +62,6 @@
- 	com/sun/corba/se/impl/encoding/TypeCodeInputStream.java \
- 	com/sun/corba/se/impl/encoding/TypeCodeOutputStream.java \
- 	com/sun/corba/se/impl/encoding/TypeCodeReader.java \
--	com/sun/corba/se/impl/encoding/WrapperInputStream.java
--
--
--
-+	com/sun/corba/se/impl/encoding/WrapperInputStream.java \
-+	com/sun/corba/se/impl/encoding/IDLJavaSerializationInputStream.java \
-+	com/sun/corba/se/impl/encoding/IDLJavaSerializationOutputStream.java
-diff -Nru openjdk.orig/corba/make/com/sun/corba/minclude/com_sun_corba_se_impl_ior.jmk openjdk/corba/make/com/sun/corba/minclude/com_sun_corba_se_impl_ior.jmk
---- openjdk.orig/corba/make/com/sun/corba/minclude/com_sun_corba_se_impl_ior.jmk	2010-07-29 21:54:09.000000000 +0100
-+++ openjdk/corba/make/com/sun/corba/minclude/com_sun_corba_se_impl_ior.jmk	2011-03-16 20:45:33.922471207 +0000
-@@ -66,4 +66,5 @@
- 	com/sun/corba/se/impl/ior/iiop/JavaSerializationComponent.java \
- 	com/sun/corba/se/impl/ior/iiop/MaxStreamFormatVersionComponentImpl.java \
- 	com/sun/corba/se/impl/ior/iiop/RequestPartitioningComponentImpl.java \
--	com/sun/corba/se/impl/ior/iiop/ORBTypeComponentImpl.java
-+	com/sun/corba/se/impl/ior/iiop/ORBTypeComponentImpl.java \
-+	com/sun/corba/se/impl/ior/iiop/JavaSerializationComponent.java
-diff -Nru openjdk.orig/corba/make/com/sun/corba/minclude/com_sun_corba_se_impl_orbutil.jmk openjdk/corba/make/com/sun/corba/minclude/com_sun_corba_se_impl_orbutil.jmk
---- openjdk.orig/corba/make/com/sun/corba/minclude/com_sun_corba_se_impl_orbutil.jmk	2010-07-29 21:54:09.000000000 +0100
-+++ openjdk/corba/make/com/sun/corba/minclude/com_sun_corba_se_impl_orbutil.jmk	2011-03-16 20:45:33.922471207 +0000
-@@ -81,4 +81,5 @@
- 	com/sun/corba/se/impl/orbutil/graph/Node.java \
- 	com/sun/corba/se/impl/orbutil/graph/NodeData.java \
- 	com/sun/corba/se/impl/orbutil/graph/Graph.java \
--	com/sun/corba/se/impl/orbutil/graph/GraphImpl.java 
-+	com/sun/corba/se/impl/orbutil/graph/GraphImpl.java \
-+	com/sun/corba/se/impl/orbutil/GetPropertyAction.java
-diff -Nru openjdk.orig/corba/make/com/sun/corba/minclude/com_sun_corba_se_impl_protocol.jmk openjdk/corba/make/com/sun/corba/minclude/com_sun_corba_se_impl_protocol.jmk
---- openjdk.orig/corba/make/com/sun/corba/minclude/com_sun_corba_se_impl_protocol.jmk	2010-07-29 21:54:09.000000000 +0100
-+++ openjdk/corba/make/com/sun/corba/minclude/com_sun_corba_se_impl_protocol.jmk	2011-03-16 20:45:33.922471207 +0000
-@@ -81,5 +81,5 @@
- 	com/sun/corba/se/impl/protocol/giopmsgheaders/RequestMessage_1_1.java \
- 	com/sun/corba/se/impl/protocol/giopmsgheaders/RequestMessage_1_2.java \
- 	com/sun/corba/se/impl/protocol/giopmsgheaders/TargetAddress.java \
--	com/sun/corba/se/impl/protocol/giopmsgheaders/TargetAddressHelper.java
--
-+	com/sun/corba/se/impl/protocol/giopmsgheaders/TargetAddressHelper.java \
-+	com/sun/corba/se/impl/protocol/giopmsgheaders/LocateReplyOrReplyMessage.java
-diff -Nru openjdk.orig/corba/make/com/sun/corba/minclude/com_sun_corba_se_spi_monitoring.jmk openjdk/corba/make/com/sun/corba/minclude/com_sun_corba_se_spi_monitoring.jmk
---- openjdk.orig/corba/make/com/sun/corba/minclude/com_sun_corba_se_spi_monitoring.jmk	2010-07-29 21:54:09.000000000 +0100
-+++ openjdk/corba/make/com/sun/corba/minclude/com_sun_corba_se_spi_monitoring.jmk	2011-03-16 20:45:33.922471207 +0000
-@@ -30,6 +30,7 @@
- 	com/sun/corba/se/spi/monitoring/StringMonitoredAttributeBase.java \
- 	com/sun/corba/se/spi/monitoring/LongMonitoredAttributeBase.java \
- 	com/sun/corba/se/spi/monitoring/MonitoringFactories.java \
-+	com/sun/corba/se/spi/monitoring/MonitoringConstants.java \
- 	com/sun/corba/se/spi/monitoring/MonitoredAttributeInfo.java \
- 	com/sun/corba/se/spi/monitoring/MonitoredObject.java \
- 	com/sun/corba/se/spi/monitoring/MonitoredObjectFactory.java \
-diff -Nru openjdk.orig/corba/make/com/sun/corba/minclude/com_sun_corba_se_spi_presentation_rmi.jmk openjdk/corba/make/com/sun/corba/minclude/com_sun_corba_se_spi_presentation_rmi.jmk
---- openjdk.orig/corba/make/com/sun/corba/minclude/com_sun_corba_se_spi_presentation_rmi.jmk	2010-07-29 21:54:09.000000000 +0100
-+++ openjdk/corba/make/com/sun/corba/minclude/com_sun_corba_se_spi_presentation_rmi.jmk	2011-03-16 20:45:33.922471207 +0000
-@@ -29,5 +29,6 @@
- 	com/sun/corba/se/spi/presentation/rmi/IDLNameTranslator.java \
- 	com/sun/corba/se/spi/presentation/rmi/PresentationDefaults.java \
- 	com/sun/corba/se/spi/presentation/rmi/PresentationManager.java \
-+	com/sun/corba/se/spi/presentation/rmi/PresentationDefaults.java \
- 	com/sun/corba/se/spi/presentation/rmi/StubAdapter.java
- 
-diff -Nru openjdk.orig/jdk/make/java/java/FILES_java.gmk openjdk/jdk/make/java/java/FILES_java.gmk
---- openjdk.orig/jdk/make/java/java/FILES_java.gmk	2011-03-14 22:10:30.000000000 +0000
-+++ openjdk/jdk/make/java/java/FILES_java.gmk	2011-03-16 20:45:33.922471207 +0000
-@@ -29,6 +29,80 @@
- # will generate header files
- #
- JAVA_JAVA_java = \
-+    java/lang/reflect/AccessibleObject.java \
-+    java/lang/reflect/AnnotatedElement.java \
-+    java/lang/reflect/Array.java \
-+    java/lang/reflect/Constructor.java \
-+    java/lang/reflect/Field.java \
-+    java/lang/reflect/GenericArrayType.java \
-+    java/lang/reflect/GenericDeclaration.java \
-+    java/lang/reflect/GenericSignatureFormatError.java \
-+    java/lang/reflect/InvocationHandler.java \
-+    java/lang/reflect/InvocationTargetException.java \
-+    java/lang/reflect/MalformedParameterizedTypeException.java \
-+    java/lang/reflect/Member.java \
-+    java/lang/reflect/Method.java \
-+    java/lang/reflect/Modifier.java \
-+    java/lang/reflect/package-info.java \
-+    java/lang/reflect/ParameterizedType.java \
-+    java/lang/reflect/Proxy.java \
-+    java/lang/reflect/ReflectAccess.java \
-+    java/lang/reflect/ReflectPermission.java \
-+    java/lang/reflect/Type.java \
-+    java/lang/reflect/TypeVariable.java \
-+    java/lang/reflect/UndeclaredThrowableException.java \
-+    java/lang/reflect/WildcardType.java \
-+    java/lang/ref/Finalizer.java \
-+    java/lang/ref/FinalReference.java \
-+    java/lang/ref/PhantomReference.java \
-+    java/lang/ref/Reference.java \
-+    java/lang/ref/ReferenceQueue.java \
-+    java/lang/ref/SoftReference.java \
-+    java/lang/ref/WeakReference.java \
-+    java/lang/management/ClassLoadingMXBean.java \
-+    java/lang/management/CompilationMXBean.java \
-+    java/lang/management/GarbageCollectorMXBean.java \
-+    java/lang/management/LockInfo.java \
-+    java/lang/management/ManagementFactory.java \
-+    java/lang/management/ManagementPermission.java \
-+    java/lang/management/MemoryManagerMXBean.java \
-+    java/lang/management/MemoryMXBean.java \
-+    java/lang/management/MemoryNotificationInfo.java \
-+    java/lang/management/MemoryPoolMXBean.java \
-+    java/lang/management/MemoryType.java \
-+    java/lang/management/MemoryUsage.java \
-+    java/lang/management/MonitorInfo.java \
-+    java/lang/management/OperatingSystemMXBean.java \
-+    java/lang/management/RuntimeMXBean.java \
-+    java/lang/management/ThreadInfo.java \
-+    java/lang/management/ThreadMXBean.java \
-+    java/lang/instrument/ClassDefinition.java \
-+    java/lang/instrument/ClassFileTransformer.java \
-+    java/lang/instrument/IllegalClassFormatException.java \
-+    java/lang/instrument/Instrumentation.java \
-+    java/lang/instrument/UnmodifiableClassException.java \
-+    java/lang/annotation/AnnotationFormatError.java \
-+    java/lang/annotation/Annotation.java \
-+    java/lang/annotation/AnnotationTypeMismatchException.java \
-+    java/lang/annotation/Documented.java \
-+    java/lang/annotation/ElementType.java \
-+    java/lang/annotation/IncompleteAnnotationException.java \
-+    java/lang/annotation/Inherited.java \
-+    java/lang/annotation/package-info.java \
-+    java/lang/annotation/Retention.java \
-+    java/lang/annotation/RetentionPolicy.java \
-+    java/lang/annotation/Target.java \
-+    java/io/IOError.java \
-+    java/lang/Deprecated.java \
-+    java/lang/Iterable.java \
-+    java/util/RandomAccess.java \
-+    java/lang/CharacterData00.java \
-+    java/lang/CharacterData01.java \
-+    java/lang/CharacterData02.java \
-+    java/lang/CharacterData0E.java \
-+    java/lang/CharacterDataLatin1.java \
-+    java/lang/CharacterDataPrivateUse.java \
-+    java/lang/CharacterDataUndefined.java \
-     java/lang/Object.java \
-     java/lang/AutoCloseable.java \
-     java/lang/Class.java \
-@@ -139,13 +213,6 @@
-     java/lang/Override.java \
-     java/lang/SafeVarargs.java \
-     java/lang/SuppressWarnings.java \
--    java/lang/ref/Reference.java \
--        java/lang/ref/SoftReference.java \
--	java/lang/ref/WeakReference.java \
--	java/lang/ref/FinalReference.java \
--	java/lang/ref/PhantomReference.java \
--    java/lang/ref/ReferenceQueue.java \
--    java/lang/ref/Finalizer.java \
-     java/util/BitSet.java \
-     java/util/Calendar.java \
-         java/util/GregorianCalendar.java \
--- a/patches/jtreg-httpTest.patch	Wed Sep 21 18:56:43 2011 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
---- /dev/null		2010-03-18 17:24:04.000000000 +0100
-+++ openjdk/jdk/test/java/net/URL/TestHttps.java	2010-03-18 17:24:04.000000000 +0100
-@@ -0,0 +1,34 @@
-+/*
-+ * Copyright 2010 Red Hat, 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.
-+ *
-+ * 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.
-+ */
-+
-+
-+/* @test
-+ * @summary This test check if the cacerts keytool database is configured properly and SSL is really working. The test should not fail if SSL is working.
-+ */
-+
-+import java.io.IOException;
-+
-+import java.net.URL;
-+import java.net.URLConnection;
-+
-+public class TestHttps {
-+    public static void main(String[] args) throws IOException {
-+        new URL("https://www.verisign.com/").openConnection().connect();
-+    }
-+}
--- a/patches/jvmtiEnv.patch	Wed Sep 21 18:56:43 2011 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
---- openjdk/hotspot/src/share/vm/prims/jvmtiEnv.cpp.old	2009-02-26 17:18:35.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/prims/jvmtiEnv.cpp	2009-02-26 17:16:59.000000000 +0000
-@@ -2702,6 +2702,9 @@
-   (*entry_count_ptr) = num_entries;
-   (*table_ptr) = jvmti_table;
- 
-+  if (num_entries == 0)
-+    return JVMTI_ERROR_ABSENT_INFORMATION;
-+
-   return JVMTI_ERROR_NONE;
- } /* end GetLineNumberTable */
- 
--- a/patches/lc_ctype.patch	Wed Sep 21 18:56:43 2011 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-diff -Nru openjdk.orig/jdk/src/solaris/native/java/lang/java_props_md.c openjdk/jdk/src/solaris/native/java/lang/java_props_md.c
---- openjdk.orig/jdk/src/solaris/native/java/lang/java_props_md.c	2011-03-14 22:10:33.000000000 +0000
-+++ openjdk/jdk/src/solaris/native/java/lang/java_props_md.c	2011-03-15 23:40:55.950143541 +0000
-@@ -119,7 +119,7 @@
- 
- static int ParseLocale(int cat, char ** std_language, char ** std_script,
-                        char ** std_country, char ** std_variant, char ** std_encoding) {
--    char temp[64];
-+    char *temp;
-     char *language = NULL, *country = NULL, *variant = NULL,
-          *encoding = NULL;
-     char *p, encoding_variant[64];
-@@ -163,6 +163,7 @@
-      * <country name>, <encoding name>, and <variant name> are optional.
-      */
- 
-+    temp = (char*) malloc(strlen(lc)+1);
-     strcpy(temp, lc);
- 
-     /* Parse the language, country, encoding, and variant from the
-@@ -301,6 +302,10 @@
- #endif
-     }
- 
-+	
-+    /* Free temp */
-+    free(temp);
-+
-     return 1;
- }
- 
--- a/patches/nss-config.patch	Wed Sep 21 18:56:43 2011 +0100
+++ b/patches/nss-config.patch	Fri Sep 23 17:30:26 2011 +0100
@@ -1,9 +1,10 @@
---- openjdk.orig/jdk/src/share/lib/security/java.security	2009-08-25 11:43:59.000000000 +0100
-+++ openjdk/jdk/src/share/lib/security/java.security		2009-08-27 14:23:54.000000000 +0100
-@@ -51,6 +51,7 @@
- security.provider.6=com.sun.security.sasl.Provider
+diff -Nru openjdk.orig/jdk/src/share/lib/security/java.security openjdk/jdk/src/share/lib/security/java.security
+--- openjdk.orig/jdk/src/share/lib/security/java.security	2011-09-22 01:56:22.000000000 +0100
++++ openjdk/jdk/src/share/lib/security/java.security	2011-09-22 13:51:56.234039451 +0100
+@@ -52,6 +52,7 @@
  security.provider.7=org.jcp.xml.dsig.internal.dom.XMLDSigRI
  security.provider.8=sun.security.smartcardio.SunPCSC
+ #security.provider.9=sun.security.ec.SunEC
 +security.provider.9=sun.security.pkcs11.SunPKCS11 ${java.home}/lib/security/nss.cfg
  
  #
--- a/patches/nss-not-enabled-config.patch	Wed Sep 21 18:56:43 2011 +0100
+++ b/patches/nss-not-enabled-config.patch	Fri Sep 23 17:30:26 2011 +0100
@@ -1,9 +1,10 @@
---- openjdk.orig/jdk/src/share/lib/security/java.security	2009-08-25 11:43:59.000000000 +0100
-+++ openjdk/jdk/src/share/lib/security/java.security		2009-08-27 14:23:54.000000000 +0100
-@@ -51,6 +51,10 @@
- security.provider.6=com.sun.security.sasl.Provider
+diff -Nru openjdk.orig/jdk/src/share/lib/security/java.security openjdk/jdk/src/share/lib/security/java.security
+--- openjdk.orig/jdk/src/share/lib/security/java.security	2011-09-22 01:56:22.000000000 +0100
++++ openjdk/jdk/src/share/lib/security/java.security	2011-09-22 13:52:56.826997041 +0100
+@@ -52,6 +52,10 @@
  security.provider.7=org.jcp.xml.dsig.internal.dom.XMLDSigRI
  security.provider.8=sun.security.smartcardio.SunPCSC
+ #security.provider.9=sun.security.ec.SunEC
 +# the NSS security provider was not enabled for this build; it can be enabled
 +# if NSS (libnss3) is available on the machine. The nss.cfg file may need
 +# editing to reflect the location of the NSS installation.
--- a/patches/override-redirect-metacity.patch	Wed Sep 21 18:56:43 2011 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-diff -Nru openjdk.orig/jdk/src/solaris/classes/sun/awt/X11/XWindowPeer.java openjdk/jdk/src/solaris/classes/sun/awt/X11/XWindowPeer.java
---- openjdk.orig/jdk/src/solaris/classes/sun/awt/X11/XWindowPeer.java	2010-01-04 16:57:29.000000000 +0000
-+++ openjdk/jdk/src/solaris/classes/sun/awt/X11/XWindowPeer.java	2010-01-04 19:47:57.000000000 +0000
-@@ -1142,6 +1142,7 @@
- 
-     boolean isOverrideRedirect() {
-         return XWM.getWMID() == XWM.OPENLOOK_WM ||
-+            XWM.getWMID() == XWM.METACITY_WM ||
-             Window.Type.POPUP.equals(getWindowType());
-     }
- 
--- a/patches/params-cast-size_t.patch	Wed Sep 21 18:56:43 2011 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,103 +0,0 @@
-diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp
---- openjdk.orig/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	2011-04-20 04:39:42.000000000 +0100
-+++ openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	2011-04-21 10:52:34.766273674 +0100
-@@ -957,7 +957,7 @@
-   if (free_percentage < desired_free_percentage) {
-     size_t desired_capacity = (size_t)(used() / ((double) 1 - desired_free_percentage));
-     assert(desired_capacity >= capacity(), "invalid expansion size");
--    expand_bytes = MAX2(desired_capacity - capacity(), MinHeapDeltaBytes);
-+    expand_bytes = MAX2((long unsigned int) (desired_capacity - capacity()), (long unsigned int) MinHeapDeltaBytes);
-   }
-   if (expand_bytes > 0) {
-     if (PrintGCDetails && Verbose) {
-@@ -6253,7 +6253,7 @@
-     HeapWord* curAddr = _markBitMap.startWord();
-     while (curAddr < _markBitMap.endWord()) {
-       size_t remaining  = pointer_delta(_markBitMap.endWord(), curAddr);
--      MemRegion chunk(curAddr, MIN2(CMSBitMapYieldQuantum, remaining));
-+      MemRegion chunk(curAddr, MIN2((size_t) CMSBitMapYieldQuantum, remaining));
-       _markBitMap.clear_large_range(chunk);
-       if (ConcurrentMarkSweepThread::should_yield() &&
-           !foregroundGCIsActive() &&
-@@ -6546,7 +6546,7 @@
-     return;
-   }
-   // Double capacity if possible
--  size_t new_capacity = MIN2(_capacity*2, MarkStackSizeMax);
-+  size_t new_capacity = MIN2((size_t) _capacity*2, (size_t) MarkStackSizeMax);
-   // Do not give up existing stack until we have managed to
-   // get the double capacity that we desired.
-   ReservedSpace rs(ReservedSpace::allocation_align_size_up(
-diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp
---- openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp	2011-04-20 04:39:42.000000000 +0100
-+++ openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp	2011-04-21 10:52:34.766273674 +0100
-@@ -897,8 +897,8 @@
- void PSParallelCompact::initialize_dead_wood_limiter()
- {
-   const size_t max = 100;
--  _dwl_mean = double(MIN2(ParallelOldDeadWoodLimiterMean, max)) / 100.0;
--  _dwl_std_dev = double(MIN2(ParallelOldDeadWoodLimiterStdDev, max)) / 100.0;
-+  _dwl_mean = double(MIN2((size_t) ParallelOldDeadWoodLimiterMean, max)) / 100.0;
-+  _dwl_std_dev = double(MIN2((size_t) ParallelOldDeadWoodLimiterStdDev, max)) / 100.0;
-   _dwl_first_term = 1.0 / (sqrt(2.0 * M_PI) * _dwl_std_dev);
-   DEBUG_ONLY(_dwl_initialized = true;)
-   _dwl_adjustment = normal_distribution(1.0);
-diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPermGen.cpp openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPermGen.cpp
---- openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPermGen.cpp	2011-03-14 22:09:03.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPermGen.cpp	2011-04-21 10:52:34.770273739 +0100
-@@ -69,7 +69,7 @@
-   _last_used = current_live;
- 
-   // We have different alignment constraints than the rest of the heap.
--  const size_t alignment = MAX2(MinPermHeapExpansion,
-+  const size_t alignment = MAX2((size_t) MinPermHeapExpansion,
-                                 virtual_space()->alignment());
- 
-   // Compute the desired size:
-diff -Nru openjdk.orig/hotspot/src/share/vm/memory/collectorPolicy.cpp openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp
---- openjdk.orig/hotspot/src/share/vm/memory/collectorPolicy.cpp	2011-04-20 04:39:42.000000000 +0100
-+++ openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp	2011-04-21 10:52:34.770273739 +0100
-@@ -329,7 +329,7 @@
-     // yield a size that is too small) and bound it by MaxNewSize above.
-     // Ergonomics plays here by previously calculating the desired
-     // NewSize and MaxNewSize.
--    max_new_size = MIN2(MAX2(max_new_size, NewSize), MaxNewSize);
-+    max_new_size = MIN2(MAX2(max_new_size, (size_t) NewSize), (size_t) MaxNewSize);
-   }
-   assert(max_new_size > 0, "All paths should set max_new_size");
- 
-diff -Nru openjdk.orig/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp openjdk/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp
---- openjdk.orig/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp	2011-04-11 12:33:06.000000000 +0100
-+++ openjdk/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp	2011-04-21 10:52:34.770273739 +0100
-@@ -240,7 +240,7 @@
-   size_t init_sz;
- 
-   if (TLABSize > 0) {
--    init_sz = MIN2(TLABSize / HeapWordSize, max_size());
-+    init_sz = MIN2((size_t) (TLABSize / HeapWordSize), max_size());
-   } else if (global_stats() == NULL) {
-     // Startup issue - main thread initialized before heap initialized.
-     init_sz = min_size();
-diff -Nru openjdk.orig/hotspot/src/share/vm/runtime/arguments.cpp openjdk/hotspot/src/share/vm/runtime/arguments.cpp
---- openjdk.orig/hotspot/src/share/vm/runtime/arguments.cpp	2011-04-20 04:39:42.000000000 +0100
-+++ openjdk/hotspot/src/share/vm/runtime/arguments.cpp	2011-04-21 10:52:34.770273739 +0100
-@@ -1130,7 +1130,7 @@
-     // NewSize was set on the command line and it is larger than
-     // preferred_max_new_size.
-     if (!FLAG_IS_DEFAULT(NewSize)) {   // NewSize explicitly set at command-line
--      FLAG_SET_ERGO(uintx, MaxNewSize, MAX2(NewSize, preferred_max_new_size));
-+      FLAG_SET_ERGO(uintx, MaxNewSize, MAX2((size_t) NewSize, preferred_max_new_size));
-     } else {
-       FLAG_SET_ERGO(uintx, MaxNewSize, preferred_max_new_size);
-     }
-@@ -1159,8 +1159,8 @@
-       // Unless explicitly requested otherwise, make young gen
-       // at least min_new, and at most preferred_max_new_size.
-       if (FLAG_IS_DEFAULT(NewSize)) {
--        FLAG_SET_ERGO(uintx, NewSize, MAX2(NewSize, min_new));
--        FLAG_SET_ERGO(uintx, NewSize, MIN2(preferred_max_new_size, NewSize));
-+        FLAG_SET_ERGO(uintx, NewSize, MAX2((size_t) NewSize, min_new));
-+        FLAG_SET_ERGO(uintx, NewSize, MIN2(preferred_max_new_size, (size_t) NewSize));
-         if (PrintGCDetails && Verbose) {
-           // Too early to use gclog_or_tty
-           tty->print_cr("CMS ergo set NewSize: " SIZE_FORMAT, NewSize);
--- a/patches/parisc-opt.patch	Wed Sep 21 18:56:43 2011 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
---- openjdk/hotspot/make/linux/makefiles/product.make.orig	2008-12-10 19:02:31.000000000 +0100
-+++ openjdk/hotspot/make/linux/makefiles/product.make	2008-12-10 19:24:53.000000000 +0100
-@@ -25,6 +25,11 @@
- # Sets make macros for making optimized version of Gamma VM
- # (This is the "product", not the "release" version.)
- 
-+# work around an ICE in gcc-4.1 and gcc-4.3 on parisc-linux
-+ifeq ($(BUILDARCH)-$(ZERO_LIBARCH), zero-parisc)
-+  OPT_CFLAGS/codeBlob.o = $(OPT_CFLAGS/NOOPT)
-+endif
-+
- # Compiler specific OPT_CFLAGS are passed in from gcc.make, sparcWorks.make
- OPT_CFLAGS/DEFAULT= $(OPT_CFLAGS)
- OPT_CFLAGS/BYFILE = $(OPT_CFLAGS/$@)$(OPT_CFLAGS/DEFAULT$(OPT_CFLAGS/$@))
---- openjdk/hotspot/make/linux/makefiles/optimized.make.orig	2008-12-10 19:02:22.000000000 +0100
-+++ openjdk/hotspot/make/linux/makefiles/optimized.make	2008-12-10 19:24:24.000000000 +0100
-@@ -25,6 +25,11 @@
- # Sets make macros for making optimized version of Gamma VM
- # (This is the "product", not the "release" version.)
- 
-+# work around an ICE in gcc-4.1 and gcc-4.3 on parisc-linux
-+ifeq ($(BUILDARCH)-$(ZERO_LIBARCH), zero-parisc)
-+  OPT_CFLAGS/codeBlob.o = $(OPT_CFLAGS/NOOPT)
-+endif
-+
- # Compiler specific OPT_CFLAGS are passed in from gcc.make, sparcWorks.make
- OPT_CFLAGS/DEFAULT= $(OPT_CFLAGS)
- OPT_CFLAGS/BYFILE = $(OPT_CFLAGS/$@)$(OPT_CFLAGS/DEFAULT$(OPT_CFLAGS/$@))
--- a/patches/parisc.patch	Wed Sep 21 18:56:43 2011 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
---- openjdk/jdk/make/common/shared/Compiler-gcc.gmk.orig	2009-12-19 12:45:34.000000000 +0000
-+++ openjdk/jdk/make/common/shared/Compiler-gcc.gmk	2009-12-19 12:45:09.000000000 +0000
-@@ -106,6 +106,11 @@
-     REQUIRED_CC_VER = 3.2
-     REQUIRED_GCC_VER = 3.2.*
-   endif
-+  ifneq ("$(findstring parisc,$(ARCH))", "")
-+    # mips
-+    REQUIRED_CC_VER = 4.4
-+    REQUIRED_GCC_VER = 4.4.*
-+  endif
-   ifneq ("$(findstring ppc,$(ARCH))", "")
-     # ppc or ppc64
-     REQUIRED_CC_VER = 3.2
--- a/patches/samejvm-safe.patch	Wed Sep 21 18:56:43 2011 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
---- openjdk.orig/jdk/test/TEST.ROOT	2008-11-06 09:44:52.000000000 +0100
-+++ openjdk/jdk/test/TEST.ROOT	2008-11-23 16:15:53.000000000 +0100
-@@ -4,3 +4,9 @@
- 
- # The list of keywords supported in the entire test suite
- keys=2d dnd i18n
-+
-+# List if directory (prefixes) that contain test that are safe to run in
-+# -samejvm mode. Only used if the test root (dir containing this file) is
-+# given to jtreg and the -samejvm argument is used, ignored otherwise
-+# (meaning all tests are assumed to be same jvm safe).
-+samejvmsafe=com/sun/crypto com/sun/management com/sun/media com/sun/security java/beans/beancontext java/beans/PropertyChangeSupport java/beans/Statement java/beans/VetoableChangeSupport java/lang/Boolean java/lang/Byte java/lang/Double java/lang/Float java/lang/Integer java/lang/Long java/lang/Short java/lang/Math java/lang/StrictMath java/lang/String java/lang/Throwable java/lang/instrument java/math java/net/URI java/net/URLDecoder java/net/URLEncoder java/nio/Buffer java/nio/ByteOrder java/nio/MappedByteBuffer java/nio/channels/Channels java/nio/channels/DatagramChannel java/nio/channels/spi java/security/cert java/security/Provider java/text java/util/jar java/util/zip java/util/Array java/util/BitSet java/util/Collection java/util/List javax/imageio javax/management/openmbean javax/rmi javax/sound sun/net/www/protocol sun/misc sun/nio sun/security/pkcs11 sun/security/rsa sun/util
--- a/patches/security-updates.patch	Wed Sep 21 18:56:43 2011 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,101 +0,0 @@
-diff -Nru openjdk.orig/jdk/test/sun/management/jmxremote/bootstrap/LocalOnlyTest.java openjdk/jdk/test/sun/management/jmxremote/bootstrap/LocalOnlyTest.java
---- openjdk.orig/jdk/test/sun/management/jmxremote/bootstrap/LocalOnlyTest.java	1970-01-01 01:00:00.000000000 +0100
-+++ openjdk/jdk/test/sun/management/jmxremote/bootstrap/LocalOnlyTest.java	2009-05-12 12:55:47.000000000 +0100
-@@ -0,0 +1,97 @@
-+/*
-+ * Copyright 2007 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.
-+ *
-+ * 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.
-+ */
-+
-+/*
-+ * @test
-+ * @bug 6685178
-+ * @summary Sanity check for local only option. In order to fully test this
-+ *          new local only option two different machines would be required.
-+ * @author Luis-Miguel Alventosa
-+ * @run main/othervm LocalOnlyTest
-+ * @run main/othervm -Dcom.sun.management.jmxremote.local.only=true LocalOnlyTest
-+ * @run main/othervm -Dcom.sun.management.jmxremote.local.only=false LocalOnlyTest
-+ * @run main/othervm -Dcom.sun.management.jmxremote LocalOnlyTest
-+ * @run main/othervm -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.local.only=true LocalOnlyTest
-+ * @run main/othervm -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.local.only=false LocalOnlyTest
-+ * @run main/othervm -Dcom.sun.management.jmxremote.port=0 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false LocalOnlyTest
-+ * @run main/othervm -Dcom.sun.management.jmxremote.port=0 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.local.only=true LocalOnlyTest
-+ * @run main/othervm -Dcom.sun.management.jmxremote.port=0 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.local.only=false LocalOnlyTest
-+ */
-+
-+import java.io.*;
-+import java.lang.management.*;
-+import java.util.*;
-+import javax.management.*;
-+import javax.management.remote.*;
-+import com.sun.tools.attach.*;
-+
-+public class LocalOnlyTest {
-+
-+    public static void main(String args[]) throws Exception {
-+        RuntimeMXBean rt = ManagementFactory.getRuntimeMXBean();
-+        String name = rt.getName();
-+        System.out.println("name = " + name);
-+        String vmid = name.substring(0, name.indexOf("@"));
-+        System.out.println("vmid = " + vmid);
-+        VirtualMachine vm = VirtualMachine.attach(vmid);
-+        String addr = vm.getAgentProperties().getProperty(
-+                "com.sun.management.jmxremote.localConnectorAddress");
-+        System.out.println("connectorAddress = " + addr);
-+        if (addr == null) {
-+            // Normally in ${java.home}/jre/lib/management-agent.jar
-+            // but might be in ${java.home}/lib in build environments.
-+            String javaHome = System.getProperty("java.home");
-+            String agent = javaHome + File.separator + "jre" + File.separator +
-+                    "lib" + File.separator + "management-agent.jar";
-+            File f = new File(agent);
-+            if (!f.exists()) {
-+                agent = javaHome + File.separator + "lib" + File.separator +
-+                        "management-agent.jar";
-+                f = new File(agent);
-+                if (!f.exists()) {
-+                    throw new IOException("Management agent not found");
-+                }
-+            }
-+            agent = f.getCanonicalPath();
-+            try {
-+                vm.loadAgent(agent, "com.sun.management.jmxremote");
-+            } catch (AgentLoadException x) {
-+                IOException ioe = new IOException(x.getMessage());
-+                ioe.initCause(x);
-+                throw ioe;
-+            } catch (AgentInitializationException x) {
-+                IOException ioe = new IOException(x.getMessage());
-+                ioe.initCause(x);
-+                throw ioe;
-+            }
-+            addr = vm.getAgentProperties().getProperty(
-+                    "com.sun.management.jmxremote.localConnectorAddress");
-+            System.out.println("connectorAddress (after loading agent) = " + addr);
-+        }
-+        vm.detach();
-+        JMXServiceURL url = new JMXServiceURL(addr);
-+        JMXConnector c = JMXConnectorFactory.connect(url);
-+        System.out.println("connectionId  = " + c.getConnectionId());
-+        System.out.println("Bye! Bye!");
-+    }
-+}
--- a/patches/security/6592792.patch	Wed Sep 21 18:56:43 2011 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-diff -Nru openjdk.orig/jdk/test/com/sun/org/apache/xml/internal/ws/server/Test.java openjdk/jdk/test/com/sun/org/apache/xml/internal/ws/server/Test.java
---- openjdk.orig/jdk/test/com/sun/org/apache/xml/internal/ws/server/Test.java	1970-01-01 01:00:00.000000000 +0100
-+++ openjdk/jdk/test/com/sun/org/apache/xml/internal/ws/server/Test.java	2009-05-12 23:41:24.000000000 +0100
-@@ -0,0 +1,65 @@
-+/*
-+ *  @test
-+ *  @bug 6592792
-+ *  @summary Add com.sun.xml.internal to the "package.access" property in $JAVA_HOME/lib/security/java.security
-+ *  @run shell Test6592792.sh
-+ */
-+
-+import java.lang.*;
-+import java.lang.reflect.*;
-+import com.sun.xml.internal.ws.server.*;
-+import com.sun.xml.internal.ws.server.SingletonResolver;
-+import com.sun.xml.internal.ws.api.server.*;
-+
-+public class Test {
-+
-+  public static void main(String[] args) throws Exception{
-+      // Enable the security manager
-+      SecurityManager sm = new SecurityManager();
-+      System.setSecurityManager(sm);
-+      new Test();
-+  }
-+
-+  Object invokeMethod(Object target,Method m,Object args[]) throws Exception {
-+      SingletonResolver r = new SingletonResolver(target);
-+      Invoker invoker = r.createInvoker();
-+      return invoker.invoke(null, m, args);
-+  }
-+
-+  public Test() throws Exception{
-+      try {
-+          Class c=Class.forName("java.lang.Class");
-+
-+          Class ctab[]=new Class[1];
-+          ctab[0]=Class.forName("java.lang.String");
-+          Method forName=c.getMethod("forName",ctab);
-+
-+          Class gtab[]=new Class[2];
-+          gtab[0]=Class.forName("java.lang.String");
-+          gtab[1]=Class[].class;
-+          Method getMethod=c.getMethod("getMethod",gtab);
-+
-+          Method newInstance=c.getMethod("newInstance",(Class[])null);
-+
-+          Object otab[]=new Object[1];
-+          otab[0]="sun.misc.Unsafe";
-+
-+          Object o=invokeMethod(null,forName,otab);
-+          c = (Class)o;		// sun.misc.Unsafe class
-+          // Test FAILED: Should n't have got the reference.   
-+          throw new RuntimeException("Test Failed: Got reference to: "+o);
-+
-+
-+          //o=invokeMethod(c,getMethod, new Object[]{"getUnsafe", (Class[])null});
-+          //System.out.println("Got reference to: "+o);
-+          //throw new RuntimeException("Got reference to: "+o);
-+          //o=invokeMethod(c,(Method)o,null);
-+          //System.out.println("Got reference to: "+o);
-+          //throw new RuntimeException("Got reference to: "+o);
-+   
-+      } catch(java.security.AccessControlException e) {
-+          System.out.println("Test passed");
-+          //e.printStackTrace();
-+      } 
-+   }
-+}
--- a/patches/security/6733959.patch	Wed Sep 21 18:56:43 2011 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-diff -Nru openjdk.orig/jdk/src/share/bin/java.c openjdk/jdk/src/share/bin/java.c
---- openjdk.orig/jdk/src/share/bin/java.c	2009-05-12 23:35:16.000000000 +0100
-+++ openjdk/jdk/src/share/bin/java.c	2009-05-12 23:43:56.000000000 +0100
-@@ -885,8 +885,14 @@
-      * "Valid" returns (other than unrecoverable errors) follow.  Set
-      * main_class as a side-effect of this routine.
-      */
--    if (info.main_class != NULL)
-+    if (info.main_class != NULL) {
-+      if (strlen(info.main_class) <= MAXNAMELEN) {
-         *main_class = JLI_StringDup(info.main_class);
-+      } else {
-+        JLI_ReportErrorMessage("Error: main-class: attribute exceeds system limits\n", JNI_TRUE);
-+	exit(1);
-+      }
-+    }
- 
-     /*
-      * If no version selection information is found either on the command
--- a/patches/security/6755943.patch	Wed Sep 21 18:56:43 2011 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,373 +0,0 @@
-diff -Nru openjdk.orig/jdk/test/tools/pack200/MemoryAllocatorTest.java openjdk/jdk/test/tools/pack200/MemoryAllocatorTest.java
---- openjdk.orig/jdk/test/tools/pack200/MemoryAllocatorTest.java	1970-01-01 01:00:00.000000000 +0100
-+++ openjdk/jdk/test/tools/pack200/MemoryAllocatorTest.java	2008-12-02 15:42:47.000000000 +0000
-@@ -0,0 +1,369 @@
-+/*
-+ * Copyright 2008 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.
-+ *
-+ * 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.
-+ */
-+
-+/*
-+ * @test
-+ * @bug 6755943
-+ * @summary Checks any memory overruns in archive length.
-+ * @run main/timeout=1200 MemoryAllocatorTest
-+ */
-+import java.io.BufferedReader;
-+import java.io.DataOutputStream;
-+import java.io.File;
-+import java.io.FileOutputStream;
-+import java.io.IOException;
-+import java.io.InputStreamReader;
-+import java.io.OutputStream;
-+import java.io.RandomAccessFile;
-+import java.nio.MappedByteBuffer;
-+import java.nio.channels.FileChannel;
-+import java.util.ArrayList;
-+import java.util.List;
-+import java.util.Map;
-+
-+public class MemoryAllocatorTest {
-+
-+    /*
-+     * The smallest possible pack file with 1 empty resource
-+     */
-+    static int[] magic = {
-+        0xCA, 0xFE, 0xD0, 0x0D
-+    };
-+    static int[] version_info = {
-+        0x07, // minor
-+        0x96  // major
-+    };
-+    static int[] option = {
-+        0x10
-+    };
-+    static int[] size_hi = {
-+        0x00
-+    };
-+    static int[] size_lo_ulong = {
-+        0xFF, 0xFC, 0xFC, 0xFC, 0xFC // ULONG_MAX 0xFFFFFFFF
-+    };
-+    static int[] size_lo_correct = {
-+        0x17
-+    };
-+    static int[] data = {
-+        0x00, 0xEC, 0xDA, 0xDE, 0xF8, 0x45, 0x01, 0x02,
-+        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-+        0x00, 0x00, 0x00, 0x01, 0x31, 0x01, 0x00
-+    };
-+    // End of pack file data
-+
-+    static final String JAVA_HOME = System.getProperty("java.home");
-+
-+    static final boolean debug = Boolean.getBoolean("MemoryAllocatorTest.Debug");
-+    static final boolean WINDOWS = System.getProperty("os.name").startsWith("Windows");
-+    static final boolean LINUX = System.getProperty("os.name").startsWith("Linux");
-+    static final boolean SIXTYFOUR_BIT = System.getProperty("sun.arch.data.model", "32").equals("64");
-+    static final private int EXPECTED_EXIT_CODE = (WINDOWS) ? -1 : 255;
-+
-+    static int testExitValue = 0;
-+    
-+    static byte[] bytes(int[] a) {
-+        byte[] b = new byte[a.length];
-+        for (int i = 0; i < b.length; i++) {
-+            b[i] = (byte) a[i];
-+        }
-+        return b;
-+    }
-+    
-+    static void createPackFile(boolean good, File packFile) throws IOException {
-+        FileOutputStream fos = new FileOutputStream(packFile);
-+        fos.write(bytes(magic));
-+        fos.write(bytes(version_info));
-+        fos.write(bytes(option));
-+        fos.write(bytes(size_hi));
-+        if (good) {
-+            fos.write(bytes(size_lo_correct));
-+        } else {
-+            fos.write(bytes(size_lo_ulong));
-+        }
-+        fos.write(bytes(data));
-+    }
-+
-+    /*
-+     * This method modifies the LSB of the size_lo for various wicked
-+     * values between MAXINT-0x3F and MAXINT.
-+     */
-+    static int modifyPackFile(File packFile) throws IOException {
-+        RandomAccessFile raf = new RandomAccessFile(packFile, "rws");
-+        long len = packFile.length();
-+        FileChannel fc = raf.getChannel();
-+        MappedByteBuffer bb = fc.map(FileChannel.MapMode.READ_WRITE, 0, len);
-+        int pos = magic.length + version_info.length + option.length +
-+                size_hi.length;
-+        byte value = bb.get(pos);
-+        value--;
-+        bb.position(pos);
-+        bb.put(value);
-+        bb.force();
-+        fc.truncate(len);
-+        fc.close();
-+        return value & 0xFF;
-+    }
-+
-+    static String getUnpack200Cmd() throws Exception {
-+        File binDir = new File(JAVA_HOME, "bin");
-+        File unpack200File = WINDOWS
-+                ? new File(binDir, "unpack200.exe")
-+                : new File(binDir, "unpack200");
-+
-+        String cmd = unpack200File.getAbsolutePath();
-+        if (!unpack200File.canExecute()) {
-+            throw new Exception("please check" +
-+                    cmd + " exists and is executable");
-+        }
-+        return cmd;
-+    }
-+
-+    static TestResult runUnpacker(File packFile) throws Exception {
-+        if (!packFile.exists()) {
-+            throw new Exception("please check" + packFile + " exists");
-+        }
-+        ArrayList<String> alist = new ArrayList<String>();
-+        ProcessBuilder pb = new ProcessBuilder(getUnpack200Cmd(),
-+                packFile.getName(), "testout.jar");
-+        Map<String, String> env = pb.environment();
-+        pb.directory(new File("."));
-+        int retval = 0;
-+        try {
-+            pb.redirectErrorStream(true);
-+            Process p = pb.start();
-+            BufferedReader rd = new BufferedReader(
-+                    new InputStreamReader(p.getInputStream()), 8192);
-+            String in = rd.readLine();
-+            while (in != null) {
-+                alist.add(in);
-+                System.out.println(in);
-+                in = rd.readLine();
-+            }
-+            retval = p.waitFor();
-+            p.destroy();
-+        } catch (Exception ex) {
-+            ex.printStackTrace();
-+            throw new RuntimeException(ex.getMessage());
-+        }
-+        return new TestResult("", retval, alist);
-+    }
-+
-+    /*
-+     * The debug version builds of unpack200 call abort(3) which might set
-+     * an unexpected return value, therefore this test is to determine
-+     * if we are using a product or non-product build and check the
-+     * return value appropriately.
-+     */
-+    static boolean isNonProductVersion() throws Exception {
-+        ArrayList<String> alist = new ArrayList<String>();
-+        ProcessBuilder pb = new ProcessBuilder(getUnpack200Cmd(), "--version");
-+        Map<String, String> env = pb.environment();
-+        pb.directory(new File("."));
-+        int retval = 0;
-+        try {
-+            pb.redirectErrorStream(true);
-+            Process p = pb.start();
-+            BufferedReader rd = new BufferedReader(
-+                    new InputStreamReader(p.getInputStream()), 8192);
-+            String in = rd.readLine();
-+            while (in != null) {
-+                alist.add(in);
-+                System.out.println(in);
-+                in = rd.readLine();
-+            }
-+            retval = p.waitFor();
-+            p.destroy();
-+        } catch (Exception ex) {
-+            ex.printStackTrace();
-+            throw new RuntimeException(ex.getMessage());
-+        }
-+        for (String x : alist) {
-+            if (x.contains("non-product")) {
-+                return true;
-+            }
-+        }
-+        return false;
-+    }
-+
-+    /**
-+     * @param args the command line arguments
-+     * @throws java.lang.Exception 
-+     */
-+    public static void main(String[] args) throws Exception {
-+
-+        File packFile = new File("tiny.pack");
-+        boolean isNPVersion = isNonProductVersion();
-+
-+        // Create a good pack file and test if everything is ok
-+        createPackFile(true, packFile);
-+        TestResult tr = runUnpacker(packFile);
-+        tr.setDescription("a good pack file");
-+        tr.checkPositive();
-+        tr.isOK();
-+        System.out.println(tr);
-+
-+        /*
-+         * jprt systems on windows and linux seem to have abundant memory
-+         * therefore can take a very long time to run, and even if it does
-+         * the error message is not accurate for us to discern if the test
-+         * passes successfully.
-+         */
-+        if (SIXTYFOUR_BIT && (LINUX || WINDOWS)) {
-+            System.out.println("Warning: Windows/Linux 64bit tests passes vacuously");
-+            return;
-+        }
-+        
-+        /*
-+         * debug builds call abort, the exit code under these conditions
-+         * are not really relevant.
-+         */
-+        if (isNPVersion) {
-+            System.out.println("Warning: non-product build: exit values not checked");
-+        }
-+    
-+        // create a bad pack file
-+        createPackFile(false, packFile);
-+        tr = runUnpacker(packFile);
-+        tr.setDescription("a wicked pack file");
-+        tr.contains("Native allocation failed");
-+        if(!isNPVersion) {
-+            tr.checkValue(EXPECTED_EXIT_CODE);
-+        }
-+        System.out.println(tr);
-+        int value = modifyPackFile(packFile);
-+        tr.setDescription("value=" + value);
-+
-+        // continue creating bad pack files by modifying the specimen pack file.
-+        while (value >= 0xc0) {
-+            tr = runUnpacker(packFile);
-+            tr.contains("Native allocation failed");
-+            if (!isNPVersion) {
-+                tr.checkValue(EXPECTED_EXIT_CODE);
-+            }
-+            tr.setDescription("wicked value=0x" +
-+                    Integer.toHexString(value & 0xFF));
-+            System.out.println(tr);
-+            value = modifyPackFile(packFile);
-+        }
-+        if (testExitValue != 0) {
-+            throw new Exception("Pack200 archive length tests(" +
-+                    testExitValue + ") failed ");
-+        } else {
-+            System.out.println("All tests pass");
-+        }
-+    }
-+
-+    /*
-+     * A class to encapsulate the test results and stuff, with some ease
-+     * of use methods to check the test results.
-+     */
-+    static class TestResult {
-+
-+        StringBuilder status;
-+        int exitValue;
-+        List<String> testOutput;
-+        String description;
-+
-+        public TestResult(String str, int rv, List<String> oList) {
-+            status = new StringBuilder(str);
-+            exitValue = rv;
-+            testOutput = oList;
-+        }
-+
-+        void setDescription(String description) {
-+            this.description = description;
-+        }
-+
-+        void checkValue(int value) {
-+            if (exitValue != value) {
-+                status =
-+                        status.append("  Error: test expected exit value " +
-+                        value + "got " + exitValue);
-+                testExitValue++;
-+            }
-+        }
-+
-+        void checkNegative() {
-+            if (exitValue == 0) {
-+                status = status.append(
-+                        "  Error: test did not expect 0 exit value");
-+
-+                testExitValue++;
-+            }
-+        }
-+
-+        void checkPositive() {
-+            if (exitValue != 0) {
-+                status = status.append(
-+                        "  Error: test did not return 0 exit value");
-+                testExitValue++;
-+            }
-+        }
-+
-+        boolean isOK() {
-+            return exitValue == 0;
-+        }
-+
-+        boolean isZeroOutput() {
-+            if (!testOutput.isEmpty()) {
-+                status = status.append("  Error: No message from cmd please");
-+                testExitValue++;
-+                return false;
-+            }
-+            return true;
-+        }
-+
-+        boolean isNotZeroOutput() {
-+            if (testOutput.isEmpty()) {
-+                status = status.append("  Error: Missing message");
-+                testExitValue++;
-+                return false;
-+            }
-+            return true;
-+        }
-+
-+        public String toString() {
-+            if (debug) {
-+                for (String x : testOutput) {
-+                    status = status.append(x + "\n");
-+                }
-+            }
-+            if (description != null) {
-+                status.insert(0, description);
-+            }
-+            return status.append("\nexitValue = " + exitValue).toString();
-+        }
-+
-+        boolean contains(String str) {
-+            for (String x : testOutput) {
-+                if (x.contains(str)) {
-+                    return true;
-+                }
-+            }
-+            status = status.append("   Error: string <" + str + "> not found ");
-+            testExitValue++;
-+            return false;
-+        }
-+    }
-+}
--- a/patches/sh4-support.patch	Wed Sep 21 18:56:43 2011 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,162 +0,0 @@
-diff -Nru openjdk.orig/corba/make/common/shared/Platform.gmk openjdk/corba/make/common/shared/Platform.gmk
---- openjdk.orig/corba/make/common/shared/Platform.gmk	2011-04-21 15:22:49.000000000 +0100
-+++ openjdk/corba/make/common/shared/Platform.gmk	2011-04-21 19:57:25.486492074 +0100
-@@ -172,6 +172,9 @@
-                 arm*) \
-                     echo arm \
-                     ;; \
-+                sh*) \
-+                    echo sh \
-+		    ;; \
-                 *) \
-                     echo $(mach) \
-                     ;; \
-@@ -199,6 +202,9 @@
-       else
-         ARCH_DATA_MODEL=64
-       endif
-+      ifeq ($(ARCH), sh)
-+        ARCH_DATA_MODEL=32
-+      endif
-     endif
-   endif
- 
-diff -Nru openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp openjdk/hotspot/src/os/linux/vm/os_linux.cpp
---- openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp	2011-04-21 15:22:49.000000000 +0100
-+++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp	2011-04-21 19:57:25.490492144 +0100
-@@ -1864,7 +1864,8 @@
-     {EM_MIPS_RS3_LE, EM_MIPS_RS3_LE, ELFCLASS32, ELFDATA2LSB, (char*)"MIPSel"},
-     {EM_MIPS,        EM_MIPS,    ELFCLASS32, ELFDATA2MSB, (char*)"MIPS"},
-     {EM_PARISC,      EM_PARISC,  ELFCLASS32, ELFDATA2MSB, (char*)"PARISC"},
--    {EM_68K,         EM_68K,     ELFCLASS32, ELFDATA2MSB, (char*)"M68k"}
-+    {EM_68K,         EM_68K,     ELFCLASS32, ELFDATA2MSB, (char*)"M68k"},
-+    {EM_SH,          EM_SH,      ELFCLASS32, ELFDATA2LSB, (char*)"SH"} /* Support little endian only*/
-   };
- 
-   #if  (defined IA32)
-@@ -1895,9 +1896,11 @@
-     static  Elf32_Half running_arch_code=EM_MIPS;
-   #elif  (defined M68K)
-     static  Elf32_Half running_arch_code=EM_68K;
-+  #elif  (defined SH)
-+    static  Elf32_Half running_arch_code=EM_SH;
-   #else
-     #error Method os::dll_load requires that one of following is defined:\
--         IA32, AMD64, IA64, __sparc, __powerpc__, ARM, S390, ALPHA, MIPS, MIPSEL, PARISC, M68K
-+         IA32, AMD64, IA64, __sparc, __powerpc__, ARM, S390, ALPHA, MIPS, MIPSEL, PARISC, M68K, SH
-   #endif
- 
-   // Identify compatability class for VM's architecture and library's architecture
-diff -Nru openjdk.orig/jdk/make/common/Defs-linux.gmk openjdk/jdk/make/common/Defs-linux.gmk
---- openjdk.orig/jdk/make/common/Defs-linux.gmk	2011-04-21 15:22:49.000000000 +0100
-+++ openjdk/jdk/make/common/Defs-linux.gmk	2011-04-21 19:58:06.615219532 +0100
-@@ -119,6 +119,7 @@
- LDFLAGS_COMMON_sparc    += -m32 -mcpu=v9
- CFLAGS_REQUIRED_arm     += -fsigned-char -D_LITTLE_ENDIAN
- CFLAGS_REQUIRED_ppc     += -fsigned-char -D_BIG_ENDIAN
-+CFLAGS_REQUIRED_sh      += -mieee
- ifeq ($(ZERO_BUILD), true)
-   CFLAGS_REQUIRED       =  $(ZERO_ARCHFLAG)
-   ifeq ($(ZERO_ENDIANNESS), little)
-@@ -197,11 +198,15 @@
- 
- CPP_ARCH_FLAGS = -DARCH='"$(ARCH)"'
- 
--# Alpha arch does not like "alpha" defined (potential general arch cleanup issue here)
--ifneq ($(ARCH),alpha)
--  CPP_ARCH_FLAGS += -D$(ARCH)
-+# Alpha and sh archs do not like "alpha" or "sh" defined (potential general arch cleanup issue here)
-+ifeq ($(ARCH),alpha)
-+  CPP_ARCH_FLAGS += -D_$(ARCH)_
- else
-+ifeq ($(ARCH),sh)
-   CPP_ARCH_FLAGS += -D_$(ARCH)_
-+else
-+  CPP_ARCH_FLAGS += -D$(ARCH)
-+endif
- endif
- 
- CPPFLAGS_COMMON = $(CPP_ARCH_FLAGS) -DLINUX $(VERSION_DEFINES) \
-diff -Nru openjdk.orig/jdk/make/common/shared/Compiler-gcc.gmk openjdk/jdk/make/common/shared/Compiler-gcc.gmk
---- openjdk.orig/jdk/make/common/shared/Compiler-gcc.gmk	2011-04-21 15:22:50.000000000 +0100
-+++ openjdk/jdk/make/common/shared/Compiler-gcc.gmk	2011-04-21 19:57:25.490492144 +0100
-@@ -119,6 +119,11 @@
-     REQUIRED_CC_VER = 3.2
-     REQUIRED_GCC_VER = 3.2.*
-   endif
-+  ifneq ("$(findstring sh,$(ARCH))", "")
-+    # sh4*, sh3*
-+    REQUIRED_CC_VER = 4.0
-+    REQUIRED_GCC_VER = 4.0.*
-+  endif
-   # Option used to create a shared library
-   SHARED_LIBRARY_FLAG = -shared -mimpure-text
-   SUN_COMP_VER := $(shell $(CC) --verbose 2>&1 )
-diff -Nru openjdk.orig/jdk/make/common/shared/Platform.gmk openjdk/jdk/make/common/shared/Platform.gmk
---- openjdk.orig/jdk/make/common/shared/Platform.gmk	2011-04-21 15:22:49.000000000 +0100
-+++ openjdk/jdk/make/common/shared/Platform.gmk	2011-04-21 19:57:25.490492144 +0100
-@@ -179,6 +179,9 @@
-                 arm*) \
-                     echo arm \
-                     ;; \
-+                sh*) \
-+                    echo sh \
-+                    ;; \
-                 *) \
-                     echo $(mach) \
-                     ;; \
-@@ -208,6 +211,9 @@
-       ifeq ($(ARCH), ia64)
-         ARCH_DATA_MODEL=64
-       endif
-+      ifeq ($(ARCH), sh)
-+        ARCH_DATA_MODEL=32
-+      endif
-     endif
-   endif
- 
-diff -Nru openjdk.orig/jdk/make/javax/sound/SoundDefs.gmk openjdk/jdk/make/javax/sound/SoundDefs.gmk
---- openjdk.orig/jdk/make/javax/sound/SoundDefs.gmk	2011-04-21 15:22:49.000000000 +0100
-+++ openjdk/jdk/make/javax/sound/SoundDefs.gmk	2011-04-21 19:58:38.367780866 +0100
-@@ -126,6 +126,10 @@
-     CPPFLAGS += -DX_ARCH=X_PPC
-   endif # ARCH ppc
- 
-+  ifeq ($(ARCH), sh)
-+    CPPFLAGS += -DX_ARCH=X_SH
-+  endif # ARCH Renesas SuperH(sh)
-+
- endif
- 
- 
-diff -Nru openjdk.orig/jdk/make/jdk_generic_profile.sh openjdk/jdk/make/jdk_generic_profile.sh
---- openjdk.orig/jdk/make/jdk_generic_profile.sh	2011-04-11 12:34:30.000000000 +0100
-+++ openjdk/jdk/make/jdk_generic_profile.sh	2011-04-21 19:57:25.498492286 +0100
-@@ -258,13 +258,14 @@
-     i?86)    ZERO_LIBARCH=i386      ;;
-     sparc64) ZERO_LIBARCH=sparcv9   ;;
-     arm*)    ZERO_LIBARCH=arm       ;;
-+    sh*)     ZERO_LIBARCH=sh        ;;
-     *)       ZERO_LIBARCH="$(arch)"
-   esac
-   export ZERO_LIBARCH
- 
-   # ARCH_DATA_MODEL is the number of bits in a pointer
-   case "${ZERO_LIBARCH}" in
--    i386|ppc|s390|sparc|arm)
-+    i386|ppc|s390|sparc|arm|sh)
-       ARCH_DATA_MODEL=32
-       ;;
-     amd64|ppc64|s390x|sparcv9|ia64|alpha)
-diff -Nru openjdk.orig/jdk/src/share/native/com/sun/media/sound/SoundDefs.h openjdk/jdk/src/share/native/com/sun/media/sound/SoundDefs.h
---- openjdk.orig/jdk/src/share/native/com/sun/media/sound/SoundDefs.h	2011-04-21 15:22:49.000000000 +0100
-+++ openjdk/jdk/src/share/native/com/sun/media/sound/SoundDefs.h	2011-04-21 19:59:08.392311421 +0100
-@@ -48,7 +48,7 @@
- #define X_PPC64         13
- #define X_S390          14
- #define X_S390X         15
--
-+#define X_SH            16
- 
- // **********************************
- // Make sure you set X_PLATFORM and X_ARCH defines correctly.
--- a/patches/signed-types.patch	Wed Sep 21 18:56:43 2011 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-diff -Nru openjdk.orig/hotspot/src/share/vm/asm/codeBuffer.hpp openjdk/hotspot/src/share/vm/asm/codeBuffer.hpp
---- openjdk.orig/hotspot/src/share/vm/asm/codeBuffer.hpp	2011-03-14 22:09:03.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/asm/codeBuffer.hpp	2011-03-15 23:15:53.055192661 +0000
-@@ -93,7 +93,7 @@
-   address     _locs_point;      // last relocated position (grows upward)
-   bool        _locs_own;        // did I allocate the locs myself?
-   bool        _frozen;          // no more expansion of this section
--  char        _index;           // my section number (SECT_INST, etc.)
-+  signed char _index;           // my section number (SECT_INST, etc.)
-   CodeBuffer* _outer;           // enclosing CodeBuffer
- 
-   // (Note:  _locs_point used to be called _last_reloc_offset.)
-diff -Nru openjdk.orig/hotspot/src/share/vm/ci/ciTypeFlow.cpp openjdk/hotspot/src/share/vm/ci/ciTypeFlow.cpp
---- openjdk.orig/hotspot/src/share/vm/ci/ciTypeFlow.cpp	2011-03-14 22:09:03.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/ci/ciTypeFlow.cpp	2011-03-15 23:15:53.055192661 +0000
-@@ -403,7 +403,7 @@
-   // Set the rest of the locals to bottom.
-   Cell cell = state->next_cell(state->tos());
-   state->set_stack_size(0);
--  int limit = state->limit_cell();
-+  Cell limit = state->limit_cell();
-   for (; cell < limit; cell = state->next_cell(cell)) {
-     state->set_type_at(cell, state->bottom_type());
-   }
-diff -Nru openjdk.orig/hotspot/src/share/vm/utilities/ostream.cpp openjdk/hotspot/src/share/vm/utilities/ostream.cpp
---- openjdk.orig/hotspot/src/share/vm/utilities/ostream.cpp	2011-03-14 22:09:03.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/utilities/ostream.cpp	2011-03-15 23:16:13.990549499 +0000
-@@ -915,7 +915,7 @@
-   server.sin_port = htons(port);
- 
-   server.sin_addr.s_addr = inet_addr(ip);
--  if (server.sin_addr.s_addr == (uint32_t)-1) {
-+  if (server.sin_addr.s_addr == (in_addr_t)-1) {
-     struct hostent* host = os::get_host_by_name((char*)ip);
-     if (host != NULL) {
-       memcpy(&server.sin_addr, host->h_addr_list[0], host->h_length);
--- a/patches/sources.patch	Wed Sep 21 18:56:43 2011 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-diff -Nru openjdk.orig/jdk/make/common/Release.gmk openjdk/jdk/make/common/Release.gmk
---- openjdk.orig/jdk/make/common/Release.gmk	2009-11-11 03:12:50.000000000 +0000
-+++ openjdk/jdk/make/common/Release.gmk	2009-11-11 03:16:17.000000000 +0000
-@@ -313,7 +313,12 @@
- 	org/omg				\
- 	org/w3c/dom			\
- 	org/xml/sax			\
--	sunw
-+	sunw				\
-+	sun/applet			\
-+	netscape			\
-+	net				\
-+	javax/jnlp
-+
- #
- # Directories where sources may be found.  If a file with the same path
- # name exists in more than one of these places, the one found last on this
--- a/patches/sparc-ptracefix.patch	Wed Sep 21 18:56:43 2011 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-diff -up openjdk/hotspot/agent/src/os/linux/libproc.h.BAD openjdk/hotspot/agent/src/os/linux/libproc.h
---- openjdk/hotspot/agent/src/os/linux/libproc.h.BAD	2008-05-29 19:03:34.000000000 -0400
-+++ openjdk/hotspot/agent/src/os/linux/libproc.h	2008-05-29 19:01:45.000000000 -0400
-@@ -34,14 +34,25 @@
- 
- #if defined(sparc) || defined(sparcv9)
- /*
--  If _LP64 is defined ptrace.h should be taken from /usr/include/asm-sparc64
--  otherwise it should be from /usr/include/asm-sparc
--  These two files define pt_regs structure differently
-+  Taken from asm-sparc/ptrace.h and asm-sparc64/ptrace.h
- */ 
- #ifdef _LP64
--#include "asm-sparc64/ptrace.h"
-+struct pt_regs {
-+	unsigned long u_regs[16]; /* globals and ins */
-+	unsigned long tstate;
-+	unsigned long tpc;
-+	unsigned long tnpc;
-+	unsigned int y;
-+	unsigned int fprs;
-+};
- #else
--#include "asm-sparc/ptrace.h"
-+struct pt_regs {
-+	unsigned long psr;
-+	unsigned long pc;
-+	unsigned long npc;
-+	unsigned long y;
-+	unsigned long u_regs[16]; /* globals and ins */
-+};
- #endif
- 
- #endif //sparc or sparcv9
--- a/patches/sparc-trapsfix.patch	Wed Sep 21 18:56:43 2011 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
---- openjdk.orig/hotspot/src/os_cpu/linux_sparc/vm/assembler_linux_sparc.cpp	2011-03-14 22:09:02.000000000 +0000
-+++ openjdk/hotspot/src/os_cpu/linux_sparc/vm/assembler_linux_sparc.cpp	2011-03-15 23:02:33.883758538 +0000
-@@ -28,7 +28,16 @@
- #include "runtime/os.hpp"
- #include "runtime/threadLocalStorage.hpp"
- 
--#include <asm-sparc/traps.h>
-+/* Headers for 32bit sparc with a 32bit userland end up in asm/
-+ * Headers for 32bit sparc with a 64bit userland end up in asm-sparc/
-+ * There is no traps.h in asm-sparc64/
-+ */
-+
-+#if defined(__sparc__) && defined(__arch64__)
-+# include <asm-sparc/traps.h>
-+#else 
-+# include <asm/traps.h>
-+#endif
- 
- void MacroAssembler::read_ccr_trap(Register ccr_save) {
-   // No implementation
--- a/patches/systemtap-gcc-4.5.patch	Wed Sep 21 18:56:43 2011 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
---- openjdk.orig/hotspot/src/share/vm/prims/jni.cpp	2010-04-28 08:51:29.000000000 +0100
-+++ openjdk/hotspot/src/share/vm/prims/jni.cpp	2010-04-28 09:29:22.000000000 +0100
-@@ -2723,7 +2723,7 @@
- 
-   if (!directBufferSupportInitializeEnded) {
-     if (!initializeDirectBufferSupport(env, thread)) {
--      DTRACE_PROBE1(hotspot_jni, NewDirectByteBuffer__return, NULL);
-+      DTRACE_PROBE1(hotspot_jni, NewDirectByteBuffer__return, (uintptr_t) NULL);
-       return NULL;
-     }
-   }
--- a/patches/tests-jdk.patch	Wed Sep 21 18:56:43 2011 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-diff -Nru openjdk.orig/jdk/test/sun/tools/native2ascii/NativeErrors.java openjdk/jdk/test/sun/tools/native2ascii/NativeErrors.java
---- openjdk.orig/jdk/test/sun/tools/native2ascii/NativeErrors.java	2009-05-12 23:26:50.000000000 +0100
-+++ openjdk/jdk/test/sun/tools/native2ascii/NativeErrors.java	2009-05-12 23:28:57.000000000 +0100
-@@ -89,8 +89,8 @@
-         }
-         //System.out.println("received: " + errorReceived);
-         //System.out.println("expected: " + errorExpected);
--        if (!errorReceived.endsWith(errorExpected))
--            throw new RuntimeException("Native2ascii bad arg error broken.");
-+        if (errorReceived == null || !errorReceived.endsWith(errorExpected))
-+            throw new RuntimeException("Native2ascii " + errorExpected + " broken.");
-     }
- 
-     private static String[] getComString(String arg2) {
--- a/patches/update-bootclasspath.patch	Wed Sep 21 18:56:43 2011 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-diff -Nru openjdk.orig/hotspot/src/share/vm/runtime/os.cpp openjdk/hotspot/src/share/vm/runtime/os.cpp
---- openjdk.orig/hotspot/src/share/vm/runtime/os.cpp	2011-04-20 04:39:42.000000000 +0100
-+++ openjdk/hotspot/src/share/vm/runtime/os.cpp	2011-04-21 20:50:09.475567200 +0100
-@@ -1079,6 +1079,9 @@
-         "%/lib/jsse.jar:"
-         "%/lib/jce.jar:"
-         "%/lib/charsets.jar:"
-+        "%/lib/netx.jar:"
-+        "%/lib/plugin.jar:"
-+        "%/lib/rhino.jar:"
-         "%/classes";
-     char* sysclasspath = format_boot_path(classpath_format, home, home_len, fileSep, pathSep);
-     if (sysclasspath == NULL) return false;
--- a/patches/use-idx_t.patch	Wed Sep 21 18:56:43 2011 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-diff -Nru openjdk.orig/hotspot/src/share/vm/compiler/methodLiveness.cpp openjdk/hotspot/src/share/vm/compiler/methodLiveness.cpp
---- openjdk.orig/hotspot/src/share/vm/compiler/methodLiveness.cpp	2008-11-06 08:40:55.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/compiler/methodLiveness.cpp	2008-11-10 00:55:09.000000000 +0000
-@@ -567,15 +567,15 @@
- 
- 
- MethodLiveness::BasicBlock::BasicBlock(MethodLiveness *analyzer, int start, int limit) :
--         _gen((uintptr_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()),
-+         _gen((size_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()),
-                          analyzer->bit_map_size_bits()),
--         _kill((uintptr_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()),
-+         _kill((size_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()),
-                          analyzer->bit_map_size_bits()),
--         _entry((uintptr_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()),
-+         _entry((size_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()),
-                          analyzer->bit_map_size_bits()),
--         _normal_exit((uintptr_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()),
-+         _normal_exit((size_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()),
-                          analyzer->bit_map_size_bits()),
--         _exception_exit((uintptr_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()),
-+         _exception_exit((size_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()),
-                          analyzer->bit_map_size_bits()),
-          _last_bci(-1) {
-   _analyzer = analyzer;
-@@ -992,7 +992,7 @@
- }
- 
- MethodLivenessResult MethodLiveness::BasicBlock::get_liveness_at(ciMethod* method, int bci) {
--  MethodLivenessResult answer(NEW_RESOURCE_ARRAY(uintptr_t, _analyzer->bit_map_size_words()),
-+  MethodLivenessResult answer(NEW_RESOURCE_ARRAY(size_t, _analyzer->bit_map_size_words()),
-                 _analyzer->bit_map_size_bits());
-   answer.set_is_valid();
- 
-diff -Nru openjdk.orig/hotspot/src/share/vm/utilities/bitMap.hpp openjdk/hotspot/src/share/vm/utilities/bitMap.hpp
---- openjdk.orig/hotspot/src/share/vm/utilities/bitMap.hpp	2008-11-06 08:40:58.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/utilities/bitMap.hpp	2008-11-10 00:57:20.000000000 +0000
-@@ -73,7 +73,7 @@
- 
-   // Set a word to a specified value or to all ones; clear a word.
-   void set_word  (idx_t word, bm_word_t val) { _map[word] = val; }
--  void set_word  (idx_t word)            { set_word(word, ~(uintptr_t)0); }
-+  void set_word  (idx_t word)            { set_word(word, ~(idx_t)0); }
-   void clear_word(idx_t word)            { _map[word] = 0; }
- 
-   // Utilities for ranges of bits.  Ranges are half-open [beg, end).