aboutsummaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2011-07-12 04:58:58 +0800
committerjkim <jkim@FreeBSD.org>2011-07-12 04:58:58 +0800
commit3512c8a85753ef0735f1f501e8db0b41c798bc8f (patch)
tree3a4bd06f042ce315576dd9b37a8aa14cc37656d8 /java
parent80a54879bc85cfed2f1deb45dd218849d797ca17 (diff)
downloadfreebsd-ports-gnome-3512c8a85753ef0735f1f501e8db0b41c798bc8f.tar.gz
freebsd-ports-gnome-3512c8a85753ef0735f1f501e8db0b41c798bc8f.tar.zst
freebsd-ports-gnome-3512c8a85753ef0735f1f501e8db0b41c798bc8f.zip
- Update to build 23.
- Import more complete JPEG class support and turn on ICEDTEA option by default. [1] - Remove obsolete WEB option. Note the functionality is now moved to a new port java/icedtea-web, which depends on ICEDTEA option of this port. Obtained from: IcedTea project [1]
Diffstat (limited to 'java')
-rw-r--r--java/openjdk6/Makefile116
-rw-r--r--java/openjdk6/distinfo14
-rw-r--r--java/openjdk6/files/Makefile.plugin59
-rw-r--r--java/openjdk6/files/icedtea/applet_hole.patch115
-rw-r--r--java/openjdk6/files/icedtea/jpegclasses.patch2824
-rw-r--r--java/openjdk6/files/patch-set3705
-rw-r--r--java/openjdk6/files/plugin.patch409
7 files changed, 5079 insertions, 2163 deletions
diff --git a/java/openjdk6/Makefile b/java/openjdk6/Makefile
index aac0f98e45b2..9bbb5fa6b5f2 100644
--- a/java/openjdk6/Makefile
+++ b/java/openjdk6/Makefile
@@ -6,19 +6,17 @@
#
PORTNAME= openjdk6
-PORTVERSION= b22
-PORTREVISION= 6
+PORTVERSION= b23
CATEGORIES= java devel
MASTER_SITES= http://download.java.net/openjdk/jdk6/promoted/${PORTVERSION}/ \
http://download.java.net/jaxp/openjdk/jdk6/:jaxp \
- https://java.net/downloads/jax-ws/OpenJDK6/:jaxws \
+ http://download.java.net/glassfish/components/jax-ws/openjdk/jdk6:jaxws \
https://java.net/downloads/jax-ws/OpenJDK6/:jaf \
http://icedtea.classpath.org/builds/icedtea6/src/ \
http://icedtea.classpath.org/download/drops/:jaxp \
http://icedtea.classpath.org/download/drops/:jaxws \
http://icedtea.classpath.org/download/drops/:jaf \
${MASTER_SITE_APACHE:S,%SUBDIR%/,ant/binaries/:ant,} \
- http://icedtea.classpath.org/download/source/:itweb \
http://download.java.net/openjdk/jtreg/promoted/${JTREGVERSION}/:jtreg
DISTNAME= openjdk-6-src-${PORTVERSION}-${OPENJDK_BUILDDATE}
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \
@@ -40,16 +38,15 @@ RUN_DEPENDS= javavm:${PORTSDIR}/java/javavmwrapper \
LICENSE= GPLv2
-OPENJDK_BUILDDATE= 28_feb_2011
+OPENJDK_BUILDDATE= 05_jul_2011
OPTIONS= DEBUG "Enable legacy debugging support" off \
FASTDEBUG "Include fastdebug build" off \
- ICEDTEA "Apply additional patches from IcedTea" off \
+ ICEDTEA "Apply additional patches from IcedTea" on \
IPV6 "Enable IPv6 support" off \
POLICY "Install the Unlimited Strength Policy Files" off \
SOUND "Enable sound support" off \
- TEST "Add support for running regression test" off \
- WEB "Enable the browser plugin and Java Web Start" off
+ TEST "Add support for running regression test" off
# java extracts directly to the cwd
WRKSRC= ${WRKDIR}
@@ -59,14 +56,12 @@ USE_MOTIF= yes
USE_XORG= xtst xi xt x11
MAKE_JOBS_UNSAFE= yes
-JAXP_BUILD= 144_01
+JAXP_BUILD= 144_03
JAXPFILE= jaxp${JAXP_BUILD}.zip
-JAXWS_BUILD= b20
-JAXWSFILE= jdk6-jaxws-${JAXWS_BUILD}.zip
+JAXWS_BUILD= 2_1_6-2011_06_08
+JAXWSFILE= jdk6-jaxws${JAXWS_BUILD}.zip
JAF_BUILD= b20
JAFFILE= jdk6-jaf-${JAF_BUILD}.zip
-ITWEBVERSION= 1.0.3
-ITWEBFILE= icedtea-web-${ITWEBVERSION}${EXTRACT_SUFX}
JTREGVERSION= b02
JTREGFILE= jtreg-4.1-bin-${JTREGVERSION}_21_may_2010.zip
@@ -143,7 +138,8 @@ MAKE_ENV+= SKIP_FASTDEBUG_BUILD=true
.endif
.if defined(WITH_ICEDTEA)
-EXTRA_PATCHES+= ${FILESDIR}/icedtea/jpegclasses.patch
+EXTRA_PATCHES+= ${FILESDIR}/icedtea/applet_hole.patch \
+ ${FILESDIR}/icedtea/jpegclasses.patch
.endif
.if !defined(WITH_IPV6)
@@ -165,23 +161,6 @@ BUILD_DEPENDS+= ${LOCALBASE}/lib/X11/fonts/dejavu:${PORTSDIR}/x11-fonts/dejavu
USE_DISPLAY= yes
.endif
-.if defined(WITH_WEB)
-DISTFILES+= ${ITWEBFILE}:itweb
-EXTRACT_ONLY+= ${ITWEBFILE}
-EXTRA_PATCHES+= ${FILESDIR}/plugin.patch
-BUILD_DEPENDS+= ${LOCALBASE}/bin/pkg-config:${PORTSDIR}/devel/pkg-config \
- ${LOCALBASE}/libdata/pkgconfig/glib-2.0.pc:${PORTSDIR}/devel/glib20 \
- ${LOCALBASE}/libdata/pkgconfig/gtk+-2.0.pc:${PORTSDIR}/x11-toolkits/gtk20 \
- ${LOCALBASE}/libdata/pkgconfig/mozilla-plugin.pc:${PORTSDIR}/www/libxul
-ITWEBDIR= ${WRKDIR}/icedtea-web-${ITWEBVERSION}
-ITWEB_JAVAC= ${WRKSRC}/build/${OPENJDK_OSARCH}/j2sdk-image/bin/javac
-ITWEB_JAR= ${WRKSRC}/build/${OPENJDK_OSARCH}/j2sdk-image/bin/jar
-.if defined(WITH_DEBUG)
-ITWEB_DEBUG_FLAGS=-g
-.endif
-ITWEB_JAVAC_FLAGS=${ITWEB_DEBUG_FLAGS} -encoding utf-8 -J-Xmx1024m -source 6 -target 6
-.endif
-
.if !defined(DISABLE_MAKE_JOBS)
.if defined(MAKE_JOBS_NUMBER)
BUILD_JOBS_NUMBER= ${MAKE_JOBS_NUMBER}
@@ -192,7 +171,6 @@ MAKE_ENV+= HOTSPOT_BUILD_JOBS=${BUILD_JOBS_NUMBER}
.endif
COPYDIRS= \
- hotspot/src/os/linux/launcher \
hotspot/src/os/linux/vm \
hotspot/src/os_cpu/linux_x86/vm \
hotspot/agent/src/os/linux \
@@ -231,7 +209,7 @@ post-extract:
for f in *; do \
if [ -f $$f ]; then \
t=`echo ${WRKDIR}/$$d/$$f | ${SED} 's/linux/bsd/g; s/Linux/Bsd/g'`; \
- ${SED} 's/linux/bsd/g; s/Linux/Bsd/g' < $$f > $$t; \
+ ${SED} 's/linux/bsd/g; s/Linux/Bsd/g; s/LINUX/BSD/g' < $$f > $$t; \
fi; \
done; \
done
@@ -256,77 +234,8 @@ post-patch:
${WRKSRC}/jdk/make/javax/crypto/Makefile
.endif
-.if defined(WITH_WEB) || defined(WITH_TEST)
-post-build:
-.if defined(WITH_WEB)
- @${MKDIR} ${ITWEBDIR}/build/lib
- @( \
- cd ${ITWEBDIR}/plugin/icedteanp; \
- ${MAKE} -f ${FILESDIR}/Makefile.plugin depend all install \
- DEBUG_FLAGS="${ITWEB_DEBUG_FLAGS}" \
- LIBDIR=${ITWEBDIR}/build/lib \
- LIBOWN=${UID} \
- LIBGRP=`${ID} -g` \
- LOCALBASE=${LOCALBASE} \
- JDK_UPDATE_VERSION=50 \
- PLUGIN_VERSION="IcedTea-Web ${ITWEBVERSION}" \
- )
- @${FIND} -s ${ITWEBDIR}/netx -name '*.java' > \
- ${ITWEBDIR}/netx-source-files.txt
- @${MKDIR} ${ITWEBDIR}/netx.build/lib
- @${ITWEB_JAVAC} ${ITWEB_JAVAC_FLAGS} -d ${ITWEBDIR}/netx.build \
- @${ITWEBDIR}/netx-source-files.txt
- @${CP} -r ${ITWEBDIR}/netx/net/sourceforge/jnlp/resources \
- ${ITWEBDIR}/netx.build/net/sourceforge/jnlp
- @( \
- cd ${ITWEBDIR}/netx.build; \
- ${ITWEB_JAR} cf ${ITWEBDIR}/build/lib/netx.jar \
- javax/jnlp net \
- )
- @( \
- cd ${ITWEBDIR}/netx; \
- ${ITWEB_JAR} uf ${ITWEBDIR}/build/lib/netx.jar \
- `${FIND} . -type f -not -name '*.java'` \
- )
- @${CP} ${ITWEBDIR}/netx/net/sourceforge/jnlp/resources/about.jnlp \
- ${ITWEBDIR}/build/lib
- @${FIND} -s ${ITWEBDIR}/plugin/icedteanp/java -name '*.java' > \
- ${ITWEBDIR}/liveconnect-source-files.txt
- @${MKDIR} ${ITWEBDIR}/liveconnect/lib
- @${ITWEB_JAVAC} ${ITWEB_JAVAC_FLAGS} -d ${ITWEBDIR}/liveconnect \
- -classpath ${ITWEBDIR}/netx.build \
- @${ITWEBDIR}/liveconnect-source-files.txt
- @( \
- cd ${ITWEBDIR}/liveconnect; \
- ${ITWEB_JAR} cf ${ITWEBDIR}/build/lib/plugin.jar \
- netscape sun/applet \
- )
- @${FIND} -s ${ITWEBDIR}/extra -name '*.java' > \
- ${ITWEBDIR}/extra-source-files.txt
- @${MKDIR} ${ITWEBDIR}/extra-lib
- @${ITWEB_JAVAC} ${ITWEB_JAVAC_FLAGS} -d ${ITWEBDIR}/extra-lib \
- -classpath ${ITWEBDIR}/netx.build \
- @${ITWEBDIR}/extra-source-files.txt
- @${CP} -r ${ITWEBDIR}/extra/net/sourceforge/jnlp/about/resources \
- ${ITWEBDIR}/extra-lib/net/sourceforge/jnlp/about
- @( \
- cd ${ITWEBDIR}/extra-lib; \
- ${ITWEB_JAR} cf ${ITWEBDIR}/build/lib/about.jar net \
- )
- @${MKDIR} ${ITWEBDIR}/build/lib/desktop
- @${SED} 's|PATH_TO_ITWEB_SETTINGS|${PREFIX}/openjdk6/bin/itweb-settings|' \
- ${ITWEBDIR}/itweb-settings.desktop.in > \
- ${ITWEBDIR}/build/lib/desktop/itweb-settings.desktop
- @${SED} 's|PATH_TO_JAVAWS|${PREFIX}/openjdk6/bin/javaws|' \
- ${ITWEBDIR}/javaws.desktop.in > \
- ${ITWEBDIR}/build/lib/desktop/javaws.desktop
- @${CP} ${ITWEBDIR}/javaws.png ${ITWEBDIR}/build/lib/desktop
- @${CP} -Rp ${ITWEBDIR}/build/lib \
- ${WRKSRC}/build/${OPENJDK_OSARCH}/j2sdk-image/jre
- @${CP} ${ITWEBDIR}/netx/javaws.1 \
- ${WRKSRC}/build/${OPENJDK_OSARCH}/j2sdk-image/man/man1/javaws.1
-.endif
.if defined(WITH_TEST)
+post-build:
@${ECHO_MSG} ""
@${ECHO_MSG} "Run \"make test\" to execute regression test (it could take a few hours to complete)."
.if defined(DISPLAY)
@@ -347,7 +256,6 @@ test: build-depends build
@${ECHO_MSG} "You can run \"make test\" again to re-execute only the failed tests."
@${ECHO_MSG} ""
.endif
-.endif
do-install:
@${MKDIR} ${PREFIX}/openjdk6/
diff --git a/java/openjdk6/distinfo b/java/openjdk6/distinfo
index 979528257022..f2f5f65d47eb 100644
--- a/java/openjdk6/distinfo
+++ b/java/openjdk6/distinfo
@@ -1,14 +1,12 @@
-SHA256 (openjdk-6-src-b22-28_feb_2011.tar.gz) = 14a097d45b8c040e984be164a8cefbf22040a9ad57474fe87dd8cf2d0b08328b
-SIZE (openjdk-6-src-b22-28_feb_2011.tar.gz) = 45279689
-SHA256 (jaxp144_01.zip) = d72c2e27a479e7e78e0141cfcf3a9c5dbc5677495bd21b2d52dce85d21322186
-SIZE (jaxp144_01.zip) = 5964803
-SHA256 (jdk6-jaxws-b20.zip) = 0c460583898b968a58bf88eb53f90a0e34369e2562d65fb3a143512dfcaeb3eb
-SIZE (jdk6-jaxws-b20.zip) = 5513069
+SHA256 (openjdk-6-src-b23-05_jul_2011.tar.gz) = f36198920e84053d7bfa3599ee32477c1e2b911dba38d75a669b79e9ae5393e5
+SIZE (openjdk-6-src-b23-05_jul_2011.tar.gz) = 45428097
+SHA256 (jaxp144_03.zip) = c1a5348e17b330a7e4b18431e61a40efd2ba99a7da71102cf2c604478ef96012
+SIZE (jaxp144_03.zip) = 5964999
+SHA256 (jdk6-jaxws2_1_6-2011_06_08.zip) = be95ff0ae05b474d0bbb3ad8bdb2a23f20cb8c48b1a21f16aa079e43a50c057f
+SIZE (jdk6-jaxws2_1_6-2011_06_08.zip) = 5512710
SHA256 (jdk6-jaf-b20.zip) = 78c7b5c9d6271e88ee46abadd018a61f1e9645f8936cc8df1617e5f4f5074012
SIZE (jdk6-jaf-b20.zip) = 71243
SHA256 (apache-ant-1.8.2-bin.tar.bz2) = ecb49f5017807c9320bf19702149328cf4779a01bddca2b6c47e3ebb0e39c9c7
SIZE (apache-ant-1.8.2-bin.tar.bz2) = 6740047
SHA256 (jtreg-4.1-bin-b02_21_may_2010.zip) = 9a9ca107e8004e8d29e6c708e03e347c38ac4d7fdfd1930a25d6dc5cf61ad0f4
SIZE (jtreg-4.1-bin-b02_21_may_2010.zip) = 5038412
-SHA256 (icedtea-web-1.0.3.tar.gz) = 2a3b907b471a67fdbae4ecc80b8425dfc7533e91f63f622d91501d4a64f07581
-SIZE (icedtea-web-1.0.3.tar.gz) = 821928
diff --git a/java/openjdk6/files/Makefile.plugin b/java/openjdk6/files/Makefile.plugin
deleted file mode 100644
index d9b6ce7e17ea..000000000000
--- a/java/openjdk6/files/Makefile.plugin
+++ /dev/null
@@ -1,59 +0,0 @@
-# $FreeBSD$
-#
-# Makefile for IcedTea Mozilla plugin
-#
-
-LIB=
-SHLIB_NAME= IcedTeaPlugin.so
-NO_MAN= yes
-NO_PROFILE= yes
-
-SRCS= IcedTeaJavaRequestProcessor.cc \
- IcedTeaNPPlugin.cc \
- IcedTeaPluginRequestProcessor.cc \
- IcedTeaPluginUtils.cc \
- IcedTeaScriptablePluginObject.cc
-SRCS+= IcedTeaJavaRequestProcessor.h \
- IcedTeaNPPlugin.h \
- IcedTeaPluginRequestProcessor.h \
- IcedTeaPluginUtils.h \
- IcedTeaScriptablePluginObject.h
-
-.if empty(DEBUG_FLAGS)
-.undef DEBUG_FLAGS
-STRIP= -s
-.endif
-.if !defined(LOCALBASE)
-.error "LOCALBASE not defined"
-.endif
-.if !defined(JDK_UPDATE_VERSION)
-.error "JDK_UPDATE_VERSION not defined"
-.endif
-.if !defined(PLUGIN_VERSION)
-.error "PLUGIN_VERSION not defined"
-.endif
-
-PLUGIN_NAME=IcedTea-Web Plugin
-PACKAGE_URL=http://icedtea.classpath.org/wiki/IcedTea-Web
-
-MOZILLA_VERSION!=${LOCALBASE}/bin/pkg-config --modversion mozilla-plugin
-MOZILLA_VERSION2!=/usr/bin/printf "%d%02d%02d%02d" ${MOZILLA_VERSION:C/\./ /g}
-
-PLUGIN_PKG_INC= glib-2.0 gtk+-2.0 mozilla-plugin
-PLUGIN_PKG_LIB= glib-2.0 gtk+-2.0
-PLUGIN_CFLAGS!= ${LOCALBASE}/bin/pkg-config --cflags ${PLUGIN_PKG_INC}
-PLUGIN_LIBS!= ${LOCALBASE}/bin/pkg-config --libs ${PLUGIN_PKG_LIB}
-
-CFLAGS+= -DJDK_UPDATE_VERSION="\"${JDK_UPDATE_VERSION}\"" \
- -DPLUGIN_NAME="\"${PLUGIN_NAME}\"" \
- -DPLUGIN_VERSION="\"${PLUGIN_VERSION}\"" \
- -DPACKAGE_URL="\"${PACKAGE_URL}\"" \
- -DMOZILLA_VERSION_COLLAPSED="${MOZILLA_VERSION2}"
-.if ${MOZILLA_VERSION2} >= 1090200
-CFLAGS+= ${PLUGIN_CFLAGS:S,/libxul/stable,/libxul,}
-.else
-CFLAGS+= ${PLUGIN_CFLAGS:S,/libxul/stable,/libxul/unstable,}
-.endif
-LDFLAGS+= ${PLUGIN_LIBS}
-
-.include <bsd.lib.mk>
diff --git a/java/openjdk6/files/icedtea/applet_hole.patch b/java/openjdk6/files/icedtea/applet_hole.patch
new file mode 100644
index 000000000000..1a4179d9ee60
--- /dev/null
+++ b/java/openjdk6/files/icedtea/applet_hole.patch
@@ -0,0 +1,115 @@
+--- jdk/src/share/classes/sun/applet/AppletViewerPanel.java Fri Nov 12 12:08:44 2010 +0000
++++ jdk/src/share/classes/sun/applet/AppletViewerPanel.java Thu Dec 02 01:45:58 2010 +0000
+@@ -42,25 +42,25 @@
+ *
+ * @author Arthur van Hoff
+ */
+-class AppletViewerPanel extends AppletPanel {
++public class AppletViewerPanel extends AppletPanel {
+
+ /* Are we debugging? */
+- static boolean debug = false;
++ protected static boolean debug = false;
+
+ /**
+ * The document url.
+ */
+- URL documentURL;
++ protected URL documentURL;
+
+ /**
+ * The base url.
+ */
+- URL baseURL;
++ protected URL baseURL;
+
+ /**
+ * The attributes of the applet.
+ */
+- Hashtable atts;
++ protected Hashtable<String,String> atts;
+
+ /*
+ * JDK 1.1 serialVersionUID
+@@ -70,7 +70,7 @@
+ /**
+ * Construct an applet viewer and start the applet.
+ */
+- AppletViewerPanel(URL documentURL, Hashtable atts) {
++ protected AppletViewerPanel(URL documentURL, Hashtable<String,String> atts) {
+ this.documentURL = documentURL;
+ this.atts = atts;
+
+@@ -106,7 +106,7 @@
+ * Get an applet parameter.
+ */
+ public String getParameter(String name) {
+- return (String)atts.get(name.toLowerCase());
++ return atts.get(name.toLowerCase());
+ }
+
+ /**
+@@ -202,12 +202,12 @@
+ return (AppletContext)getParent();
+ }
+
+- static void debug(String s) {
++ protected static void debug(String s) {
+ if(debug)
+ System.err.println("AppletViewerPanel:::" + s);
+ }
+
+- static void debug(String s, Throwable t) {
++ protected static void debug(String s, Throwable t) {
+ if(debug) {
+ t.printStackTrace();
+ debug(s);
+--- jdk/src/share/classes/sun/applet/AppletPanel.java Fri Nov 12 12:08:44 2010 +0000
++++ jdk/src/share/classes/sun/applet/AppletPanel.java Thu Dec 02 01:45:58 2010 +0000
+@@ -68,7 +68,7 @@
+ /**
+ * The applet (if loaded).
+ */
+- Applet applet;
++ protected Applet applet;
+
+ /**
+ * Applet will allow initialization. Should be
+@@ -117,7 +117,7 @@
+ /**
+ * The thread for the applet.
+ */
+- Thread handler;
++ protected Thread handler;
+
+
+ /**
+@@ -162,7 +162,8 @@
+ * Creates a thread to run the applet. This method is called
+ * each time an applet is loaded and reloaded.
+ */
+- synchronized void createAppletThread() {
++ //Overridden by NetxPanel.
++ protected synchronized void createAppletThread() {
+ // Create a thread group for the applet, and start a new
+ // thread to load the applet.
+ String nm = "applet-" + getCode();
+@@ -306,7 +307,7 @@
+ /**
+ * Get an event from the queue.
+ */
+- synchronized AppletEvent getNextEvent() throws InterruptedException {
++ protected synchronized AppletEvent getNextEvent() throws InterruptedException {
+ while (queue == null || queue.isEmpty()) {
+ wait();
+ }
+@@ -695,7 +696,8 @@
+ * applet event processing so that it can be gracefully interrupted from
+ * things like HotJava.
+ */
+- private void runLoader() {
++ //Overridden by NetxPanel.
++ protected void runLoader() {
+ if (status != APPLET_DISPOSE) {
+ showAppletStatus("notdisposed");
+ return;
diff --git a/java/openjdk6/files/icedtea/jpegclasses.patch b/java/openjdk6/files/icedtea/jpegclasses.patch
index 7a46b7c208d2..0f9dd08aa6ac 100644
--- a/java/openjdk6/files/icedtea/jpegclasses.patch
+++ b/java/openjdk6/files/icedtea/jpegclasses.patch
@@ -1,17 +1,660 @@
--- jdk/src/share/classes/com/sun/image/codec/jpeg/ImageFormatException.java 1969-12-31 19:00:00.000000000 -0500
-+++ jdk/src/share/classes/com/sun/image/codec/jpeg/ImageFormatException.java 2008-03-31 18:04:57.000000000 -0400
++++ jdk/src/share/classes/com/sun/image/codec/jpeg/ImageFormatException.java 2011-07-07 09:19:34.000000000 -0400
@@ -0,0 +1,51 @@
+/* ImageFormatException.java
-+ Copyright (C) 2007 Matthew Flaschen
++ * Copyright (C) 2007 Matthew Flaschen
++ * Copyright (C) 2011 Red Hat, Inc.
++ *
++ * This file is part of IcedTea
++ *
++ * IcedTea is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2, or (at your option)
++ * any later version.
++ *
++ * IcedTea 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 for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with GNU Classpath; see the file COPYING. If not, write to the
++ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
++ * 02110-1301 USA.
++ *
++ * Linking this library statically or dynamically with other modules is
++ * making a combined work based on this library. Thus, the terms and
++ * conditions of the GNU General Public License cover the whole
++ * combination.
++ *
++ * As a special exception, the copyright holders of this library give you
++ * permission to link this library with independent modules to produce an
++ * executable, regardless of the license terms of these independent
++ * modules, and to copy and distribute the resulting executable under
++ * terms of your choice, provided that you also meet, for each linked
++ * independent module, the terms and conditions of the license of that
++ * module. An independent module is a module which is not derived from
++ * or based on this library. If you modify this library, you may extend
++ * this exception to your version of the library, but you are not
++ * obligated to do so. If you do not wish to do so, delete this
++ * exception statement from your version.
++ */
+
-+ This file is part of IcedTea
++package com.sun.image.codec.jpeg;
+
-+ IcedTea is free software; you can redistribute it and/or modify
++public class ImageFormatException extends RuntimeException {
++
++ public ImageFormatException() {
++ super();
++ }
++
++ public ImageFormatException(String s) {
++ super(s);
++ }
++}
+--- jdk/src/share/classes/com/sun/image/codec/jpeg/JPEGCodec.java 1969-12-31 19:00:00.000000000 -0500
++++ jdk/src/share/classes/com/sun/image/codec/jpeg/JPEGCodec.java 2011-07-07 09:19:34.000000000 -0400
+@@ -0,0 +1,193 @@
++/* JPEGCodec.java --
++ * Copyright (C) 2007 Free Software Foundation, Inc.
++ * Copyright (C) 2007 Matthew Flaschen
++ *
++ * This file is part of GNU Classpath.
++ *
++ * GNU Classpath is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2, or (at your option)
++ * any later version.
++ *
++ * GNU Classpath 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 for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with GNU Classpath; see the file COPYING. If not, write to the
++ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
++ * 02110-1301 USA.
++ *
++ * Linking this library statically or dynamically with other modules is
++ * making a combined work based on this library. Thus, the terms and
++ * conditions of the GNU General Public License cover the whole
++ * combination.
++ *
++ * As a special exception, the copyright holders of this library give you
++ * permission to link this library with independent modules to produce an
++ * executable, regardless of the license terms of these independent
++ * modules, and to copy and distribute the resulting executable under
++ * terms of your choice, provided that you also meet, for each linked
++ * independent module, the terms and conditions of the license of that
++ * module. An independent module is a module which is not derived from
++ * or based on this library. If you modify this library, you may extend
++ * this exception to your version of the library, but you are not
++ * obligated to do so. If you do not wish to do so, delete this
++ * exception statement from your version.
++ */
++
++package com.sun.image.codec.jpeg;
++
++import java.io.InputStream;
++import java.io.OutputStream;
++import java.awt.color.ColorSpace;
++import java.awt.image.BufferedImage;
++import java.awt.image.ColorModel;
++import java.awt.image.Raster;
++
++import sun.awt.image.codec.JPEGImageDecoderImpl;
++import sun.awt.image.codec.JPEGImageEncoderImpl;
++import sun.awt.image.codec.JPEGParam;
++
++/**
++ * This class is a factory for implementations of the JPEG Image
++ * Decoder/Encoder.
++ */
++public class JPEGCodec {
++
++ private JPEGCodec() {}
++
++ /**
++ * This creates an instance of a JPEGImageDecoder that can be used to decode
++ * JPEG Data streams.
++ *
++ * @param src
++ * @return
++ */
++ public static JPEGImageDecoder createJPEGDecoder(InputStream src) {
++ return new JPEGImageDecoderImpl(src);
++ }
++
++ /**
++ * This creates an instance of a JPEGImageDecoder that can be used to decode
++ * JPEG Data streams.
++ *
++ * @param src
++ * @param jdp
++ * @return
++ */
++ public static JPEGImageDecoder createJPEGDecoder(InputStream src,
++ JPEGDecodeParam jdp) {
++ return new JPEGImageDecoderImpl(src, jdp);
++ }
++
++ /**
++ * This creates an instance of a JPEGImageEncoder that can be used to encode
++ * image data as JPEG Data streams.
++ *
++ * @param os
++ * @return
++ */
++ public static JPEGImageEncoder createJPEGEncoder(OutputStream os) {
++ return new JPEGImageEncoderImpl(os);
++ }
++
++ /**
++ * This creates an instance of a JPEGImageEncoder that can be used to encode
++ * image data as JPEG Data streams.
++ *
++ * @param dest
++ * @param jep
++ * @return
++ */
++ public static JPEGImageEncoder createJPEGEncoder(OutputStream dest,
++ JPEGEncodeParam jep) {
++ return new JPEGImageEncoderImpl(dest, jep);
++ }
++
++ /**
++ * This is a factory method for creating JPEGEncodeParam objects.
++ *
++ * @param bi
++ * @return
++ */
++ public static JPEGEncodeParam getDefaultJPEGEncodeParam(BufferedImage bi) {
++ return getDefaultJPEGEncodeParam(bi.getRaster(),
++ getDefaultColorID(bi.getColorModel()));
++ }
++
++ /**
++ * This is a factory method for creating JPEGEncodeParam objects.
++ *
++ * @param numBands
++ * @param colorID
++ * @return
++ */
++ public static JPEGEncodeParam getDefaultJPEGEncodeParam(int numBands,
++ int colorID) {
++ return new JPEGParam(colorID, numBands);
++ }
++
++ /**
++ * This is a factory method for creating a JPEGEncodeParam from a
++ * JPEGDecodeParam.
++ *
++ * @param jdp
++ * @return
++ */
++ public static JPEGEncodeParam getDefaultJPEGEncodeParam(JPEGDecodeParam jdp) {
++ return new JPEGParam(jdp);
++ }
++
++ /**
++ * This is a factory method for creating JPEGEncodeParam objects.
++ *
++ * @param ras
++ * @param colorID
++ * @return
++ */
++ public static JPEGEncodeParam getDefaultJPEGEncodeParam(Raster ras,
++ int colorID) {
++ return getDefaultJPEGEncodeParam(ras.getNumBands(), colorID);
++ }
++
++ private static int getDefaultColorID(ColorModel cm) {
++ ColorSpace cs = cm.getColorSpace();
++ int type = cs.getType();
++ int id = -1;
++ switch (type) {
++ case ColorSpace.TYPE_GRAY:
++ id = JPEGEncodeParam.COLOR_ID_GRAY;
++ break;
++
++ case ColorSpace.TYPE_RGB:
++ id = cm.hasAlpha() ? JPEGEncodeParam.COLOR_ID_RGBA
++ : JPEGEncodeParam.COLOR_ID_RGB;
++
++ case ColorSpace.TYPE_YCbCr:
++ try {
++ if (cs == ColorSpace.getInstance(ColorSpace.CS_PYCC)) {
++ id = cm.hasAlpha() ? JPEGEncodeParam.COLOR_ID_PYCCA
++ : JPEGEncodeParam.COLOR_ID_PYCC;
++ }
++ } catch (IllegalArgumentException e) {
++ /* We know it isn't PYCC type, nothing to handle */
++ }
++ if (id == -1) {
++ id = cm.hasAlpha() ? JPEGEncodeParam.COLOR_ID_YCbCrA
++ : JPEGEncodeParam.COLOR_ID_YCbCr;
++ }
++ break;
++
++ case ColorSpace.TYPE_CMYK:
++ id = JPEGEncodeParam.COLOR_ID_CMYK;
++ break;
++
++ default:
++ id = JPEGEncodeParam.COLOR_ID_UNKNOWN;
++ }
++
++ return id;
++ }
++}
+--- jdk/src/share/classes/com/sun/image/codec/jpeg/JPEGDecodeParam.java 1969-12-31 19:00:00.000000000 -0500
++++ jdk/src/share/classes/com/sun/image/codec/jpeg/JPEGDecodeParam.java 2011-07-07 09:19:34.000000000 -0400
+@@ -0,0 +1,390 @@
++/* JPEGImageDecoder.java --
++ * Copyright (C) 2007 Free Software Foundation, Inc.
++ * Copyright (C) 2007 Matthew Flaschen
++ *
++ * This file is part of GNU Classpath.
++ *
++ * GNU Classpath is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2, or (at your option)
++ * any later version.
++ *
++ * GNU Classpath 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 for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with GNU Classpath; see the file COPYING. If not, write to the
++ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
++ * 02110-1301 USA.
++ *
++ * Linking this library statically or dynamically with other modules is
++ * making a combined work based on this library. Thus, the terms and
++ * conditions of the GNU General Public License cover the whole
++ * combination.
++ *
++ * As a special exception, the copyright holders of this library give you
++ * permission to link this library with independent modules to produce an
++ * executable, regardless of the license terms of these independent
++ * modules, and to copy and distribute the resulting executable under
++ * terms of your choice, provided that you also meet, for each linked
++ * independent module, the terms and conditions of the license of that
++ * module. An independent module is a module which is not derived from
++ * or based on this library. If you modify this library, you may extend
++ * this exception to your version of the library, but you are not
++ * obligated to do so. If you do not wish to do so, delete this
++ * exception statement from your version.
++ */
++
++package com.sun.image.codec.jpeg;
++
++/**
++ * <p>
++ * JPEGDecodeParam encapsulates tables and options necessary to control decoding
++ * JPEG data streams. Parameters are either set explicitly by the application
++ * for encoding, or read from the JPEG header for decoding. In the case of
++ * decoding abbreviated data streams the application may need to set some/all of
++ * the values it's self.
++ * </p>
++ * <p>
++ * When working with BufferedImages (@see JPEGImageDecoder.decodeBufferedImage),
++ * the codec will attempt to generate an appropriate ColorModel for the JPEG
++ * COLOR_ID. This is not always possible (example mappings are listed below) .
++ * In cases where unsupported conversions are required, or unknown encoded
++ * COLOR_ID's are in use, the user must request the data as a Raster and perform
++ * the transformations themselves. When decoding into a raster (@see
++ * JPEGImageDecoder.decodeRaster) no ColorSpace adjustments are made. Note: The
++ * color ids described herein are simply enumerated values that influence data
++ * processing by the JPEG codec. JPEG compression is by definition color blind.
++ * These values are used as hints when decompressing JPEG data. Of particular
++ * interest is the default conversion from YCbCr to sRGB when decoding buffered
++ * Images.
++ * </p>
++ * <p>
++ * Note: because JPEG is mostly color-blind color fidelity can not be
++ * guaranteed. This will hopefully be rectified in the near future by the wide
++ * spread inclusion of ICC-profiles in the JPEG data stream (as a special
++ * marker). The following is an example of the conversions that take place. This
++ * is only a guide to the types of conversions that are allowed. This list is
++ * likely to change in the future so it is strongly recommended that you check
++ * for thrown ImageFormatExceptions and check the actual ColorModel associated
++ * with the BufferedImage returned rather than make assumptions.
++ * </p>
++ * DECODING:
++ *
++ * <pre>
++ * JPEG (Encoded) Color ID BufferedImage ColorSpace
++ * ======================= ========================
++ * COLOR_ID_UNKNOWN ** Invalid **
++ * COLOR_ID_GRAY CS_GRAY
++ * COLOR_ID_RGB CS_sRGB
++ * COLOR_ID_YCbCr CS_sRGB
++ * COLOR_ID_CMYK ** Invalid **
++ * COLOR_ID_PYCC CS_PYCC
++ * COLOR_ID_RGBA CS_sRGB (w/ alpha)
++ * COLOR_ID_YCbCrA CS_sRGB (w/ alpha)
++ * COLOR_ID_RGBA_INVERTED ** Invalid **
++ * COLOR_ID_YCbCrA_INVERTED ** Invalid **
++ * COLOR_ID_PYCCA CS_PYCC (w/ alpha)
++ * COLOR_ID_YCCK ** Invalid **
++ * </pre>
++ * <p>
++ * If the user needs better control over conversion, the user must request the
++ * data as a Raster and handle the conversion of the image data themselves. When
++ * decoding JFIF files the encoded COLOR_ID will always be one of:
++ * COLOR_ID_UNKNOWN, COLOR_ID_GRAY, COLOR_ID_RGB, COLOR_ID_YCbCr, COLOR_ID_CMYK,
++ * or COLOR_ID_YCCK
++ * </p>
++ * <p>
++ * Note that the classes in the com.sun.image.codec.jpeg package are not part of
++ * the core Java APIs. They are a part of Sun's JDK and JRE distributions.
++ * Although other licensees may choose to distribute these classes, developers
++ * cannot depend on their availability in non-Sun implementations. We expect
++ * that equivalent functionality will eventually be available in a core API or
++ * standard extension.
++ * </p>
++ */
++public interface JPEGDecodeParam extends Cloneable {
++
++ /** APP0 marker - JFIF info */
++ public static final int APP0_MARKER = 0xE0;
++ /** APP1 marker */
++ public static final int APP1_MARKER = 0xE1;
++ /** APP2 marker */
++ public static final int APP2_MARKER = 0xE2;
++ /** APP3 marker */
++ public static final int APP3_MARKER = 0xE3;
++ /** APP4 marker */
++ public static final int APP4_MARKER = 0xE4;
++ /** APP5 marker */
++ public static final int APP5_MARKER = 0xE5;
++ /** APP6 marker */
++ public static final int APP6_MARKER = 0xE6;
++ /** APP7 marker */
++ public static final int APP7_MARKER = 0xE7;
++ /** APP8 marker */
++ public static final int APP8_MARKER = 0xE8;
++ /** APP9 marker */
++ public static final int APP9_MARKER = 0xE9;
++ /** APPA marker */
++ public static final int APPA_MARKER = 0xEA;
++ /** APPB marker */
++ public static final int APPB_MARKER = 0xEB;
++ /** APPC marker */
++ public static final int APPC_MARKER = 0xEC;
++ /** APPD marker */
++ public static final int APPD_MARKER = 0xED;
++ /** APPE marker - Adobe info */
++ public static final int APPE_MARKER = 0xEE;
++ /** APPF marker */
++ public static final int APPF_MARKER = 0xEF;
++ /** Adobe marker indicates presence/need for Adobe marker. */
++ public static final int COMMENT_MARKER = 0XFE;
++
++ /* Color ID values */
++ public static final int COLOR_ID_UNKNOWN = 0;
++ public static final int COLOR_ID_GRAY = 1;
++ public static final int COLOR_ID_RGB = 2;
++ public static final int COLOR_ID_YCbCr = 3;
++ public static final int COLOR_ID_CMYK = 4;
++ public static final int COLOR_ID_PYCC = 5;
++ public static final int COLOR_ID_RGBA = 6;
++ public static final int COLOR_ID_YCbCrA = 7;
++ public static final int COLOR_ID_RGBA_INVERTED = 8;
++ public static final int COLOR_ID_YCbCrA_INVERTED = 9;
++ public static final int COLOR_ID_PYCCA = 10;
++ public static final int COLOR_ID_YCCK = 11;
++ public static final int NUM_COLOR_ID = 12;
++
++ /** Number of allowed Huffman and Quantization Tables */
++ public static final int NUM_TABLES = 4;
++
++ /** The X and Y units simply indicate the aspect ratio of the pixels. */
++ public static final int DENSITY_UNIT_ASPECT_RATIO = 0;
++ /** Pixel density is in pixels per inch. */
++ public static final int DENSITY_UNIT_DOTS_INCH = 1;
++ /** Pixel density is in pixels per centimeter. */
++ public static final int DENSITY_UNIT_DOTS_CM = 2;
++ /** The max known value for DENSITY_UNIT */
++ public static final int NUM_DENSITY_UNIT = 3;
++
++ public Object clone();
++
++ /**
++ * Get the image width.
++ *
++ * @return int the width of the image data in pixels.
++ */
++ public int getWidth();
++
++ /**
++ * Get the image height.
++ *
++ * @return The height of the image data in pixels.
++ */
++ public int getHeight();
++
++ /**
++ * Return the Horizontal subsampling factor for requested Component. The
++ * Subsample factor is the number of input pixels that contribute to each
++ * output pixel. This is distinct from the way the JPEG to each output
++ * pixel. This is distinct from the way the JPEG standard defines this
++ * quantity, because fractional subsampling factors are not allowed.
++ *
++ * @param component
++ * The component of the encoded image to return the subsampling
++ * factor for.
++ * @return The subsample factor.
++ */
++ public int getHorizontalSubsampling(int component);
++
++ /**
++ * Return the Vertical subsampling factor for requested Component. The
++ * Subsample factor is the number of input pixels that contribute to each
++ * output pixel. This is distinct from the way the JPEG to each output
++ * pixel. This is distinct from the way the JPEG standard defines this
++ * quantity, because fractional subsampling factors are not allowed.
++ *
++ * @param component
++ * The component of the encoded image to return the subsampling
++ * factor for.
++ * @return The subsample factor.
++ */
++ public int getVerticalSubsampling(int component);
++
++ /**
++ * Returns the coefficient quantization tables or NULL if not defined.
++ * tableNum must range in value from 0 - 3.
++ *
++ * @param tableNum
++ * the index of the table to be returned.
++ * @return Quantization table stored at index tableNum.
++ */
++ public JPEGQTable getQTable(int tableNum);
++
++ /**
++ * Returns the Quantization table for the requested component.
++ *
++ * @param component
++ * the image component of interest.
++ * @return Quantization table associated with component
++ */
++ public JPEGQTable getQTableForComponent(int component);
++
++ /**
++ * Returns the DC Huffman coding table requested or null if not defined
++ *
++ * @param tableNum
++ * the index of the table to be returned.
++ * @return Huffman table stored at index tableNum.
++ */
++ public JPEGHuffmanTable getDCHuffmanTable(int tableNum);
++
++ /**
++ * Returns the DC Huffman coding table for the requested component.
++ *
++ * @param component
++ * the image component of interest.
++ * @return Huffman table associated with component
++ */
++ public JPEGHuffmanTable getDCHuffmanTableForComponent(int component);
++
++ /**
++ * Returns the AC Huffman coding table requested or null if not defined
++ *
++ * @param tableNum
++ * the index of the table to be returned.
++ * @return Huffman table stored at index tableNum.
++ */
++ public JPEGHuffmanTable getACHuffmanTable(int tableNum);
++
++ /**
++ * Returns the AC Huffman coding table for the requested component.
++ *
++ * @param component
++ * the image component of interest.
++ * @return Huffman table associated with component
++ */
++ public JPEGHuffmanTable getACHuffmanTableForComponent(int component);
++
++ /**
++ * Get the number of the DC Huffman table that will be used for a particular
++ * component.
++ *
++ * @param component
++ * The Component of interest.
++ * @return The table number of the DC Huffman table for component.
++ */
++ public int getDCHuffmanComponentMapping(int component);
++
++ /**
++ * Get the number of the AC Huffman table that will be used for a particular
++ * component.
++ *
++ * @param component
++ * The Component of interest.
++ * @return The table number of the AC Huffman table for component.
++ */
++ public int getACHuffmanComponentMapping(int component);
++
++ /**
++ * Get the number of the quantization table that will be used for a
++ * particular component.
++ *
++ * @param component
++ * The Component of interest.
++ * @return The table number of the Quantization table for component.
++ */
++ public int getQTableComponentMapping(int component);
++
++ /**
++ * Returns true if the image information in the ParamBlock is currently
++ * valid. This indicates if image data was read from the stream for decoding
++ * and weather image data should be written when encoding.
++ */
++ public boolean isImageInfoValid();
++
++ /**
++ * Returns true if the tables in the ParamBlock are currently valid. This
++ * indicates that tables were read from the stream for decoding. When
++ * encoding this indicates whether tables should be written to the stream.
++ */
++ public boolean isTableInfoValid();
++
++ /**
++ * Returns true if at least one instance of the marker is present in the
++ * Parameter object. For encoding returns true if there is at least one
++ * instance of the marker to be written.
++ *
++ * @param marker
++ * The marker of interest.
++ */
++ public boolean getMarker(int marker);
++
++ /**
++ * Returns a 'byte[][]' associated with the requested marker in the
++ * parameter object. Each entry in the 'byte[][]' is the data associated
++ * with one instance of the marker (each marker can theoretically appear any
++ * number of times in a stream).
++ *
++ * @param marker
++ * The marker of interest.
++ * @return The 'byte[][]' for this marker or null if none available.
++ */
++ public byte[][] getMarkerData(int marker);
++
++ /**
++ * Returns the JPEG Encoded color id. This is generally speaking only used
++ * if you are decoding into Rasters. Note that when decoding into a Raster
++ * no color conversion is performed.
++ *
++ * @return The value of the JPEG encoded data's color id.
++ */
++ public int getEncodedColorID();
++
++ /**
++ * Returns the number of components for the current encoding COLOR_ID.
++ *
++ * @return the number of Components
++ */
++ public int getNumComponents();
++
++ /**
++ * Get the MCUs per restart marker.
++ *
++ * @return The number of MCUs between restart markers.
++ */
++ public int getRestartInterval();
++
++ /**
++ * Get the code for pixel size units This value is copied from the APP0
++ * marker. It isn't used by the JPEG codec. If the APP0 marker wasn't
++ * present then you can not rely on this value.
++ *
++ * @return Value indicating the density unit one of the DENSITY_UNIT_*
++ * constants.
++ */
++ public int getDensityUnit();
++
++ /**
++ * Get the horizontal pixel density This value is copied from the APP0
++ * marker. It isn't used by the JPEG code. If the APP0 marker wasn't present
++ * then you can not rely on this value.
++ *
++ * @return The horizontal pixel density, in units described by
++ * @see #getDensityUnit()
++ */
++ public int getXDensity();
++
++ /**
++ * Get the vertical pixel density This value is copied into the APP0 marker.
++ * It isn't used by the JPEG code. If the APP0 marker wasn't present then
++ * you can not rely on this value.
++ *
++ * @return The vertical pixel density, in units described by
++ * @see #getDensityUnit()
++ */
++ public int getYDensity();
++
++}
+--- jdk/src/share/classes/com/sun/image/codec/jpeg/JPEGEncodeParam.java 1969-12-31 19:00:00.000000000 -0500
++++ jdk/src/share/classes/com/sun/image/codec/jpeg/JPEGEncodeParam.java 2011-07-07 09:19:34.000000000 -0400
+@@ -0,0 +1,307 @@
++/* JPEGEncodeParam.java --
++ Copyright (C) 2007 Free Software Foundation, Inc.
++
++ This file is part of GNU Classpath.
++
++ GNU Classpath is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
-+ IcedTea is distributed in the hope that it will be useful, but
++ GNU Classpath 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 for more details.
@@ -40,22 +683,410 @@
+
+package com.sun.image.codec.jpeg;
+
-+public class ImageFormatException extends RuntimeException
-+{
-+ public ImageFormatException()
-+ {
-+ this("");
-+ }
-+
-+ public ImageFormatException(String s)
-+ {
-+ super(s);
-+ }
++/**
++ * <p>
++ * JPEGEncodeParam encapsulates tables and options necessary to control encoding
++ * of JPEG data streams. Parameters are either set explicitly by the application
++ * for encoding, or read from another JPEG header.
++ * </p>
++ * <p>
++ * When working with BufferedImages, the codec will attempt to match the encoded
++ * JPEG COLOR_ID with the ColorModel in the BufferedImage. This is not always
++ * possible (the default mappings are listed below). In cases where unsupported
++ * conversions are required (or odd image colorspaces are in use) the user must
++ * either convert the image data to a known ColorSpace or encode the data from a
++ * raster. When encoding rasters no colorspace adjustments are made, so the user
++ * must do any conversions required to get to the encoded COLOR_ID. The COLOR_ID
++ * for the encoded images is used to control the JPEG codec's inital values for
++ * Huffman and Quantization Tables as well as subsampling factors. It is also
++ * used to determine what color conversion should be performed to obtain the
++ * best encoding.
++ * </p>
++ * <p>
++ * Note: The color ids described herein are simply enumerated values that
++ * influence data processing by the JPEG codec. JPEG compression is, by
++ * definition, color blind. These values are used as hints when compressing JPEG
++ * data. Through these values the JPEG codec can perform some default rotation
++ * of data into spaces that will aid in getting better compression ratios.
++ * </p>
++ * <p>
++ * Example behavior is described below. Since these mappings are likely to
++ * change in the future it is strongly recommended that you make use of the @see
++ * JPEGImageEncoder.getDefaultParamBlock calls and check the encodedColorID for
++ * your particular BufferedImage. In extreme cases is may be necessary for the
++ * user to convert the image to the desired colorspace, and encode it from a
++ * Raster. In this case the API programmer must specify the colorID of the data
++ * in the Raster and no color conversion will take place.
++ * </p>
++ *
++ * ENCODING:
++ *
++ * <pre>
++ * BufferedImage Type/Instance JPEG (Encoded) Color ID
++ * =========================== =======================
++ * TYPE_GRAY COLOR_ID_GRAYSCALE
++ * TYPE_RGB COLOR_ID_YCbCr
++ * TYPE_YCbCr COLOR_ID_YCbCr
++ * TYPE_YCbCr/CS_PYCC COLOR_ID_PYCC
++ * TYPE_CMYK COLOR_ID_CMYK
++ * TYPE_RGB (w/ alpha) COLOR_ID_YCbCrA
++ * TYPE_YCbCr (w/ alpha) COLOR_ID_YCbCrA
++ * TYPE_YCbCr/CS_PYCC (w/ alpha) COLOR_ID_PYCCA
++ * ** Any Other ** COLOR_ID_UNKNOWN
++ * </pre>
++ * <p>
++ * When the user wants more control than the BufferedImage conversions provide,
++ * the user must encode the data from a Raster. In this case the data undergoes
++ * no color conversion at all. It is the user's responsibility to perform the
++ * desired conversions. If you intend to write a JFIF image (by including the
++ * APP0_MARKER) the encoded COLOR_ID must be one of: COLOR_ID_UNKNOWN,
++ * COLOR_ID_GRAYSCALE, COLOR_ID_YCbCr, or COLOR_ID_CMYK. In all other instances
++ * an ImageformatException will be thrown.
++ * </p>
++ * <p>
++ * IMPORTANT: an Alpha RGB BufferedImage will not map to a valid JFIF stream,
++ * you must strip off the alpha prior to encoding if you want a JFIF file. If
++ * the APP0 marker is set and you do not strip off the Alpha, an
++ * ImageFormatException will be thrown.
++ * </p>
++ * <p>
++ * Note that the classes in the com.sun.image.codec.jpeg package are not part of
++ * the core Java APIs. They are a part of Sun's JDK and JRE distributions.
++ * Although other licensees may choose to distribute these classes, developers
++ * cannot depend on their availability in non-Sun implementations. We expect
++ * that equivalent functionality will eventually be available in a core API or
++ * standard extension.
++ * </p>
++ */
++public interface JPEGEncodeParam extends JPEGDecodeParam {
++
++ /**
++ * Set the horizontal subsample factor for the given component. Note that
++ * the subsample factor is the number of input pixels that contribute to
++ * each output pixel (usually 2 for YCC).
++ *
++ * @param component
++ * The component being specified.
++ * @param subsample
++ * The subsampling factor being specified.
++ */
++ public void setHorizontalSubsampling(int component, int subsample);
++
++ /**
++ * Set the vertical subsample factor for the given component. Note that the
++ * subsample factor is the number of input pixels that contribute to each
++ * output pixel (usually 2 for YCC).
++ *
++ * @param component
++ * The component being specified.
++ * @param subsample
++ * The subsampling factor being specified.
++ */
++ public void setVerticalSubsampling(int component, int subsample);
++
++ /**
++ * Sets the coefficient quantization tables at index passed. tableNum must
++ * range in value from 0 - 3.
++ *
++ * @param qtable
++ * that will be used.
++ * @param tableNum
++ * the index of the table to be set.
++ */
++ public void setQTable(int tableNum, JPEGQTable qTable);
++
++ /**
++ * Sets the DC Huffman coding table at index to the table provided.
++ *
++ * @param huffTable
++ * JPEGHuffmanTable that will be assigned to index tableNum.
++ * @param tableNum
++ * - the index of the table to be set.
++ * @exception IllegalArgumentException
++ * - thrown if the tableNum is out of range. Index must range
++ * in value from 0 - 3.
++ */
++ public void setDCHuffmanTable(int tableNum, JPEGHuffmanTable huffTable);
++
++ /**
++ * Sets the AC Huffman coding table at index to the table provided.
++ *
++ * @param huffTable
++ * JPEGHuffmanTable that will be assigned to index tableNum.
++ * @param tableNum
++ * - the index of the table to be set.
++ * @exception IllegalArgumentException
++ * - thrown if the tableNum is out of range. Index must range
++ * in value from 0 - 3.
++ */
++ public void setACHuffmanTable(int tableNum, JPEGHuffmanTable huffTable);
++
++ /**
++ * Sets the mapping between a component and it's DC Huffman Table.
++ *
++ * @param component
++ * The component to set the mapping for
++ * @param table
++ * The DC Huffman table to use for component
++ */
++ public void setDCHuffmanComponentMapping(int component, int table);
++
++ /**
++ * Sets the mapping between a component and it's AC Huffman Table.
++ *
++ * @param component
++ * The component to set the mapping for
++ * @param table
++ * The AC Huffman table to use for component
++ */
++ public void setACHuffmanComponentMapping(int component, int table);
++
++ /**
++ * Sets the mapping between a component and it's Quantization Table.
++ *
++ * @param component
++ * The component to set the mapping for
++ * @param table
++ * The Quantization Table to use for component
++ */
++ public void setQTableComponentMapping(int component, int table);
++
++ /**
++ * Set the flag indicating the validity of the table information in the
++ * ParamBlock. This is used to indicate if tables should be included when
++ * encoding.
++ */
++ public void setImageInfoValid(boolean flag);
++
++ /**
++ * Set the flag indicating the validity of the image information in the
++ * ParamBlock. This is used to indicates if image data should be written
++ * when encoding.
++ */
++ public void setTableInfoValid(boolean flag);
++
++ /**
++ * Sets the marker data to be written to the output data stream. This
++ * removes any existing marker data in the JPEParm object. This can be used
++ * to remove the default APP0 marker by calling it with data set to null.
++ *
++ * @param marker
++ * The marker to set the data for.
++ * @param data
++ * the new set of data to be written.
++ */
++ public void setMarkerData(int marker, byte[][] data);
++
++ /**
++ * Appends 'data' to the array of byte[] associated with marker. This will
++ * result in additional instance of the marker being written (one for each
++ * byte[] in the array.).
++ *
++ * @param marker
++ * The marker to add and instance of.
++ * @param data
++ * the data to be written.
++ */
++ public void addMarkerData(int marker, byte[] data);
++
++ /**
++ * Set the MCUs per restart, or 0 for no restart markers.
++ *
++ * @param restartInterval
++ * number MCUs per restart marker.
++ */
++ public void setRestartInterval(int restartInterval);
++
++ /**
++ * Set the pixel size units This value is copied into the APP0 marker (if
++ * that marker is written). This value isn't used by the JPEG code.
++ *
++ * @param unit
++ * One of the DENSITY_UNIT_* values.
++ */
++ public void setDensityUnit(int unit);
++
++ /**
++ * Set the horizontal pixel density. This value is written into the APP0
++ * marker. It isn't used by the JPEG code.
++ *
++ * @param density
++ * the horizontal pixel density, in units described by @see
++ * JPEGParam.getDensityUnit.
++ */
++ public void setXDensity(int density);
++
++ /**
++ * Set the vertical pixel density. This value is copied into the JFIF APP0
++ * marker. It isn't used by the JPEG code.
++ *
++ * @param density
++ * The vertical pixel density, in units described by @see
++ * JPEGParam.getDensityUnit.
++ */
++ public void setYDensity(int density);
++
++ /**
++ * This creates new Quantization tables that replace the currently installed
++ * Quantization tables. It also updates the Component QTable mapping to the
++ * default for the current encoded COLOR_ID.
++ *
++ * The Created Quantization table varies from very high compression, very
++ * low quality, (0.0) to low compression, very high quality (1.0) based on
++ * the quality parameter.
++ *
++ * At a quality level of 1.0 the table will be all 1's which will lead to no
++ * loss of data due to quantization (however chrominance subsampling, if
++ * used, and roundoff error in the DCT will still degrade the image some
++ * what).
++ *
++ * This is a linear manipulation of the standard chrominance Q-Table.
++ *
++ * Some guidelines: 0.75 high quality 0.5 medium quality 0.25 low quality
++ *
++ * @param quality
++ * 0.0-1.0 setting of desired quality level.
++ * @param forceBaseline
++ * force baseline quantization table
++ */
++ public void setQuality(float quality, boolean forceBaseline);
+}
---- jdk/src/share/classes/com/sun/image/codec/jpeg/JPEGCodec.java 1969-12-31 19:00:00.000000000 -0500
-+++ jdk/src/share/classes/com/sun/image/codec/jpeg/JPEGCodec.java 2008-03-31 18:04:57.000000000 -0400
-@@ -0,0 +1,146 @@
-+/* JPEGCodec.java --
+--- jdk/src/share/classes/com/sun/image/codec/jpeg/JPEGHuffmanTable.java 1969-12-31 19:00:00.000000000 -0500
++++ jdk/src/share/classes/com/sun/image/codec/jpeg/JPEGHuffmanTable.java 2011-07-07 09:19:34.000000000 -0400
+@@ -0,0 +1,129 @@
++/* JPEGHuffmanTable.java -- Huffman table implementation for JPEG.
++Copyright (C) 2011 Red Hat
++
++This program is free software; you can redistribute it and/or modify
++it under the terms of the GNU General Public License as published by
++the Free Software Foundation; either version 2 of the License, or
++(at your option) any later version.
++
++This program 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 for more details.
++
++You should have received a copy of the GNU General Public License
++along with this program; if not, write to the Free Software
++Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ */
++
++package com.sun.image.codec.jpeg;
++
++/**
++ * A class to encapsulate a JPEG Huffman table.
++ */
++public class JPEGHuffmanTable {
++
++ /**
++ * The standard DC luminance Huffman table.
++ */
++ public static final JPEGHuffmanTable StdDCLuminance;
++
++ /**
++ * The standard DC chrominance Huffman table.
++ */
++ public static final JPEGHuffmanTable StdDCChrominance;
++
++ /**
++ * The standard AC luminance Huffman table.
++ */
++ public static final JPEGHuffmanTable StdACLuminance;
++
++ /**
++ * The standard AC chrominance Huffman table.
++ */
++ public static final JPEGHuffmanTable StdACChrominance;
++
++ private short[] lengths;
++
++ private short[] symbols;
++
++ static {
++ javax.imageio.plugins.jpeg.JPEGHuffmanTable temp;
++
++ temp = javax.imageio.plugins.jpeg.JPEGHuffmanTable.StdDCLuminance;
++ StdDCLuminance = new JPEGHuffmanTable(temp.getLengths(),
++ temp.getValues());
++
++ temp = javax.imageio.plugins.jpeg.JPEGHuffmanTable.StdDCChrominance;
++ StdDCChrominance = new JPEGHuffmanTable(temp.getLengths(),
++ temp.getValues());
++
++ temp = javax.imageio.plugins.jpeg.JPEGHuffmanTable.StdACLuminance;
++ StdACLuminance = new JPEGHuffmanTable(temp.getLengths(),
++ temp.getValues());
++
++ temp = javax.imageio.plugins.jpeg.JPEGHuffmanTable.StdACChrominance;
++ StdACChrominance = new JPEGHuffmanTable(temp.getLengths(),
++ temp.getValues());
++ }
++
++ /**
++ * Creates a Huffman table and initializes it. The input arrays are copied.
++ * The arrays must describe a possible Huffman table. For example, 3 codes
++ * cannot be expressed with a single bit.
++ *
++ * @param lengths
++ * an array of {@code short}s where <code>lengths[k]</code> is
++ * equal to the number of values with corresponding codes of
++ * length <code>k + 1</code> bits.
++ * @param values
++ * an array of shorts containing the values in order of
++ * increasing code length.
++ * @throws IllegalArgumentException
++ * if <code>lengths</code> or <code>values</code> are null, the
++ * length of <code>lengths</code> is greater than 16, the length
++ * of <code>values</code> is greater than 256, if any value in
++ * <code>lengths</code> or <code>values</code> is less than
++ * zero, or if the arrays do not describe a valid Huffman table.
++ */
++ public JPEGHuffmanTable(short lengths[], short symbols[]) {
++ if (lengths == null)
++ throw new IllegalArgumentException("lengths array can not be null.");
++ if (symbols == null)
++ throw new IllegalArgumentException("symbols array can not be null.");
++ if (lengths.length > 17)
++ throw new IllegalArgumentException("lengths array can not be longer than 17.");
++ if (symbols.length > 256)
++ throw new IllegalArgumentException("symbols array can not be longer than 256.");
++ for (int a = 0; a < lengths.length; ++a)
++ if (lengths[a] < 0)
++ throw new IllegalArgumentException("length " + a + " is smaller than zero.");
++ for (int a = 0; a < symbols.length; ++a)
++ if (symbols[a] < 0)
++ throw new IllegalArgumentException("symbol " + a + " is smaller than zero.");
++ this.lengths = lengths;
++ this.symbols = symbols;
++ }
++
++ /**
++ * Return an array containing the number of symbols for each length in
++ * the Huffman table.
++ *
++ * @return A short array where length[a] is equal to the number of symbols
++ * in the Huffman table of length a. The first element (length[0])
++ * is unused.
++ */
++ public short[] getLengths() {
++ return lengths;
++ }
++
++ /**
++ * Return an array containing the Huffman symbols arranged by increasing
++ * length. To make use of this array you must refer to the lengths array.
++ *
++ * @return A short array of Huffman symbols
++ */
++ public short[] getSymbols() {
++ return symbols;
++ }
++}
+--- jdk/src/share/classes/com/sun/image/codec/jpeg/JPEGImageDecoder.java 1969-12-31 19:00:00.000000000 -0500
++++ jdk/src/share/classes/com/sun/image/codec/jpeg/JPEGImageDecoder.java 2011-07-07 09:19:34.000000000 -0400
+@@ -0,0 +1,102 @@
++/* JPEGImageDecoder.java --
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007 Matthew Flaschen
+
@@ -95,118 +1126,73 @@
+
+package com.sun.image.codec.jpeg;
+
-+import java.io.InputStream;
-+import java.io.OutputStream;
-+import java.io.IOException;
-+
+import java.awt.image.BufferedImage;
+import java.awt.image.Raster;
+
-+import javax.imageio.*;
-+import javax.imageio.stream.*;
-+import javax.imageio.plugins.jpeg.*;
-+
-+import java.util.Iterator;
++import java.io.InputStream;
++import java.io.IOException;
+
-+public class JPEGCodec
-+{
-+
-+ public static JPEGImageDecoder createJPEGDecoder(InputStream is)
-+ {
-+ return new ImageIOJPEGImageDecoder(is);
-+ }
-+
-+ public static JPEGImageEncoder createJPEGEncoder(OutputStream os)
-+ {
-+ return null;
-+ }
-+
-+ public static JPEGImageDecoder createJPEGDecoder(InputStream src, JPEGDecodeParam jdp)
-+ {
-+ return null;
-+ }
-+
-+ public static JPEGImageEncoder createJPEGEncoder(OutputStream dest, JPEGEncodeParam jep)
-+ {
-+ return null;
-+ }
-+
-+ public static JPEGEncodeParam getDefaultJPEGEncodeParam(BufferedImage bi)
-+ {
-+ return null;
-+ }
-+
-+ public static JPEGEncodeParam getDefaultJPEGEncodeParam(int numBands, int colorID)
-+ {
-+ return null;
-+ }
-+
-+ public static JPEGEncodeParam getDefaultJPEGEncodeParam(JPEGDecodeParam jdp)
-+ {
-+ return null;
-+ }
-+
-+ public static JPEGEncodeParam getDefaultJPEGEncodeParam(Raster ras, int colorID)
-+ {
-+ return null;
-+ }
-+
-+
-+ private static class ImageIOJPEGImageDecoder implements JPEGImageDecoder
-+ {
-+
-+ private static final String JPGMime = "image/jpeg";
-+
-+ private ImageReader JPGReader;
-+
-+ private InputStream in;
-+
-+ private ImageIOJPEGImageDecoder (InputStream newIs)
-+ {
-+ in = newIs;
-+
-+ Iterator<ImageReader> JPGReaderIter = ImageIO.getImageReadersByMIMEType(JPGMime);
-+ if(JPGReaderIter.hasNext())
-+ {
-+ JPGReader = JPGReaderIter.next();
-+ }
-+
-+ JPGReader.setInput(new MemoryCacheImageInputStream(in));
-+ }
-+
-+ public BufferedImage decodeAsBufferedImage() throws IOException, ImageFormatException
-+ {
-+ return JPGReader.read(0);
-+ }
-+
-+ public Raster decodeAsRaster() throws IOException, ImageFormatException
-+ {
-+ return JPGReader.readRaster(0, null);
-+ }
-+
-+ public InputStream getInputStream()
-+ {
-+ return in;
-+ }
-+
-+ public JPEGDecodeParam getJPEGDecodeParam()
-+ {
-+ return null;
-+ }
-+
-+ public void setJPEGDecodeParam(JPEGDecodeParam jdp)
-+ {
-+ return;
-+ }
-+
-+ }
++public interface JPEGImageDecoder {
++
++ /**
++ * Decodes the current JPEG data stream. The result of decoding this
++ * InputStream is a BufferedImage the ColorModel associated with this
++ * BufferedImage is determined based on the encoded COLOR_ID of the
++ * JPEGDecodeParam object. For a tables only stream this will return null.
++ *
++ * @return BufferedImage containing the image data.
++ * @throws ImageFormatException
++ * If irregularities in the JPEG stream or an unknown condition
++ * is encountered.
++ * @throws IOException
++ */
++ public BufferedImage decodeAsBufferedImage() throws IOException,
++ ImageFormatException;
++
++ /**
++ * Decode the JPEG stream that was passed as part of construction. The JPEG
++ * decompression will be performed according to the current settings of the
++ * JPEGDecodeParam object. For a tables only stream this will return null.
++ *
++ * @return Raster containg the image data. Colorspace and other pertinent
++ * information can be obtained from the JPEGDecodeParam object.
++ * @throws ImageFormatException
++ * If irregularities in the JPEG stream or an unknown condition
++ * is encountered.
++ * @throws IOException
++ */
++ public Raster decodeAsRaster() throws IOException, ImageFormatException;
++
++ /**
++ * Get the input stream that decoding will occur from.
++ *
++ * @return The stream that the decoder is currently associated with.
++ */
++ public InputStream getInputStream();
++
++ /**
++ * Returns the JPEGDecodeParam object that resulted from the most recent
++ * decoding event.
++ *
++ * @return
++ */
++ public JPEGDecodeParam getJPEGDecodeParam();
++
++ /**
++ * Sets the JPEGDecodeParam object used to determine the features of the
++ * decompression performed on the JPEG encoded data. This is usually only
++ * needed for decoding abbreviated JPEG data streams.
++ *
++ * @param jdp
++ * JPEGDecodeParam object
++ */
++ public void setJPEGDecodeParam(JPEGDecodeParam jdp);
+}
---- jdk/src/share/classes/com/sun/image/codec/jpeg/JPEGDecodeParam.java 1969-12-31 19:00:00.000000000 -0500
-+++ jdk/src/share/classes/com/sun/image/codec/jpeg/JPEGDecodeParam.java 2008-03-31 18:04:57.000000000 -0400
-@@ -0,0 +1,50 @@
-+/* JPEGImageDecoder.java --
+--- jdk/src/share/classes/com/sun/image/codec/jpeg/JPEGImageEncoder.java 1969-12-31 19:00:00.000000000 -0500
++++ jdk/src/share/classes/com/sun/image/codec/jpeg/JPEGImageEncoder.java 2011-07-07 09:19:34.000000000 -0400
+@@ -0,0 +1,208 @@
++/* JPEGImageEncoder.java --
+ Copyright (C) 2007 Free Software Foundation, Inc.
-+ Copyright (C) 2007 Matthew Flaschen
+
+ This file is part of GNU Classpath.
+
@@ -244,21 +1230,182 @@
+
+package com.sun.image.codec.jpeg;
+
-+public interface JPEGDecodeParam
-+{
++import java.io.OutputStream;
++import java.io.IOException;
++
++import java.awt.image.BufferedImage;
++import java.awt.image.ColorModel;
++import java.awt.image.Raster;
+
-+ public static final int COLOR_ID_UNKNOWN = 0;
-+ public static final int COLOR_ID_RGBA = 1;
-+ public static final int COLOR_ID_RGB = 2;
-+ public static final int COLOR_ID_GRAY = 3;
-+ public static final int COLOR_ID_YCbCrA = 4;
-+ public static final int COLOR_ID_YCbCr = 5;
++public interface JPEGImageEncoder {
++ /**
++ * This is a factory method for creating JPEGEncodeParam objects. The
++ * returned object will do a credible job of encoding the given
++ * BufferedImage.
++ *
++ * @param bi
++ * @return
++ * @throws ImageFormatException
++ */
++ public JPEGEncodeParam getDefaultJPEGEncodeParam(BufferedImage bi)
++ throws ImageFormatException;
++
++ /**
++ * This is a factory method for creating JPEGEncodeParam objects. It is the
++ * users responsibility to match the colorID with the given number of bands,
++ * which should match the data being encoded. Failure to do so may lead to
++ * poor compression and/or poor image quality. If you don't understand much
++ * about JPEG it is strongly recommended that you stick to the BufferedImage
++ * interface.
++ *
++ * @param numBands
++ * the number of bands that will be encoded (max of four).
++ * @param colorID
++ * the COLOR_ID for the encoded data. This is used to set
++ * reasonable defaults in the parameter object. This must match
++ * the number of bands given.
++ * @return
++ * @throws ImageFormatException
++ */
++ public JPEGEncodeParam getDefaultJPEGEncodeParam(int numBands, int colorID)
++ throws ImageFormatException;
++
++ /**
++ * This is a factory method for creating a JPEGEncodeParam from a
++ * JPEGDecodeParam. This will return a new JPEGEncodeParam object that is
++ * initialized from the JPEGDecodeParam object. All major pieces of
++ * information will be initialized from the DecodeParam (Markers, Tables,
++ * mappings).
++ *
++ * @param d
++ * The JPEGDecodeParam object to copy.
++ * @return
++ * @throws ImageFormatException
++ */
++ public JPEGEncodeParam getDefaultJPEGEncodeParam(JPEGDecodeParam d)
++ throws ImageFormatException;
++
++ /**
++ * This is a factory method for creating JPEGEncodeParam objects. It is the
++ * users responsiblity to match the colorID with the data contained in the
++ * Raster. Failure to do so may lead to either poor compression or poor
++ * image quality. If you don't understand much about JPEG it is strongly
++ * reccomended that you stick to the BufferedImage interfaces.
++ *
++ * @param ras
++ * @param colorID
++ * @return
++ * @throws ImageFormatException
++ */
++ public JPEGEncodeParam getDefaultJPEGEncodeParam(Raster ras, int colorID)
++ throws ImageFormatException;
++
++ public JPEGEncodeParam getJPEGEncodeParam() throws ImageFormatException;
++
++ /**
++ * Set the JPEGEncodeParam object that is to be used for future encoding
++ * operations. 'p' is copied so changes will not be tracked, unless you call
++ * this method again.
++ *
++ * @param p
++ * The JPEGEncodeParam object to use for future encodings.
++ */
++ public void setJPEGEncodeParam(JPEGEncodeParam p);
++
++ /**
++ * Return the stream the Encoder is current associated with.
++ *
++ * @return
++ */
++ public OutputStream getOutputStream();
++
++ /**
++ * Encode a BufferedImage as a JPEG data stream. Note, some color
++ * conversions may takes place. The jep's encoded COLOR_ID should match the
++ * value returned by getDefaultColorID when given the BufferedImage's
++ * ColorModel. This call also sets the current JPEGEncodeParam object. The
++ * given JPEGEncodeParam object will be used for this and future encodings.
++ * If p is null then a new JPEGEncodeParam object will be created by calling
++ * getDefaultJPEGEncodeParam with bi.
++ *
++ * @param bi
++ * The BufferedImage to encode.
++ * @param p
++ * The JPEGEncodeParam object used to control the encoding.
++ * @throws IOException
++ * @throws ImageFormatException
++ */
++ public void encode(BufferedImage bi, JPEGEncodeParam p) throws IOException,
++ ImageFormatException;
++
++ /**
++ * Encode a Raster as a JPEG data stream. Note that no color conversion
++ * takes place. It is required that you match the Raster to the encoded
++ * COLOR_ID contained in the current JPEGEncodeParam object. If no
++ * JPEGEncodeParam object has been provided yet a new JPEGEncodeParam object
++ * will be created by calling getDefaultJPEGEncodeParam with ras and
++ * COLOR_ID_UNKNOWN.
++ *
++ * @param ras
++ * The Raster to encode.
++ * @throws IOException
++ * @throws ImageFormatException
++ */
++ public void encode(Raster ras) throws IOException, ImageFormatException;
++
++ /**
++ * Encode a BufferedImage as a JPEG data stream. Note, some color
++ * conversions may takes place. The current JPEGEncodeParam's encoded
++ * COLOR_ID should match the value returned by getDefaultColorID when given
++ * the BufferedImage's ColorModel. If no JPEGEncodeParam object has been
++ * provided yet a default one will be created by calling
++ * getDefaultJPEGEncodeParam with bi.
++ *
++ * @param bi
++ * The BufferedImage to encode.
++ * @throws IOException
++ * @throws ImageFormatException
++ */
++ public void encode(BufferedImage bi) throws IOException,
++ ImageFormatException;
++
++ /**
++ * Encode a Raster as a JPEG data stream. Note that no color conversion
++ * takes place. It is required that you match the Raster to the encoded
++ * COLOR_ID contained in the JPEGEncodeParam object. If p is null a new
++ * JPEGEncodeParam object will be created by calling
++ * getDefaultJPEGEncodeParam with ras and COLOR_ID_UNKNOWN.
++ *
++ * @param ras
++ * The Raster to encode.
++ * @param p
++ * The JPEGEncodeParam object used to control the encoding.
++ * @throws IOException
++ * @throws ImageFormatException
++ */
++ public void encode(Raster ras, JPEGEncodeParam p) throws IOException,
++ ImageFormatException;
++
++ /**
++ * Returns the 'default' encoded COLOR_ID for a given ColorModel. This
++ * method is not needed in the simple case of encoding Buffered Images (the
++ * library will figure things out for you). It can be useful for encoding
++ * Rasters. To determine what needs to be done to the image prior to
++ * encoding.
++ *
++ * @param cm
++ * The ColorModel to map to an jpeg encoded COLOR_ID.
++ * @return
++ */
++ public int getDefaultColorId(ColorModel cm);
+}
---- jdk/src/share/classes/com/sun/image/codec/jpeg/JPEGEncodeParam.java 1969-12-31 19:00:00.000000000 -0500
-+++ jdk/src/share/classes/com/sun/image/codec/jpeg/JPEGEncodeParam.java 2008-03-31 18:04:57.000000000 -0400
-@@ -0,0 +1,139 @@
-+/* JPEGEncodeParam.java --
+--- jdk/src/share/classes/com/sun/image/codec/jpeg/JPEGQTable.java 1969-12-31 19:00:00.000000000 -0500
++++ jdk/src/share/classes/com/sun/image/codec/jpeg/JPEGQTable.java 2011-07-07 09:19:34.000000000 -0400
+@@ -0,0 +1,118 @@
++/* JPEGQTable.java --
++ Copyright (C) 2011 Red Hat
+ Copyright (C) 2007 Free Software Foundation, Inc.
++ Copyright (C) 2007 Matthew Flaschen
+
+ This file is part of GNU Classpath.
+
@@ -296,121 +1443,98 @@
+
+package com.sun.image.codec.jpeg;
+
-+public class JPEGEncodeParam
-+{
-+ public static final int COLOR_ID_UNKNOWN = 0;
-+ public static final int COLOR_ID_RGBA = 1;
-+ public static final int COLOR_ID_RGB = 2;
-+ public static final int COLOR_ID_GRAY = 3;
-+ public static final int COLOR_ID_YCbCrA = 4;
-+ public static final int COLOR_ID_CMYK = 5;
-+ public static final int COLOR_ID_YCbCr = 6;
-+
-+ public JPEGEncodeParam()
-+ {
-+ }
-+
-+ public void setQuality(float i, boolean b)
-+ {
-+ }
-+
-+ public void setQuality(int i, boolean b)
-+ {
-+ }
-+
-+ public JPEGEncodeParam clone()
-+ {
-+ return null;
-+ }
-+
-+ public void setTableInfoValid(boolean b)
-+ {
-+ }
-+
-+ public void setImageInfoValid(boolean b)
-+ {
-+ }
-+
-+ public int getHorizontalSubsampling(int i)
-+ {
-+ return 0;
-+ }
-+
-+ public int getVerticalSubsampling(int i)
-+ {
-+ return 0;
-+ }
-+
-+ public int getWidth()
-+ {
-+ return 0;
-+ }
-+
-+ public int getHeight()
-+ {
-+ return 0;
-+ }
-+
-+ public int getDensityUnit()
-+ {
-+ return 0;
-+ }
-+
-+ public int getXDensity()
-+ {
-+ return 0;
++import java.util.Arrays;
++
++/**
++ * Class to encapsulate the JPEG quantization tables.
++ *
++ * Note: The tables K1Luminance, K1Div2Luminance, K2Chrominance,
++ * K2Div2Chrominance is an instance of the superclass.
++ *
++ * @author Andrew Su (asu@redhat.com)
++ *
++ */
++public class JPEGQTable {
++
++ /**
++ * Luminance quantization table (in zig-zag order).
++ */
++ public static final JPEGQTable StdLuminance;
++
++ /**
++ * Chromninance quantization table (in zig-zag order).
++ */
++ public static final JPEGQTable StdChrominance;
++
++ static {
++ /* table for luminance values in zig-zag order */
++ int[] table1 = { 16, 11, 12, 14, 12, 10, 16, 14, 13, 14, 18, 17, 16,
++ 19, 24, 40, 26, 24, 22, 22, 24, 49, 35, 37, 29, 40, 58, 51, 61,
++ 60, 57, 51, 56, 55, 64, 72, 92, 78, 64, 68, 87, 69, 55, 56, 80,
++ 109, 81, 87, 95, 98, 103, 104, 103, 62, 77, 113, 121, 112, 100,
++ 120, 92, 101, 103, 99 };
++
++ StdLuminance = new JPEGQTable(table1);
++
++ /* table for chrominance values in zig-zag order */
++ int[] table2 = { 17, 18, 18, 24, 21, 24, 47, 26, 26, 47, 99, 66, 56,
++ 66, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
++ 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
++ 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
++ 99, 99, 99 };
++ StdChrominance = new JPEGQTable(table2);
++ }
++
++ private int[] table;
++
++ /**
++ * Constructs an quantization table from the array that was passed. The
++ * coefficients must be in zig-zag order. The array must be of length 64.
++ * The table will be copied.
++ *
++ * @param table
++ * the quantization table, as an int array.
++ * @throws IllegalArgumentException
++ * if table is null or table.length is not equal to 64.
++ */
++ public JPEGQTable(int[] table) {
++ /* Table must be 8x8 thus 64 entries */
++ if (table == null || table.length != 64) {
++ throw new IllegalArgumentException("Not a valid table.");
+ }
-+
-+ public int getYDensity()
-+ {
-+ return 0;
-+ }
-+
-+ public int getRestartInterval()
-+ {
-+ return 0;
++ this.table = Arrays.copyOf(table, table.length);
++ }
++
++ public int[] getTable() {
++ return Arrays.copyOf(table, table.length);
++ }
++
++ public JPEGQTable getScaledInstance(float scaleFactor, boolean forceBaseline) {
++ int limit = (forceBaseline) ? 255 : 32767;
++ int[] newTable = new int[table.length];
++ for (int i = 0; i < table.length; i++) {
++ int newValue = Math.round(table[i] * scaleFactor);
++ newTable[i] = (newValue < 1) ? 1 : (newValue > limit) ? limit : newValue;
+ }
++ return new JPEGQTable(newTable);
++ }
+
-+ public JPEGQTable getQTable(int i)
-+ {
-+ return new JPEGQTable();
-+ }
-+
-+ public void setDensityUnit(int i)
-+ {
-+ }
-+
-+ public void setXDensity(int i)
-+ {
-+ }
-+
-+ public void setYDensity(int i)
-+ {
-+ }
-+
-+ public void setRestartInterval(int i)
-+ {
-+ }
-+
-+ public void setQTable(int i, JPEGQTable jqt)
-+ {
-+ }
+}
---- jdk/src/share/classes/com/sun/image/codec/jpeg/JPEGImageDecoder.java 1969-12-31 19:00:00.000000000 -0500
-+++ jdk/src/share/classes/com/sun/image/codec/jpeg/JPEGImageDecoder.java 2008-03-31 18:04:57.000000000 -0400
-@@ -0,0 +1,60 @@
-+/* JPEGImageDecoder.java --
-+ Copyright (C) 2007 Free Software Foundation, Inc.
+--- jdk/src/share/classes/com/sun/image/codec/jpeg/TruncatedFileException.java 1969-12-31 19:00:00.000000000 -0500
++++ jdk/src/share/classes/com/sun/image/codec/jpeg/TruncatedFileException.java 2011-07-07 09:19:34.000000000 -0400
+@@ -0,0 +1,92 @@
++/* TruncatedFileException.java
+ Copyright (C) 2007 Matthew Flaschen
++ Copyright (C) 2011 Red Hat, Inc.
+
-+ This file is part of GNU Classpath.
++ This file is part of IcedTea
+
-+ GNU Classpath is free software; you can redistribute it and/or modify
++ IcedTea is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
-+ GNU Classpath is distributed in the hope that it will be useful, but
++ IcedTea 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 for more details.
@@ -437,207 +1561,1107 @@
+ obligated to do so. If you do not wish to do so, delete this
+ exception statement from your version. */
+
-+
+package com.sun.image.codec.jpeg;
++
+import java.awt.image.BufferedImage;
+import java.awt.image.Raster;
+
-+import java.io.InputStream;
++public class TruncatedFileException extends RuntimeException {
++
++ private final BufferedImage bufferedImage;
++
++ private final Raster raster;
++
++ /**
++ * Creates a new exception with the specified {@link BufferedImage}
++ * containing the partially read image data.
++ *
++ * @param bufferedImage the partially decoded image (may be null).
++ */
++ public TruncatedFileException(BufferedImage bufferedImage) {
++ this.bufferedImage = bufferedImage;
++ this.raster = null;
++ }
++
++ /**
++ * Creates a new exception with the specified {@link Raster}
++ * containing the partially read image data.
++ *
++ * @param raster the partially decoded image (may be null).
++ */
++ public TruncatedFileException(Raster raster) {
++ this.raster = raster;
++ this.bufferedImage = null;
++ }
++
++ /**
++ * Returns the partially read data as a {@link BufferedImage}
++ * if available, or {@code null} if not.
++ *
++ * @return the partially read data.
++ */
++ public BufferedImage getBufferedImage() {
++ return bufferedImage;
++ }
++
++ /**
++ * Returns the partially read data as a {@link Raster}
++ * if available, or {@code null} if not.
++ *
++ * @return the partially read data.
++ */
++ public Raster getRaster() {
++ return raster;
++ }
++
++}
+--- jdk/src/share/classes/sun/awt/image/codec/JPEGImageDecoderImpl.java 1969-12-31 19:00:00.000000000 -0500
++++ jdk/src/share/classes/sun/awt/image/codec/JPEGImageDecoderImpl.java 2011-07-07 09:19:34.000000000 -0400
+@@ -0,0 +1,108 @@
++/* JPEGImageDecoderImpl.java -- JPEG decoder implementation
++Copyright (C) 2011 Red Hat
++
++This program is free software; you can redistribute it and/or modify
++it under the terms of the GNU General Public License as published by
++the Free Software Foundation; either version 2 of the License, or
++(at your option) any later version.
++
++This program 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 for more details.
++
++You should have received a copy of the GNU General Public License
++along with this program; if not, write to the Free Software
++Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ */
++package sun.awt.image.codec;
++
++import java.awt.image.BufferedImage;
++import java.awt.image.Raster;
+import java.io.IOException;
++import java.io.InputStream;
++import java.util.Iterator;
++
++import javax.imageio.ImageIO;
++import javax.imageio.ImageReader;
++import javax.imageio.plugins.jpeg.JPEGHuffmanTable;
++import javax.imageio.plugins.jpeg.JPEGImageReadParam;
++import javax.imageio.plugins.jpeg.JPEGQTable;
++import javax.imageio.stream.MemoryCacheImageInputStream;
++
++import com.sun.image.codec.jpeg.ImageFormatException;
++import com.sun.image.codec.jpeg.JPEGDecodeParam;
++import com.sun.image.codec.jpeg.JPEGImageDecoder;
++import com.sun.imageio.plugins.jpeg.JPEGImageReader;
++
++/**
++ * This class provides the implementation for a JPEG decoder.
++ */
++public class JPEGImageDecoderImpl implements JPEGImageDecoder {
++ private static final String JPGMime = "image/jpeg";
++
++ private JPEGImageReader JPGReader;
++ private InputStream in;
++ private JPEGDecodeParam param;
++
++ public JPEGImageDecoderImpl(InputStream in) {
++ this(in, null);
++ }
++
++ public JPEGImageDecoderImpl(InputStream in, JPEGDecodeParam param) {
++ this.in = in;
++ setJPEGDecodeParam(param);
++
++ Iterator<ImageReader> JPGReaderIter = ImageIO
++ .getImageReadersByMIMEType(JPGMime);
++ if (JPGReaderIter.hasNext()) {
++ JPGReader = (JPEGImageReader) JPGReaderIter.next();
++ }
++
++ JPGReader.setInput(new MemoryCacheImageInputStream(in));
++ }
++
++ public BufferedImage decodeAsBufferedImage() throws IOException,
++ ImageFormatException {
++ JPEGImageReadParam irp = null;
++
++ if (param != null) {
++ // We should do more than this, but it's a start.
++ JPEGQTable[] qTables = new JPEGQTable[4];
++ JPEGHuffmanTable[] DCHuffmanTables = new JPEGHuffmanTable[4];
++ JPEGHuffmanTable[] ACHuffmanTables = new JPEGHuffmanTable[4];
++
++ for (int i = 0; i < 4; i++) {
++ qTables[i] = new JPEGQTable(param.getQTable(i).getTable());
++ com.sun.image.codec.jpeg.JPEGHuffmanTable dcHuffman = param.getDCHuffmanTable(i);
++ com.sun.image.codec.jpeg.JPEGHuffmanTable acHuffman = param.getACHuffmanTable(i);
++ DCHuffmanTables[i] = new JPEGHuffmanTable(dcHuffman.getLengths(),
++ dcHuffman.getSymbols());
++ ACHuffmanTables[i] = new JPEGHuffmanTable(acHuffman.getLengths(),
++ dcHuffman.getSymbols());
++ }
++
++ irp = new JPEGImageReadParam();
++ irp.setDecodeTables(qTables, DCHuffmanTables, ACHuffmanTables);
++ }
+
++ return JPGReader.read(0, irp);
++ }
+
-+public interface JPEGImageDecoder
-+{
++ public Raster decodeAsRaster() throws IOException, ImageFormatException {
++ return JPGReader.readRaster(0, null);
++ }
+
-+ public BufferedImage decodeAsBufferedImage() throws IOException, ImageFormatException;
-+
-+ public Raster decodeAsRaster() throws IOException, ImageFormatException;
-+
-+ public InputStream getInputStream();
++ public InputStream getInputStream() {
++ return in;
++ }
+
-+ public JPEGDecodeParam getJPEGDecodeParam();
++ public JPEGDecodeParam getJPEGDecodeParam() {
++ if (param == null) return null;
++ return (JPEGDecodeParam) param.clone();
++ }
+
-+ public void setJPEGDecodeParam(JPEGDecodeParam jdp);
++ public void setJPEGDecodeParam(JPEGDecodeParam jdp) {
++ param = jdp;
++ }
+}
---- jdk/src/share/classes/com/sun/image/codec/jpeg/JPEGImageEncoder.java 1969-12-31 19:00:00.000000000 -0500
-+++ jdk/src/share/classes/com/sun/image/codec/jpeg/JPEGImageEncoder.java 2008-03-31 18:04:57.000000000 -0400
-@@ -0,0 +1,71 @@
-+/* JPEGImageEncoder.java --
-+ Copyright (C) 2007 Free Software Foundation, Inc.
+--- jdk/src/share/classes/sun/awt/image/codec/JPEGImageEncoderImpl.java 1969-12-31 19:00:00.000000000 -0500
++++ jdk/src/share/classes/sun/awt/image/codec/JPEGImageEncoderImpl.java 2011-07-07 09:19:34.000000000 -0400
+@@ -0,0 +1,183 @@
++/* JPEGImageEncoder.java -- JPEG encoder implementation
++Copyright (C) 2011 Red Hat
++
++This program is free software; you can redistribute it and/or modify
++it under the terms of the GNU General Public License as published by
++the Free Software Foundation; either version 2 of the License, or
++(at your option) any later version.
++
++This program 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 for more details.
++
++You should have received a copy of the GNU General Public License
++along with this program; if not, write to the Free Software
++Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ */
++package sun.awt.image.codec;
++
++import java.awt.color.ColorSpace;
++import java.awt.image.BufferedImage;
++import java.awt.image.ColorModel;
++import java.awt.image.Raster;
++import java.io.IOException;
++import java.io.OutputStream;
++import java.util.ArrayList;
++import java.util.Iterator;
+
-+ This file is part of GNU Classpath.
++import javax.imageio.IIOImage;
++import javax.imageio.ImageIO;
++import javax.imageio.ImageWriteParam;
++import javax.imageio.ImageWriter;
++import javax.imageio.plugins.jpeg.JPEGImageWriteParam;
++import javax.imageio.stream.MemoryCacheImageOutputStream;
++
++import com.sun.image.codec.jpeg.ImageFormatException;
++import com.sun.image.codec.jpeg.JPEGCodec;
++import com.sun.image.codec.jpeg.JPEGDecodeParam;
++import com.sun.image.codec.jpeg.JPEGEncodeParam;
++import com.sun.image.codec.jpeg.JPEGImageEncoder;
++import com.sun.imageio.plugins.jpeg.JPEG;
++
++/**
++ * This class provides the implementation for encoding JPEG images.
++ *
++ */
++public class JPEGImageEncoderImpl implements JPEGImageEncoder {
++ private static final String JPGMime = "image/jpeg";
++
++ private ImageWriter JPGWriter;
++ private JPEGEncodeParam param;
++ private OutputStream out;
++
++ public JPEGImageEncoderImpl(OutputStream os) {
++ this(os, null);
++ }
++
++ public JPEGImageEncoderImpl(OutputStream out, JPEGEncodeParam newParam) {
++ this.out = out;
++ setJPEGEncodeParam(newParam);
++
++ Iterator<ImageWriter> JPGWriterIter = ImageIO
++ .getImageWritersByMIMEType(JPGMime);
++ if (JPGWriterIter.hasNext()) {
++ JPGWriter = JPGWriterIter.next();
++ }
+
-+ GNU Classpath is free software; you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation; either version 2, or (at your option)
-+ any later version.
++ JPGWriter.setOutput(new MemoryCacheImageOutputStream(out));
++ }
++
++ public JPEGEncodeParam getDefaultJPEGEncodeParam(BufferedImage bi)
++ throws ImageFormatException {
++ return JPEGCodec.getDefaultJPEGEncodeParam(bi);
++ }
++
++ public JPEGEncodeParam getDefaultJPEGEncodeParam(int numBands, int colorID)
++ throws ImageFormatException {
++ return JPEGCodec.getDefaultJPEGEncodeParam(numBands, colorID);
++ }
++
++ public JPEGEncodeParam getDefaultJPEGEncodeParam(JPEGDecodeParam d)
++ throws ImageFormatException {
++ return JPEGCodec.getDefaultJPEGEncodeParam(d);
++ }
++
++ public JPEGEncodeParam getDefaultJPEGEncodeParam(Raster ras, int colorID)
++ throws ImageFormatException {
++ return JPEGCodec.getDefaultJPEGEncodeParam(ras, colorID);
++ }
++
++ public JPEGEncodeParam getJPEGEncodeParam() throws ImageFormatException {
++ if (param == null)
++ return null;
++ return (JPEGEncodeParam) param.clone();
++ }
++
++ public void setJPEGEncodeParam(JPEGEncodeParam p) {
++ param = p;
++ }
++
++ public OutputStream getOutputStream() {
++ return out;
++ }
++
++ private void encode(IIOImage img) throws IOException, ImageFormatException {
++ if (JPGWriter == null)
++ throw new ImageFormatException(
++ "JPEG writer code not implemented in ImageIO");
++
++ JPEGImageWriteParam jiwp = new JPEGImageWriteParam(null);
++ ;
++ jiwp.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
++ if (param != null && param instanceof JPEGParam) {
++ JPEGParam jp = (JPEGParam) param;
++ jiwp.setCompressionQuality(jp.getQuality());
++ } else {
++ jiwp.setCompressionQuality(JPEG.DEFAULT_QUALITY);
++ }
+
-+ GNU Classpath 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 for more details.
++ JPGWriter.write(null, img, jiwp);
++ }
++
++ public void encode(BufferedImage bi, JPEGEncodeParam writeParam)
++ throws IOException, ImageFormatException {
++ setJPEGEncodeParam(writeParam);
++ encode(new IIOImage(bi, new ArrayList<BufferedImage>(), null));
++ }
++
++ public void encode(Raster rs, JPEGEncodeParam writeParam)
++ throws IOException, ImageFormatException {
++ setJPEGEncodeParam(writeParam);
++ encode(new IIOImage(rs, new ArrayList<BufferedImage>(), null));
++ }
++
++ public void encode(BufferedImage bi) throws IOException,
++ ImageFormatException {
++ encode(bi, null);
++ }
++
++ public void encode(Raster rs) throws IOException, ImageFormatException {
++ encode(rs, null);
++ }
++
++ @Override
++ public int getDefaultColorId(ColorModel cm) {
++ ColorSpace cs = cm.getColorSpace();
++ int type = cs.getType();
++ int id = -1;
++ switch (type) {
++ case ColorSpace.TYPE_GRAY:
++ id = JPEGEncodeParam.COLOR_ID_GRAY;
++ break;
++
++ case ColorSpace.TYPE_RGB:
++ id = cm.hasAlpha() ? JPEGEncodeParam.COLOR_ID_RGBA
++ : JPEGEncodeParam.COLOR_ID_RGB;
++
++ case ColorSpace.TYPE_YCbCr:
++ try {
++ if (cs == ColorSpace.getInstance(ColorSpace.CS_PYCC)) {
++ id = cm.hasAlpha() ? JPEGEncodeParam.COLOR_ID_PYCCA
++ : JPEGEncodeParam.COLOR_ID_PYCC;
++ }
++ } catch (IllegalArgumentException e) {
++ /* We know it isn't PYCC type, nothing to handle */
++ }
++ if (id == -1) {
++ id = cm.hasAlpha() ? JPEGEncodeParam.COLOR_ID_YCbCrA
++ : JPEGEncodeParam.COLOR_ID_YCbCr;
++ }
++ break;
++
++ case ColorSpace.TYPE_CMYK:
++ id = JPEGEncodeParam.COLOR_ID_CMYK;
++ break;
++
++ default:
++ id = JPEGEncodeParam.COLOR_ID_UNKNOWN;
++ }
+
-+ You should have received a copy of the GNU General Public License
-+ along with GNU Classpath; see the file COPYING. If not, write to the
-+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-+ 02110-1301 USA.
++ return id;
++ }
++}
+--- jdk/src/share/classes/sun/awt/image/codec/JPEGParam.java 1969-12-31 19:00:00.000000000 -0500
++++ jdk/src/share/classes/sun/awt/image/codec/JPEGParam.java 2011-07-07 09:19:34.000000000 -0400
+@@ -0,0 +1,750 @@
++/* JPEGParam.java -- keeps track of encode and decode parameters for JPEG.
++ * Copyright (C) 2011 Red Hat
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * This program 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 for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ */
++package sun.awt.image.codec;
++
++import java.util.Arrays;
++
++import com.sun.image.codec.jpeg.JPEGDecodeParam;
++import com.sun.image.codec.jpeg.JPEGEncodeParam;
++import com.sun.image.codec.jpeg.JPEGHuffmanTable;
++import com.sun.image.codec.jpeg.JPEGQTable;
++import com.sun.imageio.plugins.jpeg.JPEG;
++
++/**
++ * This class encapsulates the information about encoding and decoding the JPEG
++ * image.
++ *
++ * @author Andrew Su (asu@redhat.com)
++ *
++ */
++public class JPEGParam implements JPEGEncodeParam {
++ /*
++ * NOTE: bands mean the same thing as components, trying to keep it
++ * Consistent with the documentation
++ *
++ * NOTE: subsampling is not done implementing.
++ */
++
++ private float quality = JPEG.DEFAULT_QUALITY;
++ private int colorID = -1;
++ private int width;
++ private int height;
++ private int numBands;
++ private boolean imageInfoValid = false;
++ private boolean tableInfoValid = false;
++ private JPEGQTable[] qTable = new JPEGQTable[NUM_TABLES];
++ private JPEGHuffmanTable[] acHuffmanTable = new JPEGHuffmanTable[NUM_TABLES];
++ private JPEGHuffmanTable[] dcHuffmanTable = new JPEGHuffmanTable[NUM_TABLES];
++
++ private int restartInterval = 0;
++ private int[] horizontalSubsampleComponents;
++ private int[] verticalSubsampleComponents;
++
++ /* [marker between 0xE0 to 0xEF minus 0xE0 to get index][data] */
++ private byte[][][] markers = new byte[16][][];
++ private byte[][] commentMarker = null;
++
++ /* number of components each color id has (color id from JPEGDecodeParam) */
++ private static int[] components = { 0, 1, 3, 3, 4, 3, 4, 4, 4, 4, 4, 4, };
++ private int[] qTableComponentMapping;
++ private int[] acHuffmanComponentMapping;
++ private int[] dcHuffmanComponentMapping;
++
++ /*
++ * Breakdown for marker bytes
++ * 5 for name.
++ * 2 for version.
++ * 1 for density type.
++ * 2 for x density.
++ * 2 for y density.
++ * 2 for thumbnail.
++ */
++ private byte APP0_MARKER_NUM_BYTES = 14;
++
++ public JPEGParam(JPEGEncodeParam param) {
++ this((JPEGDecodeParam) param);
++ }
++
++ public JPEGParam(JPEGDecodeParam param) {
++ this(param.getEncodedColorID(), param.getNumComponents());
++
++ setTableInfoValid(param.isTableInfoValid());
++ setImageInfoValid(param.isImageInfoValid());
++ setRestartInterval(param.getRestartInterval());
++
++ // Copy the Q tables and Huffman tables.
++ for (int i = 0; i < NUM_TABLES; i++) {
++ qTable[i] = param.getQTable(i);
++ acHuffmanTable[i] = param.getACHuffmanTable(i);
++ dcHuffmanTable[i] = param.getDCHuffmanTable(i);
++ }
+
-+ Linking this library statically or dynamically with other modules is
-+ making a combined work based on this library. Thus, the terms and
-+ conditions of the GNU General Public License cover the whole
-+ combination.
++ // Next we want to copy the component mappings.
++ for (int i = 0; i < getNumComponents(); i++) {
++ setQTableComponentMapping(i, param.getQTableComponentMapping(i));
++ setACHuffmanComponentMapping(i,
++ param.getACHuffmanComponentMapping(i));
++ setDCHuffmanComponentMapping(i,
++ param.getDCHuffmanComponentMapping(i));
++ }
+
-+ As a special exception, the copyright holders of this library give you
-+ permission to link this library with independent modules to produce an
-+ executable, regardless of the license terms of these independent
-+ modules, and to copy and distribute the resulting executable under
-+ terms of your choice, provided that you also meet, for each linked
-+ independent module, the terms and conditions of the license of that
-+ module. An independent module is a module which is not derived from
-+ or based on this library. If you modify this library, you may extend
-+ this exception to your version of the library, but you are not
-+ obligated to do so. If you do not wish to do so, delete this
-+ exception statement from your version. */
++ // Copy all the marker data.
++ for (int i = APP0_MARKER; i < APPF_MARKER; i++) {
++ byte[][] markerData = param.getMarkerData(i);
++ byte[][] copyMarkerData = null;
++ if (markerData != null) {
++ copyMarkerData = new byte[markerData.length][];
++ for (int j = 0; j < markerData.length; j++) {
++ copyMarkerData[j] = Arrays.copyOf(markerData[j],
++ markerData[j].length);
++ }
++ }
++ setMarkerData(i, copyMarkerData);
++ }
+
-+package com.sun.image.codec.jpeg;
++ byte[][] commentData = param.getMarkerData(COMMENT_MARKER);
++ byte[][] copyCommentData = null;
++ if (commentData != null) {
++ copyCommentData = new byte[commentData.length][];
++ for (int i = 0; i < commentData.length; i++) {
++ copyCommentData[i] = Arrays.copyOf(commentData[i],
++ commentData[i].length);
++ }
++ setMarkerData(COMMENT_MARKER, copyCommentData);
++ }
++ }
++
++ public JPEGParam(int colorID) {
++ this(colorID, components[colorID]);
++ }
++
++ public JPEGParam(int colorID, int numBands) {
++ // We were given an invalid color id, or the number of bands given to us
++ // did not match requirements.
++ if (colorID < 0
++ || colorID >= JPEGDecodeParam.NUM_COLOR_ID
++ || (colorID != COLOR_ID_UNKNOWN && numBands != components[colorID])) {
++ throw new IllegalArgumentException();
++ }
++ this.colorID = colorID;
++ this.numBands = numBands;
++
++ initialize();
++ }
++
++ private void initialize() {
++
++ qTable[0] = JPEGQTable.StdLuminance;
++ qTable[1] = JPEGQTable.StdChrominance;
++
++ acHuffmanTable[0] = JPEGHuffmanTable.StdACLuminance;
++ acHuffmanTable[1] = JPEGHuffmanTable.StdACChrominance;
++
++ dcHuffmanTable[0] = JPEGHuffmanTable.StdDCLuminance;
++ dcHuffmanTable[1] = JPEGHuffmanTable.StdDCChrominance;
++
++ qTableComponentMapping = new int[getNumComponents()];
++ acHuffmanComponentMapping = new int[getNumComponents()];
++ dcHuffmanComponentMapping = new int[getNumComponents()];
++
++ horizontalSubsampleComponents = new int[getNumComponents()];
++ verticalSubsampleComponents = new int[getNumComponents()];
++
++ /*
++ * we can just set these to true since they are using default values
++ * right now
++ */
++ setTableInfoValid(true);
++ setImageInfoValid(true);
++
++ setMarkerData(APP0_MARKER,
++ arrayAdd(getMarkerData(APP0_MARKER), createAPP0MarkerData()));
++
++ }
++
++ private byte[] createAPP0MarkerData() {
++ byte[] data = null;
++ // Create JFIF APP0 Marker if compatible.
++ // By compatible, it must be one of the following cases.
++ // Reference:
++ // http://www.jpeg.org/public/jfif.pdf
++ // http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/JFIF.html
++ switch (colorID) {
++ case COLOR_ID_UNKNOWN:
++ case COLOR_ID_GRAY:
++ case COLOR_ID_RGB:
++ case COLOR_ID_YCbCr:
++ case COLOR_ID_CMYK:
++ data = new byte[APP0_MARKER_NUM_BYTES];
++
++ // Null terminated JFIF string. [5 bytes]
++ data[0] = 'J';
++ data[1] = 'F';
++ data[2] = 'I';
++ data[3] = 'F';
++ data[4] = 0x0;
++
++ // Version number [2 bytes]
++ data[5] = 1;
++ data[6] = 2;
++
++ // Density unit [1 byte]
++ data[7] = DENSITY_UNIT_ASPECT_RATIO;
++
++ // X density [2 bytes]
++ data[8] = 0;
++ data[9] = 1;
++
++ // Y density [2 bytes]
++ data[10] = 0;
++ data[11] = 1;
++
++ // Thumbnail [2 bytes]
++ data[12] = 0;
++ data[13] = 0;
++ break;
++ }
+
-+import com.sun.image.codec.jpeg.*;
-+import java.awt.image.BufferedImage;
-+import java.awt.image.Raster;
++ return data;
++ }
+
-+public class JPEGImageEncoder
-+{
-+ public JPEGImageEncoder()
-+ {
-+ }
-+
-+ public JPEGEncodeParam getDefaultJPEGEncodeParam(BufferedImage bi)
-+ {
-+ return null;
-+ }
++ public void setQuality(float quality, boolean forceBaseline) {
++ if (quality < 0.0) {
++ quality = 0.00f;
++ } else if (quality > 1.0) {
++ quality = 1.0f;
++ }
+
-+ public void setJPEGEncodeParam(JPEGEncodeParam p)
-+ {
-+ }
++ this.quality = quality; // preserve original.
++
++ /*
++ * Since quality value of 1 is the lowest compression, we want our
++ * QTable to contain as much 1s as possible. Since scaling is by a
++ * factor, we want to invert the selection such that highest quality is
++ * 0 and lowest is 1.
++ */
++ quality = 1 - quality;
++
++ // We will scale our QTables to match the quality value given to us.
++ for (int i = 0; i < NUM_TABLES; i++) {
++ if (qTable[i] != null) {
++ qTable[i] = qTable[i].getScaledInstance(quality, forceBaseline);
++ }
++ }
++ }
++
++ public Object clone() {
++ JPEGParam c = new JPEGParam(this);
++ return c;
++ }
++
++ @Override
++ public int getWidth() {
++ return width;
++ }
++
++ @Override
++ public int getHeight() {
++ return height;
++ }
++
++ @Override
++ public int getHorizontalSubsampling(int component) {
++ if (component < 0 || component > getNumComponents()) {
++ throw new IllegalArgumentException("Invalid component");
++ }
+
-+ public void encode(BufferedImage bi, JPEGEncodeParam p)
-+ {
-+ }
++ return horizontalSubsampleComponents[component];
++ }
+
-+ public void encode(Raster bi)
-+ {
++ @Override
++ public int getVerticalSubsampling(int component) {
++ if (component < 0 || component > getNumComponents()) {
++ throw new IllegalArgumentException("Invalid component");
+ }
+
-+ public void encode(BufferedImage bi)
-+ {
++ return verticalSubsampleComponents[component];
++ }
++
++ @Override
++ public JPEGQTable getQTable(int tableNum) {
++ if (tableNum < 0 || tableNum > NUM_TABLES)
++ throw new IllegalArgumentException("tableNum must be [0-"
++ + (NUM_TABLES - 1) + "]");
++ return qTable[tableNum];
++ }
++
++ @Override
++ public JPEGQTable getQTableForComponent(int component) {
++ if (component < 0 || component > getNumComponents()) {
++ throw new IllegalArgumentException("Invalid component");
+ }
+
-+}
---- jdk/src/share/classes/com/sun/image/codec/jpeg/JPEGQTable.java 1969-12-31 19:00:00.000000000 -0500
-+++ jdk/src/share/classes/com/sun/image/codec/jpeg/JPEGQTable.java 2008-03-31 18:04:57.000000000 -0400
-@@ -0,0 +1,44 @@
-+/* JPEGQTable.java --
-+ Copyright (C) 2007 Free Software Foundation, Inc.
-+ Copyright (C) 2007 Matthew Flaschen
++ return qTable[qTableComponentMapping[component]];
++ }
++
++ @Override
++ public JPEGHuffmanTable getDCHuffmanTable(int tableNum) {
++ if (tableNum < 0 || tableNum > NUM_TABLES)
++ throw new IllegalArgumentException("tableNum must be [0-"
++ + (NUM_TABLES - 1) + "]");
++ return dcHuffmanTable[tableNum];
++ }
++
++ @Override
++ public JPEGHuffmanTable getDCHuffmanTableForComponent(int component) {
++ if (component < 0 || component > getNumComponents()) {
++ throw new IllegalArgumentException("Invalid component");
++ }
+
-+ This file is part of GNU Classpath.
++ return dcHuffmanTable[dcHuffmanComponentMapping[component]];
++ }
++
++ @Override
++ public JPEGHuffmanTable getACHuffmanTable(int tableNum) {
++ if (tableNum < 0 || tableNum > NUM_TABLES)
++ throw new IllegalArgumentException("tableNum must be [0-"
++ + (NUM_TABLES - 1) + "]");
++ return acHuffmanTable[tableNum];
++ }
++
++ @Override
++ public JPEGHuffmanTable getACHuffmanTableForComponent(int component) {
++ if (component < 0 || component > getNumComponents()) {
++ throw new IllegalArgumentException("Invalid component");
++ }
+
-+ GNU Classpath is free software; you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation; either version 2, or (at your option)
-+ any later version.
++ return acHuffmanTable[acHuffmanComponentMapping[component]];
++ }
+
-+ GNU Classpath 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 for more details.
++ @Override
++ public int getDCHuffmanComponentMapping(int component) {
++ if (component < 0 || component > getNumComponents()) {
++ throw new IllegalArgumentException("Invalid component");
++ }
++ return dcHuffmanComponentMapping[component];
++ }
+
-+ You should have received a copy of the GNU General Public License
-+ along with GNU Classpath; see the file COPYING. If not, write to the
-+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-+ 02110-1301 USA.
++ @Override
++ public int getACHuffmanComponentMapping(int component) {
++ if (component < 0 || component > getNumComponents()) {
++ throw new IllegalArgumentException("Invalid component");
++ }
++ return acHuffmanComponentMapping[component];
++ }
+
-+ Linking this library statically or dynamically with other modules is
-+ making a combined work based on this library. Thus, the terms and
-+ conditions of the GNU General Public License cover the whole
-+ combination.
++ @Override
++ public int getQTableComponentMapping(int component) {
++ if (component < 0 || component > getNumComponents()) {
++ throw new IllegalArgumentException("Invalid component");
++ }
++ return qTableComponentMapping[component];
++ }
++
++ @Override
++ public boolean isImageInfoValid() {
++ return imageInfoValid;
++ }
++
++ @Override
++ public boolean isTableInfoValid() {
++ return tableInfoValid;
++ }
++
++ @Override
++ public boolean getMarker(int marker) {
++ byte[][] data = null;
++ switch (marker) {
++ case APP0_MARKER:
++ case APP1_MARKER:
++ case APP2_MARKER:
++ case APP3_MARKER:
++ case APP4_MARKER:
++ case APP5_MARKER:
++ case APP6_MARKER:
++ case APP7_MARKER:
++ case APP8_MARKER:
++ case APP9_MARKER:
++ case APPA_MARKER:
++ case APPB_MARKER:
++ case APPC_MARKER:
++ case APPD_MARKER:
++ case APPE_MARKER:
++ case APPF_MARKER:
++ data = markers[marker - APP0_MARKER];
++ break;
++ case COMMENT_MARKER:
++ data = commentMarker;
++ break;
++ default:
++ throw new IllegalArgumentException("Marker provided is invalid");
++ }
+
-+ As a special exception, the copyright holders of this library give you
-+ permission to link this library with independent modules to produce an
-+ executable, regardless of the license terms of these independent
-+ modules, and to copy and distribute the resulting executable under
-+ terms of your choice, provided that you also meet, for each linked
-+ independent module, the terms and conditions of the license of that
-+ module. An independent module is a module which is not derived from
-+ or based on this library. If you modify this library, you may extend
-+ this exception to your version of the library, but you are not
-+ obligated to do so. If you do not wish to do so, delete this
-+ exception statement from your version. */
++ return data != null && data.length > 0;
++ }
++
++ @Override
++ public byte[][] getMarkerData(int marker) {
++ byte[][] data = null;
++
++ switch (marker) {
++ case APP0_MARKER:
++ case APP1_MARKER:
++ case APP2_MARKER:
++ case APP3_MARKER:
++ case APP4_MARKER:
++ case APP5_MARKER:
++ case APP6_MARKER:
++ case APP7_MARKER:
++ case APP8_MARKER:
++ case APP9_MARKER:
++ case APPA_MARKER:
++ case APPB_MARKER:
++ case APPC_MARKER:
++ case APPD_MARKER:
++ case APPE_MARKER:
++ case APPF_MARKER:
++ data = markers[marker - APP0_MARKER];
++ break;
++ case COMMENT_MARKER:
++ // TODO: Add stuff for comment marker
++ break;
++ default:
++ throw new IllegalArgumentException("Marker provided is invalid");
++ }
++ return data;
++ }
++
++ @Override
++ public int getEncodedColorID() {
++ return colorID;
++ }
++
++ @Override
++ public int getNumComponents() {
++ return numBands;
++ }
++
++ @Override
++ public int getRestartInterval() {
++ return restartInterval;
++ }
++
++ @Override
++ public int getDensityUnit() {
++ if (!getMarker(APP0_MARKER))
++ throw new IllegalArgumentException("APP0 Marker not found.");
++ byte[] data = getValidAPP0Marker();
++
++ if (data == null)
++ throw new IllegalArgumentException("No valid APP0 Marker found");
++
++ return data[7];
++ }
++
++ @Override
++ public int getXDensity() {
++ if (!getMarker(APP0_MARKER))
++ throw new IllegalArgumentException("APP0 Marker not found.");
++ byte[] data = getValidAPP0Marker();
++
++ if (data == null)
++ throw new IllegalArgumentException("No valid APP0 Marker found");
++
++ // data[8] is the upper portion of the density value
++ // data[9] is the lower portion of the density value
++ int upper = data[8] << 8; // Shift it so we can merge with lower value.
++ int lower = data[9] & 0xFF; // Keep it in bounds 0 - 256
++ return upper | lower; // Merge
++
++ }
++
++ @Override
++ public int getYDensity() {
++ if (!getMarker(APP0_MARKER))
++ throw new IllegalArgumentException("APP0 Marker not found.");
++ byte[] data = getValidAPP0Marker();
++
++ if (data == null)
++ throw new IllegalArgumentException("No valid APP0 Marker found");
++
++ // data[10] is the upper portion of the density value
++ // data[11] is the lower portion of the density value
++ int upper = data[10] << 8; // Shift it so we can merge with lower value.
++ int lower = data[11] & 0xFF;// Keep it in bounds 0 - 256
++ return upper | lower; // merge
++ }
++
++ @Override
++ public void setHorizontalSubsampling(int component, int subsample) {
++ if (component < 0 || component > getNumComponents()) {
++ throw new IllegalArgumentException("Invalid component");
++ }
+
-+package com.sun.image.codec.jpeg;
++ horizontalSubsampleComponents[component] = subsample;
++ }
+
-+public class JPEGQTable
-+{
++ @Override
++ public void setVerticalSubsampling(int component, int subsample) {
++ if (component < 0 || component > getNumComponents()) {
++ throw new IllegalArgumentException("Invalid component");
++ }
+
-+}
---- jdk/src/share/classes/com/sun/image/codec/jpeg/TruncatedFileException.java 1969-12-31 19:00:00.000000000 -0500
-+++ jdk/src/share/classes/com/sun/image/codec/jpeg/TruncatedFileException.java 2008-03-31 19:38:37.000000000 -0400
-@@ -0,0 +1,58 @@
-+/* TruncatedFileException.java
-+ Copyright (C) 2007 Matthew Flaschen
++ verticalSubsampleComponents[component] = subsample;
++ }
++
++ @Override
++ public void setQTable(int tableNum, JPEGQTable qTable) {
++ if (tableNum < 0 || tableNum > NUM_TABLES)
++ throw new IllegalArgumentException("tableNum must be [0-"
++ + (NUM_TABLES - 1) + "]");
++
++ this.qTable[tableNum] = qTable;
++ }
++
++ @Override
++ public void setDCHuffmanTable(int tableNum, JPEGHuffmanTable huffTable) {
++ if (tableNum < 0 || tableNum > NUM_TABLES)
++ throw new IllegalArgumentException("tableNum must be [0-"
++ + (NUM_TABLES - 1) + "]");
++
++ dcHuffmanTable[tableNum] = huffTable;
++ }
++
++ @Override
++ public void setACHuffmanTable(int tableNum, JPEGHuffmanTable huffTable) {
++ if (tableNum < 0 || tableNum > NUM_TABLES)
++ throw new IllegalArgumentException("tableNum must be [0-"
++ + (NUM_TABLES - 1) + "]");
++ acHuffmanTable[tableNum] = huffTable;
++ }
++
++ @Override
++ public void setACHuffmanComponentMapping(int component, int table) {
++ if (component < 0 || component > getNumComponents()) {
++ throw new IllegalArgumentException("Invalid component specified.");
++ } else if (table < 0 || table > NUM_TABLES) {
++ throw new IllegalArgumentException("Invalid table specified");
++ }
+
-+ This file is part of IcedTea
++ acHuffmanComponentMapping[component] = table;
++ }
+
-+ IcedTea is free software; you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation; either version 2, or (at your option)
-+ any later version.
++ @Override
++ public void setDCHuffmanComponentMapping(int component, int table) {
++ if (component < 0 || component > getNumComponents()) {
++ throw new IllegalArgumentException("Invalid component specified.");
++ } else if (table < 0 || table > NUM_TABLES) {
++ throw new IllegalArgumentException("Invalid table specified");
++ }
+
-+ IcedTea 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 for more details.
++ dcHuffmanComponentMapping[component] = table;
++ }
+
-+ You should have received a copy of the GNU General Public License
-+ along with GNU Classpath; see the file COPYING. If not, write to the
-+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-+ 02110-1301 USA.
++ @Override
++ public void setQTableComponentMapping(int component, int table) {
++ if (component < 0 || component > getNumComponents()) {
++ throw new IllegalArgumentException("Invalid component specified.");
++ } else if (table < 0 || table > NUM_TABLES) {
++ throw new IllegalArgumentException("Invalid table specified");
++ }
+
-+ Linking this library statically or dynamically with other modules is
-+ making a combined work based on this library. Thus, the terms and
-+ conditions of the GNU General Public License cover the whole
-+ combination.
++ qTableComponentMapping[component] = table;
++ }
+
-+ As a special exception, the copyright holders of this library give you
-+ permission to link this library with independent modules to produce an
-+ executable, regardless of the license terms of these independent
-+ modules, and to copy and distribute the resulting executable under
-+ terms of your choice, provided that you also meet, for each linked
-+ independent module, the terms and conditions of the license of that
-+ module. An independent module is a module which is not derived from
-+ or based on this library. If you modify this library, you may extend
-+ this exception to your version of the library, but you are not
-+ obligated to do so. If you do not wish to do so, delete this
-+ exception statement from your version. */
++ @Override
++ public void setImageInfoValid(boolean flag) {
++ imageInfoValid = flag;
++ }
+
-+package com.sun.image.codec.jpeg;
++ @Override
++ public void setTableInfoValid(boolean flag) {
++ tableInfoValid = flag;
++ }
+
-+import java.awt.image.BufferedImage;
++ @Override
++ public void setMarkerData(int marker, byte[][] data) {
++ if (data == null) {
++ return;
++ }
++
++ switch (marker) {
++ case APP0_MARKER:
++ case APP1_MARKER:
++ case APP2_MARKER:
++ case APP3_MARKER:
++ case APP4_MARKER:
++ case APP5_MARKER:
++ case APP6_MARKER:
++ case APP7_MARKER:
++ case APP8_MARKER:
++ case APP9_MARKER:
++ case APPA_MARKER:
++ case APPB_MARKER:
++ case APPC_MARKER:
++ case APPD_MARKER:
++ case APPE_MARKER:
++ case APPF_MARKER:
++ markers[marker - APP0_MARKER] = data;
++ break;
++ case COMMENT_MARKER:
++ commentMarker = data;
++ break;
++ default:
++ throw new IllegalArgumentException("Marker provided is invalid");
++ }
++ }
+
-+public class TruncatedFileException extends RuntimeException
-+{
-+ public TruncatedFileException()
-+ {
-+ this("");
-+ }
-+
-+ public TruncatedFileException(String s)
-+ {
-+ super(s);
-+ }
-+
-+ public BufferedImage getBufferedImage()
-+ {
-+ return null;
-+ }
++ @Override
++ public void addMarkerData(int marker, byte[] data) {
++ if (data == null) {
++ return;
++ }
++ switch (marker) {
++ case APP0_MARKER:
++ case APP1_MARKER:
++ case APP2_MARKER:
++ case APP3_MARKER:
++ case APP4_MARKER:
++ case APP5_MARKER:
++ case APP6_MARKER:
++ case APP7_MARKER:
++ case APP8_MARKER:
++ case APP9_MARKER:
++ case APPA_MARKER:
++ case APPB_MARKER:
++ case APPC_MARKER:
++ case APPD_MARKER:
++ case APPE_MARKER:
++ case APPF_MARKER:
++ markers[marker - APP0_MARKER] = arrayAdd(markers[marker
++ - APP0_MARKER], data);
++ break;
++ case COMMENT_MARKER:
++ commentMarker = arrayAdd(commentMarker, data);
++ break;
++ default:
++ throw new IllegalArgumentException("Marker provided is invalid");
++ }
++ }
++
++ @Override
++ public void setRestartInterval(int restartInterval) {
++ this.restartInterval = restartInterval;
++ }
++
++ @Override
++ public void setDensityUnit(int unit) {
++ if (unit < 0 || unit > NUM_DENSITY_UNIT) {
++ throw new IllegalArgumentException("Invalid density unit.");
++ }
++
++ byte[] data = getValidAPP0Marker();
++ if (data == null) { // We will create one now.
++ data = createAPP0MarkerData();
++ // markers[0] = array of APP0_MARKER
++ markers[0] = arrayAdd(markers[0], data);
++ }
++
++ data[7] = (byte) unit;
++ }
++
++ @Override
++ public void setXDensity(int density) {
++ byte[] data = getValidAPP0Marker();
++ if (data == null) { // We will create one now.
++ data = createAPP0MarkerData();
++ // markers[0] = array of APP0_MARKER
++ markers[0] = arrayAdd(markers[0], data);
++ }
++
++ byte upper = (byte) (density >>> 8 & 0xFF); // unsigned shift to keep it
++ // positive
++ byte lower = (byte) (density & 0xFF);
++ data[8] = upper;
++ data[9] = lower;
++ }
++
++ @Override
++ public void setYDensity(int density) {
++ byte[] data = getValidAPP0Marker();
++ if (data == null) { // We will create one now.
++ data = createAPP0MarkerData();
++ // markers[0] = array of APP0_MARKER
++ markers[0] = arrayAdd(markers[0], data);
++ }
++
++ byte upper = (byte) (density >>> 8 & 0xFF); // unsigned shift to keep it
++ // positive
++ byte lower = (byte) (density & 0xFF);
++ data[10] = upper;
++ data[11] = lower;
++ }
++
++ public void setWidth(int width) {
++ this.width = width;
++ }
++
++ public void setHeight(int height) {
++ this.height = height;
++ }
++
++ /**
++ * get the quality value.
++ *
++ * @return currently set quality value.
++ */
++ public float getQuality() {
++ return quality;
++ }
++
++ /**
++ * Appends new data to original array
++ *
++ * @param origArr
++ * @param newArr
++ * @return
++ */
++ private byte[][] arrayAdd(byte[][] origArr, byte[] newArr) {
++ byte[][] newData;
++ if (origArr != null) {
++ newData = Arrays.copyOf(origArr, origArr.length + 1);
++ newData[origArr.length] = Arrays.copyOf(newArr, newArr.length);
++ } else {
++ newData = new byte[1][];
++ newData[0] = Arrays.copyOf(newArr, newArr.length);
++ }
++
++ return newData;
++ }
++
++ private byte[] getValidAPP0Marker() {
++ byte[][] app0Markers = getMarkerData(APP0_MARKER);
++ for (int i = 0; i < app0Markers.length; i++) {
++ byte[] data = app0Markers[i];
++ if (data[0] == 'J' && data[1] == 'F' && data[2] == 'I'
++ && data[3] == 'F' && data[4] == 0x0) {
++ if (data[5] <= 1) { // version is 1 or below.
++ // We have a valid JFIF header.
++ return data;
++ }
++ }
++ }
++ return null;
++ }
+}
diff --git a/java/openjdk6/files/patch-set b/java/openjdk6/files/patch-set
index c903e161afb7..ffdb7d6d4c21 100644
--- a/java/openjdk6/files/patch-set
+++ b/java/openjdk6/files/patch-set
@@ -1,5 +1,5 @@
---- Makefile 2011-01-20 18:50:10.000000000 -0500
-+++ Makefile 2011-02-01 17:46:55.000000000 -0500
+--- Makefile 2011-07-05 14:29:12.000000000 -0400
++++ Makefile 2011-07-07 19:17:02.000000000 -0400
@@ -236,6 +236,18 @@
clean: clobber
@@ -19,8 +19,8 @@
#
# Dev builds
#
---- corba/make/common/Defs-bsd.gmk 2011-02-01 17:20:23.000000000 -0500
-+++ corba/make/common/Defs-bsd.gmk 2011-02-01 17:46:55.000000000 -0500
+--- corba/make/common/Defs-bsd.gmk 2011-07-07 19:16:00.000000000 -0400
++++ corba/make/common/Defs-bsd.gmk 2011-07-07 19:17:02.000000000 -0400
@@ -40,18 +40,12 @@
# Get shared JDK settings
include $(BUILDDIR)/common/shared/Defs.gmk
@@ -142,8 +142,8 @@
override OTHER_M4FLAGS = -D__GLIBC__ -DGNU_ASSEMBLER
override SUN_CMM_SUBDIR =
override THREADS_FLAG = native
---- corba/make/common/Defs-linux.gmk 2011-01-20 18:50:17.000000000 -0500
-+++ corba/make/common/Defs-linux.gmk 2011-02-01 17:46:55.000000000 -0500
+--- corba/make/common/Defs-linux.gmk 2011-07-05 14:29:22.000000000 -0400
++++ corba/make/common/Defs-linux.gmk 2011-07-07 19:17:02.000000000 -0400
@@ -290,7 +290,7 @@
override LIBTHREAD =
override MOOT_PRIORITIES = true
@@ -153,8 +153,8 @@
ifeq ($(ARCH), amd64)
override OPENWIN_LIB = $(OPENWIN_HOME)/lib64
else
---- corba/make/common/Defs.gmk 2011-01-20 18:50:17.000000000 -0500
-+++ corba/make/common/Defs.gmk 2011-02-01 17:46:55.000000000 -0500
+--- corba/make/common/Defs.gmk 2011-07-05 14:29:22.000000000 -0400
++++ corba/make/common/Defs.gmk 2011-07-07 19:17:02.000000000 -0400
@@ -53,6 +53,24 @@
_OUTPUTDIR=$(TOPDIR)/build/$(PLATFORM)-$(ARCH)
@@ -190,8 +190,8 @@
endif # PROGRAM
LDLIBS_COMMON += $(EXTRA_LIBS)
---- corba/make/common/Mapfile-vers.gmk 2011-01-20 18:50:17.000000000 -0500
-+++ corba/make/common/Mapfile-vers.gmk 2011-02-01 17:46:55.000000000 -0500
+--- corba/make/common/Mapfile-vers.gmk 2011-07-05 14:29:22.000000000 -0400
++++ corba/make/common/Mapfile-vers.gmk 2011-07-07 19:17:02.000000000 -0400
@@ -77,7 +77,7 @@
endif # PLATFORM
@@ -201,8 +201,8 @@
ifeq ($(VARIANT), OPT)
# OPT build MUST have a mapfile?
---- corba/make/common/shared/Compiler-gcc.gmk 2011-01-20 18:50:17.000000000 -0500
-+++ corba/make/common/shared/Compiler-gcc.gmk 2011-02-01 17:46:55.000000000 -0500
+--- corba/make/common/shared/Compiler-gcc.gmk 2011-07-05 14:29:22.000000000 -0400
++++ corba/make/common/shared/Compiler-gcc.gmk 2011-07-07 19:17:02.000000000 -0400
@@ -100,6 +100,24 @@
endif
@@ -228,8 +228,8 @@
ifeq ($(PLATFORM), solaris)
# Settings specific to Solaris
---- corba/make/common/shared/Compiler.gmk 2011-01-20 18:50:17.000000000 -0500
-+++ corba/make/common/shared/Compiler.gmk 2011-02-01 17:46:55.000000000 -0500
+--- corba/make/common/shared/Compiler.gmk 2011-07-05 14:29:22.000000000 -0400
++++ corba/make/common/shared/Compiler.gmk 2011-07-07 19:17:02.000000000 -0400
@@ -42,6 +42,11 @@
override CC_VERSION = gcc
endif
@@ -242,8 +242,8 @@
# Get the compiler specific settings
include $(BUILDDIR)/common/shared/Compiler-$(CC_VERSION).gmk
---- corba/make/common/shared/Defs-bsd.gmk 2011-02-01 17:20:23.000000000 -0500
-+++ corba/make/common/shared/Defs-bsd.gmk 2011-02-01 17:46:55.000000000 -0500
+--- corba/make/common/shared/Defs-bsd.gmk 2011-07-07 19:16:00.000000000 -0400
++++ corba/make/common/shared/Defs-bsd.gmk 2011-07-07 19:17:02.000000000 -0400
@@ -54,7 +54,7 @@
endef
@@ -262,8 +262,8 @@
endif
# _BOOTDIR1: First choice for a Bootstrap JDK, previous released JDK.
---- corba/make/common/shared/Defs-java.gmk 2011-01-20 18:50:17.000000000 -0500
-+++ corba/make/common/shared/Defs-java.gmk 2011-02-01 17:46:55.000000000 -0500
+--- corba/make/common/shared/Defs-java.gmk 2011-07-05 14:29:22.000000000 -0400
++++ corba/make/common/shared/Defs-java.gmk 2011-07-07 19:17:02.000000000 -0400
@@ -38,7 +38,7 @@
# Suspect this may not be needed anymore.
JAVA_MEM_FLAGS += -Xms$(MAX_VM_MEMORY)m -XX:-Inline
@@ -273,8 +273,8 @@
endif
#
---- corba/make/common/shared/Defs-utils.gmk 2011-01-20 18:50:17.000000000 -0500
-+++ corba/make/common/shared/Defs-utils.gmk 2011-02-01 17:46:55.000000000 -0500
+--- corba/make/common/shared/Defs-utils.gmk 2011-07-05 14:29:22.000000000 -0400
++++ corba/make/common/shared/Defs-utils.gmk 2011-07-07 19:17:02.000000000 -0400
@@ -53,6 +53,13 @@
UTILS_DEVTOOL_PATH=$(USRBIN_PATH)
endif
@@ -322,8 +322,8 @@
+ TAR = $(UTILS_USR_BIN_PATH)tar
+ endif
+endif
---- corba/make/common/shared/Platform.gmk 2011-01-20 18:50:17.000000000 -0500
-+++ corba/make/common/shared/Platform.gmk 2011-02-01 17:46:55.000000000 -0500
+--- corba/make/common/shared/Platform.gmk 2011-07-05 14:29:22.000000000 -0400
++++ corba/make/common/shared/Platform.gmk 2011-07-07 19:17:02.000000000 -0400
@@ -261,6 +261,76 @@
MB_OF_MEMORY := $(shell free -m | fgrep Mem: | sed -e 's@\ \ *@ @g' | cut -d' ' -f2)
endif
@@ -426,8 +426,8 @@
fi)
MIN_VM_MEMORY := $(shell \
if [ $(MAX_VM_MEMORY) -le 128 ] ; then \
---- hotspot/agent/make/Makefile 2011-01-20 18:51:10.000000000 -0500
-+++ hotspot/agent/make/Makefile 2011-02-01 18:02:44.000000000 -0500
+--- hotspot/agent/make/Makefile 2011-07-05 14:30:51.000000000 -0400
++++ hotspot/agent/make/Makefile 2011-07-07 19:17:02.000000000 -0400
@@ -52,6 +52,9 @@
sun.jvm.hotspot.compiler \
sun.jvm.hotspot.debugger \
@@ -468,8 +468,8 @@
sun/jvm/hotspot/runtime/ia64/*.java \
sun/jvm/hotspot/runtime/linux/*.java \
sun/jvm/hotspot/runtime/linux_amd64/*.java \
---- hotspot/agent/src/os/bsd/BsdDebuggerLocal.c 2011-02-01 17:20:22.000000000 -0500
-+++ hotspot/agent/src/os/bsd/BsdDebuggerLocal.c 2011-02-01 17:46:59.000000000 -0500
+--- hotspot/agent/src/os/bsd/BsdDebuggerLocal.c 2011-07-07 19:15:59.000000000 -0400
++++ hotspot/agent/src/os/bsd/BsdDebuggerLocal.c 2011-07-07 19:17:02.000000000 -0400
@@ -22,6 +22,7 @@
*
*/
@@ -609,8 +609,8 @@
#endif /* amd64 */
---- hotspot/agent/src/os/bsd/Makefile 2011-02-01 17:20:22.000000000 -0500
-+++ hotspot/agent/src/os/bsd/Makefile 2011-02-01 17:46:59.000000000 -0500
+--- hotspot/agent/src/os/bsd/Makefile 2011-07-07 19:15:59.000000000 -0400
++++ hotspot/agent/src/os/bsd/Makefile 2011-07-07 19:17:02.000000000 -0400
@@ -22,7 +22,7 @@
#
#
@@ -685,8 +685,8 @@
+ rm -f test.o
+ -rmdir $(ARCH)
---- hotspot/agent/src/os/bsd/elfmacros.h 2011-02-01 17:20:22.000000000 -0500
-+++ hotspot/agent/src/os/bsd/elfmacros.h 2011-02-01 17:46:59.000000000 -0500
+--- hotspot/agent/src/os/bsd/elfmacros.h 2011-07-07 19:15:59.000000000 -0400
++++ hotspot/agent/src/os/bsd/elfmacros.h 2011-07-07 19:17:02.000000000 -0400
@@ -25,16 +25,19 @@
#ifndef _ELFMACROS_H_
#define _ELFMACROS_H_
@@ -722,8 +722,8 @@
#endif
---- hotspot/agent/src/os/bsd/hsearch_r.c 1969-12-31 19:00:00.000000000 -0500
-+++ hotspot/agent/src/os/bsd/hsearch_r.c 2011-02-01 17:46:59.000000000 -0500
+--- hotspot/agent/src/os/bsd/hsearch_r.c 2011-07-07 19:17:02.000000000 -0400
++++ hotspot/agent/src/os/bsd/hsearch_r.c 2011-07-07 19:17:02.000000000 -0400
@@ -0,0 +1,217 @@
+/* Copyright (C) 1993,1995-1997,2002,2005,2007,2008
+ Free Software Foundation, Inc.
@@ -942,8 +942,8 @@
+ *retval = NULL;
+ return 0;
+}
---- hotspot/agent/src/os/bsd/hsearch_r.h 1969-12-31 19:00:00.000000000 -0500
-+++ hotspot/agent/src/os/bsd/hsearch_r.h 2011-02-01 17:46:59.000000000 -0500
+--- hotspot/agent/src/os/bsd/hsearch_r.h 2011-07-07 19:17:02.000000000 -0400
++++ hotspot/agent/src/os/bsd/hsearch_r.h 2011-07-07 19:17:02.000000000 -0400
@@ -0,0 +1,42 @@
+/* Declarations for System V style searching functions.
+ Copyright (C) 1995-1999, 2000 Free Software Foundation, Inc.
@@ -987,8 +987,8 @@
+extern void hdestroy_r (struct hsearch_data *__htab);
+
+#endif /* _HSEARCH_R_H_ */
---- hotspot/agent/src/os/bsd/libproc.h 2011-02-01 17:20:22.000000000 -0500
-+++ hotspot/agent/src/os/bsd/libproc.h 2011-02-01 17:46:59.000000000 -0500
+--- hotspot/agent/src/os/bsd/libproc.h 2011-07-07 19:15:59.000000000 -0400
++++ hotspot/agent/src/os/bsd/libproc.h 2011-07-07 19:17:02.000000000 -0400
@@ -27,7 +27,8 @@
#include <unistd.h>
@@ -1049,8 +1049,8 @@
// get number of shared objects
int get_num_libs(struct ps_prochandle* ph);
---- hotspot/agent/src/os/bsd/libproc_impl.c 2011-02-01 17:20:22.000000000 -0500
-+++ hotspot/agent/src/os/bsd/libproc_impl.c 2011-02-04 18:25:14.000000000 -0500
+--- hotspot/agent/src/os/bsd/libproc_impl.c 2011-07-07 19:15:59.000000000 -0400
++++ hotspot/agent/src/os/bsd/libproc_impl.c 2011-07-07 19:17:02.000000000 -0400
@@ -174,10 +174,13 @@
return NULL;
}
@@ -1193,8 +1193,8 @@
+ print_debug("ps_pcontinue not implemented\n");
return PS_OK;
}
---- hotspot/agent/src/os/bsd/libproc_impl.h 2011-02-01 17:20:22.000000000 -0500
-+++ hotspot/agent/src/os/bsd/libproc_impl.h 2011-02-07 16:41:58.000000000 -0500
+--- hotspot/agent/src/os/bsd/libproc_impl.h 2011-07-07 19:15:59.000000000 -0400
++++ hotspot/agent/src/os/bsd/libproc_impl.h 2011-07-07 19:17:02.000000000 -0400
@@ -47,7 +47,7 @@
typedef struct thread_info {
lwpid_t lwp_id;
@@ -1248,8 +1248,8 @@
// a test for ELF signature without using libelf
bool is_elf_file(int fd);
---- hotspot/agent/src/os/bsd/mapfile 2011-02-01 17:20:22.000000000 -0500
-+++ hotspot/agent/src/os/bsd/mapfile 2011-02-01 17:46:59.000000000 -0500
+--- hotspot/agent/src/os/bsd/mapfile 2011-07-07 19:15:59.000000000 -0400
++++ hotspot/agent/src/os/bsd/mapfile 2011-07-07 19:17:02.000000000 -0400
@@ -43,13 +43,17 @@
# proc_service.h functions - to be used by libthread_db
ps_getpid;
@@ -1271,8 +1271,8 @@
# used by attach test program
init_libproc;
---- hotspot/agent/src/os/bsd/proc_service.h 2011-02-01 17:20:22.000000000 -0500
-+++ hotspot/agent/src/os/bsd/proc_service.h 2011-02-01 17:46:59.000000000 -0500
+--- hotspot/agent/src/os/bsd/proc_service.h 2011-07-07 19:15:59.000000000 -0400
++++ hotspot/agent/src/os/bsd/proc_service.h 2011-07-07 19:17:02.000000000 -0400
@@ -1,76 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
@@ -1350,8 +1350,8 @@
-ps_err_e ps_get_thread_area();
-
-#endif /* _PROC_SERVICE_H_ */
---- hotspot/agent/src/os/bsd/ps_core.c 2011-02-04 17:40:15.000000000 -0500
-+++ hotspot/agent/src/os/bsd/ps_core.c 2011-02-04 18:22:28.000000000 -0500
+--- hotspot/agent/src/os/bsd/ps_core.c 2011-07-07 19:15:59.000000000 -0400
++++ hotspot/agent/src/os/bsd/ps_core.c 2011-07-07 19:17:02.000000000 -0400
@@ -142,6 +142,7 @@
map->next = ph->core->class_share_maps;
@@ -1673,8 +1673,8 @@
struct ps_prochandle* ph = (struct ps_prochandle*) calloc(1, sizeof(struct ps_prochandle));
if (ph == NULL) {
---- hotspot/agent/src/os/bsd/ps_proc.c 2011-02-01 17:20:22.000000000 -0500
-+++ hotspot/agent/src/os/bsd/ps_proc.c 2011-02-04 18:23:14.000000000 -0500
+--- hotspot/agent/src/os/bsd/ps_proc.c 2011-07-07 19:15:59.000000000 -0400
++++ hotspot/agent/src/os/bsd/ps_proc.c 2011-07-07 19:17:02.000000000 -0400
@@ -22,20 +22,22 @@
*
*/
@@ -1706,7 +1706,7 @@
// This file has the libproc implementation specific to live process
// For core files, refer to ps_core.c
-@@ -50,255 +52,365 @@
+@@ -50,253 +52,365 @@
// read "size" bytes of data from "addr" within the target process.
// unlike the standard ptrace() function, process_read_data() can handle
@@ -1801,15 +1801,13 @@
-#define ptrace_getregs(request, pid, addr, data) ptrace(request, pid, data, addr)
-#endif
-
--#ifdef _LP64
--#ifdef PTRACE_GETREGS64
+-#if defined(_LP64) && defined(PTRACE_GETREGS64)
-#define PTRACE_GETREGS_REQ PTRACE_GETREGS64
--#endif
--#else
--#if defined(PTRACE_GETREGS) || defined(PT_GETREGS)
+-#elif defined(PTRACE_GETREGS)
-#define PTRACE_GETREGS_REQ PTRACE_GETREGS
+-#elif defined(PT_GETREGS)
+-#define PTRACE_GETREGS_REQ PT_GETREGS
-#endif
--#endif /* _LP64 */
-
-#ifdef PTRACE_GETREGS_REQ
- if (ptrace_getregs(PTRACE_GETREGS_REQ, pid, user, NULL) < 0) {
@@ -1823,12 +1821,12 @@
- return false;
-#endif
+}
-
++
+// fill in ptrace_lwpinfo for lid
+static bool process_get_lwp_info(struct ps_prochandle *ph, lwpid_t lwp_id, void *linfo) {
+ errno = 0;
+ ptrace(PT_LWPINFO, lwp_id, linfo, sizeof(struct ptrace_lwpinfo));
-+
+
+ return (errno == 0)? true: false;
}
@@ -2124,7 +2122,7 @@
+
+ free(freep);
+
- return true;
++ return true;
+#else
+ char *l_name;
+ struct link_map *lmap;
@@ -2180,7 +2178,7 @@
+ free (l_name);
+ free (lmap);
+
-+ return true;
+ return true;
+#endif
}
@@ -2220,7 +2218,7 @@
};
// attach to the process. One and only one exposed stuff
-@@ -325,21 +437,14 @@
+@@ -323,21 +437,14 @@
// read library info and symbol tables, must do this before attaching threads,
// as the symbols in the pthread library will be used to figure out
// the list of threads within the same process.
@@ -2248,8 +2246,8 @@
- }
return ph;
}
---- hotspot/agent/src/os/bsd/salibelf.c 2011-02-01 17:20:22.000000000 -0500
-+++ hotspot/agent/src/os/bsd/salibelf.c 2011-02-01 17:46:59.000000000 -0500
+--- hotspot/agent/src/os/bsd/salibelf.c 2011-07-07 19:15:59.000000000 -0400
++++ hotspot/agent/src/os/bsd/salibelf.c 2011-07-07 19:17:02.000000000 -0400
@@ -25,6 +25,7 @@
#include "salibelf.h"
#include <stdlib.h>
@@ -2258,8 +2256,8 @@
extern void print_debug(const char*,...);
---- hotspot/agent/src/os/bsd/symtab.c 2011-02-01 17:20:22.000000000 -0500
-+++ hotspot/agent/src/os/bsd/symtab.c 2011-02-01 17:46:59.000000000 -0500
+--- hotspot/agent/src/os/bsd/symtab.c 2011-07-07 19:15:59.000000000 -0400
++++ hotspot/agent/src/os/bsd/symtab.c 2011-07-07 19:17:02.000000000 -0400
@@ -23,10 +23,10 @@
*/
@@ -2659,8 +2657,8 @@
void destroy_symtab(struct symtab* symtab) {
if (!symtab) return;
if (symtab->strs) free(symtab->strs);
---- hotspot/agent/src/os/bsd/symtab.h 2011-02-01 17:20:22.000000000 -0500
-+++ hotspot/agent/src/os/bsd/symtab.h 2011-02-01 17:46:59.000000000 -0500
+--- hotspot/agent/src/os/bsd/symtab.h 2011-07-07 19:15:59.000000000 -0400
++++ hotspot/agent/src/os/bsd/symtab.h 2011-07-07 19:17:02.000000000 -0400
@@ -32,7 +32,7 @@
struct symtab;
@@ -2670,8 +2668,8 @@
// destroy the symbol table
void destroy_symtab(struct symtab* symtab);
---- hotspot/agent/src/os/bsd/test.c 2011-02-01 17:20:22.000000000 -0500
-+++ hotspot/agent/src/os/bsd/test.c 2011-02-01 17:46:59.000000000 -0500
+--- hotspot/agent/src/os/bsd/test.c 2011-07-07 19:15:59.000000000 -0400
++++ hotspot/agent/src/os/bsd/test.c 2011-07-07 19:17:02.000000000 -0400
@@ -44,7 +44,7 @@
}
@@ -2681,8 +2679,8 @@
return 1;
}
}
---- hotspot/agent/src/share/classes/sun/jvm/hotspot/HotSpotAgent.java 2011-01-20 18:51:10.000000000 -0500
-+++ hotspot/agent/src/share/classes/sun/jvm/hotspot/HotSpotAgent.java 2011-02-01 17:46:59.000000000 -0500
+--- hotspot/agent/src/share/classes/sun/jvm/hotspot/HotSpotAgent.java 2011-07-05 14:30:52.000000000 -0400
++++ hotspot/agent/src/share/classes/sun/jvm/hotspot/HotSpotAgent.java 2011-07-07 19:17:02.000000000 -0400
@@ -28,6 +28,7 @@
import java.net.*;
import java.rmi.*;
@@ -2752,8 +2750,8 @@
/** Convenience routine which should be called by per-platform
debugger setup. Should not be called when startupMode is
REMOTE_MODE. */
---- hotspot/agent/src/share/classes/sun/jvm/hotspot/bugspot/BugSpotAgent.java 2011-01-20 18:51:11.000000000 -0500
-+++ hotspot/agent/src/share/classes/sun/jvm/hotspot/bugspot/BugSpotAgent.java 2011-02-01 17:46:59.000000000 -0500
+--- hotspot/agent/src/share/classes/sun/jvm/hotspot/bugspot/BugSpotAgent.java 2011-07-05 14:30:53.000000000 -0400
++++ hotspot/agent/src/share/classes/sun/jvm/hotspot/bugspot/BugSpotAgent.java 2011-07-07 19:17:02.000000000 -0400
@@ -29,6 +29,7 @@
import java.rmi.*;
import sun.jvm.hotspot.*;
@@ -2825,8 +2823,8 @@
/** Convenience routine which should be called by per-platform
debugger setup. Should not be called when startupMode is
REMOTE_MODE. */
---- hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/bsd/BsdCDebugger.java 2011-02-01 17:20:22.000000000 -0500
-+++ hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/bsd/BsdCDebugger.java 2011-02-01 17:46:59.000000000 -0500
+--- hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/bsd/BsdCDebugger.java 2011-07-07 19:16:00.000000000 -0400
++++ hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/bsd/BsdCDebugger.java 2011-07-07 19:17:02.000000000 -0400
@@ -30,10 +30,8 @@
import sun.jvm.hotspot.debugger.cdbg.*;
import sun.jvm.hotspot.debugger.x86.*;
@@ -2852,8 +2850,8 @@
} else {
throw new DebuggerException(cpu + " is not yet supported");
}
---- hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/bsd/BsdThreadContextFactory.java 2011-02-01 17:20:22.000000000 -0500
-+++ hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/bsd/BsdThreadContextFactory.java 2011-02-01 17:46:59.000000000 -0500
+--- hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/bsd/BsdThreadContextFactory.java 2011-07-07 19:16:00.000000000 -0400
++++ hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/bsd/BsdThreadContextFactory.java 2011-07-07 19:17:02.000000000 -0400
@@ -26,9 +26,7 @@
import sun.jvm.hotspot.debugger.*;
@@ -2875,8 +2873,8 @@
} else {
throw new RuntimeException("cpu " + cpu + " is not yet supported");
}
---- hotspot/agent/src/share/classes/sun/jvm/hotspot/jdi/ConnectorImpl.java 2011-01-20 18:51:12.000000000 -0500
-+++ hotspot/agent/src/share/classes/sun/jvm/hotspot/jdi/ConnectorImpl.java 2011-02-07 13:53:33.000000000 -0500
+--- hotspot/agent/src/share/classes/sun/jvm/hotspot/jdi/ConnectorImpl.java 2011-07-05 14:30:54.000000000 -0400
++++ hotspot/agent/src/share/classes/sun/jvm/hotspot/jdi/ConnectorImpl.java 2011-07-07 19:17:02.000000000 -0400
@@ -217,7 +217,7 @@
}
@@ -2886,8 +2884,8 @@
// link "saproc" - SA native library on SunOS and Linux?
sm.checkLink("saproc");
} else if (os.startsWith("Windows")) {
---- hotspot/agent/src/share/classes/sun/jvm/hotspot/jdi/SAPIDAttachingConnector.java 2011-01-20 18:51:12.000000000 -0500
-+++ hotspot/agent/src/share/classes/sun/jvm/hotspot/jdi/SAPIDAttachingConnector.java 2011-02-07 13:46:44.000000000 -0500
+--- hotspot/agent/src/share/classes/sun/jvm/hotspot/jdi/SAPIDAttachingConnector.java 2011-07-05 14:30:54.000000000 -0400
++++ hotspot/agent/src/share/classes/sun/jvm/hotspot/jdi/SAPIDAttachingConnector.java 2011-07-07 19:17:02.000000000 -0400
@@ -66,7 +66,7 @@
try {
// Whether the caller can perform link against SA native library?
@@ -2897,8 +2895,8 @@
// Whether the caller can read /proc/<pid> file?
sm.checkRead("/proc/" + pid);
}
---- hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/Threads.java 2011-01-20 18:51:13.000000000 -0500
-+++ hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/Threads.java 2011-02-01 17:46:59.000000000 -0500
+--- hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/Threads.java 2011-07-05 14:30:55.000000000 -0400
++++ hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/Threads.java 2011-07-07 19:17:02.000000000 -0400
@@ -37,6 +37,8 @@
import sun.jvm.hotspot.runtime.linux_ia64.LinuxIA64JavaThreadPDAccess;
import sun.jvm.hotspot.runtime.linux_amd64.LinuxAMD64JavaThreadPDAccess;
@@ -2922,8 +2920,8 @@
}
if (access == null) {
---- hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/bsd/BsdSignals.java 2011-02-01 17:20:22.000000000 -0500
-+++ hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/bsd/BsdSignals.java 2011-02-01 17:46:59.000000000 -0500
+--- hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/bsd/BsdSignals.java 2011-07-07 19:16:00.000000000 -0400
++++ hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/bsd/BsdSignals.java 2011-07-07 19:17:02.000000000 -0400
@@ -28,37 +28,36 @@
private static String[] signalNames = {
"", /* No signal 0 */
@@ -2984,8 +2982,8 @@
};
public static String getSignalName(int sigNum) {
---- hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/bsd_x86/BsdSignals.java 2011-02-01 17:20:22.000000000 -0500
-+++ hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/bsd_x86/BsdSignals.java 2011-02-01 17:46:59.000000000 -0500
+--- hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/bsd_x86/BsdSignals.java 2011-07-07 19:16:00.000000000 -0400
++++ hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/bsd_x86/BsdSignals.java 2011-07-07 19:17:02.000000000 -0400
@@ -28,37 +28,36 @@
private static String[] signalNames = {
"", /* No signal 0 */
@@ -3046,8 +3044,8 @@
};
public static String getSignalName(int sigNum) {
---- hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/PlatformInfo.java 2011-01-20 18:51:13.000000000 -0500
-+++ hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/PlatformInfo.java 2011-02-01 17:46:59.000000000 -0500
+--- hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/PlatformInfo.java 2011-07-05 14:30:55.000000000 -0400
++++ hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/PlatformInfo.java 2011-07-07 19:17:02.000000000 -0400
@@ -37,6 +37,14 @@
return "solaris";
} else if (os.equals("Linux")) {
@@ -3063,8 +3061,8 @@
} else if (os.startsWith("Windows")) {
return "win32";
} else {
---- hotspot/make/Makefile 2011-01-20 18:51:14.000000000 -0500
-+++ hotspot/make/Makefile 2011-02-01 17:46:59.000000000 -0500
+--- hotspot/make/Makefile 2011-07-05 14:30:56.000000000 -0400
++++ hotspot/make/Makefile 2011-07-07 19:17:02.000000000 -0400
@@ -321,28 +321,28 @@
ifneq ($(OSNAME),windows)
ifeq ($(ZERO_BUILD), true)
@@ -3104,8 +3102,8 @@
$(install-file)
endif
endif
---- hotspot/make/bsd/Makefile 2011-02-01 17:20:22.000000000 -0500
-+++ hotspot/make/bsd/Makefile 2011-02-01 17:46:59.000000000 -0500
+--- hotspot/make/bsd/Makefile 2011-07-07 19:16:00.000000000 -0400
++++ hotspot/make/bsd/Makefile 2011-07-07 19:17:02.000000000 -0400
@@ -39,11 +39,11 @@
# One can set ALT_BOOTDIR or BOOTDIR to point to a jdk that runs on
# an architecture that differs from the target architecture, as long
@@ -3118,8 +3116,8 @@
-# make REMOTE="rsh -l me myotherbsdbox"
+# make REMOTE="rsh -l me myotherlinuxbox"
- # Along with VM, Serviceability Agent (SA) is built for SA/JDI binding.
- # JDI binding on SA produces two binaries:
+ # Along with VM, Serviceability Agent (SA) is built for SA/JDI binding.
+ # JDI binding on SA produces two binaries:
@@ -94,7 +94,7 @@
#
# We only do this on SunOS variants, for a couple of reasons:
@@ -3144,9 +3142,9 @@
OS_VERSION := $(shell uname -r)
EMPTY_IF_NOT_SUPPORTED = $(filter $(SUPPORTED_OS_VERSION),$(OS_VERSION))
---- hotspot/make/bsd/makefiles/buildtree.make 2011-02-01 17:20:22.000000000 -0500
-+++ hotspot/make/bsd/makefiles/buildtree.make 2011-02-01 17:46:59.000000000 -0500
-@@ -287,10 +287,11 @@
+--- hotspot/make/bsd/makefiles/buildtree.make 2011-07-07 19:16:00.000000000 -0400
++++ hotspot/make/bsd/makefiles/buildtree.make 2011-07-07 19:17:02.000000000 -0400
+@@ -303,10 +303,11 @@
[ -n "$$JAVA_HOME" ] && { echo ": \$${JAVA_HOME:=$${JAVA_HOME}}"; }; \
{ \
echo "LD_LIBRARY_PATH=.:$${LD_LIBRARY_PATH:+$$LD_LIBRARY_PATH:}\$${JAVA_HOME}/jre/lib/${LIBARCH}/native_threads:\$${JAVA_HOME}/jre/lib/${LIBARCH}:${GCC_LIB}"; \
@@ -3159,8 +3157,8 @@
) > $@
env.csh: env.sh
---- hotspot/make/bsd/makefiles/cscope.make 2011-02-01 17:20:22.000000000 -0500
-+++ hotspot/make/bsd/makefiles/cscope.make 2011-02-01 17:46:59.000000000 -0500
+--- hotspot/make/bsd/makefiles/cscope.make 2011-07-07 19:16:00.000000000 -0400
++++ hotspot/make/bsd/makefiles/cscope.make 2011-07-07 19:17:02.000000000 -0400
@@ -71,7 +71,7 @@
# OS-specific files for other systems are excluded by default. Use CS_OS=yes
# to include platform-specific files for other platforms.
@@ -3170,8 +3168,8 @@
CS_PRUNE_OS = $(patsubst %,-o -name '*%*',$(filter-out ${OS},${CS_OS}))
endif
---- hotspot/make/bsd/makefiles/defs.make 2011-02-01 17:20:22.000000000 -0500
-+++ hotspot/make/bsd/makefiles/defs.make 2011-02-01 17:46:59.000000000 -0500
+--- hotspot/make/bsd/makefiles/defs.make 2011-07-07 19:16:00.000000000 -0400
++++ hotspot/make/bsd/makefiles/defs.make 2011-07-07 19:17:02.000000000 -0400
@@ -72,8 +72,8 @@
HS_ARCH = sparc
endif
@@ -3278,9 +3276,9 @@
EXPORT_LIST += $(ADD_SA_BINARIES/$(HS_ARCH))
-
-
---- hotspot/make/bsd/makefiles/gcc.make 2011-02-01 17:20:22.000000000 -0500
-+++ hotspot/make/bsd/makefiles/gcc.make 2011-02-01 17:46:59.000000000 -0500
-@@ -22,18 +22,22 @@
+--- hotspot/make/bsd/makefiles/gcc.make 2011-07-07 19:16:00.000000000 -0400
++++ hotspot/make/bsd/makefiles/gcc.make 2011-07-07 19:17:02.000000000 -0400
+@@ -22,20 +22,24 @@
#
#
@@ -3289,7 +3287,9 @@
#------------------------------------------------------------------------
# CC, CPP & AS
- ifdef ALT_COMPILER_PATH
+ # When cross-compiling the ALT_COMPILER_PATH points
+ # to the cross-compilation toolset
+ ifdef CROSS_COMPILE_ARCH
+CXX = $(ALT_COMPILER_PATH)/g++
CPP = $(ALT_COMPILER_PATH)/g++
CC = $(ALT_COMPILER_PATH)/gcc
@@ -3306,7 +3306,7 @@
# -dumpversion in gcc-2.91 shows "egcs-2.91.66". In later version, it only
# prints the numbers (e.g. "2.95", "3.2.1")
-@@ -67,7 +71,7 @@
+@@ -73,7 +77,7 @@
CFLAGS += $(VM_PICFLAG)
CFLAGS += -fno-rtti
CFLAGS += -fno-exceptions
@@ -3315,7 +3315,7 @@
CFLAGS += -fcheck-new
ARCHFLAG = $(ARCHFLAG/$(BUILDARCH))
-@@ -76,10 +80,12 @@
+@@ -82,10 +86,12 @@
ARCHFLAG/ia64 =
ARCHFLAG/sparc = -m32 -mcpu=v9
ARCHFLAG/sparcv9 = -m64 -mcpu=v9
@@ -3331,7 +3331,7 @@
endif
CFLAGS += $(ARCHFLAG)
-@@ -124,6 +130,11 @@
+@@ -130,6 +136,11 @@
CFLAGS_WARN/DEFAULT = $(WARNINGS_ARE_ERRORS) $(ACCEPTABLE_WARNINGS)
# Special cases
CFLAGS_WARN/BYFILE = $(CFLAGS_WARN/$@)$(CFLAGS_WARN/DEFAULT$(CFLAGS_WARN/$@))
@@ -3343,7 +3343,7 @@
# The flags to use for an Optimized g++ build
OPT_CFLAGS += -O3
-@@ -159,28 +170,40 @@
+@@ -175,28 +186,40 @@
LFLAGS += -Wl,-relax
endif
@@ -3401,8 +3401,8 @@
#------------------------------------------------------------------------
# Debug flags
---- hotspot/make/bsd/makefiles/jsig.make 2011-02-01 17:20:22.000000000 -0500
-+++ hotspot/make/bsd/makefiles/jsig.make 2011-02-01 17:46:59.000000000 -0500
+--- hotspot/make/bsd/makefiles/jsig.make 2011-07-07 19:16:00.000000000 -0400
++++ hotspot/make/bsd/makefiles/jsig.make 2011-07-07 19:17:02.000000000 -0400
@@ -25,11 +25,16 @@
# Rules to build signal interposition library, used by vm.make
@@ -3442,9 +3442,9 @@
$(QUIETLY) [ -f $(LIBJSIG_G) ] || { ln -s $@ $(LIBJSIG_G); }
install_jsig: $(LIBJSIG)
---- hotspot/make/bsd/makefiles/launcher.make 2011-02-01 17:20:22.000000000 -0500
-+++ hotspot/make/bsd/makefiles/launcher.make 2011-02-01 17:46:59.000000000 -0500
-@@ -46,7 +46,7 @@
+--- hotspot/make/bsd/makefiles/launcher.make 2011-07-07 19:16:00.000000000 -0400
++++ hotspot/make/bsd/makefiles/launcher.make 2011-07-07 19:17:02.000000000 -0400
+@@ -50,7 +50,7 @@
LIBS_LAUNCHER += $(STATIC_STDCXX) $(LIBS)
else
LAUNCHER.o = launcher.o
@@ -3453,8 +3453,8 @@
LIBS_LAUNCHER += -l$(JVM) $(LIBS)
endif
---- hotspot/make/bsd/makefiles/sa.make 2011-02-01 17:20:22.000000000 -0500
-+++ hotspot/make/bsd/makefiles/sa.make 2011-02-01 17:46:59.000000000 -0500
+--- hotspot/make/bsd/makefiles/sa.make 2011-07-07 19:16:00.000000000 -0400
++++ hotspot/make/bsd/makefiles/sa.make 2011-07-07 19:17:02.000000000 -0400
@@ -45,8 +45,8 @@
# gnumake 3.78.1 does not accept the *s that
@@ -3464,10 +3464,10 @@
+AGENT_FILES1 := $(shell /bin/test -d $(AGENT_DIR) && /bin/ls $(AGENT_FILES1))
+AGENT_FILES2 := $(shell /bin/test -d $(AGENT_DIR) && /bin/ls $(AGENT_FILES2))
- SA_CLASSDIR = $(GENERATED)/saclasses
-
---- hotspot/make/bsd/makefiles/saproc.make 2011-02-01 17:20:22.000000000 -0500
-+++ hotspot/make/bsd/makefiles/saproc.make 2011-02-01 17:46:59.000000000 -0500
+ AGENT_FILES1_LIST := $(GENERATED)/agent1.classes.list
+ AGENT_FILES2_LIST := $(GENERATED)/agent2.classes.list
+--- hotspot/make/bsd/makefiles/saproc.make 2011-07-07 19:16:00.000000000 -0400
++++ hotspot/make/bsd/makefiles/saproc.make 2011-07-07 19:17:02.000000000 -0400
@@ -25,23 +25,34 @@
# Rules to build serviceability agent library, used by vm.make
@@ -3508,9 +3508,9 @@
SAMAPFILE = $(SASRCDIR)/mapfile
-@@ -60,7 +71,10 @@
- $(MAKE) -f vm.make $(LIBSAPROC); \
- fi
+@@ -62,7 +73,10 @@
+ endif
+
-SA_LFLAGS = $(MAPFLAG:FILENAME=$(SAMAPFILE)) $(LDFLAGS_HASH_STYLE)
+ifneq ($(OS_VENDOR), Darwin)
@@ -3520,7 +3520,7 @@
$(LIBSAPROC): $(SASRCFILES) $(SAMAPFILE)
$(QUIETLY) if [ "$(BOOT_JAVA_HOME)" = "" ]; then \
-@@ -73,12 +87,12 @@
+@@ -75,12 +89,12 @@
-I$(SASRCDIR) \
-I$(GENERATED) \
-I$(BOOT_JAVA_HOME)/include \
@@ -3534,10 +3534,10 @@
+ $(SALIBS)
$(QUIETLY) [ -f $(LIBSAPROC_G) ] || { ln -s $@ $(LIBSAPROC_G); }
- install_saproc: checkAndBuildSA
---- hotspot/make/bsd/makefiles/vm.make 2011-02-01 17:20:22.000000000 -0500
-+++ hotspot/make/bsd/makefiles/vm.make 2011-02-01 17:46:59.000000000 -0500
-@@ -90,6 +90,10 @@
+ install_saproc: $(BUILDLIBSAPROC)
+--- hotspot/make/bsd/makefiles/vm.make 2011-07-07 19:16:00.000000000 -0400
++++ hotspot/make/bsd/makefiles/vm.make 2011-07-07 19:17:02.000000000 -0400
+@@ -91,6 +91,10 @@
${JRE_VERSION} \
${VM_DISTRO}
@@ -3548,7 +3548,7 @@
# CFLAGS_WARN holds compiler options to suppress/enable warnings.
CFLAGS += $(CFLAGS_WARN/BYFILE)
-@@ -100,7 +104,7 @@
+@@ -101,7 +105,7 @@
CFLAGS += $(EXTRA_CFLAGS)
LFLAGS += $(EXTRA_CFLAGS)
@@ -3557,7 +3557,7 @@
# By default, link the *.o into the library, not the executable.
LINK_INTO$(LINK_INTO) = LIBJVM
-@@ -114,9 +118,15 @@
+@@ -115,9 +119,15 @@
#----------------------------------------------------------------------
# JVM
@@ -3574,9 +3574,9 @@
+ LIBJVM_G = lib$(JVM)$(G_SUFFIX).so
+endif
- JVM_OBJ_FILES = $(Obj_Files)
-
-@@ -137,15 +147,7 @@
+ CORE_PATHS := $(shell find $(GAMMADIR)/src/share/vm/* -type d \! \( -name adlc -o -name c1 -o -name gc_implementation -o -name opto -o -name shark -o -name libadt \))
+ CORE_PATHS += $(GAMMADIR)/src/os/$(Platform_os_family)/vm
+@@ -196,15 +206,7 @@
vm.def: $(Res_Files) $(Obj_Files)
sh $(GAMMADIR)/make/bsd/makefiles/build_vm_def.sh *.o > $@
@@ -3593,7 +3593,7 @@
ifeq ($(LINK_INTO),AOUT)
LIBJVM.o =
-@@ -157,14 +159,21 @@
+@@ -216,14 +218,21 @@
LFLAGS_VM$(LDNOMAP) += $(MAPFLAG:FILENAME=$(LIBJVM_MAPFILE))
LFLAGS_VM += $(SONAMEFLAG:SONAME=$(LIBJVM))
@@ -3616,15 +3616,15 @@
endif
LIBS_VM += $(LIBS)
-@@ -177,7 +186,6 @@
+@@ -236,7 +245,6 @@
LIBS_VM += $(LLVM_LIBS)
endif
-LINK_VM = $(LINK_LIB.c)
# rule for building precompiled header
- $(PRECOMPILED_HEADER): $(Precompiled_Files)
-@@ -205,11 +213,6 @@
+ $(PRECOMPILED_HEADER):
+@@ -264,11 +272,6 @@
LD_SCRIPT_FLAG = -Wl,-T,$(LD_SCRIPT)
endif
@@ -3636,7 +3636,7 @@
$(LIBJVM): $(LIBJVM.o) $(LIBJVM_MAPFILE) $(LD_SCRIPT)
$(QUIETLY) { \
echo Linking vm...; \
-@@ -219,17 +222,6 @@
+@@ -278,17 +281,6 @@
$(LINK_LIB.CC/POST_HOOK) \
rm -f $@.1; ln -s $@ $@.1; \
[ -f $(LIBJVM_G) ] || { ln -s $@ $(LIBJVM_G); ln -s $@.1 $(LIBJVM_G).1; }; \
@@ -3654,25 +3654,25 @@
}
DEST_JVM = $(JDK_LIBDIR)/$(VM_SUBDIR)/$(LIBJVM)
---- hotspot/make/bsd/platform_amd64 2011-02-01 17:20:22.000000000 -0500
-+++ hotspot/make/bsd/platform_amd64 2011-02-01 17:46:59.000000000 -0500
+--- hotspot/make/bsd/platform_amd64 2011-07-07 19:16:00.000000000 -0400
++++ hotspot/make/bsd/platform_amd64 2011-07-07 19:17:02.000000000 -0400
@@ -12,4 +12,4 @@
compiler = gcc
--sysdefs = -DLINUX -D_GNU_SOURCE -DAMD64
+-sysdefs = -DBSD -D_GNU_SOURCE -DAMD64
+sysdefs = -D_ALLBSD_SOURCE -D_GNU_SOURCE -DAMD64
---- hotspot/make/bsd/platform_i486 2011-02-01 17:20:22.000000000 -0500
-+++ hotspot/make/bsd/platform_i486 2011-02-01 17:46:59.000000000 -0500
+--- hotspot/make/bsd/platform_i486 2011-07-07 19:16:00.000000000 -0400
++++ hotspot/make/bsd/platform_i486 2011-07-07 19:17:02.000000000 -0400
@@ -12,4 +12,4 @@
compiler = gcc
--sysdefs = -DLINUX -D_GNU_SOURCE -DIA32
+-sysdefs = -DBSD -D_GNU_SOURCE -DIA32
+sysdefs = -D_ALLBSD_SOURCE -D_GNU_SOURCE -DIA32
---- hotspot/make/defs.make 2011-01-20 18:51:14.000000000 -0500
-+++ hotspot/make/defs.make 2011-02-01 17:46:59.000000000 -0500
-@@ -119,13 +119,23 @@
+--- hotspot/make/defs.make 2011-07-05 14:30:56.000000000 -0400
++++ hotspot/make/defs.make 2011-07-07 19:17:02.000000000 -0400
+@@ -118,13 +118,23 @@
# Windows should have OS predefined
ifeq ($(OS),)
OS := $(shell uname -s)
@@ -3698,8 +3698,8 @@
else
OSNAME=solaris
endif
---- hotspot/make/sa.files 2011-01-20 18:51:14.000000000 -0500
-+++ hotspot/make/sa.files 2011-02-01 17:46:59.000000000 -0500
+--- hotspot/make/sa.files 2011-07-05 14:30:56.000000000 -0400
++++ hotspot/make/sa.files 2011-07-07 19:17:02.000000000 -0400
@@ -50,6 +50,9 @@
$(AGENT_SRC_DIR)/sun/jvm/hotspot/compiler/*.java \
$(AGENT_SRC_DIR)/sun/jvm/hotspot/debugger/*.java \
@@ -3720,9 +3720,21 @@
$(AGENT_SRC_DIR)/sun/jvm/hotspot/runtime/ia64/*.java \
$(AGENT_SRC_DIR)/sun/jvm/hotspot/runtime/linux/*.java \
$(AGENT_SRC_DIR)/sun/jvm/hotspot/runtime/linux_amd64/*.java \
---- hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp 2011-01-20 18:51:15.000000000 -0500
-+++ hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp 2011-02-01 17:46:59.000000000 -0500
-@@ -469,8 +469,8 @@
+--- hotspot/src/cpu/x86/vm/bytes_x86.hpp 2011-07-05 14:30:57.000000000 -0400
++++ hotspot/src/cpu/x86/vm/bytes_x86.hpp 2011-07-07 19:17:02.000000000 -0400
+@@ -81,6 +81,9 @@
+ #ifdef TARGET_OS_ARCH_windows_x86
+ # include "bytes_windows_x86.inline.hpp"
+ #endif
++#ifdef TARGET_OS_ARCH_bsd_x86
++# include "bytes_bsd_x86.inline.hpp"
++#endif
+
+
+ #endif // CPU_X86_VM_BYTES_X86_HPP
+--- hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp 2011-07-05 14:30:57.000000000 -0400
++++ hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp 2011-07-07 19:17:02.000000000 -0400
+@@ -481,8 +481,8 @@
// Fetch the exception from TLS and clear out exception related thread state
__ get_thread(rsi);
__ movptr(rax, Address(rsi, JavaThread::exception_oop_offset()));
@@ -3733,9 +3745,31 @@
__ bind(_unwind_handler_entry);
__ verify_not_null_oop(rax);
---- hotspot/src/cpu/x86/vm/interp_masm_x86_32.cpp 2011-01-20 18:51:15.000000000 -0500
-+++ hotspot/src/cpu/x86/vm/interp_masm_x86_32.cpp 2011-02-01 17:46:59.000000000 -0500
-@@ -1153,7 +1153,7 @@
+--- hotspot/src/cpu/x86/vm/copy_x86.hpp 2011-07-05 14:30:57.000000000 -0400
++++ hotspot/src/cpu/x86/vm/copy_x86.hpp 2011-07-07 19:17:02.000000000 -0400
+@@ -37,6 +37,9 @@
+ #ifdef TARGET_OS_ARCH_windows_x86
+ # include "copy_windows_x86.inline.hpp"
+ #endif
++#ifdef TARGET_OS_ARCH_bsd_x86
++# include "copy_bsd_x86.inline.hpp"
++#endif
+
+
+ static void pd_fill_to_words(HeapWord* tohw, size_t count, juint value) {
+--- hotspot/src/cpu/x86/vm/interp_masm_x86_32.cpp 2011-07-05 14:30:57.000000000 -0400
++++ hotspot/src/cpu/x86/vm/interp_masm_x86_32.cpp 2011-07-07 19:17:02.000000000 -0400
+@@ -45,6 +45,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "thread_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "thread_bsd.inline.hpp"
++#endif
+
+
+ // Implementation of InterpreterMacroAssembler
+@@ -1170,7 +1173,7 @@
int recvr_offset = in_bytes(VirtualCallData::receiver_offset(start_row));
set_mdp_data_at(mdp, recvr_offset, receiver);
int count_offset = in_bytes(VirtualCallData::receiver_count_offset(start_row));
@@ -3744,7 +3778,7 @@
set_mdp_data_at(mdp, count_offset, reg2);
if (start_row > 0) {
jmp(done);
-@@ -1296,7 +1296,7 @@
+@@ -1313,7 +1316,7 @@
test_method_data_pointer(mdp, profile_continue);
// Build the base (index * per_case_size_in_bytes()) + case_array_offset_in_bytes()
@@ -3753,8 +3787,20 @@
// index is positive and so should have correct value if this code were
// used on 64bits
imulptr(index, reg2);
---- hotspot/src/cpu/x86/vm/jni_x86.h 2011-01-20 18:51:15.000000000 -0500
-+++ hotspot/src/cpu/x86/vm/jni_x86.h 2011-02-01 17:46:59.000000000 -0500
+--- hotspot/src/cpu/x86/vm/interp_masm_x86_64.cpp 2011-07-05 14:30:57.000000000 -0400
++++ hotspot/src/cpu/x86/vm/interp_masm_x86_64.cpp 2011-07-07 19:17:02.000000000 -0400
+@@ -45,6 +45,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "thread_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "thread_bsd.inline.hpp"
++#endif
+
+
+ // Implementation of InterpreterMacroAssembler
+--- hotspot/src/cpu/x86/vm/jni_x86.h 2011-07-05 14:30:57.000000000 -0400
++++ hotspot/src/cpu/x86/vm/jni_x86.h 2011-07-07 19:17:02.000000000 -0400
@@ -26,7 +26,7 @@
#ifndef _JAVASOFT_JNI_MD_H_
#define _JAVASOFT_JNI_MD_H_
@@ -3764,148 +3810,127 @@
#define JNIEXPORT
#define JNIIMPORT
#define JNICALL
---- hotspot/src/os/bsd/launcher/java_md.c 2011-02-01 17:20:22.000000000 -0500
-+++ hotspot/src/os/bsd/launcher/java_md.c 2011-02-01 17:46:59.000000000 -0500
-@@ -45,8 +45,15 @@
- #include "version_comp.h"
+--- hotspot/src/cpu/x86/vm/stubGenerator_x86_32.cpp 2011-07-05 14:30:57.000000000 -0400
++++ hotspot/src/cpu/x86/vm/stubGenerator_x86_32.cpp 2011-07-07 19:17:02.000000000 -0400
+@@ -47,6 +47,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "thread_windows.inline.hpp"
#endif
-
-+#ifdef __APPLE__
-+#define JVM_DLL "libjvm.dylib"
-+#define JAVA_DLL "libjava.dylib"
-+#define LD_LIBRARY_PATH "DYLD_LIBRARY_PATH"
-+#else
- #define JVM_DLL "libjvm.so"
- #define JAVA_DLL "libjava.so"
-+#define LD_LIBRARY_PATH "LD_LIBRARY_PATH"
++#ifdef TARGET_OS_FAMILY_bsd
++# include "thread_bsd.inline.hpp"
+#endif
-
- #ifndef GAMMA /* launcher.make defines ARCH */
-
-@@ -116,7 +123,7 @@
- * A collection of useful strings. One should think of these as #define
- * entries, but actual strings can be more efficient (with many compilers).
- */
--#ifdef __bsd__
-+#ifdef _ALLBSD_SOURCE
- static const char *system_dir = "/usr/java";
- static const char *user_dir = "/java";
- #else /* Solaris */
-@@ -460,10 +467,10 @@
- * If not on Solaris, assume only a single LD_LIBRARY_PATH
- * variable.
- */
-- runpath = getenv("LD_LIBRARY_PATH");
-+ runpath = getenv(LD_LIBRARY_PATH);
- #endif /* __sun */
-
--#ifdef __bsd
-+#ifdef _ALLBSD_SOURCE
- /*
- * On bsd, if a binary is running as sgid or suid, glibc sets
- * LD_LIBRARY_PATH to the empty string for security purposes. (In
-@@ -476,7 +483,7 @@
- * return from the function now. Getting the right libraries to
- * be found must be handled through other mechanisms.
- */
-- if((getgid() != getegid()) || (getuid() != geteuid()) ) {
-+ if(issetugid()) {
- return;
- }
+ #ifdef COMPILER2
+ #include "opto/runtime.hpp"
#endif
-@@ -487,7 +494,7 @@
- new_runpath = MemAlloc( ((runpath!=NULL)?strlen(runpath):0) +
- 2*strlen(jrepath) + 2*strlen(arch) +
- strlen(jvmpath) + 52);
-- newpath = new_runpath + strlen("LD_LIBRARY_PATH=");
-+ newpath = new_runpath + strlen(LD_LIBRARY_PATH "=");
-
-
- /*
-@@ -502,7 +509,7 @@
-
- /* jvmpath, ((running != wanted)?((wanted==64)?"/"BIG_ARCH:"/.."):""), */
-
-- sprintf(new_runpath, "LD_LIBRARY_PATH="
-+ sprintf(new_runpath, LD_LIBRARY_PATH "="
- "%s:"
- "%s/lib/%s:"
- "%s/../lib/%s",
-@@ -840,7 +847,7 @@
- jboolean
- GetApplicationHome(char *buf, jint bufsize)
- {
--#ifdef __bsd__
-+#ifdef _ALLBSD_SOURCE
- char *execname = GetExecname();
- if (execname) {
- strncpy(buf, execname, bufsize-1);
-@@ -1009,7 +1016,7 @@
- }
- }
- }
--#elif defined(__bsd__)
-+#elif defined(__linux__)
- {
- const char* self = "/proc/self/exe";
- char buf[PATH_MAX+1];
-@@ -1019,7 +1026,7 @@
- exec_path = strdup(buf);
- }
- }
--#else /* !__sun && !__bsd */
-+#else /* !__sun && !__linux */
- {
- /* Not implemented */
- }
-@@ -1224,7 +1231,7 @@
-
- #endif /* __sun && i586 */
+--- hotspot/src/cpu/x86/vm/stubGenerator_x86_64.cpp 2011-07-05 14:30:57.000000000 -0400
++++ hotspot/src/cpu/x86/vm/stubGenerator_x86_64.cpp 2011-07-07 19:17:02.000000000 -0400
+@@ -47,6 +47,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "thread_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "thread_bsd.inline.hpp"
++#endif
+ #ifdef COMPILER2
+ #include "opto/runtime.hpp"
+ #endif
+--- hotspot/src/cpu/x86/vm/stubRoutines_x86_32.cpp 2011-07-05 14:30:57.000000000 -0400
++++ hotspot/src/cpu/x86/vm/stubRoutines_x86_32.cpp 2011-07-07 19:17:02.000000000 -0400
+@@ -35,6 +35,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "thread_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "thread_bsd.inline.hpp"
++#endif
--#if defined(__bsd__) && defined(i586)
-+#if defined(_ALLBSD_SOURCE) && defined(i586)
+ // Implementation of the platform-specific part of StubRoutines - for
+ // a description of how to extend it, see the stubRoutines.hpp file.
+--- hotspot/src/cpu/x86/vm/stubRoutines_x86_64.cpp 2011-07-05 14:30:57.000000000 -0400
++++ hotspot/src/cpu/x86/vm/stubRoutines_x86_64.cpp 2011-07-07 19:17:02.000000000 -0400
+@@ -35,6 +35,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "thread_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "thread_bsd.inline.hpp"
++#endif
- /*
- * A utility method for asking the CPU about itself.
-@@ -1290,7 +1297,7 @@
+ // Implementation of the platform-specific part of StubRoutines - for
+ // a description of how to extend it, see the stubRoutines.hpp file.
+--- hotspot/src/cpu/x86/vm/vm_version_x86.cpp 2011-07-05 14:30:57.000000000 -0400
++++ hotspot/src/cpu/x86/vm/vm_version_x86.cpp 2011-07-07 19:17:02.000000000 -0400
+@@ -37,6 +37,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "os_windows.inline.hpp"
#endif
- }
++#ifdef TARGET_OS_FAMILY_bsd
++# include "os_bsd.inline.hpp"
++#endif
--#endif /* __bsd__ && i586 */
-+#endif /* _ALLBSD_SOURCE && i586 */
- #ifdef i586
- /*
-@@ -1469,7 +1476,7 @@
+ int VM_Version::_cpu;
+--- hotspot/src/cpu/zero/vm/bytes_zero.hpp 2011-07-05 14:30:57.000000000 -0400
++++ hotspot/src/cpu/zero/vm/bytes_zero.hpp 2011-07-07 19:17:02.000000000 -0400
+@@ -168,6 +168,9 @@
+ #ifdef TARGET_OS_ARCH_linux_zero
+ # include "bytes_linux_zero.inline.hpp"
+ #endif
++#ifdef TARGET_OS_ARCH_bsd_zero
++# include "bytes_bsd_zero.inline.hpp"
++#endif
- #endif /* __sun && i586 */
+ #endif // VM_LITTLE_ENDIAN
--#if defined(__bsd__) && defined(i586)
-+#if defined(_ALLBSD_SOURCE) && defined(i586)
+--- hotspot/src/cpu/zero/vm/interp_masm_zero.cpp 2011-07-05 14:30:58.000000000 -0400
++++ hotspot/src/cpu/zero/vm/interp_masm_zero.cpp 2011-07-07 19:17:02.000000000 -0400
+@@ -40,5 +40,8 @@
+ #ifdef TARGET_OS_FAMILY_linux
+ # include "thread_linux.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "thread_bsd.inline.hpp"
++#endif
- /* The definition of a server-class machine for bsd-i586 */
- jboolean
-@@ -1500,7 +1507,7 @@
- return result;
- }
+ // This file is intentionally empty
+--- hotspot/src/cpu/zero/vm/stubGenerator_zero.cpp 2011-07-05 14:30:58.000000000 -0400
++++ hotspot/src/cpu/zero/vm/stubGenerator_zero.cpp 2011-07-07 19:17:02.000000000 -0400
+@@ -43,6 +43,9 @@
+ #ifdef TARGET_OS_FAMILY_linux
+ # include "thread_linux.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "thread_bsd.inline.hpp"
++#endif
+ #ifdef COMPILER2
+ #include "opto/runtime.hpp"
+ #endif
+--- hotspot/src/cpu/zero/vm/stubRoutines_zero.cpp 2011-07-05 14:30:58.000000000 -0400
++++ hotspot/src/cpu/zero/vm/stubRoutines_zero.cpp 2011-07-07 19:17:02.000000000 -0400
+@@ -30,6 +30,9 @@
+ #ifdef TARGET_OS_FAMILY_linux
+ # include "thread_linux.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "thread_bsd.inline.hpp"
++#endif
--#endif /* __bsd__ && i586 */
-+#endif /* _ALLBSD_SOURCE && i586 */
+ #ifdef IA32
+ address StubRoutines::x86::_call_stub_compiled_return = NULL;
+--- hotspot/src/cpu/zero/vm/vm_version_zero.cpp 2011-07-05 14:30:58.000000000 -0400
++++ hotspot/src/cpu/zero/vm/vm_version_zero.cpp 2011-07-07 19:17:02.000000000 -0400
+@@ -32,5 +32,8 @@
+ #ifdef TARGET_OS_FAMILY_linux
+ # include "os_linux.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "os_bsd.inline.hpp"
++#endif
- /* Dispatch to the platform-specific definition of "server-class" */
- jboolean
-@@ -1510,7 +1517,7 @@
- result = solaris_sparc_ServerClassMachine();
- #elif defined(__sun) && defined(i586)
- result = solaris_i586_ServerClassMachine();
--#elif defined(__bsd__) && defined(i586)
-+#elif defined(_ALLBSD_SOURCE) && defined(i586)
- result = bsd_i586_ServerClassMachine();
- #else
- if (_launcher_debug) {
---- hotspot/src/os/bsd/vm/attachListener_bsd.cpp 2011-02-01 17:20:22.000000000 -0500
-+++ hotspot/src/os/bsd/vm/attachListener_bsd.cpp 2011-02-02 01:08:04.000000000 -0500
-@@ -167,53 +167,41 @@
+ // This file is intentionally empty
+--- hotspot/src/os/bsd/vm/attachListener_bsd.cpp 2011-07-07 19:15:59.000000000 -0400
++++ hotspot/src/os/bsd/vm/attachListener_bsd.cpp 2011-07-07 19:17:02.000000000 -0400
+@@ -170,53 +170,41 @@
// Initialization - create a listener socket and bind it to a file
int BsdAttachListener::init() {
@@ -3920,10 +3945,10 @@
- int n = snprintf(path, UNIX_PATH_MAX, "%s/.java_pid%d",
- os::get_temp_directory(), os::current_process_id());
-- if (n <= (int)UNIX_PATH_MAX) {
+- if (n < (int)UNIX_PATH_MAX) {
- n = snprintf(initial_path, UNIX_PATH_MAX, "%s.tmp", path);
- }
-- if (n > (int)UNIX_PATH_MAX) {
+- if (n >= (int)UNIX_PATH_MAX) {
- return -1;
- }
-
@@ -3974,7 +3999,7 @@
set_listener(listener);
return 0;
-@@ -334,6 +322,15 @@
+@@ -337,6 +325,15 @@
// get the credentials of the peer and check the effective uid/guid
// - check with jeff on this.
@@ -3990,7 +4015,7 @@
struct ucred cred_info;
socklen_t optlen = sizeof(cred_info);
if (::getsockopt(s, SOL_SOCKET, SO_PEERCRED, (void*)&cred_info, &optlen) == -1) {
-@@ -341,10 +338,13 @@
+@@ -344,10 +341,13 @@
RESTARTABLE(::close(s), res);
continue;
}
@@ -4005,7 +4030,7 @@
int res;
RESTARTABLE(::close(s), res);
continue;
-@@ -464,16 +464,13 @@
+@@ -467,16 +467,13 @@
if (init_at_startup() || is_initialized()) {
return false; // initialized at startup or already initialized
}
@@ -4028,91 +4053,8 @@
if (ret == 0) {
// simple check to avoid starting the attach mechanism when
// a bogus user creates the file
---- hotspot/src/os/bsd/vm/hpi_bsd.cpp 2011-02-01 17:20:22.000000000 -0500
-+++ hotspot/src/os/bsd/vm/hpi_bsd.cpp 2011-02-01 17:46:59.000000000 -0500
-@@ -28,6 +28,14 @@
- # include <sys/param.h>
- # include <dlfcn.h>
-
-+#ifdef __APPLE__
-+#define HPI_LIB "libhpi.dylib"
-+#define HPI_G_LIB "libhpi.dylib"
-+#else
-+#define HPI_LIB "libhpi.so"
-+#define HPI_G_LIB "libhpi.so"
-+#endif
-+
- typedef jint (JNICALL *init_t)(GetInterfaceFunc *, void *);
-
- void hpi::initialize_get_interface(vm_calls_t *callbacks) {
-@@ -45,11 +53,11 @@
- os::jvm_path(buf, JVM_MAXPATHLEN);
-
- #ifdef PRODUCT
-- const char * hpi_lib = "/libhpi.so";
-+ const char * hpi_lib = "/" HPI_LIB;
- #else
- char * ptr = strrchr(buf, '/');
- assert(strstr(ptr, "/libjvm") == ptr, "invalid library name");
-- const char * hpi_lib = strstr(ptr, "_g") ? "/libhpi_g.so" : "/libhpi.so";
-+ const char * hpi_lib = strstr(ptr, "_g") ? "/" HPI_G_LIB : "/" HPI_LIB;
- #endif
-
- *(strrchr(buf, '/')) = '\0'; /* get rid of /libjvm.so */
---- hotspot/src/os/bsd/vm/hpi_bsd.hpp 2011-02-01 17:20:22.000000000 -0500
-+++ hotspot/src/os/bsd/vm/hpi_bsd.hpp 2011-02-01 17:46:59.000000000 -0500
-@@ -36,7 +36,7 @@
- // HPI_FileInterface
-
- inline int hpi::close(int fd) {
-- return ::close(fd);
-+ RESTARTABLE_RETURN_INT(::close(fd));
- }
-
- inline size_t hpi::read(int fd, void *buf, unsigned int nBytes) {
-@@ -55,7 +55,7 @@
- // HPI_SocketInterface
-
- inline int hpi::socket_close(int fd) {
-- return ::close(fd);
-+ RESTARTABLE_RETURN_INT(::close(fd));
- }
-
- inline int hpi::socket(int domain, int type, int protocol) {
-@@ -120,9 +120,9 @@
- // fetch it's value, this cast is safe for now. The java.net group
- // may need and want to change this interface someday if socklen_t goes
- // to 64 bits on some platform that we support.
-- // Bsd doc says this can't return EINTR, unlike accept() on Solaris
-+ // At least OpenBSD and FreeBSD can return EINTR from accept.
-
-- return ::accept(fd, him, (socklen_t *)len);
-+ RESTARTABLE_RETURN_INT(::accept(fd, him, (socklen_t *)len));
- }
-
- inline int hpi::recvfrom(int fd, char *buf, int nBytes, int flags,
-@@ -136,12 +136,16 @@
- }
-
- inline int hpi::socket_available(int fd, jint *pbytes) {
-- // Bsd doc says EINTR not returned, unlike Solaris
-- int ret = ::ioctl(fd, FIONREAD, pbytes);
-+ int ret;
-+
-+ if (fd < 0)
-+ return OS_OK;
-+
-+ RESTARTABLE(::ioctl(fd, FIONREAD, pbytes), ret);
-
- //%% note ioctl can return 0 when successful, JVM_SocketAvailable
- // is expected to return 0 on failure and 1 on success to the jdk.
-- return (ret < 0) ? 0 : 1;
-+ return (ret == OS_ERR) ? 0 : 1;
- }
-
-
---- hotspot/src/os/bsd/vm/jsig.c 2011-02-01 17:20:22.000000000 -0500
-+++ hotspot/src/os/bsd/vm/jsig.c 2011-02-01 17:46:59.000000000 -0500
+--- hotspot/src/os/bsd/vm/jsig.c 2011-07-07 19:15:59.000000000 -0400
++++ hotspot/src/os/bsd/vm/jsig.c 2011-07-07 19:17:02.000000000 -0400
@@ -143,7 +143,8 @@
}
@@ -4123,9 +4065,9 @@
}
static int call_os_sigaction(int sig, const struct sigaction *act,
---- hotspot/src/os/bsd/vm/jvm_bsd.cpp 2011-02-01 17:20:22.000000000 -0500
-+++ hotspot/src/os/bsd/vm/jvm_bsd.cpp 2011-02-01 17:46:59.000000000 -0500
-@@ -144,38 +144,31 @@
+--- hotspot/src/os/bsd/vm/jvm_bsd.cpp 2011-07-07 19:15:59.000000000 -0400
++++ hotspot/src/os/bsd/vm/jvm_bsd.cpp 2011-07-07 19:17:02.000000000 -0400
+@@ -146,38 +146,31 @@
"ILL", SIGILL, /* Illegal instruction (ANSI). */
"TRAP", SIGTRAP, /* Trace trap (POSIX). */
"ABRT", SIGABRT, /* Abort (ANSI). */
@@ -4174,9 +4116,9 @@
};
JVM_ENTRY_NO_ENV(jint, JVM_FindSignal(const char *name))
---- hotspot/src/os/bsd/vm/jvm_bsd.h 2011-02-01 17:20:22.000000000 -0500
-+++ hotspot/src/os/bsd/vm/jvm_bsd.h 2011-02-01 17:46:59.000000000 -0500
-@@ -51,7 +51,11 @@
+--- hotspot/src/os/bsd/vm/jvm_bsd.h 2011-07-07 19:15:59.000000000 -0400
++++ hotspot/src/os/bsd/vm/jvm_bsd.h 2011-07-07 19:17:02.000000000 -0400
+@@ -54,7 +54,11 @@
#define AGENT_ONATTACH_SYMBOLS {"Agent_OnAttach"}
#define JNI_LIB_PREFIX "lib"
@@ -4188,7 +4130,7 @@
// Hack: MAXPATHLEN is 4095 on some Bsd and 4096 on others. This may
// cause problems if JVM and the rest of JDK are built on different
-@@ -90,6 +94,20 @@
+@@ -93,6 +97,20 @@
#define SHUTDOWN2_SIGNAL SIGINT
#define SHUTDOWN3_SIGNAL SIGTERM
@@ -4209,9 +4151,9 @@
#endif /* JVM_MD_H */
// Reconciliation History
---- hotspot/src/os/bsd/vm/osThread_bsd.cpp 2011-02-04 16:15:39.000000000 -0500
-+++ hotspot/src/os/bsd/vm/osThread_bsd.cpp 2011-02-04 16:23:45.000000000 -0500
-@@ -31,8 +31,12 @@
+--- hotspot/src/os/bsd/vm/osThread_bsd.cpp 2011-07-07 19:15:59.000000000 -0400
++++ hotspot/src/os/bsd/vm/osThread_bsd.cpp 2011-07-07 19:17:02.000000000 -0400
+@@ -43,8 +43,12 @@
void OSThread::pd_initialize() {
assert(this != NULL, "check");
@@ -4225,9 +4167,9 @@
_siginfo = NULL;
_ucontext = NULL;
_expanding_stack = 0;
---- hotspot/src/os/bsd/vm/osThread_bsd.hpp 2011-02-04 16:15:39.000000000 -0500
-+++ hotspot/src/os/bsd/vm/osThread_bsd.hpp 2011-02-07 14:29:24.000000000 -0500
-@@ -36,6 +36,7 @@
+--- hotspot/src/os/bsd/vm/osThread_bsd.hpp 2011-07-07 19:15:59.000000000 -0400
++++ hotspot/src/os/bsd/vm/osThread_bsd.hpp 2011-07-07 19:17:02.000000000 -0400
+@@ -39,6 +39,7 @@
private:
@@ -4235,7 +4177,7 @@
// _thread_id is kernel thread id (similar to LWP id on Solaris). Each
// thread has a unique thread_id (BsdThreads or NPTL). It can be used
// to access /proc.
-@@ -44,6 +45,12 @@
+@@ -47,6 +48,12 @@
// _pthread_id is the pthread id, which is used by library calls
// (e.g. pthread_kill).
pthread_t _pthread_id;
@@ -4248,7 +4190,7 @@
sigset_t _caller_sigmask; // Caller's signal mask
-@@ -53,12 +60,22 @@
+@@ -56,12 +63,22 @@
sigset_t caller_sigmask() const { return _caller_sigmask; }
void set_caller_sigmask(sigset_t sigmask) { _caller_sigmask = sigmask; }
@@ -4271,7 +4213,7 @@
#endif
#ifdef ASSERT
// We expect no reposition failures so kill vm if we get one.
-@@ -67,9 +84,15 @@
+@@ -70,9 +87,15 @@
return false;
}
#endif // ASSERT
@@ -4287,16 +4229,17 @@
pthread_t pthread_id() const {
return _pthread_id;
}
---- hotspot/src/os/bsd/vm/os_bsd.cpp 2011-02-04 16:00:23.000000000 -0500
-+++ hotspot/src/os/bsd/vm/os_bsd.cpp 2011-02-08 11:38:39.000000000 -0500
-@@ -39,27 +39,56 @@
- # include <stdio.h>
- # include <unistd.h>
- # include <sys/resource.h>
--# include <pthread.h>
+--- hotspot/src/os/bsd/vm/os_bsd.cpp 2011-07-07 19:15:59.000000000 -0400
++++ hotspot/src/os/bsd/vm/os_bsd.cpp 2011-07-07 19:17:02.000000000 -0400
+@@ -88,7 +88,6 @@
+ # include <sys/mman.h>
# include <sys/stat.h>
- # include <sys/time.h>
- # include <sys/times.h>
+ # include <sys/select.h>
+-# include <pthread.h>
+ # include <signal.h>
+ # include <errno.h>
+ # include <dlfcn.h>
+@@ -102,21 +101,51 @@
# include <sys/utsname.h>
# include <sys/socket.h>
# include <sys/wait.h>
@@ -4319,6 +4262,7 @@
-# include <link.h>
# include <stdint.h>
# include <inttypes.h>
+ # include <sys/ioctl.h>
+#ifdef __FreeBSD__
+#if __FreeBSD_version > 900030
@@ -4348,7 +4292,7 @@
#define MAX_PATH (2 * K)
// for timer info max values which include all bits
-@@ -70,19 +99,25 @@
+@@ -127,19 +156,25 @@
// global variables
julong os::Bsd::_physical_memory = 0;
@@ -4374,7 +4318,7 @@
static jlong initial_time_count=0;
-@@ -100,8 +135,6 @@
+@@ -157,8 +192,6 @@
static int SR_signum = SIGUSR2;
sigset_t SR_sigset;
@@ -4383,7 +4327,7 @@
////////////////////////////////////////////////////////////////////////////////
// utility functions
-@@ -114,11 +147,16 @@
+@@ -171,11 +204,16 @@
}
julong os::Bsd::available_memory() {
@@ -4400,7 +4344,7 @@
}
julong os::physical_memory() {
-@@ -166,6 +204,7 @@
+@@ -223,6 +261,7 @@
}
@@ -4408,7 +4352,7 @@
#ifndef SYS_gettid
// i386: 224, ia64: 1105, amd64: 186, sparc 143
#ifdef __ia64__
-@@ -180,6 +219,7 @@
+@@ -237,6 +276,7 @@
#error define gettid for the arch
#endif
#endif
@@ -4416,7 +4360,7 @@
// Cpu architecture string
#if defined(ZERO)
-@@ -210,28 +250,58 @@
+@@ -267,28 +307,58 @@
// Returns the kernel thread id of the currently running thread. Kernel
// thread id is used to access /proc.
//
@@ -4493,7 +4437,7 @@
void os::Bsd::initialize_system_info() {
set_processor_count(sysconf(_SC_NPROCESSORS_CONF));
if (processor_count() == 1) {
-@@ -248,6 +318,7 @@
+@@ -305,6 +375,7 @@
_physical_memory = (julong)sysconf(_SC_PHYS_PAGES) * (julong)sysconf(_SC_PAGESIZE);
assert(processor_count() > 0, "bsd error");
}
@@ -4501,7 +4445,7 @@
void os::init_system_properties_values() {
// char arch[12];
-@@ -291,9 +362,7 @@
+@@ -348,9 +419,7 @@
* ...
* 7: The default directories, normally /lib and /usr/lib.
*/
@@ -4512,7 +4456,7 @@
#define DEFAULT_LIBPATH "/lib:/usr/lib"
#endif
-@@ -372,7 +441,11 @@
+@@ -429,7 +498,11 @@
* should always exist (until the legacy problem cited above is
* addressed).
*/
@@ -4524,7 +4468,7 @@
if (v != NULL) {
char *t = ld_library_path;
/* That's +1 for the colon and +1 for the trailing '\0' */
-@@ -531,6 +604,7 @@
+@@ -588,6 +661,7 @@
}
}
@@ -4532,7 +4476,7 @@
//////////////////////////////////////////////////////////////////////////////
// detecting pthread library
-@@ -694,6 +768,7 @@
+@@ -751,6 +825,7 @@
}
return false;
}
@@ -4540,7 +4484,7 @@
//////////////////////////////////////////////////////////////////////////////
// create new thread
-@@ -702,6 +777,9 @@
+@@ -759,6 +834,9 @@
// check if it's safe to start a new thread
static bool _thread_safety_check(Thread* thread) {
@@ -4550,7 +4494,7 @@
if (os::Bsd::is_BsdThreads() && !os::Bsd::is_floating_stack()) {
// Fixed stack BsdThreads (SuSE Bsd/x86, and some versions of Redhat)
// Heap is mmap'ed at lower end of memory space. Thread stacks are
-@@ -735,6 +813,7 @@
+@@ -792,6 +870,7 @@
// here, that means enough space has been reserved for stack.
return true;
}
@@ -4558,7 +4502,7 @@
}
// Thread start routine for all newly created threads
-@@ -762,15 +841,22 @@
+@@ -819,15 +898,22 @@
return NULL;
}
@@ -4581,7 +4525,7 @@
// initialize signal mask for this thread
os::Bsd::hotspot_sigmask(thread);
-@@ -851,17 +937,22 @@
+@@ -910,17 +996,22 @@
// let pthread_create() pick the default value.
}
@@ -4604,7 +4548,7 @@
pthread_t tid;
int ret = pthread_create(&tid, &attr, (void* (*)(void*)) java_start, thread);
-@@ -875,7 +966,9 @@
+@@ -934,7 +1025,9 @@
// Need to clean up stuff we've allocated so far
thread->set_osthread(NULL);
delete osthread;
@@ -4614,7 +4558,7 @@
return false;
}
-@@ -891,9 +984,11 @@
+@@ -950,9 +1043,11 @@
}
}
@@ -4626,7 +4570,7 @@
}
// Aborted due to thread limit being reached
-@@ -931,7 +1026,11 @@
+@@ -990,7 +1085,11 @@
}
// Store pthread info into the OSThread
@@ -4638,7 +4582,7 @@
osthread->set_pthread_id(::pthread_self());
// initialize floating point control register
-@@ -942,6 +1041,7 @@
+@@ -1001,6 +1100,7 @@
thread->set_osthread(osthread);
@@ -4646,7 +4590,7 @@
if (UseNUMA) {
int lgrp_id = os::numa_get_group_id();
if (lgrp_id != -1) {
-@@ -968,6 +1068,7 @@
+@@ -1027,6 +1127,7 @@
os::Bsd::manually_expand_stack(jt, addr);
osthread->clear_expanding_stack();
}
@@ -4654,7 +4598,7 @@
// initialize signal mask for this thread
// and save the caller's signal mask
-@@ -1026,6 +1127,7 @@
+@@ -1085,6 +1186,7 @@
//////////////////////////////////////////////////////////////////////////////
// initial thread
@@ -4662,7 +4606,7 @@
// Check if current thread is the initial thread, similar to Solaris thr_main.
bool os::Bsd::is_initial_thread(void) {
char dummy;
-@@ -1262,6 +1364,7 @@
+@@ -1321,6 +1423,7 @@
_initial_thread_stack_size = align_size_down(_initial_thread_stack_size, page_size());
_initial_thread_stack_bottom = (address)stack_top - _initial_thread_stack_size;
}
@@ -4670,7 +4614,7 @@
////////////////////////////////////////////////////////////////////////////////
// time support
-@@ -1283,9 +1386,7 @@
+@@ -1342,9 +1445,7 @@
return (1000 * 1000);
}
@@ -4681,7 +4625,7 @@
bool os::supports_vtime() { return false; }
bool os::enable_vtime() { return false; }
bool os::vtime_enabled() { return false; }
-@@ -1305,6 +1406,21 @@
+@@ -1364,6 +1465,21 @@
#define CLOCK_MONOTONIC (1)
#endif
@@ -4703,7 +4647,7 @@
void os::Bsd::clock_init() {
// we do dlopen's in this particular order due to bug in bsd
// dynamical loader (see 6348968) leading to crash on exit
-@@ -1340,7 +1456,9 @@
+@@ -1399,7 +1515,9 @@
}
}
}
@@ -4713,7 +4657,7 @@
#ifndef SYS_clock_getres
#if defined(IA32) || defined(AMD64)
-@@ -1381,6 +1499,7 @@
+@@ -1440,6 +1558,7 @@
_pthread_getcpuclockid = pthread_getcpuclockid_func;
}
}
@@ -4721,7 +4665,7 @@
jlong os::javaTimeNanos() {
if (Bsd::supports_monotonic_clock()) {
-@@ -1531,7 +1650,14 @@
+@@ -1608,7 +1727,14 @@
// DLL functions
@@ -4737,7 +4681,7 @@
// This must be hard coded because it's the system's temporary
// directory not the java application's temp directory, ala java.io.tmpdir.
-@@ -1551,13 +1677,13 @@
+@@ -1628,13 +1754,13 @@
const size_t pnamelen = pname ? strlen(pname) : 0;
// Quietly truncate on buffer overflow. Should be an error.
@@ -4753,7 +4697,7 @@
} else if (strchr(pname, *os::path_separator()) != NULL) {
int n;
char** pelements = split_path(pname, &n);
-@@ -1566,7 +1692,8 @@
+@@ -1643,7 +1769,8 @@
if (pelements[i] == NULL || strlen(pelements[i]) == 0) {
continue; // skip the empty path values
}
@@ -4763,7 +4707,7 @@
if (file_exists(buffer)) {
break;
}
-@@ -1581,7 +1708,7 @@
+@@ -1658,7 +1785,7 @@
FREE_C_HEAP_ARRAY(char*, pelements);
}
} else {
@@ -4772,8 +4716,8 @@
}
}
-@@ -1622,6 +1749,23 @@
- }
+@@ -1708,6 +1835,23 @@
+ return false;
}
+#ifdef _ALLBSD_SOURCE
@@ -4796,7 +4740,7 @@
struct _address_to_library_name {
address addr; // input : memory address
size_t buflen; // size of fname
-@@ -1696,11 +1840,27 @@
+@@ -1782,11 +1926,27 @@
return false;
}
}
@@ -4813,18 +4757,18 @@
+ // Successful loading
+ return result;
+ }
-+
+
+ // Read system error message into ebuf
+ ::strncpy(ebuf, ::dlerror(), ebuflen-1);
+ ebuf[ebuflen-1]='\0';
-
++
+ return NULL;
+}
+#else
void * os::dll_load(const char *filename, char *ebuf, int ebuflen)
{
void * result= ::dlopen(filename, RTLD_LAZY);
-@@ -1753,6 +1913,26 @@
+@@ -1839,6 +1999,26 @@
#define EM_486 6 /* Intel 80486 */
#endif
@@ -4851,7 +4795,7 @@
static const arch_t arch_array[]={
{EM_386, EM_386, ELFCLASS32, ELFDATA2LSB, (char*)"IA 32"},
{EM_486, EM_386, ELFCLASS32, ELFDATA2LSB, (char*)"IA 32"},
-@@ -1856,17 +2036,11 @@
+@@ -1942,17 +2122,11 @@
return NULL;
}
@@ -4872,7 +4816,7 @@
}
-@@ -1889,7 +2063,51 @@
+@@ -1975,7 +2149,51 @@
void os::print_dll_info(outputStream *st) {
st->print_cr("Dynamic libraries:");
@@ -4925,7 +4869,7 @@
char fname[32];
pid_t pid = os::Bsd::gettid();
-@@ -1898,6 +2116,7 @@
+@@ -1984,6 +2202,7 @@
if (!_print_ascii_file(fname, st)) {
st->print("Can not get library information for pid = %d\n", pid);
}
@@ -4933,7 +4877,7 @@
}
-@@ -1932,6 +2151,7 @@
+@@ -2018,6 +2237,7 @@
st->print(name.machine);
st->cr();
@@ -4941,7 +4885,7 @@
// Print warning if unsafe chroot environment detected
if (unsafe_chroot_detected) {
st->print("WARNING!! ");
-@@ -1946,6 +2166,7 @@
+@@ -2032,6 +2252,7 @@
st->print("(%s stack)", os::Bsd::is_floating_stack() ? "floating" : "fixed");
}
st->cr();
@@ -4949,7 +4893,7 @@
// rlimit
st->print("rlimit:");
-@@ -1971,6 +2192,7 @@
+@@ -2057,6 +2278,7 @@
if (rlim.rlim_cur == RLIM_INFINITY) st->print("infinity");
else st->print("%d", rlim.rlim_cur);
@@ -4957,7 +4901,7 @@
st->print(", AS ");
getrlimit(RLIMIT_AS, &rlim);
if (rlim.rlim_cur == RLIM_INFINITY) st->print("infinity");
-@@ -1983,11 +2205,7 @@
+@@ -2069,11 +2291,7 @@
os::loadavg(loadavg, 3);
st->print("%0.02f %0.02f %0.02f", loadavg[0], loadavg[1], loadavg[2]);
st->cr();
@@ -4970,7 +4914,7 @@
}
void os::print_memory_info(outputStream* st) {
-@@ -1995,18 +2213,27 @@
+@@ -2081,18 +2299,27 @@
st->print("Memory:");
st->print(" %dk page", os::vm_page_size()>>10);
@@ -4998,7 +4942,7 @@
st->cr();
}
-@@ -2249,19 +2476,29 @@
+@@ -2333,19 +2560,29 @@
static volatile jint pending_signals[NSIG+1] = { 0 };
// Bsd(POSIX) specific hand shaking semaphore.
@@ -5030,7 +4974,7 @@
}
static int check_pending_signals(bool wait) {
-@@ -2283,7 +2520,7 @@
+@@ -2367,7 +2604,7 @@
do {
thread->set_suspend_equivalent();
// cleared by handle_special_suspend_equivalent_condition() or java_suspend_self()
@@ -5039,7 +4983,7 @@
// were we externally suspended while we were waiting?
threadIsSuspended = thread->handle_special_suspend_equivalent_condition();
-@@ -2294,7 +2531,7 @@
+@@ -2378,7 +2615,7 @@
// while suspended because that would surprise the thread that
// suspended us.
//
@@ -5048,7 +4992,7 @@
thread->java_suspend_self();
}
-@@ -2338,10 +2575,10 @@
+@@ -2422,10 +2659,10 @@
return;
}
@@ -5061,7 +5005,7 @@
os::get_temp_directory(), os::current_process_id(), num);
unlink(buf);
-@@ -2367,9 +2604,14 @@
+@@ -2451,9 +2688,14 @@
// problem.
bool os::commit_memory(char* addr, size_t size, bool exec) {
int prot = exec ? PROT_READ|PROT_WRITE|PROT_EXEC : PROT_READ|PROT_WRITE;
@@ -5076,7 +5020,7 @@
}
bool os::commit_memory(char* addr, size_t size, size_t alignment_hint,
-@@ -2385,36 +2627,27 @@
+@@ -2469,36 +2711,27 @@
}
void os::numa_make_global(char *addr, size_t bytes) {
@@ -5118,7 +5062,7 @@
}
bool os::get_page_info(char *start, page_info* info) {
-@@ -2425,6 +2658,7 @@
+@@ -2509,6 +2742,7 @@
return end;
}
@@ -5126,7 +5070,7 @@
extern "C" void numa_warn(int number, char *where, ...) { }
extern "C" void numa_error(char *where) { }
-@@ -2526,104 +2760,26 @@
+@@ -2610,104 +2844,26 @@
os::Bsd::numa_tonode_memory_func_t os::Bsd::_numa_tonode_memory;
os::Bsd::numa_interleave_memory_func_t os::Bsd::_numa_interleave_memory;
unsigned long* os::Bsd::_numa_all_nodes;
@@ -5238,7 +5182,7 @@
return os::uncommit_memory(addr, size);
}
-@@ -2728,6 +2884,9 @@
+@@ -2812,6 +2968,9 @@
static size_t _large_page_size = 0;
bool os::large_page_init() {
@@ -5248,7 +5192,7 @@
if (!UseLargePages) return false;
if (LargePageSizeInBytes) {
-@@ -2785,6 +2944,7 @@
+@@ -2869,6 +3028,7 @@
// We optimistically assume the support is available. If later it turns out
// not true, VM will automatically switch to use regular page size.
return true;
@@ -5256,7 +5200,7 @@
}
#ifndef SHM_HUGETLB
-@@ -2961,7 +3121,7 @@
+@@ -3045,7 +3205,7 @@
}
size_t os::read(int fd, void *buf, unsigned int nBytes) {
@@ -5265,7 +5209,7 @@
}
// TODO-FIXME: reconcile Solaris' os::sleep with the bsd variation.
-@@ -3097,6 +3257,44 @@
+@@ -3181,6 +3341,44 @@
// this reason, the code should not be used as default (ThreadPriorityPolicy=0).
// It is only used when ThreadPriorityPolicy=1 and requires root privilege.
@@ -5310,7 +5254,7 @@
int os::java_to_os_priority[MaxPriority + 1] = {
19, // 0 Entry should never be used
-@@ -3114,6 +3312,7 @@
+@@ -3198,6 +3396,7 @@
-5 // 10 MaxPriority
};
@@ -5318,7 +5262,7 @@
static int prio_init() {
if (ThreadPriorityPolicy == 1) {
-@@ -3133,8 +3332,28 @@
+@@ -3217,8 +3416,28 @@
OSReturn os::set_native_priority(Thread* thread, int newpri) {
if ( !UseThreadPriorities || ThreadPriorityPolicy == 0 ) return OS_OK;
@@ -5347,7 +5291,7 @@
}
OSReturn os::get_native_priority(const Thread* const thread, int *priority_ptr) {
-@@ -3144,7 +3363,17 @@
+@@ -3228,7 +3447,17 @@
}
errno = 0;
@@ -5365,7 +5309,7 @@
return (*priority_ptr != -1 || errno == 0 ? OS_OK : OS_ERR);
}
-@@ -3254,7 +3483,7 @@
+@@ -3338,7 +3567,7 @@
/* Get signal number to use for suspend/resume */
if ((s = ::getenv("_JAVA_SR_SIGNUM")) != 0) {
int sig = ::strtol(s, 0, 10);
@@ -5374,7 +5318,7 @@
SR_signum = sig;
}
}
-@@ -3598,6 +3827,28 @@
+@@ -3682,6 +3911,28 @@
set_signal_handler(SIGFPE, true);
set_signal_handler(SIGXFSZ, true);
@@ -5403,7 +5347,7 @@
if (libjsig_is_loaded) {
// Tell libjsig jvm finishes setting signal handlers
(*end_signal_setting)();
-@@ -3618,6 +3869,7 @@
+@@ -3702,6 +3953,7 @@
}
}
@@ -5411,7 +5355,7 @@
// This is the fastest way to get thread cpu time on Bsd.
// Returns cpu time (user+sys) for any thread, not only for current.
// POSIX compliant clocks are implemented in the kernels 2.6.16+.
-@@ -3632,6 +3884,7 @@
+@@ -3716,6 +3968,7 @@
return (tp.tv_sec * SEC_IN_NANOSECS) + tp.tv_nsec;
}
@@ -5419,7 +5363,7 @@
/////
// glibc on Bsd platform uses non-documented flag
-@@ -3853,13 +4106,13 @@
+@@ -3937,13 +4190,13 @@
_initial_pid = (java_launcher_pid > 0) ? java_launcher_pid : getpid();
@@ -5435,7 +5379,7 @@
if (Bsd::page_size() == -1) {
fatal(err_msg("os_bsd.cpp: os::init: sysconf failed (%s)",
strerror(errno)));
-@@ -3873,7 +4126,16 @@
+@@ -3957,7 +4210,16 @@
Bsd::clock_init();
initial_time_count = os::elapsed_counter();
@@ -5453,7 +5397,7 @@
}
// To install functions for atexit system call
-@@ -3886,7 +4148,9 @@
+@@ -3970,7 +4232,9 @@
// this is called _after_ the global arguments have been parsed
jint os::init_2(void)
{
@@ -5463,7 +5407,7 @@
// Allocate a single page and mark it as readable for safepoint polling
address polling_page = (address) ::mmap(NULL, Bsd::page_size(), PROT_READ, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
-@@ -3935,6 +4199,7 @@
+@@ -4028,6 +4292,7 @@
JavaThread::set_stack_size_at_create(round_to(threadStackSizeInBytes,
vm_page_size()));
@@ -5471,7 +5415,7 @@
Bsd::capture_initial_stack(JavaThread::stack_size_at_create());
Bsd::libpthread_init();
-@@ -3957,6 +4222,7 @@
+@@ -4050,6 +4315,7 @@
UseNUMA = true;
}
}
@@ -5479,7 +5423,7 @@
if (MaxFDLimit) {
// set the number of file descriptors to max. print out error
-@@ -3968,6 +4234,14 @@
+@@ -4061,6 +4327,14 @@
perror("os::init_2 getrlimit failed");
} else {
nbr_files.rlim_cur = nbr_files.rlim_max;
@@ -5494,7 +5438,7 @@
status = setrlimit(RLIMIT_NOFILE, &nbr_files);
if (status != 0) {
if (PrintMiscellaneous && (Verbose || WizardMode))
-@@ -3976,8 +4250,10 @@
+@@ -4069,8 +4343,10 @@
}
}
@@ -5503,9 +5447,9 @@
Bsd::set_createThread_lock(new Mutex(Mutex::leaf, "createThread_lock", false));
+#endif
- // Initialize HPI.
- jint hpi_result = hpi::initialize();
-@@ -4028,11 +4304,15 @@
+ // at-exit methods are called in the reverse order of their registration.
+ // atexit functions are called on return from main or as a result of a
+@@ -4114,11 +4390,15 @@
};
int os::active_processor_count() {
@@ -5521,7 +5465,7 @@
}
bool os::distribute_processes(uint length, uint* distribution) {
-@@ -4074,6 +4354,9 @@
+@@ -4160,6 +4440,9 @@
int os::Bsd::safe_cond_timedwait(pthread_cond_t *_cond, pthread_mutex_t *_mutex, const struct timespec *_abstime)
{
@@ -5531,7 +5475,7 @@
if (is_NPTL()) {
return pthread_cond_timedwait(_cond, _mutex, _abstime);
} else {
-@@ -4089,6 +4372,7 @@
+@@ -4175,6 +4458,7 @@
#endif // IA64
return status;
}
@@ -5539,7 +5483,26 @@
}
////////////////////////////////////////////////////////////////////////////////
-@@ -4221,17 +4505,17 @@
+@@ -4322,14 +4606,14 @@
+ int o_delete = (oflag & O_DELETE);
+ oflag = oflag & ~O_DELETE;
+
+- fd = ::open64(path, oflag, mode);
++ fd = ::open(path, oflag, mode);
+ if (fd == -1) return -1;
+
+ //If the open succeeded, the file might still be a directory
+ {
+- struct stat64 buf64;
+- int ret = ::fstat64(fd, &buf64);
+- int st_mode = buf64.st_mode;
++ struct stat buf;
++ int ret = ::fstat(fd, &buf);
++ int st_mode = buf.st_mode;
+
+ if (ret != -1) {
+ if ((st_mode & S_IFMT) == S_IFDIR) {
+@@ -4386,17 +4670,17 @@
if (!rewrite_existing) {
oflags |= O_EXCL;
}
@@ -5559,8 +5522,37 @@
+ return (jlong)::lseek(fd, (off_t)offset, SEEK_SET);
}
- // Map a block of memory.
-@@ -4281,6 +4565,7 @@
+ // This code originates from JDK's sysAvailable
+@@ -4405,10 +4689,10 @@
+ int os::available(int fd, jlong *bytes) {
+ jlong cur, end;
+ int mode;
+- struct stat64 buf64;
++ struct stat buf;
+
+- if (::fstat64(fd, &buf64) >= 0) {
+- mode = buf64.st_mode;
++ if (::fstat(fd, &buf) >= 0) {
++ mode = buf.st_mode;
+ if (S_ISCHR(mode) || S_ISFIFO(mode) || S_ISSOCK(mode)) {
+ /*
+ * XXX: is the following call interruptible? If so, this might
+@@ -4422,11 +4706,11 @@
+ }
+ }
+ }
+- if ((cur = ::lseek64(fd, 0L, SEEK_CUR)) == -1) {
++ if ((cur = ::lseek(fd, 0L, SEEK_CUR)) == -1) {
+ return 0;
+- } else if ((end = ::lseek64(fd, 0L, SEEK_END)) == -1) {
++ } else if ((end = ::lseek(fd, 0L, SEEK_END)) == -1) {
+ return 0;
+- } else if (::lseek64(fd, cur, SEEK_SET) == -1) {
++ } else if (::lseek(fd, cur, SEEK_SET) == -1) {
+ return 0;
+ }
+ *bytes = end - cur;
+@@ -4489,6 +4773,7 @@
return munmap(addr, bytes) == 0;
}
@@ -5568,7 +5560,7 @@
static jlong slow_thread_cpu_time(Thread *thread, bool user_sys_cpu_time);
static clockid_t thread_cpu_clockid(Thread* thread) {
-@@ -4292,6 +4577,7 @@
+@@ -4500,6 +4785,7 @@
assert(rc == 0, "pthread_getcpuclockid is expected to return 0 code");
return clockid;
}
@@ -5576,7 +5568,7 @@
// current_thread_cpu_time(bool) and thread_cpu_time(Thread*, bool)
// are used by JVM M&M and JVMTI to get user+sys or user CPU time
-@@ -4301,39 +4587,71 @@
+@@ -4509,39 +4795,71 @@
// the fast estimate available on the platform.
jlong os::current_thread_cpu_time() {
@@ -5648,7 +5640,7 @@
//
// -1 on error.
//
-@@ -4423,6 +4741,7 @@
+@@ -4631,6 +4949,7 @@
return (jlong)user_time * (1000000000 / clock_tics_per_sec);
}
}
@@ -5656,7 +5648,7 @@
void os::current_thread_cpu_time_info(jvmtiTimerInfo *info_ptr) {
info_ptr->max_value = ALL_64_BITS; // will not wrap in less than 64 bits
-@@ -4439,7 +4758,13 @@
+@@ -4647,7 +4966,13 @@
}
bool os::is_thread_cpu_time_supported() {
@@ -5670,7 +5662,7 @@
}
// System loadavg support. Returns -1 if load average cannot be obtained.
-@@ -4572,7 +4897,7 @@
+@@ -4780,7 +5105,7 @@
// abstime will be the absolute timeout time
// TODO: replace compute_abstime() with unpackTime()
@@ -5679,7 +5671,7 @@
if (millis < 0) millis = 0;
struct timeval now;
int status = gettimeofday(&now, NULL);
-@@ -4624,7 +4949,7 @@
+@@ -4832,7 +5157,7 @@
status = pthread_cond_wait(_cond, _mutex);
// for some reason, under 2.7 lwp_cond_wait() may return ETIME ...
// Treat this the same as if the wait was interrupted
@@ -5688,7 +5680,7 @@
assert_status(status == 0 || status == EINTR, status, "cond_wait");
}
-- _nParked ;
-@@ -4682,10 +5007,10 @@
+@@ -4890,10 +5215,10 @@
pthread_cond_init (_cond, NULL) ;
}
assert_status(status == 0 || status == EINTR ||
@@ -5701,7 +5693,7 @@
// We consume and ignore EINTR and spurious wakeups.
}
--_nParked ;
-@@ -4777,7 +5102,7 @@
+@@ -4985,7 +5310,7 @@
* years from "now".
*/
@@ -5710,16 +5702,16 @@
assert (time > 0, "convertTime");
struct timeval now;
-@@ -4837,7 +5162,7 @@
+@@ -5045,7 +5370,7 @@
}
// Next, demultiplex/decode time arguments
- timespec absTime;
+ struct timespec absTime;
- if (time < 0) { // don't wait at all
+ if (time < 0 || (isAbsolute && time == 0) ) { // don't wait at all
return;
}
-@@ -4891,7 +5216,7 @@
+@@ -5099,7 +5424,7 @@
}
}
assert_status(status == 0 || status == EINTR ||
@@ -5728,7 +5720,7 @@
status, "cond_timedwait");
#ifdef ASSERT
-@@ -4934,14 +5259,12 @@
+@@ -5142,14 +5467,12 @@
}
@@ -5748,7 +5740,7 @@
#endif
// Run the specified command in a separate process. Return its exit value,
-@@ -4956,8 +5279,7 @@
+@@ -5164,8 +5487,7 @@
// separate process to execve. Make a direct syscall to fork process.
// On IA64 there's no fork syscall, we have to use fork() and hope for
// the best...
@@ -5758,7 +5750,7 @@
if (pid < 0) {
// fork failed
-@@ -4973,8 +5295,7 @@
+@@ -5181,8 +5503,7 @@
// in the new process, so make a system call directly.
// IA64 should use normal execve() from glibc to match the glibc fork()
// above.
@@ -5768,9 +5760,9 @@
// execve failed
_exit(-1);
---- hotspot/src/os/bsd/vm/os_bsd.hpp 2011-02-07 14:18:01.000000000 -0500
-+++ hotspot/src/os/bsd/vm/os_bsd.hpp 2011-02-07 15:03:19.000000000 -0500
-@@ -27,6 +27,12 @@
+--- hotspot/src/os/bsd/vm/os_bsd.hpp 2011-07-07 19:15:59.000000000 -0400
++++ hotspot/src/os/bsd/vm/os_bsd.hpp 2011-07-07 19:17:02.000000000 -0400
+@@ -30,6 +30,12 @@
/* pthread_getattr_np comes with BsdThreads-0.9-7 on RedHat 7.1 */
typedef int (*pthread_getattr_func_type) (pthread_t, pthread_attr_t *);
@@ -5783,7 +5775,7 @@
class Bsd {
friend class os;
-@@ -47,6 +53,7 @@
+@@ -50,6 +56,7 @@
static int sigflags[MAXSIGNUM];
static int (*_clock_gettime)(clockid_t, struct timespec *);
@@ -5791,7 +5783,7 @@
static int (*_pthread_getcpuclockid)(pthread_t, clockid_t *);
static address _initial_thread_stack_bottom;
-@@ -58,6 +65,7 @@
+@@ -61,6 +68,7 @@
static bool _is_floating_stack;
static bool _is_NPTL;
static bool _supports_fast_thread_cpu_time;
@@ -5799,7 +5791,7 @@
static GrowableArray<int>* _cpu_to_node;
-@@ -65,38 +73,54 @@
+@@ -68,38 +76,54 @@
static julong _physical_memory;
static pthread_t _main_thread;
@@ -5854,7 +5846,7 @@
static bool is_initial_thread(void);
static int page_size(void) { return _page_size; }
-@@ -133,6 +157,7 @@
+@@ -136,6 +160,7 @@
static struct sigaction *get_chained_signal_action(int sig);
static bool chained_handler(int sig, siginfo_t* siginfo, void* context);
@@ -5862,7 +5854,7 @@
// GNU libc and libpthread version strings
static const char *glibc_version() { return _glibc_version; }
static const char *libpthread_version() { return _libpthread_version; }
-@@ -148,6 +173,7 @@
+@@ -151,6 +176,7 @@
static void libpthread_init();
static bool libnuma_init();
static void* libnuma_dlsym(void* handle, const char* name);
@@ -5870,7 +5862,7 @@
// Minimum stack size a thread can be created with (allowing
// the VM to completely create the thread and enter user code)
static size_t min_stack_allowed;
-@@ -156,17 +182,21 @@
+@@ -159,17 +185,21 @@
static size_t default_stack_size(os::ThreadType thr_type);
static size_t default_guard_size(os::ThreadType thr_type);
@@ -5892,7 +5884,7 @@
static bool supports_monotonic_clock() {
return _clock_gettime != NULL;
-@@ -176,6 +206,7 @@
+@@ -179,6 +209,7 @@
return _clock_gettime ? _clock_gettime(clock_id, tp) : -1;
}
@@ -5900,7 +5892,7 @@
static int pthread_getcpuclockid(pthread_t tid, clockid_t *clock_id) {
return _pthread_getcpuclockid ? _pthread_getcpuclockid(tid, clock_id) : -1;
}
-@@ -185,6 +216,7 @@
+@@ -188,6 +219,7 @@
}
static jlong fast_thread_cpu_time(clockid_t clockid);
@@ -5908,9 +5900,9 @@
// Stack repair handling
---- hotspot/src/os/bsd/vm/os_bsd.inline.hpp 2011-02-01 17:20:22.000000000 -0500
-+++ hotspot/src/os/bsd/vm/os_bsd.inline.hpp 2011-02-01 17:46:59.000000000 -0500
-@@ -61,7 +61,15 @@
+--- hotspot/src/os/bsd/vm/os_bsd.inline.hpp 2011-07-07 19:15:59.000000000 -0400
++++ hotspot/src/os/bsd/vm/os_bsd.inline.hpp 2011-07-07 19:17:02.000000000 -0400
+@@ -86,7 +86,15 @@
inline bool os::allocate_stack_guard_pages() {
assert(uses_stack_guard_pages(), "sanity check");
@@ -5926,8 +5918,225 @@
}
---- hotspot/src/os_cpu/bsd_x86/vm/bsd_x86_32.s 2011-02-01 17:20:22.000000000 -0500
-+++ hotspot/src/os_cpu/bsd_x86/vm/bsd_x86_32.s 2011-02-01 17:47:12.000000000 -0500
+@@ -118,7 +126,7 @@
+ }
+
+ inline jlong os::lseek(int fd, jlong offset, int whence) {
+- return (jlong) ::lseek64(fd, offset, whence);
++ return (jlong) ::lseek(fd, (off_t)offset, whence);
+ }
+
+ inline int os::fsync(int fd) {
+@@ -130,7 +138,7 @@
+ }
+
+ inline int os::ftruncate(int fd, jlong length) {
+- return ::ftruncate64(fd, length);
++ return ::ftruncate(fd, (off_t)length);
+ }
+
+ inline struct dirent* os::readdir(DIR* dirp, dirent *dbuf)
+--- hotspot/src/os/posix/launcher/java_md.c 2011-07-05 14:30:58.000000000 -0400
++++ hotspot/src/os/posix/launcher/java_md.c 2011-07-07 19:17:02.000000000 -0400
+@@ -41,14 +41,21 @@
+ #include "version_comp.h"
+ #endif
+
+-#ifdef __linux__
++#if defined(__linux__) || defined(_ALLBSD_SOURCE)
+ #include <pthread.h>
+ #else
+ #include <thread.h>
+ #endif
+
++#ifdef __APPLE__
++#define JVM_DLL "libjvm.dylib"
++#define JAVA_DLL "libjava.dylib"
++#define LD_LIBRARY_PATH "DYLD_LIBRARY_PATH"
++#else
+ #define JVM_DLL "libjvm.so"
+ #define JAVA_DLL "libjava.so"
++#define LD_LIBRARY_PATH "LD_LIBRARY_PATH"
++#endif
+
+ #ifndef GAMMA /* launcher.make defines ARCH */
+ /*
+@@ -89,7 +96,7 @@
+ * A collection of useful strings. One should think of these as #define
+ * entries, but actual strings can be more efficient (with many compilers).
+ */
+-#ifdef __linux__
++#if defined(__linux__) || defined(_ALLBSD_SOURCE)
+ static const char *system_dir = "/usr/java";
+ static const char *user_dir = "/java";
+ #else /* Solaris */
+@@ -423,10 +430,10 @@
+ * If not on Solaris, assume only a single LD_LIBRARY_PATH
+ * variable.
+ */
+- runpath = getenv("LD_LIBRARY_PATH");
++ runpath = getenv(LD_LIBRARY_PATH);
+ #endif /* __sun */
+
+-#ifdef __linux
++#if defined(__linux)
+ /*
+ * On linux, if a binary is running as sgid or suid, glibc sets
+ * LD_LIBRARY_PATH to the empty string for security purposes. (In
+@@ -442,6 +449,22 @@
+ if((getgid() != getegid()) || (getuid() != geteuid()) ) {
+ return;
+ }
++#elif defined(_ALLBSD_SOURCE)
++ /*
++ * On BSD, if a binary is running as sgid or suid, libc sets
++ * LD_LIBRARY_PATH to the empty string for security purposes. (In
++ * contrast, on Solaris the LD_LIBRARY_PATH variable for a
++ * privileged binary does not lose its settings; but the dynamic
++ * linker does apply more scrutiny to the path.) The launcher uses
++ * the value of LD_LIBRARY_PATH to prevent an exec loop.
++ * Therefore, if we are running sgid or suid, this function's
++ * setting of LD_LIBRARY_PATH will be ineffective and we should
++ * return from the function now. Getting the right libraries to
++ * be found must be handled through other mechanisms.
++ */
++ if(issetugid()) {
++ return;
++ }
+ #endif
+
+ /* runpath contains current effective LD_LIBRARY_PATH setting */
+@@ -450,7 +473,7 @@
+ new_runpath = JLI_MemAlloc( ((runpath!=NULL)?strlen(runpath):0) +
+ 2*strlen(jrepath) + 2*strlen(arch) +
+ strlen(jvmpath) + 52);
+- newpath = new_runpath + strlen("LD_LIBRARY_PATH=");
++ newpath = new_runpath + strlen(LD_LIBRARY_PATH "=");
+
+
+ /*
+@@ -465,7 +488,7 @@
+
+ /* jvmpath, ((running != wanted)?((wanted==64)?"/"LIBARCH64NAME:"/.."):""), */
+
+- sprintf(new_runpath, "LD_LIBRARY_PATH="
++ sprintf(new_runpath, LD_LIBRARY_PATH "="
+ "%s:"
+ "%s/lib/%s:"
+ "%s/../lib/%s",
+@@ -792,7 +815,7 @@
+ jboolean
+ GetApplicationHome(char *buf, jint bufsize)
+ {
+-#ifdef __linux__
++#if defined(__linux__) || defined(_ALLBSD_SOURCE)
+ char *execname = GetExecname();
+ if (execname) {
+ strncpy(buf, execname, bufsize-1);
+@@ -961,7 +984,7 @@
+ }
+ }
+ }
+-#elif defined(__linux__)
++#elif defined(__linux__) || defined(_ALLBSD_SOURCE)
+ {
+ const char* self = "/proc/self/exe";
+ char buf[PATH_MAX+1];
+@@ -971,7 +994,7 @@
+ exec_path = JLI_StringDup(buf);
+ }
+ }
+-#else /* !__sun && !__linux */
++#else /* !__sun && !__linux && !_ALLBSD_SOURCE */
+ {
+ /* Not implemented */
+ }
+@@ -1175,7 +1198,7 @@
+
+ #endif /* __sun && i586 */
+
+-#if defined(__linux__) && defined(i586)
++#if (defined(__linux__) || defined(_ALLBSD_SOURCE)) && defined(i586)
+
+ /*
+ * A utility method for asking the CPU about itself.
+@@ -1240,7 +1263,7 @@
+ #endif
+ }
+
+-#endif /* __linux__ && i586 */
++#endif /* (__linux__ || _ALLBSD_SOURCE) && i586 */
+
+ #ifdef i586
+ /*
+@@ -1452,6 +1475,39 @@
+
+ #endif /* __linux__ && i586 */
+
++#if defined(_ALLBSD_SOURCE) && defined(i586)
++
++/* The definition of a server-class machine for bsd-i586 */
++jboolean
++bsd_i586_ServerClassMachine(void) {
++ jboolean result = JNI_FALSE;
++ /* How big is a server class machine? */
++ const unsigned long server_processors = 2UL;
++ const uint64_t server_memory = 2UL * GB;
++ /*
++ * We seem not to get our full complement of memory.
++ * We allow some part (1/8?) of the memory to be "missing",
++ * based on the sizes of DIMMs, and maybe graphics cards.
++ */
++ const uint64_t missing_memory = 256UL * MB;
++ const uint64_t actual_memory = physical_memory();
++
++ /* Is this a server class machine? */
++ if (actual_memory >= (server_memory - missing_memory)) {
++ const unsigned long actual_processors = physical_processors();
++ if (actual_processors >= server_processors) {
++ result = JNI_TRUE;
++ }
++ }
++ if (_launcher_debug) {
++ printf("linux_" LIBARCHNAME "_ServerClassMachine: %s\n",
++ (result == JNI_TRUE ? "true" : "false"));
++ }
++ return result;
++}
++
++#endif /* _ALLBSD_SOURCE && i586 */
++
+ /* Dispatch to the platform-specific definition of "server-class" */
+ jboolean
+ ServerClassMachine(void) {
+@@ -1466,6 +1522,8 @@
+ result = solaris_i586_ServerClassMachine();
+ #elif defined(__linux__) && defined(i586)
+ result = linux_i586_ServerClassMachine();
++#elif defined(_ALLBSD_SOURCE) && defined(i586)
++ result = bsd_i586_ServerClassMachine();
+ #else
+ if (_launcher_debug) {
+ printf("ServerClassMachine: returns default value of %s\n",
+@@ -1821,7 +1879,7 @@
+ int
+ ContinueInNewThread(int (JNICALL *continuation)(void *), jlong stack_size, void * args) {
+ int rslt;
+-#ifdef __linux__
++#if defined(__linux__) || defined(_ALLBSD_SOURCE)
+ pthread_t tid;
+ pthread_attr_t attr;
+ pthread_attr_init(&attr);
+--- hotspot/src/os/posix/launcher/launcher.script 2011-07-05 14:30:58.000000000 -0400
++++ hotspot/src/os/posix/launcher/launcher.script 2011-07-07 19:17:02.000000000 -0400
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+
+ # Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+--- hotspot/src/os_cpu/bsd_x86/vm/bsd_x86_32.s 2011-07-07 19:15:59.000000000 -0400
++++ hotspot/src/os_cpu/bsd_x86/vm/bsd_x86_32.s 2011-07-11 10:45:37.000000000 -0400
@@ -21,6 +21,17 @@
# questions.
#
@@ -5946,7 +6155,7 @@
# NOTE WELL! The _Copy functions are called directly
# from server-compiler-generated code via CallLeafNoFP,
-@@ -28,41 +39,61 @@
+@@ -28,42 +39,62 @@
# point or use it in the same manner as does the server
# compiler.
@@ -5968,7 +6177,9 @@
+ .globl SYMBOL(_mmx_Copy_arrayof_conjoint_jshorts)
- .globl _Atomic_cmpxchg_long
+- .globl _Atomic_move_long
+ .globl SYMBOL(_Atomic_cmpxchg_long)
++ .globl SYMBOL(_Atomic_move_long)
.text
@@ -6027,7 +6238,7 @@
rep
nop
movl $1, %eax
-@@ -72,8 +103,8 @@
+@@ -73,8 +104,8 @@
# void* to,
# size_t count)
.p2align 4,,15
@@ -6038,7 +6249,7 @@
pushl %esi
movl 4+12(%esp),%ecx # count
pushl %edi
-@@ -180,8 +211,8 @@
+@@ -181,8 +212,8 @@
#
# Same as _Copy_conjoint_bytes, except no source alignment check.
.p2align 4,,15
@@ -6049,7 +6260,7 @@
pushl %esi
movl 4+12(%esp),%ecx # count
pushl %edi
-@@ -268,8 +299,8 @@
+@@ -269,8 +300,8 @@
# void* to,
# size_t count)
.p2align 4,,15
@@ -6060,7 +6271,7 @@
pushl %esi
movl 4+12(%esp),%ecx # count
pushl %edi
-@@ -355,8 +386,8 @@
+@@ -356,8 +387,8 @@
# void* to,
# size_t count)
.p2align 4,,15
@@ -6071,7 +6282,7 @@
pushl %esi
movl 4+12(%esp),%ecx # count
pushl %edi
-@@ -432,10 +463,10 @@
+@@ -433,10 +464,10 @@
# Equivalent to
# arrayof_conjoint_jints
.p2align 4,,15
@@ -6086,7 +6297,7 @@
pushl %esi
movl 4+12(%esp),%ecx # count
pushl %edi
-@@ -497,7 +528,7 @@
+@@ -498,7 +529,7 @@
#
# count treated as signed
#
@@ -6095,7 +6306,7 @@
# while (--count >= 0) {
# *to++ = *from++;
# }
-@@ -507,8 +538,8 @@
+@@ -508,8 +539,8 @@
# }
# }
.p2align 4,,15
@@ -6106,7 +6317,7 @@
movl 4+8(%esp),%ecx # count
movl 4+0(%esp),%eax # from
movl 4+4(%esp),%edx # to
-@@ -536,8 +567,8 @@
+@@ -537,8 +568,8 @@
# void* to,
# size_t count)
.p2align 4,,15
@@ -6117,7 +6328,7 @@
pushl %esi
movl 4+12(%esp),%ecx
pushl %edi
-@@ -635,8 +666,8 @@
+@@ -636,8 +667,8 @@
# bool is_MP)
#
.p2align 4,,15
@@ -6128,8 +6339,19 @@
# 8(%esp) : return PC
pushl %ebx # 4(%esp) : old %ebx
pushl %edi # 0(%esp) : old %edi
---- hotspot/src/os_cpu/bsd_x86/vm/bsd_x86_64.s 2011-02-01 17:20:22.000000000 -0500
-+++ hotspot/src/os_cpu/bsd_x86/vm/bsd_x86_64.s 2011-02-01 17:47:12.000000000 -0500
+@@ -658,8 +689,8 @@
+ # Support for jlong Atomic::load and Atomic::store.
+ # void _Atomic_move_long(volatile jlong* src, volatile jlong* dst)
+ .p2align 4,,15
+- .type _Atomic_move_long,@function
+-_Atomic_move_long:
++ ELF_TYPE(_Atomic_move_long,@function)
++SYMBOL(_Atomic_move_long):
+ movl 4(%esp), %eax # src
+ fildll (%eax)
+ movl 8(%esp), %eax # dest
+--- hotspot/src/os_cpu/bsd_x86/vm/bsd_x86_64.s 2011-07-07 19:15:59.000000000 -0400
++++ hotspot/src/os_cpu/bsd_x86/vm/bsd_x86_64.s 2011-07-07 19:17:02.000000000 -0400
@@ -21,6 +21,14 @@
# questions.
#
@@ -6277,11 +6499,11 @@
cmpq %rdi,%rsi
leaq -8(%rdi,%rdx,8),%rax # from + count*8 - 8
jbe acl_CopyRight
---- hotspot/src/os_cpu/bsd_x86/vm/bytes_bsd_x86.inline.hpp 2011-02-01 17:20:22.000000000 -0500
-+++ hotspot/src/os_cpu/bsd_x86/vm/bytes_bsd_x86.inline.hpp 2011-02-01 17:47:12.000000000 -0500
-@@ -22,7 +22,33 @@
- *
- */
+--- hotspot/src/os_cpu/bsd_x86/vm/bytes_bsd_x86.inline.hpp 2011-07-07 19:15:59.000000000 -0400
++++ hotspot/src/os_cpu/bsd_x86/vm/bytes_bsd_x86.inline.hpp 2011-07-07 19:17:02.000000000 -0400
+@@ -25,7 +25,33 @@
+ #ifndef OS_CPU_BSD_X86_VM_BYTES_BSD_X86_INLINE_HPP
+ #define OS_CPU_BSD_X86_VM_BYTES_BSD_X86_INLINE_HPP
+#ifndef _ALLBSD_SOURCE
#include <byteswap.h>
@@ -6313,11 +6535,11 @@
// Efficient swapping of data bytes from Java byte
// ordering to native byte ordering and vice versa.
---- hotspot/src/os_cpu/bsd_x86/vm/globals_bsd_x86.hpp 2011-02-01 17:20:22.000000000 -0500
-+++ hotspot/src/os_cpu/bsd_x86/vm/globals_bsd_x86.hpp 2011-02-01 17:47:12.000000000 -0500
-@@ -22,9 +22,10 @@
- *
- */
+--- hotspot/src/os_cpu/bsd_x86/vm/globals_bsd_x86.hpp 2011-07-07 19:15:59.000000000 -0400
++++ hotspot/src/os_cpu/bsd_x86/vm/globals_bsd_x86.hpp 2011-07-07 19:17:02.000000000 -0400
+@@ -25,9 +25,10 @@
+ #ifndef OS_CPU_BSD_X86_VM_GLOBALS_BSD_X86_HPP
+ #define OS_CPU_BSD_X86_VM_GLOBALS_BSD_X86_HPP
+//
// Sets the default values for platform dependent flags used by the runtime system.
@@ -6327,7 +6549,7 @@
define_pd_global(bool, DontYieldALot, false);
#ifdef AMD64
define_pd_global(intx, ThreadStackSize, 1024); // 0 => use system default
-@@ -38,10 +39,11 @@
+@@ -41,11 +42,12 @@
#endif // AMD64
define_pd_global(intx, CompilerThreadStackSize, 0);
@@ -6341,9 +6563,10 @@
+define_pd_global(uintx, HeapBaseMinAddress, 2*G);
// Only used on 64 bit Windows platforms
define_pd_global(bool, UseVectoredExceptions, false);
---- hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp 2011-02-01 17:20:22.000000000 -0500
-+++ hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp 2011-02-01 17:53:57.000000000 -0500
-@@ -44,23 +44,202 @@
+
+--- hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp 2011-07-07 19:15:59.000000000 -0400
++++ hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp 2011-07-07 19:17:02.000000000 -0400
+@@ -78,23 +78,202 @@
# include <sys/wait.h>
# include <pwd.h>
# include <poll.h>
@@ -6553,7 +6776,7 @@
address os::current_stack_pointer() {
#ifdef SPARC_WORKS
register void *esp;
-@@ -85,15 +264,15 @@
+@@ -119,15 +298,15 @@
}
address os::Bsd::ucontext_get_pc(ucontext_t * uc) {
@@ -6572,7 +6795,7 @@
}
// For Forte Analyzer AsyncGetCallTrace profiling support - thread
-@@ -245,18 +424,18 @@
+@@ -279,18 +458,18 @@
pc = (address) os::Bsd::ucontext_get_pc(uc);
if (pc == (address) Fetch32PFI) {
@@ -6594,7 +6817,7 @@
address addr = (address) info->si_addr;
// check if fault address is within thread stack
-@@ -278,6 +457,7 @@
+@@ -312,6 +491,7 @@
// to handle_unexpected_exception way down below.
thread->disable_stack_red_zone();
tty->print_raw_cr("An irrecoverable stack overflow has occurred.");
@@ -6602,7 +6825,7 @@
} else {
// Accessing stack address below sp may cause SEGV if current
// thread has MAP_GROWSDOWN stack. This should only happen when
-@@ -293,6 +473,7 @@
+@@ -327,6 +507,7 @@
} else {
fatal("recursive segv. expanding stack.");
}
@@ -6610,7 +6833,7 @@
}
}
}
-@@ -301,9 +482,16 @@
+@@ -335,9 +516,16 @@
// Java thread running in Java code => find exception handler if any
// a fault inside compiled code, the interpreter, or a stub
@@ -6628,7 +6851,7 @@
// BugId 4454115: A read from a MappedByteBuffer can fault
// here if the underlying file has been truncated.
// Do not crash the VM in such a case.
-@@ -324,6 +512,28 @@
+@@ -358,6 +546,28 @@
pc,
SharedRuntime::
IMPLICIT_DIVIDE_BY_ZERO);
@@ -6657,7 +6880,7 @@
#else
if (sig == SIGFPE /* && info->si_code == FPE_INTDIV */) {
// HACK: si_code does not work on bsd 2.2.12-20!!!
-@@ -351,7 +561,7 @@
+@@ -385,7 +595,7 @@
fatal("please update this code.");
}
#endif // AMD64
@@ -6666,7 +6889,7 @@
!MacroAssembler::needs_explicit_null_check((intptr_t)info->si_addr)) {
// Determination of interpreter/vtable stub/compiled code null exception
stub = SharedRuntime::continuation_for_implicit_exception(thread, pc, SharedRuntime::IMPLICIT_NULL);
-@@ -375,7 +585,7 @@
+@@ -409,7 +619,7 @@
// process of write protecting the memory serialization page.
// It write enables the page immediately after protecting it
// so we can just return to retry the write.
@@ -6675,7 +6898,7 @@
os::is_memory_serialize_page(thread, (address) info->si_addr)) {
// Block current thread until the memory serialize page permission restored.
os::block_on_serialize_page_trap();
-@@ -396,7 +606,7 @@
+@@ -430,7 +640,7 @@
// Furthermore, a false-positive should be harmless.
if (UnguardOnExecutionViolation > 0 &&
(sig == SIGSEGV || sig == SIGBUS) &&
@@ -6684,7 +6907,7 @@
int page_size = os::vm_page_size();
address addr = (address) info->si_addr;
address pc = os::Bsd::ucontext_get_pc(uc);
-@@ -466,7 +676,7 @@
+@@ -500,7 +710,7 @@
// save all thread context in case we need to restore it
if (thread != NULL) thread->set_saved_exception_pc(pc);
@@ -6693,7 +6916,7 @@
return true;
}
-@@ -496,13 +706,24 @@
+@@ -530,13 +740,24 @@
ShouldNotReachHere();
}
@@ -6718,7 +6941,7 @@
int os::Bsd::get_fpu_control_word(void) {
#ifdef AMD64
return 0;
-@@ -518,11 +739,12 @@
+@@ -552,11 +773,12 @@
_FPU_SETCW(fpu_control);
#endif // !AMD64
}
@@ -6732,7 +6955,7 @@
return true;
#else
struct utsname uts;
-@@ -576,6 +798,9 @@
+@@ -610,6 +832,9 @@
#define GET_GS() ({int gs; __asm__ volatile("movw %%gs, %w0":"=q"(gs)); gs&0xffff;})
#endif
@@ -6742,7 +6965,7 @@
// Test if pthread library can support variable thread stack size. BsdThreads
// in fixed stack mode allocates 2M fixed slot for each thread. BsdThreads
// in floating stack mode and NPTL support variable stack size.
-@@ -598,7 +823,7 @@
+@@ -632,7 +857,7 @@
//
// Note that %gs is a reserved glibc register since early 2001, so
// applications are not allowed to change its value (Ulrich Drepper from
@@ -6751,7 +6974,7 @@
// either %fs or TSD). In the worst case scenario, when VM is embedded in
// a native application that plays with %gs, we might see non-zero %gs
// even BsdThreads is running in fixed stack mode. As the result, we'll
-@@ -612,6 +837,7 @@
+@@ -646,6 +871,7 @@
#endif
}
}
@@ -6759,7 +6982,7 @@
#endif // AMD64
// return default stack size for thr_type
-@@ -665,6 +891,41 @@
+@@ -699,6 +925,41 @@
// pthread_attr_getstack()
static void current_stack_region(address * bottom, size_t * size) {
@@ -6801,7 +7024,7 @@
if (os::Bsd::is_initial_thread()) {
// initial thread needs special handling because pthread_getattr_np()
// may return bogus value.
-@@ -691,6 +952,7 @@
+@@ -725,6 +986,7 @@
pthread_attr_destroy(&attr);
}
@@ -6809,9 +7032,9 @@
assert(os::current_stack_pointer() >= *bottom &&
os::current_stack_pointer() < *bottom + *size, "just checking");
}
-@@ -724,34 +986,32 @@
- // we can't just iterate through the gregs area
-
+@@ -753,46 +1015,44 @@
+ ucontext_t *uc = (ucontext_t*)context;
+ st->print_cr("Registers:");
#ifdef AMD64
- st->print( "RAX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_RAX]);
- st->print(", RBX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_RBX]);
@@ -6834,12 +7057,25 @@
- st->print(", R15=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_R15]);
- st->cr();
- st->print( "RIP=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_RIP]);
-- st->print(", EFL=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_EFL]);
+- st->print(", EFLAGS=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_EFL]);
- st->print(", CSGSFS=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_CSGSFS]);
- st->print(", ERR=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_ERR]);
- st->cr();
- st->print(" TRAPNO=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_TRAPNO]);
--
+-#else
+- st->print( "EAX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_EAX]);
+- st->print(", EBX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_EBX]);
+- st->print(", ECX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_ECX]);
+- st->print(", EDX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_EDX]);
+- st->cr();
+- st->print( "ESP=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_UESP]);
+- st->print(", EBP=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_EBP]);
+- st->print(", ESI=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_ESI]);
+- st->print(", EDI=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_EDI]);
+- st->cr();
+- st->print( "EIP=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_EIP]);
+- st->print(", EFLAGS=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_EFL]);
+- st->print(", CR2=" INTPTR_FORMAT, uc->uc_mcontext.cr2);
+ st->print( "RAX=" INTPTR_FORMAT, uc->context_rax);
+ st->print(", RBX=" INTPTR_FORMAT, uc->context_rbx);
+ st->print(", RCX=" INTPTR_FORMAT, uc->context_rcx);
@@ -6861,108 +7097,11 @@
+ st->print(", R15=" INTPTR_FORMAT, uc->context_r15);
+ st->cr();
+ st->print( "RIP=" INTPTR_FORMAT, uc->context_rip);
-+ st->print(", EFL=" INTPTR_FORMAT, uc->context_flags);
++ st->print(", EFLAGS=" INTPTR_FORMAT, uc->context_flags);
+ st->print(", ERR=" INTPTR_FORMAT, uc->context_err);
- st->cr();
++ st->cr();
+ st->print(" TRAPNO=" INTPTR_FORMAT, uc->context_trapno);
-+ st->cr();
- st->cr();
-
- st->print_cr("Register to memory mapping:");
-@@ -759,68 +1019,67 @@
-
- // this is only for the "general purpose" registers
-
-- st->print_cr("RAX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_RAX]);
-- print_location(st, uc->uc_mcontext.gregs[REG_RAX]);
-+ st->print_cr("RAX=" INTPTR_FORMAT, uc->context_rax);
-+ print_location(st, uc->context_rax);
- st->cr();
-- st->print_cr("RBX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_RBX]);
-- print_location(st, uc->uc_mcontext.gregs[REG_RBX]);
-+ st->print_cr("RBX=" INTPTR_FORMAT, uc->context_rbx);
-+ print_location(st, uc->context_rbx);
- st->cr();
-- st->print_cr("RCX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_RCX]);
-- print_location(st, uc->uc_mcontext.gregs[REG_RCX]);
-+ st->print_cr("RCX=" INTPTR_FORMAT, uc->context_rcx);
-+ print_location(st, uc->context_rcx);
- st->cr();
-- st->print_cr("RDX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_RDX]);
-- print_location(st, uc->uc_mcontext.gregs[REG_RDX]);
-+ st->print_cr("RDX=" INTPTR_FORMAT, uc->context_rdx);
-+ print_location(st, uc->context_rdx);
- st->cr();
-- st->print_cr("RSP=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_RSP]);
-- print_location(st, uc->uc_mcontext.gregs[REG_RSP]);
-+ st->print_cr("RSP=" INTPTR_FORMAT, uc->context_rsp);
-+ print_location(st, uc->context_rsp);
- st->cr();
-- st->print_cr("RBP=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_RBP]);
-- print_location(st, uc->uc_mcontext.gregs[REG_RBP]);
-+ st->print_cr("RBP=" INTPTR_FORMAT, uc->context_rbp);
-+ print_location(st, uc->context_rbp);
- st->cr();
-- st->print_cr("RSI=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_RSI]);
-- print_location(st, uc->uc_mcontext.gregs[REG_RSI]);
-+ st->print_cr("RSI=" INTPTR_FORMAT, uc->context_rsi);
-+ print_location(st, uc->context_rsi);
- st->cr();
-- st->print_cr("RDI=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_RDI]);
-- print_location(st, uc->uc_mcontext.gregs[REG_RDI]);
-+ st->print_cr("RDI=" INTPTR_FORMAT, uc->context_rdi);
-+ print_location(st, uc->context_rdi);
- st->cr();
-- st->print_cr("R8 =" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_R8]);
-- print_location(st, uc->uc_mcontext.gregs[REG_R8]);
-+ st->print_cr("R8 =" INTPTR_FORMAT, uc->context_r8);
-+ print_location(st, uc->context_r8);
- st->cr();
-- st->print_cr("R9 =" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_R9]);
-- print_location(st, uc->uc_mcontext.gregs[REG_R9]);
-+ st->print_cr("R9 =" INTPTR_FORMAT, uc->context_r9);
-+ print_location(st, uc->context_r9);
- st->cr();
-- st->print_cr("R10=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_R10]);
-- print_location(st, uc->uc_mcontext.gregs[REG_R10]);
-+ st->print_cr("R10=" INTPTR_FORMAT, uc->context_r10);
-+ print_location(st, uc->context_r10);
- st->cr();
-- st->print_cr("R11=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_R11]);
-- print_location(st, uc->uc_mcontext.gregs[REG_R11]);
-+ st->print_cr("R11=" INTPTR_FORMAT, uc->context_r11);
-+ print_location(st, uc->context_r11);
- st->cr();
-- st->print_cr("R12=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_R12]);
-- print_location(st, uc->uc_mcontext.gregs[REG_R12]);
-+ st->print_cr("R12=" INTPTR_FORMAT, uc->context_r12);
-+ print_location(st, uc->context_r12);
- st->cr();
-- st->print_cr("R13=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_R13]);
-- print_location(st, uc->uc_mcontext.gregs[REG_R13]);
-+ st->print_cr("R13=" INTPTR_FORMAT, uc->context_r13);
-+ print_location(st, uc->context_r13);
- st->cr();
-- st->print_cr("R14=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_R14]);
-- print_location(st, uc->uc_mcontext.gregs[REG_R14]);
-+ st->print_cr("R14=" INTPTR_FORMAT, uc->context_r14);
-+ print_location(st, uc->context_r14);
- st->cr();
-- st->print_cr("R15=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_R15]);
-- print_location(st, uc->uc_mcontext.gregs[REG_R15]);
-+ st->print_cr("R15=" INTPTR_FORMAT, uc->context_r15);
-+ print_location(st, uc->context_r15);
-
- #else
-- st->print( "EAX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_EAX]);
-- st->print(", EBX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_EBX]);
-- st->print(", ECX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_ECX]);
-- st->print(", EDX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_EDX]);
-- st->cr();
-- st->print( "ESP=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_UESP]);
-- st->print(", EBP=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_EBP]);
-- st->print(", ESI=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_ESI]);
-- st->print(", EDI=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_EDI]);
++#else
+ st->print( "EAX=" INTPTR_FORMAT, uc->context_eax);
+ st->print(", EBX=" INTPTR_FORMAT, uc->context_ebx);
+ st->print(", ECX=" INTPTR_FORMAT, uc->context_ecx);
@@ -6972,64 +7111,72 @@
+ st->print(", EBP=" INTPTR_FORMAT, uc->context_ebp);
+ st->print(", ESI=" INTPTR_FORMAT, uc->context_esi);
+ st->print(", EDI=" INTPTR_FORMAT, uc->context_edi);
- st->cr();
-- st->print( "EIP=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_EIP]);
-- st->print(", CR2=" INTPTR_FORMAT, uc->uc_mcontext.cr2);
-- st->print(", EFLAGS=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_EFL]);
++ st->cr();
+ st->print( "EIP=" INTPTR_FORMAT, uc->context_eip);
+ st->print(", EFLAGS=" INTPTR_FORMAT, uc->context_eflags);
-
+ #endif // AMD64
st->cr();
st->cr();
-@@ -830,29 +1089,29 @@
-
+@@ -825,31 +1085,31 @@
// this is only for the "general purpose" registers
-- st->print_cr("EAX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_EAX]);
-- print_location(st, uc->uc_mcontext.gregs[REG_EAX]);
-+ st->print_cr("EAX=" INTPTR_FORMAT, uc->context_eax);
-+ print_location(st, uc->context_eax);
- st->cr();
-- st->print_cr("EBX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_EBX]);
-- print_location(st, uc->uc_mcontext.gregs[REG_EBX]);
-+ st->print_cr("EBX=" INTPTR_FORMAT, uc->context_ebx);
-+ print_location(st, uc->context_ebx);
- st->cr();
-- st->print_cr("ECX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_ECX]);
-- print_location(st, uc->uc_mcontext.gregs[REG_ECX]);
-+ st->print_cr("ECX=" INTPTR_FORMAT, uc->context_ecx);
-+ print_location(st, uc->context_ecx);
- st->cr();
-- st->print_cr("EDX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_EDX]);
-- print_location(st, uc->uc_mcontext.gregs[REG_EDX]);
-+ st->print_cr("EDX=" INTPTR_FORMAT, uc->context_edx);
-+ print_location(st, uc->context_edx);
- st->cr();
-- st->print_cr("ESP=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_ESP]);
-- print_location(st, uc->uc_mcontext.gregs[REG_ESP]);
-+ st->print_cr("ESP=" INTPTR_FORMAT, uc->context_esp);
-+ print_location(st, uc->context_esp);
- st->cr();
-- st->print_cr("EBP=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_EBP]);
-- print_location(st, uc->uc_mcontext.gregs[REG_EBP]);
-+ st->print_cr("EBP=" INTPTR_FORMAT, uc->context_ebp);
-+ print_location(st, uc->context_ebp);
- st->cr();
-- st->print_cr("ESI=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_ESI]);
-- print_location(st, uc->uc_mcontext.gregs[REG_ESI]);
-+ st->print_cr("ESI=" INTPTR_FORMAT, uc->context_esi);
-+ print_location(st, uc->context_esi);
- st->cr();
-- st->print_cr("EDI=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_EDI]);
-- print_location(st, uc->uc_mcontext.gregs[REG_EDI]);
-+ st->print_cr("EDI=" INTPTR_FORMAT, uc->context_edi);
-+ print_location(st, uc->context_edi);
-
+ #ifdef AMD64
+- st->print("RAX="); print_location(st, uc->uc_mcontext.gregs[REG_RAX]);
+- st->print("RBX="); print_location(st, uc->uc_mcontext.gregs[REG_RBX]);
+- st->print("RCX="); print_location(st, uc->uc_mcontext.gregs[REG_RCX]);
+- st->print("RDX="); print_location(st, uc->uc_mcontext.gregs[REG_RDX]);
+- st->print("RSP="); print_location(st, uc->uc_mcontext.gregs[REG_RSP]);
+- st->print("RBP="); print_location(st, uc->uc_mcontext.gregs[REG_RBP]);
+- st->print("RSI="); print_location(st, uc->uc_mcontext.gregs[REG_RSI]);
+- st->print("RDI="); print_location(st, uc->uc_mcontext.gregs[REG_RDI]);
+- st->print("R8 ="); print_location(st, uc->uc_mcontext.gregs[REG_R8]);
+- st->print("R9 ="); print_location(st, uc->uc_mcontext.gregs[REG_R9]);
+- st->print("R10="); print_location(st, uc->uc_mcontext.gregs[REG_R10]);
+- st->print("R11="); print_location(st, uc->uc_mcontext.gregs[REG_R11]);
+- st->print("R12="); print_location(st, uc->uc_mcontext.gregs[REG_R12]);
+- st->print("R13="); print_location(st, uc->uc_mcontext.gregs[REG_R13]);
+- st->print("R14="); print_location(st, uc->uc_mcontext.gregs[REG_R14]);
+- st->print("R15="); print_location(st, uc->uc_mcontext.gregs[REG_R15]);
+-#else
+- st->print("EAX="); print_location(st, uc->uc_mcontext.gregs[REG_EAX]);
+- st->print("EBX="); print_location(st, uc->uc_mcontext.gregs[REG_EBX]);
+- st->print("ECX="); print_location(st, uc->uc_mcontext.gregs[REG_ECX]);
+- st->print("EDX="); print_location(st, uc->uc_mcontext.gregs[REG_EDX]);
+- st->print("ESP="); print_location(st, uc->uc_mcontext.gregs[REG_ESP]);
+- st->print("EBP="); print_location(st, uc->uc_mcontext.gregs[REG_EBP]);
+- st->print("ESI="); print_location(st, uc->uc_mcontext.gregs[REG_ESI]);
+- st->print("EDI="); print_location(st, uc->uc_mcontext.gregs[REG_EDI]);
++ st->print("RAX="); print_location(st, uc->context_rax);
++ st->print("RBX="); print_location(st, uc->context_rbx);
++ st->print("RCX="); print_location(st, uc->context_rcx);
++ st->print("RDX="); print_location(st, uc->context_rdx);
++ st->print("RSP="); print_location(st, uc->context_rsp);
++ st->print("RBP="); print_location(st, uc->context_rbp);
++ st->print("RSI="); print_location(st, uc->context_rsi);
++ st->print("RDI="); print_location(st, uc->context_rdi);
++ st->print("R8 ="); print_location(st, uc->context_r8);
++ st->print("R9 ="); print_location(st, uc->context_r9);
++ st->print("R10="); print_location(st, uc->context_r10);
++ st->print("R11="); print_location(st, uc->context_r11);
++ st->print("R12="); print_location(st, uc->context_r12);
++ st->print("R13="); print_location(st, uc->context_r13);
++ st->print("R14="); print_location(st, uc->context_r14);
++ st->print("R15="); print_location(st, uc->context_r15);
++#else
++ st->print("EAX="); print_location(st, uc->context_eax);
++ st->print("EBX="); print_location(st, uc->context_ebx);
++ st->print("ECX="); print_location(st, uc->context_ecx);
++ st->print("EDX="); print_location(st, uc->context_edx);
++ st->print("ESP="); print_location(st, uc->context_esp);
++ st->print("EBP="); print_location(st, uc->context_ebp);
++ st->print("ESI="); print_location(st, uc->context_esi);
++ st->print("EDI="); print_location(st, uc->context_edi);
#endif // AMD64
+
st->cr();
---- hotspot/src/os_cpu/bsd_x86/vm/threadLS_bsd_x86.hpp 2011-02-01 17:20:22.000000000 -0500
-+++ hotspot/src/os_cpu/bsd_x86/vm/threadLS_bsd_x86.hpp 2011-02-01 17:47:12.000000000 -0500
-@@ -27,8 +27,10 @@
+--- hotspot/src/os_cpu/bsd_x86/vm/threadLS_bsd_x86.hpp 2011-07-07 19:15:59.000000000 -0400
++++ hotspot/src/os_cpu/bsd_x86/vm/threadLS_bsd_x86.hpp 2011-07-07 19:17:02.000000000 -0400
+@@ -30,8 +30,10 @@
#ifndef AMD64
// map stack pointer to thread pointer - see notes in threadLS_bsd_x86.cpp
#define SP_BITLENGTH 32
@@ -7040,9 +7187,9 @@
static Thread* _sp_map[1UL << (SP_BITLENGTH - PAGE_SHIFT)];
#endif // !AMD64
---- hotspot/src/os_cpu/bsd_x86/vm/vmStructs_bsd_x86.hpp 2011-02-04 16:46:33.000000000 -0500
-+++ hotspot/src/os_cpu/bsd_x86/vm/vmStructs_bsd_x86.hpp 2011-02-04 19:21:40.000000000 -0500
-@@ -26,6 +26,7 @@
+--- hotspot/src/os_cpu/bsd_x86/vm/vmStructs_bsd_x86.hpp 2011-07-07 19:15:59.000000000 -0400
++++ hotspot/src/os_cpu/bsd_x86/vm/vmStructs_bsd_x86.hpp 2011-07-07 19:17:02.000000000 -0400
+@@ -29,6 +29,7 @@
// constants required by the Serviceability Agent. This file is
// referenced by vmStructs.cpp.
@@ -7050,7 +7197,7 @@
#define VM_STRUCTS_OS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field, c2_nonstatic_field, unchecked_c1_static_field, unchecked_c2_static_field, last_entry) \
\
/******************************/ \
-@@ -35,6 +36,17 @@
+@@ -38,6 +39,17 @@
nonstatic_field(OSThread, _pthread_id, pthread_t) \
/* This must be the last entry, and must be present */ \
last_entry()
@@ -7068,9 +7215,9 @@
#define VM_TYPES_OS_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type, declare_c1_toplevel_type, declare_c2_type, declare_c2_toplevel_type, last_entry) \
---- hotspot/src/share/vm/adlc/adlc.hpp 2011-01-20 18:51:18.000000000 -0500
-+++ hotspot/src/share/vm/adlc/adlc.hpp 2011-02-01 17:47:12.000000000 -0500
-@@ -69,9 +69,9 @@
+--- hotspot/src/share/vm/adlc/adlc.hpp 2011-07-05 14:31:00.000000000 -0400
++++ hotspot/src/share/vm/adlc/adlc.hpp 2011-07-07 19:17:02.000000000 -0400
+@@ -72,9 +72,9 @@
#endif
#endif // _WIN32
@@ -7082,9 +7229,43 @@
// Macros
#define uint32 unsigned int
---- hotspot/src/share/vm/classfile/javaClasses.cpp 2011-01-20 18:51:18.000000000 -0500
-+++ hotspot/src/share/vm/classfile/javaClasses.cpp 2011-02-01 17:47:12.000000000 -0500
-@@ -952,7 +952,7 @@
+--- hotspot/src/share/vm/c1/c1_globals.hpp 2011-07-05 14:31:00.000000000 -0400
++++ hotspot/src/share/vm/c1/c1_globals.hpp 2011-07-07 19:17:02.000000000 -0400
+@@ -41,6 +41,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "c1_globals_windows.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "c1_globals_bsd.hpp"
++#endif
+
+ //
+ // Defines all global flags used by the client compiler.
+--- hotspot/src/share/vm/classfile/classLoader.cpp 2011-07-05 14:31:01.000000000 -0400
++++ hotspot/src/share/vm/classfile/classLoader.cpp 2011-07-07 19:17:02.000000000 -0400
+@@ -68,6 +68,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "os_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "os_bsd.inline.hpp"
++#endif
+
+
+ // Entry points in zip.dll for loading zip/jar file entries
+--- hotspot/src/share/vm/classfile/javaClasses.cpp 2011-07-05 14:31:01.000000000 -0400
++++ hotspot/src/share/vm/classfile/javaClasses.cpp 2011-07-07 19:17:02.000000000 -0400
+@@ -55,6 +55,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "thread_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "thread_bsd.inline.hpp"
++#endif
+
+ static bool find_field(instanceKlass* ik,
+ symbolOop name_symbol, symbolOop signature_symbol,
+@@ -991,7 +994,7 @@
}
nmethod* nm = method->code();
if (WizardMode && nm != NULL) {
@@ -7093,9 +7274,204 @@
}
}
---- hotspot/src/share/vm/interpreter/bytecodeTracer.cpp 2011-01-20 18:51:20.000000000 -0500
-+++ hotspot/src/share/vm/interpreter/bytecodeTracer.cpp 2011-02-01 17:47:12.000000000 -0500
-@@ -83,7 +83,7 @@
+--- hotspot/src/share/vm/code/stubs.hpp 2011-07-05 14:31:01.000000000 -0400
++++ hotspot/src/share/vm/code/stubs.hpp 2011-07-07 19:17:02.000000000 -0400
+@@ -35,6 +35,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "os_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "os_bsd.inline.hpp"
++#endif
+
+ // The classes in this file provide a simple framework for the
+ // management of little pieces of machine code - or stubs -
+--- hotspot/src/share/vm/compiler/disassembler.hpp 2011-07-05 14:31:01.000000000 -0400
++++ hotspot/src/share/vm/compiler/disassembler.hpp 2011-07-07 19:17:02.000000000 -0400
+@@ -35,6 +35,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "os_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "os_bsd.inline.hpp"
++#endif
+
+ class decode_env;
+
+--- hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/cmsAdaptiveSizePolicy.cpp 2011-07-05 14:31:01.000000000 -0400
++++ hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/cmsAdaptiveSizePolicy.cpp 2011-07-07 19:17:02.000000000 -0400
+@@ -37,6 +37,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "os_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "os_bsd.inline.hpp"
++#endif
+ elapsedTimer CMSAdaptiveSizePolicy::_concurrent_timer;
+ elapsedTimer CMSAdaptiveSizePolicy::_STW_timer;
+
+--- hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/cmsCollectorPolicy.cpp 2011-07-05 14:31:01.000000000 -0400
++++ hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/cmsCollectorPolicy.cpp 2011-07-07 19:17:02.000000000 -0400
+@@ -50,6 +50,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "thread_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "thread_bsd.inline.hpp"
++#endif
+
+ //
+ // ConcurrentMarkSweepPolicy methods
+--- hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.hpp 2011-07-05 14:31:01.000000000 -0400
++++ hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.hpp 2011-07-07 19:17:02.000000000 -0400
+@@ -36,6 +36,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "thread_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "thread_bsd.inline.hpp"
++#endif
+
+ class ConcurrentMarkSweepGeneration;
+ class CMSCollector;
+--- hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/freeBlockDictionary.cpp 2011-07-05 14:31:01.000000000 -0400
++++ hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/freeBlockDictionary.cpp 2011-07-07 19:17:02.000000000 -0400
+@@ -33,6 +33,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "thread_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "thread_bsd.inline.hpp"
++#endif
+
+ #ifndef PRODUCT
+ Mutex* FreeBlockDictionary::par_lock() const {
+--- hotspot/src/share/vm/gc_implementation/g1/dirtyCardQueue.cpp 2011-07-05 14:31:01.000000000 -0400
++++ hotspot/src/share/vm/gc_implementation/g1/dirtyCardQueue.cpp 2011-07-07 19:17:02.000000000 -0400
+@@ -39,6 +39,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "thread_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "thread_bsd.inline.hpp"
++#endif
+
+ bool DirtyCardQueue::apply_closure(CardTableEntryClosure* cl,
+ bool consume,
+--- hotspot/src/share/vm/gc_implementation/g1/g1SATBCardTableModRefBS.cpp 2011-07-05 14:31:01.000000000 -0400
++++ hotspot/src/share/vm/gc_implementation/g1/g1SATBCardTableModRefBS.cpp 2011-07-07 19:17:02.000000000 -0400
+@@ -37,6 +37,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "thread_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "thread_bsd.inline.hpp"
++#endif
+
+ G1SATBCardTableModRefBS::G1SATBCardTableModRefBS(MemRegion whole_heap,
+ int max_covered_regions) :
+--- hotspot/src/share/vm/gc_implementation/g1/ptrQueue.cpp 2011-07-05 14:31:02.000000000 -0400
++++ hotspot/src/share/vm/gc_implementation/g1/ptrQueue.cpp 2011-07-07 19:17:02.000000000 -0400
+@@ -37,6 +37,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "thread_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "thread_bsd.inline.hpp"
++#endif
+
+ PtrQueue::PtrQueue(PtrQueueSet* qset, bool perm, bool active) :
+ _qset(qset), _buf(NULL), _index(0), _active(active),
+--- hotspot/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.cpp 2011-07-05 14:31:02.000000000 -0400
++++ hotspot/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.cpp 2011-07-07 19:17:02.000000000 -0400
+@@ -38,6 +38,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "os_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "os_bsd.inline.hpp"
++#endif
+
+ bool
+ ParMarkBitMap::initialize(MemRegion covered_region)
+--- hotspot/src/share/vm/gc_implementation/parallelScavenge/psVirtualspace.cpp 2011-07-05 14:31:02.000000000 -0400
++++ hotspot/src/share/vm/gc_implementation/parallelScavenge/psVirtualspace.cpp 2011-07-07 19:17:02.000000000 -0400
+@@ -35,6 +35,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "os_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "os_bsd.inline.hpp"
++#endif
+
+ // PSVirtualSpace
+
+--- hotspot/src/share/vm/gc_implementation/shared/mutableNUMASpace.cpp 2011-07-05 14:31:02.000000000 -0400
++++ hotspot/src/share/vm/gc_implementation/shared/mutableNUMASpace.cpp 2011-07-07 19:17:02.000000000 -0400
+@@ -37,6 +37,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "thread_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "thread_bsd.inline.hpp"
++#endif
+
+
+ MutableNUMASpace::MutableNUMASpace(size_t alignment) : MutableSpace(alignment) {
+--- hotspot/src/share/vm/gc_interface/collectedHeap.cpp 2011-07-05 14:31:02.000000000 -0400
++++ hotspot/src/share/vm/gc_interface/collectedHeap.cpp 2011-07-07 19:17:02.000000000 -0400
+@@ -39,6 +39,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "thread_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "thread_bsd.inline.hpp"
++#endif
+
+
+ #ifdef ASSERT
+--- hotspot/src/share/vm/gc_interface/collectedHeap.inline.hpp 2011-07-05 14:31:02.000000000 -0400
++++ hotspot/src/share/vm/gc_interface/collectedHeap.inline.hpp 2011-07-07 19:17:02.000000000 -0400
+@@ -43,6 +43,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "thread_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "thread_bsd.inline.hpp"
++#endif
+
+ // Inline allocation implementations.
+
+--- hotspot/src/share/vm/interpreter/abstractInterpreter.hpp 2011-07-05 14:31:02.000000000 -0400
++++ hotspot/src/share/vm/interpreter/abstractInterpreter.hpp 2011-07-07 19:17:02.000000000 -0400
+@@ -50,6 +50,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "thread_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "thread_bsd.inline.hpp"
++#endif
+
+ // This file contains the platform-independent parts
+ // of the abstract interpreter and the abstract interpreter generator.
+--- hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp 2011-07-05 14:31:02.000000000 -0400
++++ hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp 2011-07-07 19:17:02.000000000 -0400
+@@ -59,6 +59,12 @@
+ #ifdef TARGET_OS_ARCH_windows_x86
+ # include "orderAccess_windows_x86.inline.hpp"
+ #endif
++#ifdef TARGET_OS_ARCH_bsd_x86
++# include "orderAccess_bsd_x86.inline.hpp"
++#endif
++#ifdef TARGET_OS_ARCH_bsd_zero
++# include "orderAccess_bsd_zero.inline.hpp"
++#endif
+
+
+ // no precompiled headers
+--- hotspot/src/share/vm/interpreter/bytecodeTracer.cpp 2011-07-05 14:31:02.000000000 -0400
++++ hotspot/src/share/vm/interpreter/bytecodeTracer.cpp 2011-07-07 19:17:03.000000000 -0400
+@@ -92,7 +92,7 @@
// the incoming method. We could lose a line of trace output.
// This is acceptable in a debug-only feature.
st->cr();
@@ -7104,7 +7480,7 @@
method->print_name(st);
st->cr();
_current_method = method();
-@@ -97,7 +97,7 @@
+@@ -106,7 +106,7 @@
}
_code = code;
int bci = bcp - method->code_base();
@@ -7113,9 +7489,226 @@
if (Verbose) {
st->print("%8d %4d " INTPTR_FORMAT " " INTPTR_FORMAT " %s",
BytecodeCounter::counter_value(), bci, tos, tos2, Bytecodes::name(code));
---- hotspot/src/share/vm/prims/forte.cpp 2011-01-20 18:51:21.000000000 -0500
-+++ hotspot/src/share/vm/prims/forte.cpp 2011-02-01 17:47:12.000000000 -0500
-@@ -629,6 +629,11 @@
+--- hotspot/src/share/vm/interpreter/interpreterRuntime.hpp 2011-07-05 14:31:02.000000000 -0400
++++ hotspot/src/share/vm/interpreter/interpreterRuntime.hpp 2011-07-07 19:17:02.000000000 -0400
+@@ -41,6 +41,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "thread_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "thread_bsd.inline.hpp"
++#endif
+
+ // The InterpreterRuntime is called by the interpreter for everything
+ // that cannot/should not be dealt with in assembly and needs C support.
+--- hotspot/src/share/vm/interpreter/linkResolver.cpp 2011-07-05 14:31:02.000000000 -0400
++++ hotspot/src/share/vm/interpreter/linkResolver.cpp 2011-07-07 19:17:02.000000000 -0400
+@@ -52,6 +52,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "thread_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "thread_bsd.inline.hpp"
++#endif
+
+ //------------------------------------------------------------------------------------------------------------------------
+ // Implementation of FieldAccessInfo
+--- hotspot/src/share/vm/memory/allocation.cpp 2011-07-05 14:31:02.000000000 -0400
++++ hotspot/src/share/vm/memory/allocation.cpp 2011-07-07 19:17:02.000000000 -0400
+@@ -39,6 +39,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "os_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "os_bsd.inline.hpp"
++#endif
+
+ void* CHeapObj::operator new(size_t size){
+ return (void *) AllocateHeap(size, "CHeapObj-new");
+--- hotspot/src/share/vm/memory/collectorPolicy.cpp 2011-07-05 14:31:02.000000000 -0400
++++ hotspot/src/share/vm/memory/collectorPolicy.cpp 2011-07-07 19:17:02.000000000 -0400
+@@ -47,6 +47,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "thread_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "thread_bsd.inline.hpp"
++#endif
+ #ifndef SERIALGC
+ #include "gc_implementation/concurrentMarkSweep/cmsAdaptiveSizePolicy.hpp"
+ #include "gc_implementation/concurrentMarkSweep/cmsGCAdaptivePolicyCounters.hpp"
+--- hotspot/src/share/vm/memory/defNewGeneration.cpp 2011-07-05 14:31:02.000000000 -0400
++++ hotspot/src/share/vm/memory/defNewGeneration.cpp 2011-07-07 19:17:02.000000000 -0400
+@@ -48,6 +48,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "thread_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "thread_bsd.inline.hpp"
++#endif
+
+ //
+ // DefNewGeneration functions.
+--- hotspot/src/share/vm/memory/gcLocker.hpp 2011-07-05 14:31:02.000000000 -0400
++++ hotspot/src/share/vm/memory/gcLocker.hpp 2011-07-07 19:17:02.000000000 -0400
+@@ -41,6 +41,10 @@
+ # include "os_windows.inline.hpp"
+ # include "thread_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "os_bsd.inline.hpp"
++# include "thread_bsd.inline.hpp"
++#endif
+
+ // The direct lock/unlock calls do not force a collection if an unlock
+ // decrements the count to zero. Avoid calling these if at all possible.
+--- hotspot/src/share/vm/memory/genMarkSweep.cpp 2011-07-05 14:31:03.000000000 -0400
++++ hotspot/src/share/vm/memory/genMarkSweep.cpp 2011-07-07 19:17:02.000000000 -0400
+@@ -55,6 +55,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "thread_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "thread_bsd.inline.hpp"
++#endif
+
+ void GenMarkSweep::invoke_at_safepoint(int level, ReferenceProcessor* rp,
+ bool clear_all_softrefs) {
+--- hotspot/src/share/vm/memory/resourceArea.cpp 2011-07-05 14:31:03.000000000 -0400
++++ hotspot/src/share/vm/memory/resourceArea.cpp 2011-07-07 19:17:02.000000000 -0400
+@@ -35,6 +35,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "thread_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "thread_bsd.inline.hpp"
++#endif
+
+ //------------------------------ResourceMark-----------------------------------
+ debug_only(int ResourceArea::_warned;) // to suppress multiple warnings
+--- hotspot/src/share/vm/memory/resourceArea.hpp 2011-07-05 14:31:03.000000000 -0400
++++ hotspot/src/share/vm/memory/resourceArea.hpp 2011-07-07 19:17:03.000000000 -0400
+@@ -35,6 +35,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "thread_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "thread_bsd.inline.hpp"
++#endif
+
+ // The resource area holds temporary data structures in the VM.
+ // The actual allocation areas are thread local. Typical usage:
+--- hotspot/src/share/vm/memory/space.hpp 2011-07-05 14:31:03.000000000 -0400
++++ hotspot/src/share/vm/memory/space.hpp 2011-07-07 19:17:03.000000000 -0400
+@@ -44,6 +44,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "os_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "os_bsd.inline.hpp"
++#endif
+
+ // A space is an abstraction for the "storage units" backing
+ // up the generation abstraction. It includes specific
+--- hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp 2011-07-05 14:31:03.000000000 -0400
++++ hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp 2011-07-07 19:17:03.000000000 -0400
+@@ -38,6 +38,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "thread_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "thread_bsd.inline.hpp"
++#endif
+
+ // Thread-Local Edens support
+
+--- hotspot/src/share/vm/memory/universe.cpp 2011-07-05 14:31:03.000000000 -0400
++++ hotspot/src/share/vm/memory/universe.cpp 2011-07-07 19:17:03.000000000 -0400
+@@ -89,6 +89,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "thread_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "thread_bsd.inline.hpp"
++#endif
+ #ifndef SERIALGC
+ #include "gc_implementation/concurrentMarkSweep/cmsAdaptiveSizePolicy.hpp"
+ #include "gc_implementation/concurrentMarkSweep/cmsCollectorPolicy.hpp"
+--- hotspot/src/share/vm/oops/constantPoolKlass.cpp 2011-07-05 14:31:03.000000000 -0400
++++ hotspot/src/share/vm/oops/constantPoolKlass.cpp 2011-07-07 19:17:03.000000000 -0400
+@@ -44,6 +44,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "thread_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "thread_bsd.inline.hpp"
++#endif
+ #ifndef SERIALGC
+ #include "gc_implementation/parNew/parOopClosures.inline.hpp"
+ #include "gc_implementation/parallelScavenge/psPromotionManager.inline.hpp"
+--- hotspot/src/share/vm/oops/instanceKlass.cpp 2011-07-05 14:31:03.000000000 -0400
++++ hotspot/src/share/vm/oops/instanceKlass.cpp 2011-07-07 19:17:03.000000000 -0400
+@@ -59,6 +59,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "thread_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "thread_bsd.inline.hpp"
++#endif
+ #ifndef SERIALGC
+ #include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
+ #include "gc_implementation/g1/g1OopClosures.inline.hpp"
+--- hotspot/src/share/vm/oops/markOop.cpp 2011-07-05 14:31:03.000000000 -0400
++++ hotspot/src/share/vm/oops/markOop.cpp 2011-07-07 19:17:03.000000000 -0400
+@@ -33,6 +33,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "thread_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "thread_bsd.inline.hpp"
++#endif
+
+
+ void markOopDesc::print_on(outputStream* st) const {
+--- hotspot/src/share/vm/oops/oop.cpp 2011-07-05 14:31:03.000000000 -0400
++++ hotspot/src/share/vm/oops/oop.cpp 2011-07-07 19:17:03.000000000 -0400
+@@ -36,6 +36,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "thread_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "thread_bsd.inline.hpp"
++#endif
+
+ bool always_do_update_barrier = false;
+
+--- hotspot/src/share/vm/oops/oopsHierarchy.cpp 2011-07-05 14:31:03.000000000 -0400
++++ hotspot/src/share/vm/oops/oopsHierarchy.cpp 2011-07-07 19:17:03.000000000 -0400
+@@ -37,6 +37,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "thread_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "thread_bsd.inline.hpp"
++#endif
+
+ #ifdef CHECK_UNHANDLED_OOPS
+
+--- hotspot/src/share/vm/opto/c2_globals.hpp 2011-07-05 14:31:03.000000000 -0400
++++ hotspot/src/share/vm/opto/c2_globals.hpp 2011-07-07 19:17:03.000000000 -0400
+@@ -41,6 +41,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "c2_globals_windows.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "c2_globals_bsd.hpp"
++#endif
+
+ //
+ // Defines all globals flags used by the server compiler.
+--- hotspot/src/share/vm/prims/forte.cpp 2011-07-05 14:31:04.000000000 -0400
++++ hotspot/src/share/vm/prims/forte.cpp 2011-07-07 19:17:03.000000000 -0400
+@@ -639,6 +639,11 @@
// Method to let libcollector know about a dynamically loaded function.
// Because it is weakly bound, the calls become NOP's when the library
// isn't present.
@@ -7127,7 +7720,7 @@
void collector_func_load(char* name,
void* null_argument_1,
void* null_argument_2,
-@@ -639,6 +644,7 @@
+@@ -649,6 +654,7 @@
#pragma weak collector_func_load
#define collector_func_load(x0,x1,x2,x3,x4,x5,x6) \
( collector_func_load ? collector_func_load(x0,x1,x2,x3,x4,x5,x6),0 : 0 )
@@ -7135,20 +7728,359 @@
#endif // !_WINDOWS
} // end extern "C"
---- hotspot/src/share/vm/runtime/globals.hpp 2011-01-20 18:51:22.000000000 -0500
-+++ hotspot/src/share/vm/runtime/globals.hpp 2011-02-01 20:02:39.000000000 -0500
-@@ -327,7 +327,7 @@
- /* UseMembar is theoretically a temp flag used for memory barrier \
- * removal testing. It was supposed to be removed before FCS but has \
- * been re-added (see 6401008) */ \
-- product(bool, UseMembar, false, \
-+ product(bool, UseMembar, true, \
- "(Unstable) Issues membars on thread state transitions") \
- \
- /* Temporary: See 6948537 */ \
---- hotspot/src/share/vm/runtime/os.cpp 2011-01-20 18:51:22.000000000 -0500
-+++ hotspot/src/share/vm/runtime/os.cpp 2011-02-01 17:47:12.000000000 -0500
-@@ -79,7 +79,11 @@
+--- hotspot/src/share/vm/prims/jni.cpp 2011-07-05 14:31:04.000000000 -0400
++++ hotspot/src/share/vm/prims/jni.cpp 2011-07-07 19:17:03.000000000 -0400
+@@ -88,6 +88,10 @@
+ # include "os_windows.inline.hpp"
+ # include "thread_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "os_bsd.inline.hpp"
++# include "thread_bsd.inline.hpp"
++#endif
+
+ static jint CurrentVersion = JNI_VERSION_1_6;
+
+--- hotspot/src/share/vm/prims/jvm.cpp 2011-07-05 14:31:04.000000000 -0400
++++ hotspot/src/share/vm/prims/jvm.cpp 2011-07-07 19:17:03.000000000 -0400
+@@ -72,6 +72,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "jvm_windows.h"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "jvm_bsd.h"
++#endif
+
+ #include <errno.h>
+
+--- hotspot/src/share/vm/prims/jvm.h 2011-07-05 14:31:04.000000000 -0400
++++ hotspot/src/share/vm/prims/jvm.h 2011-07-07 19:17:03.000000000 -0400
+@@ -36,6 +36,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "jvm_windows.h"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "jvm_bsd.h"
++#endif
+
+ #ifndef _JAVASOFT_JVM_H_
+ #define _JAVASOFT_JVM_H_
+--- hotspot/src/share/vm/prims/jvmtiEnv.cpp 2011-07-05 14:31:04.000000000 -0400
++++ hotspot/src/share/vm/prims/jvmtiEnv.cpp 2011-07-07 19:17:03.000000000 -0400
+@@ -68,6 +68,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "thread_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "thread_bsd.inline.hpp"
++#endif
+
+
+
+--- hotspot/src/share/vm/prims/jvmtiImpl.cpp 2011-07-05 14:31:04.000000000 -0400
++++ hotspot/src/share/vm/prims/jvmtiImpl.cpp 2011-07-07 19:17:03.000000000 -0400
+@@ -51,6 +51,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "thread_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "thread_bsd.inline.hpp"
++#endif
+
+ //
+ // class JvmtiAgentThread
+--- hotspot/src/share/vm/prims/nativeLookup.cpp 2011-07-05 14:31:04.000000000 -0400
++++ hotspot/src/share/vm/prims/nativeLookup.cpp 2011-07-07 19:17:03.000000000 -0400
+@@ -49,6 +49,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "os_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "os_bsd.inline.hpp"
++#endif
+
+
+ static void mangle_name_on(outputStream* st, symbolOop name, int begin, int end) {
+--- hotspot/src/share/vm/runtime/arguments.cpp 2011-07-05 14:31:04.000000000 -0400
++++ hotspot/src/share/vm/runtime/arguments.cpp 2011-07-07 19:17:03.000000000 -0400
+@@ -55,6 +55,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "os_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "os_bsd.inline.hpp"
++#endif
+ #ifndef SERIALGC
+ #include "gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.hpp"
+ #endif
+--- hotspot/src/share/vm/runtime/atomic.cpp 2011-07-05 14:31:04.000000000 -0400
++++ hotspot/src/share/vm/runtime/atomic.cpp 2011-07-07 19:17:03.000000000 -0400
+@@ -33,6 +33,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "os_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "os_bsd.inline.hpp"
++#endif
+ #ifdef TARGET_OS_ARCH_linux_x86
+ # include "atomic_linux_x86.inline.hpp"
+ #endif
+@@ -51,6 +54,12 @@
+ #ifdef TARGET_OS_ARCH_windows_x86
+ # include "atomic_windows_x86.inline.hpp"
+ #endif
++#ifdef TARGET_OS_ARCH_bsd_x86
++# include "atomic_bsd_x86.inline.hpp"
++#endif
++#ifdef TARGET_OS_ARCH_bsd_zero
++# include "atomic_bsd_zero.inline.hpp"
++#endif
+
+ jbyte Atomic::cmpxchg(jbyte exchange_value, volatile jbyte* dest, jbyte compare_value) {
+ assert(sizeof(jbyte) == 1, "assumption.");
+--- hotspot/src/share/vm/runtime/fprofiler.hpp 2011-07-05 14:31:04.000000000 -0400
++++ hotspot/src/share/vm/runtime/fprofiler.hpp 2011-07-07 19:17:03.000000000 -0400
+@@ -35,6 +35,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "thread_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "thread_bsd.inline.hpp"
++#endif
+
+ // a simple flat profiler for Java
+
+--- hotspot/src/share/vm/runtime/globals.hpp 2011-07-05 14:31:04.000000000 -0400
++++ hotspot/src/share/vm/runtime/globals.hpp 2011-07-07 19:17:03.000000000 -0400
+@@ -44,6 +44,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "globals_windows.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "globals_bsd.hpp"
++#endif
+ #ifdef TARGET_OS_ARCH_linux_x86
+ # include "globals_linux_x86.hpp"
+ #endif
+@@ -62,6 +65,12 @@
+ #ifdef TARGET_OS_ARCH_windows_x86
+ # include "globals_windows_x86.hpp"
+ #endif
++#ifdef TARGET_OS_ARCH_bsd_x86
++# include "globals_bsd_x86.hpp"
++#endif
++#ifdef TARGET_OS_ARCH_bsd_zero
++# include "globals_bsd_zero.hpp"
++#endif
+ #ifdef COMPILER1
+ #ifdef TARGET_ARCH_x86
+ # include "c1_globals_x86.hpp"
+@@ -78,6 +87,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "c1_globals_windows.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "c1_globals_bsd.hpp"
++#endif
+ #endif
+ #ifdef COMPILER2
+ #ifdef TARGET_ARCH_x86
+@@ -95,6 +107,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "c2_globals_windows.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "c2_globals_bsd.hpp"
++#endif
+ #endif
+ #ifdef SHARK
+ #ifdef TARGET_ARCH_zero
+--- hotspot/src/share/vm/runtime/handles.cpp 2011-07-05 14:31:04.000000000 -0400
++++ hotspot/src/share/vm/runtime/handles.cpp 2011-07-07 19:17:03.000000000 -0400
+@@ -38,6 +38,10 @@
+ # include "os_windows.inline.hpp"
+ # include "thread_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "os_bsd.inline.hpp"
++# include "thread_bsd.inline.hpp"
++#endif
+
+ #ifdef ASSERT
+ oop* HandleArea::allocate_handle(oop obj) {
+--- hotspot/src/share/vm/runtime/handles.inline.hpp 2011-07-05 14:31:04.000000000 -0400
++++ hotspot/src/share/vm/runtime/handles.inline.hpp 2011-07-07 19:17:03.000000000 -0400
+@@ -35,6 +35,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "thread_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "thread_bsd.inline.hpp"
++#endif
+
+ // these inline functions are in a separate file to break an include cycle
+ // between Thread and Handle
+--- hotspot/src/share/vm/runtime/interfaceSupport.hpp 2011-07-05 14:31:04.000000000 -0400
++++ hotspot/src/share/vm/runtime/interfaceSupport.hpp 2011-07-07 19:17:03.000000000 -0400
+@@ -44,6 +44,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "thread_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "thread_bsd.inline.hpp"
++#endif
+
+ // Wrapper for all entry points to the virtual machine.
+ // The HandleMarkCleaner is a faster version of HandleMark.
+@@ -114,6 +117,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "interfaceSupport_windows.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "interfaceSupport_bsd.hpp"
++#endif
+
+ };
+
+--- hotspot/src/share/vm/runtime/java.cpp 2011-07-05 14:31:04.000000000 -0400
++++ hotspot/src/share/vm/runtime/java.cpp 2011-07-07 19:17:03.000000000 -0400
+@@ -79,6 +79,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "thread_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "thread_bsd.inline.hpp"
++#endif
+ #ifndef SERIALGC
+ #include "gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.hpp"
+ #include "gc_implementation/parallelScavenge/psScavenge.hpp"
+--- hotspot/src/share/vm/runtime/javaCalls.cpp 2011-07-05 14:31:05.000000000 -0400
++++ hotspot/src/share/vm/runtime/javaCalls.cpp 2011-07-07 19:17:03.000000000 -0400
+@@ -48,6 +48,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "thread_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "thread_bsd.inline.hpp"
++#endif
+
+ // -----------------------------------------------------
+ // Implementation of JavaCallWrapper
+--- hotspot/src/share/vm/runtime/javaCalls.hpp 2011-07-05 14:31:05.000000000 -0400
++++ hotspot/src/share/vm/runtime/javaCalls.hpp 2011-07-07 19:17:03.000000000 -0400
+@@ -48,6 +48,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "thread_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "thread_bsd.inline.hpp"
++#endif
+
+ // A JavaCallWrapper is constructed before each JavaCall and destructed after the call.
+ // Its purpose is to allocate/deallocate a new handle block and to save/restore the last
+--- hotspot/src/share/vm/runtime/javaFrameAnchor.hpp 2011-07-05 14:31:05.000000000 -0400
++++ hotspot/src/share/vm/runtime/javaFrameAnchor.hpp 2011-07-07 19:17:03.000000000 -0400
+@@ -44,6 +44,12 @@
+ #ifdef TARGET_OS_ARCH_windows_x86
+ # include "orderAccess_windows_x86.inline.hpp"
+ #endif
++#ifdef TARGET_OS_ARCH_bsd_x86
++# include "orderAccess_bsd_x86.inline.hpp"
++#endif
++#ifdef TARGET_OS_ARCH_bsd_zero
++# include "orderAccess_bsd_zero.inline.hpp"
++#endif
+ //
+ // An object for encapsulating the machine/os dependent part of a JavaThread frame state
+ //
+--- hotspot/src/share/vm/runtime/jniHandles.cpp 2011-07-05 14:31:05.000000000 -0400
++++ hotspot/src/share/vm/runtime/jniHandles.cpp 2011-07-07 19:17:03.000000000 -0400
+@@ -37,6 +37,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "thread_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "thread_bsd.inline.hpp"
++#endif
+
+
+ JNIHandleBlock* JNIHandles::_global_handles = NULL;
+--- hotspot/src/share/vm/runtime/memprofiler.cpp 2011-07-05 14:31:05.000000000 -0400
++++ hotspot/src/share/vm/runtime/memprofiler.cpp 2011-07-07 19:17:03.000000000 -0400
+@@ -46,6 +46,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "thread_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "thread_bsd.inline.hpp"
++#endif
+
+ #ifndef PRODUCT
+
+--- hotspot/src/share/vm/runtime/mutex.cpp 2011-07-05 14:31:05.000000000 -0400
++++ hotspot/src/share/vm/runtime/mutex.cpp 2011-07-07 19:17:03.000000000 -0400
+@@ -39,6 +39,10 @@
+ # include "mutex_windows.inline.hpp"
+ # include "thread_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "mutex_bsd.inline.hpp"
++# include "thread_bsd.inline.hpp"
++#endif
+
+ // o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o
+ //
+--- hotspot/src/share/vm/runtime/mutexLocker.cpp 2011-07-05 14:31:05.000000000 -0400
++++ hotspot/src/share/vm/runtime/mutexLocker.cpp 2011-07-07 19:17:03.000000000 -0400
+@@ -36,6 +36,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "thread_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "thread_bsd.inline.hpp"
++#endif
+
+ // Mutexes used in the VM (see comment in mutexLocker.hpp):
+ //
+--- hotspot/src/share/vm/runtime/mutexLocker.hpp 2011-07-05 14:31:05.000000000 -0400
++++ hotspot/src/share/vm/runtime/mutexLocker.hpp 2011-07-07 19:17:03.000000000 -0400
+@@ -36,6 +36,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "os_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "os_bsd.inline.hpp"
++#endif
+
+ // Mutexes used in the VM.
+
+--- hotspot/src/share/vm/runtime/objectMonitor.cpp 2011-07-05 14:31:05.000000000 -0400
++++ hotspot/src/share/vm/runtime/objectMonitor.cpp 2011-07-07 19:17:03.000000000 -0400
+@@ -50,6 +50,10 @@
+ # include "os_windows.inline.hpp"
+ # include "thread_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "os_bsd.inline.hpp"
++# include "thread_bsd.inline.hpp"
++#endif
+
+ #if defined(__GNUC__) && !defined(IA64)
+ // Need to inhibit inlining for older versions of GCC to avoid build-time failures
+--- hotspot/src/share/vm/runtime/os.cpp 2011-07-05 14:31:05.000000000 -0400
++++ hotspot/src/share/vm/runtime/os.cpp 2011-07-07 19:17:03.000000000 -0400
+@@ -60,6 +60,10 @@
+ # include "os_windows.inline.hpp"
+ # include "thread_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "os_bsd.inline.hpp"
++# include "thread_bsd.inline.hpp"
++#endif
+
+ # include <signal.h>
+
+@@ -115,7 +119,11 @@
assert(false, "Failed localtime_pd");
return NULL;
}
@@ -7160,9 +8092,235 @@
// If daylight savings time is in effect,
// we are 1 hour East of our time zone
---- hotspot/src/share/vm/runtime/vm_version.cpp 2011-01-20 18:51:22.000000000 -0500
-+++ hotspot/src/share/vm/runtime/vm_version.cpp 2011-02-01 17:47:12.000000000 -0500
-@@ -148,7 +148,8 @@
+--- hotspot/src/share/vm/runtime/os.hpp 2011-07-05 14:31:05.000000000 -0400
++++ hotspot/src/share/vm/runtime/os.hpp 2011-07-07 19:17:03.000000000 -0400
+@@ -30,6 +30,9 @@
+ #include "runtime/extendedPC.hpp"
+ #include "runtime/handles.hpp"
+ #include "utilities/top.hpp"
++#ifdef TARGET_OS_FAMILY_bsd
++# include "jvm_bsd.h"
++#endif
+ #ifdef TARGET_OS_FAMILY_linux
+ # include "jvm_linux.h"
+ #endif
+@@ -658,6 +661,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "os_windows.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "os_bsd.hpp"
++#endif
+ #ifdef TARGET_OS_ARCH_linux_x86
+ # include "os_linux_x86.hpp"
+ #endif
+@@ -676,6 +682,12 @@
+ #ifdef TARGET_OS_ARCH_windows_x86
+ # include "os_windows_x86.hpp"
+ #endif
++#ifdef TARGET_OS_ARCH_bsd_x86
++# include "os_bsd_x86.hpp"
++#endif
++#ifdef TARGET_OS_ARCH_linux_zero
++# include "os_bsd_zero.hpp"
++#endif
+
+
+ // debugging support (mostly used by debug.cpp but also fatal error handler)
+--- hotspot/src/share/vm/runtime/osThread.hpp 2011-07-05 14:31:05.000000000 -0400
++++ hotspot/src/share/vm/runtime/osThread.hpp 2011-07-07 19:17:03.000000000 -0400
+@@ -109,6 +109,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "osThread_windows.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "osThread_bsd.hpp"
++#endif
+
+ };
+
+--- hotspot/src/share/vm/runtime/safepoint.cpp 2011-07-05 14:31:05.000000000 -0400
++++ hotspot/src/share/vm/runtime/safepoint.cpp 2011-07-07 19:17:03.000000000 -0400
+@@ -70,6 +70,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "thread_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "thread_bsd.inline.hpp"
++#endif
+ #ifndef SERIALGC
+ #include "gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.hpp"
+ #include "gc_implementation/shared/concurrentGCThread.hpp"
+--- hotspot/src/share/vm/runtime/synchronizer.cpp 2011-07-05 14:31:05.000000000 -0400
++++ hotspot/src/share/vm/runtime/synchronizer.cpp 2011-07-07 19:17:03.000000000 -0400
+@@ -51,6 +51,10 @@
+ # include "os_windows.inline.hpp"
+ # include "thread_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "os_bsd.inline.hpp"
++# include "thread_bsd.inline.hpp"
++#endif
+
+ #if defined(__GNUC__) && !defined(IA64)
+ // Need to inhibit inlining for older versions of GCC to avoid build-time failures
+--- hotspot/src/share/vm/runtime/task.cpp 2011-07-05 14:31:05.000000000 -0400
++++ hotspot/src/share/vm/runtime/task.cpp 2011-07-07 19:17:03.000000000 -0400
+@@ -39,6 +39,10 @@
+ # include "os_windows.inline.hpp"
+ # include "thread_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "os_bsd.inline.hpp"
++# include "thread_bsd.inline.hpp"
++#endif
+
+ int PeriodicTask::_num_tasks = 0;
+ PeriodicTask* PeriodicTask::_tasks[PeriodicTask::max_tasks];
+--- hotspot/src/share/vm/runtime/thread.cpp 2011-07-05 14:31:05.000000000 -0400
++++ hotspot/src/share/vm/runtime/thread.cpp 2011-07-07 19:17:03.000000000 -0400
+@@ -88,6 +88,10 @@
+ # include "os_windows.inline.hpp"
+ # include "thread_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "os_bsd.inline.hpp"
++# include "thread_bsd.inline.hpp"
++#endif
+ #ifndef SERIALGC
+ #include "gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.hpp"
+ #include "gc_implementation/g1/concurrentMarkThread.inline.hpp"
+--- hotspot/src/share/vm/runtime/thread.hpp 2011-07-05 14:31:05.000000000 -0400
++++ hotspot/src/share/vm/runtime/thread.hpp 2011-07-07 19:17:03.000000000 -0400
+@@ -1598,6 +1598,12 @@
+ #ifdef TARGET_OS_ARCH_windows_x86
+ # include "thread_windows_x86.hpp"
+ #endif
++#ifdef TARGET_OS_ARCH_bsd_x86
++# include "thread_bsd_x86.hpp"
++#endif
++#ifdef TARGET_OS_ARCH_bsd_zero
++# include "thread_bsd_zero.hpp"
++#endif
+
+
+ public:
+--- hotspot/src/share/vm/runtime/threadLocalStorage.cpp 2011-07-05 14:31:05.000000000 -0400
++++ hotspot/src/share/vm/runtime/threadLocalStorage.cpp 2011-07-07 19:17:03.000000000 -0400
+@@ -36,6 +36,10 @@
+ # include "os_windows.inline.hpp"
+ # include "thread_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "os_bsd.inline.hpp"
++# include "thread_bsd.inline.hpp"
++#endif
+
+ // static member initialization
+ int ThreadLocalStorage::_thread_index = -1;
+--- hotspot/src/share/vm/runtime/threadLocalStorage.hpp 2011-07-05 14:31:05.000000000 -0400
++++ hotspot/src/share/vm/runtime/threadLocalStorage.hpp 2011-07-07 19:17:03.000000000 -0400
+@@ -62,6 +62,12 @@
+ #ifdef TARGET_OS_ARCH_windows_x86
+ # include "threadLS_windows_x86.hpp"
+ #endif
++#ifdef TARGET_OS_ARCH_bsd_x86
++# include "threadLS_bsd_x86.hpp"
++#endif
++#ifdef TARGET_OS_ARCH_bsd_zero
++# include "threadLS_bsd_zero.hpp"
++#endif
+
+
+ public:
+--- hotspot/src/share/vm/runtime/timer.cpp 2011-07-05 14:31:05.000000000 -0400
++++ hotspot/src/share/vm/runtime/timer.cpp 2011-07-07 19:17:03.000000000 -0400
+@@ -35,6 +35,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "os_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "os_bsd.inline.hpp"
++#endif
+
+
+ void elapsedTimer::add(elapsedTimer t) {
+--- hotspot/src/share/vm/runtime/virtualspace.cpp 2011-07-05 14:31:05.000000000 -0400
++++ hotspot/src/share/vm/runtime/virtualspace.cpp 2011-07-07 19:17:03.000000000 -0400
+@@ -35,6 +35,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "os_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "os_bsd.inline.hpp"
++#endif
+
+
+ // ReservedSpace
+--- hotspot/src/share/vm/runtime/vmStructs.cpp 2011-07-05 14:31:05.000000000 -0400
++++ hotspot/src/share/vm/runtime/vmStructs.cpp 2011-07-07 19:17:03.000000000 -0400
+@@ -118,6 +118,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "thread_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "thread_bsd.inline.hpp"
++#endif
+ #ifdef TARGET_OS_ARCH_linux_x86
+ # include "vmStructs_linux_x86.hpp"
+ #endif
+@@ -136,6 +139,12 @@
+ #ifdef TARGET_OS_ARCH_windows_x86
+ # include "vmStructs_windows_x86.hpp"
+ #endif
++#ifdef TARGET_OS_ARCH_bsd_x86
++# include "vmStructs_bsd_x86.hpp"
++#endif
++#ifdef TARGET_OS_ARCH_bsd_zero
++# include "vmStructs_bsd_zero.hpp"
++#endif
+ #ifndef SERIALGC
+ #include "gc_implementation/concurrentMarkSweep/cmsPermGen.hpp"
+ #include "gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.hpp"
+--- hotspot/src/share/vm/runtime/vmThread.cpp 2011-07-05 14:31:05.000000000 -0400
++++ hotspot/src/share/vm/runtime/vmThread.cpp 2011-07-07 19:17:03.000000000 -0400
+@@ -46,6 +46,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "thread_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "thread_bsd.inline.hpp"
++#endif
+
+ HS_DTRACE_PROBE_DECL3(hotspot, vmops__request, char *, uintptr_t, int);
+ HS_DTRACE_PROBE_DECL3(hotspot, vmops__begin, char *, uintptr_t, int);
+--- hotspot/src/share/vm/runtime/vmThread.hpp 2011-07-05 14:31:05.000000000 -0400
++++ hotspot/src/share/vm/runtime/vmThread.hpp 2011-07-07 19:17:03.000000000 -0400
+@@ -36,6 +36,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "thread_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "thread_bsd.inline.hpp"
++#endif
+
+ //
+ // Prioritized queue of VM operations.
+--- hotspot/src/share/vm/runtime/vm_operations.cpp 2011-07-05 14:31:05.000000000 -0400
++++ hotspot/src/share/vm/runtime/vm_operations.cpp 2011-07-07 19:17:03.000000000 -0400
+@@ -43,6 +43,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "thread_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "thread_bsd.inline.hpp"
++#endif
+
+ #define VM_OP_NAME_INITIALIZE(name) #name,
+
+--- hotspot/src/share/vm/runtime/vm_version.cpp 2011-07-05 14:31:05.000000000 -0400
++++ hotspot/src/share/vm/runtime/vm_version.cpp 2011-07-07 19:17:03.000000000 -0400
+@@ -160,7 +160,8 @@
#define OS LINUX_ONLY("linux") \
WINDOWS_ONLY("windows") \
@@ -7172,9 +8330,105 @@
#ifdef ZERO
#define CPU ZERO_LIBARCH
---- hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp 2011-02-28 11:03:22.000000000 -0500
-+++ hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp 2011-03-01 13:02:03.000000000 -0500
-@@ -71,13 +71,26 @@
+--- hotspot/src/share/vm/utilities/accessFlags.cpp 2011-07-05 14:31:05.000000000 -0400
++++ hotspot/src/share/vm/utilities/accessFlags.cpp 2011-07-07 19:17:03.000000000 -0400
+@@ -34,6 +34,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "os_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "os_bsd.inline.hpp"
++#endif
+
+
+ void AccessFlags::atomic_set_bits(jint bits) {
+--- hotspot/src/share/vm/utilities/array.cpp 2011-07-05 14:31:05.000000000 -0400
++++ hotspot/src/share/vm/utilities/array.cpp 2011-07-07 19:17:03.000000000 -0400
+@@ -34,6 +34,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "thread_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "thread_bsd.inline.hpp"
++#endif
+
+
+ #ifdef ASSERT
+--- hotspot/src/share/vm/utilities/bitMap.cpp 2011-07-05 14:31:05.000000000 -0400
++++ hotspot/src/share/vm/utilities/bitMap.cpp 2011-07-07 19:17:03.000000000 -0400
+@@ -35,6 +35,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "os_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "os_bsd.inline.hpp"
++#endif
+
+
+ BitMap::BitMap(bm_word_t* map, idx_t size_in_bits) :
+--- hotspot/src/share/vm/utilities/debug.cpp 2011-07-05 14:31:05.000000000 -0400
++++ hotspot/src/share/vm/utilities/debug.cpp 2011-07-07 19:17:03.000000000 -0400
+@@ -62,6 +62,10 @@
+ # include "os_windows.inline.hpp"
+ # include "thread_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "os_bsd.inline.hpp"
++# include "thread_bsd.inline.hpp"
++#endif
+
+ #ifndef ASSERT
+ # ifdef _DEBUG
+--- hotspot/src/share/vm/utilities/elfFile.hpp 2011-07-05 14:31:05.000000000 -0400
++++ hotspot/src/share/vm/utilities/elfFile.hpp 2011-07-07 19:17:03.000000000 -0400
+@@ -41,7 +41,9 @@
+ typedef Elf64_Shdr Elf_Shdr;
+ typedef Elf64_Sym Elf_Sym;
+
++#ifndef _ALLBSD_SOURCE
+ #define ELF_ST_TYPE ELF64_ST_TYPE
++#endif
+
+ #else
+
+@@ -55,8 +57,10 @@
+ typedef Elf32_Shdr Elf_Shdr;
+ typedef Elf32_Sym Elf_Sym;
+
++#ifndef _ALLBSD_SOURCE
+ #define ELF_ST_TYPE ELF32_ST_TYPE
+ #endif
++#endif
+
+ #include "globalDefinitions.hpp"
+ #include "memory/allocation.hpp"
+--- hotspot/src/share/vm/utilities/events.cpp 2011-07-05 14:31:05.000000000 -0400
++++ hotspot/src/share/vm/utilities/events.cpp 2011-07-07 19:17:03.000000000 -0400
+@@ -38,6 +38,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "thread_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "thread_bsd.inline.hpp"
++#endif
+
+
+ #ifndef PRODUCT
+--- hotspot/src/share/vm/utilities/exceptions.cpp 2011-07-05 14:31:05.000000000 -0400
++++ hotspot/src/share/vm/utilities/exceptions.cpp 2011-07-07 19:17:03.000000000 -0400
+@@ -42,6 +42,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "thread_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "thread_bsd.inline.hpp"
++#endif
+
+
+ // Implementation of ThreadShadow
+--- hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp 2011-07-05 14:31:05.000000000 -0400
++++ hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp 2011-07-07 19:17:03.000000000 -0400
+@@ -76,13 +76,26 @@
# include <sys/procfs.h>
# endif
@@ -7203,7 +8457,7 @@
// 4810578: varargs unsafe on 32-bit integer/64-bit pointer architectures
// When __cplusplus is defined, NULL is defined as 0 (32-bit constant) in
-@@ -113,7 +126,7 @@
+@@ -118,7 +131,7 @@
// pointer is stored as integer value. On some platforms, sizeof(intptr_t) >
// sizeof(void*), so here we want something which is integer type, but has the
// same size as a pointer.
@@ -7212,7 +8466,7 @@
#ifdef _LP64
#define NULL_WORD 0L
#else
-@@ -125,7 +138,7 @@
+@@ -130,7 +143,7 @@
#define NULL_WORD NULL
#endif
@@ -7221,7 +8475,7 @@
// Compiler-specific primitive types
typedef unsigned short uint16_t;
#ifndef _UINT32_T
-@@ -145,7 +158,7 @@
+@@ -150,7 +163,7 @@
// prior definition of intptr_t, and add "&& !defined(XXX)" above.
#endif // _SYS_INT_TYPES_H
@@ -7230,7 +8484,7 @@
// Additional Java basic types
-@@ -237,7 +250,9 @@
+@@ -242,7 +255,9 @@
inline int g_isnan(float f) { return isnand(f); }
#endif
inline int g_isnan(double f) { return isnand(f); }
@@ -7241,9 +8495,33 @@
inline int g_isnan(float f) { return isnanf(f); }
inline int g_isnan(double f) { return isnan(f); }
#else
---- hotspot/src/share/vm/utilities/macros.hpp 2011-01-20 18:51:22.000000000 -0500
-+++ hotspot/src/share/vm/utilities/macros.hpp 2011-02-01 17:47:12.000000000 -0500
-@@ -148,6 +148,14 @@
+--- hotspot/src/share/vm/utilities/growableArray.cpp 2011-07-05 14:31:05.000000000 -0400
++++ hotspot/src/share/vm/utilities/growableArray.cpp 2011-07-07 19:17:03.000000000 -0400
+@@ -34,6 +34,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "thread_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "thread_bsd.inline.hpp"
++#endif
+ #ifdef ASSERT
+ void GenericGrowableArray::set_nesting() {
+ if (on_stack()) {
+--- hotspot/src/share/vm/utilities/histogram.hpp 2011-07-05 14:31:05.000000000 -0400
++++ hotspot/src/share/vm/utilities/histogram.hpp 2011-07-07 19:17:03.000000000 -0400
+@@ -37,6 +37,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "os_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "os_bsd.inline.hpp"
++#endif
+
+ // This class provides a framework for collecting various statistics.
+ // The current implementation is oriented towards counting invocations
+--- hotspot/src/share/vm/utilities/macros.hpp 2011-07-05 14:31:05.000000000 -0400
++++ hotspot/src/share/vm/utilities/macros.hpp 2011-07-07 19:17:03.000000000 -0400
+@@ -161,6 +161,14 @@
#define NOT_WINDOWS(code) code
#endif
@@ -7258,9 +8536,19 @@
#if defined(IA32) || defined(AMD64)
#define X86
#define X86_ONLY(code) code
---- hotspot/src/share/vm/utilities/ostream.cpp 2011-01-20 18:51:22.000000000 -0500
-+++ hotspot/src/share/vm/utilities/ostream.cpp 2011-02-01 17:47:12.000000000 -0500
-@@ -848,7 +848,7 @@
+--- hotspot/src/share/vm/utilities/ostream.cpp 2011-07-05 14:31:05.000000000 -0400
++++ hotspot/src/share/vm/utilities/ostream.cpp 2011-07-07 19:17:03.000000000 -0400
+@@ -39,6 +39,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "os_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "os_bsd.inline.hpp"
++#endif
+
+ extern "C" void jio_print(const char* s); // Declarationtion of jvm method
+
+@@ -863,7 +866,7 @@
#ifndef PRODUCT
@@ -7269,9 +8557,48 @@
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
---- hotspot/src/share/vm/utilities/vmError.cpp 2011-01-20 18:51:22.000000000 -0500
-+++ hotspot/src/share/vm/utilities/vmError.cpp 2011-02-01 17:47:12.000000000 -0500
-@@ -31,13 +31,18 @@
+--- hotspot/src/share/vm/utilities/preserveException.hpp 2011-07-05 14:31:05.000000000 -0400
++++ hotspot/src/share/vm/utilities/preserveException.hpp 2011-07-07 19:17:03.000000000 -0400
+@@ -35,6 +35,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "thread_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "thread_bsd.inline.hpp"
++#endif
+
+ // This file provides more support for exception handling; see also exceptions.hpp
+ class PreserveExceptionMark {
+--- hotspot/src/share/vm/utilities/taskqueue.cpp 2011-07-05 14:31:05.000000000 -0400
++++ hotspot/src/share/vm/utilities/taskqueue.cpp 2011-07-07 19:17:03.000000000 -0400
+@@ -37,6 +37,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "thread_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "thread_bsd.inline.hpp"
++#endif
+
+ #ifdef TRACESPINNING
+ uint ParallelTaskTerminator::_total_yields = 0;
+--- hotspot/src/share/vm/utilities/taskqueue.hpp 2011-07-05 14:31:05.000000000 -0400
++++ hotspot/src/share/vm/utilities/taskqueue.hpp 2011-07-07 19:17:03.000000000 -0400
+@@ -47,6 +47,12 @@
+ #ifdef TARGET_OS_ARCH_windows_x86
+ # include "orderAccess_windows_x86.inline.hpp"
+ #endif
++#ifdef TARGET_OS_ARCH_bsd_x86
++# include "orderAccess_bsd_x86.inline.hpp"
++#endif
++#ifdef TARGET_OS_ARCH_bsd_zero
++# include "orderAccess_bsd_zero.inline.hpp"
++#endif
+
+ // Simple TaskQueue stats that are collected by default in debug builds.
+
+--- hotspot/src/share/vm/utilities/vmError.cpp 2011-07-05 14:31:05.000000000 -0400
++++ hotspot/src/share/vm/utilities/vmError.cpp 2011-07-07 19:17:03.000000000 -0400
+@@ -44,13 +44,18 @@
"JAVA_HOME", "JRE_HOME", "JAVA_TOOL_OPTIONS", "_JAVA_OPTIONS", "CLASSPATH",
"JAVA_COMPILER", "PATH", "USERNAME",
@@ -7291,7 +8618,7 @@
// defined on Windows
"OS", "PROCESSOR_IDENTIFIER", "_ALT_JAVA_HOME_DIR",
-@@ -861,7 +866,7 @@
+@@ -922,7 +927,7 @@
const char* ptr = OnError;
while ((cmd = next_OnError_command(buffer, sizeof(buffer), &ptr)) != NULL){
out.print_raw ("# Executing ");
@@ -7300,8 +8627,20 @@
out.print_raw ("/bin/sh -c ");
#elif defined(SOLARIS)
out.print_raw ("/usr/bin/sh -c ");
---- jdk/make/com/sun/java/pack/Makefile 2011-01-20 18:54:05.000000000 -0500
-+++ jdk/make/com/sun/java/pack/Makefile 2011-02-01 17:46:55.000000000 -0500
+--- hotspot/src/share/vm/utilities/workgroup.hpp 2011-07-05 14:31:05.000000000 -0400
++++ hotspot/src/share/vm/utilities/workgroup.hpp 2011-07-07 19:17:03.000000000 -0400
+@@ -35,6 +35,9 @@
+ #ifdef TARGET_OS_FAMILY_windows
+ # include "thread_windows.inline.hpp"
+ #endif
++#ifdef TARGET_OS_FAMILY_bsd
++# include "thread_bsd.inline.hpp"
++#endif
+
+ // Forward declarations of classes defined here
+
+--- jdk/make/com/sun/java/pack/Makefile 2011-07-05 14:35:27.000000000 -0400
++++ jdk/make/com/sun/java/pack/Makefile 2011-07-07 19:17:03.000000000 -0400
@@ -61,6 +61,7 @@
@@ -7333,8 +8672,8 @@
OTHER_LDLIBS += $(LIBCXX)
# setup the list of libraries to link in...
ifeq ($(PLATFORM), linux)
---- jdk/make/com/sun/security/auth/module/Makefile 2011-01-20 18:54:05.000000000 -0500
-+++ jdk/make/com/sun/security/auth/module/Makefile 2011-02-01 17:46:55.000000000 -0500
+--- jdk/make/com/sun/security/auth/module/Makefile 2011-07-05 14:35:27.000000000 -0400
++++ jdk/make/com/sun/security/auth/module/Makefile 2011-07-07 19:17:03.000000000 -0400
@@ -70,7 +70,7 @@
include FILES_c_solaris.gmk
endif # solaris
@@ -7344,8 +8683,8 @@
LIBRARY = jaas_unix
include FILES_export_unix.gmk
include FILES_c_unix.gmk
---- jdk/make/com/sun/tools/attach/Exportedfiles.gmk 2011-01-20 18:54:05.000000000 -0500
-+++ jdk/make/com/sun/tools/attach/Exportedfiles.gmk 2011-02-01 17:46:55.000000000 -0500
+--- jdk/make/com/sun/tools/attach/Exportedfiles.gmk 2011-07-05 14:35:27.000000000 -0400
++++ jdk/make/com/sun/tools/attach/Exportedfiles.gmk 2011-07-07 19:17:03.000000000 -0400
@@ -43,5 +43,7 @@
sun/tools/attach/LinuxVirtualMachine.java
endif
@@ -7356,8 +8695,8 @@
+FILES_export = \
+ sun/tools/attach/BsdVirtualMachine.java
+endif
---- jdk/make/com/sun/tools/attach/FILES_c.gmk 2011-01-20 18:54:05.000000000 -0500
-+++ jdk/make/com/sun/tools/attach/FILES_c.gmk 2011-02-01 17:46:55.000000000 -0500
+--- jdk/make/com/sun/tools/attach/FILES_c.gmk 2011-07-05 14:35:27.000000000 -0400
++++ jdk/make/com/sun/tools/attach/FILES_c.gmk 2011-07-07 19:17:03.000000000 -0400
@@ -39,4 +39,7 @@
LinuxVirtualMachine.c
endif
@@ -7367,8 +8706,8 @@
+FILES_c = \
+ BsdVirtualMachine.c
+endif
---- jdk/make/com/sun/tools/attach/FILES_java.gmk 2011-01-20 18:54:05.000000000 -0500
-+++ jdk/make/com/sun/tools/attach/FILES_java.gmk 2011-02-01 17:46:55.000000000 -0500
+--- jdk/make/com/sun/tools/attach/FILES_java.gmk 2011-07-05 14:35:27.000000000 -0400
++++ jdk/make/com/sun/tools/attach/FILES_java.gmk 2011-07-07 19:17:03.000000000 -0400
@@ -43,6 +43,11 @@
sun/tools/attach/LinuxAttachProvider.java
endif
@@ -7381,8 +8720,8 @@
#
# Files that need to be copied
#
---- jdk/make/com/sun/tools/attach/Makefile 2011-01-20 18:54:05.000000000 -0500
-+++ jdk/make/com/sun/tools/attach/Makefile 2011-02-01 17:46:55.000000000 -0500
+--- jdk/make/com/sun/tools/attach/Makefile 2011-07-05 14:35:27.000000000 -0400
++++ jdk/make/com/sun/tools/attach/Makefile 2011-07-07 19:17:03.000000000 -0400
@@ -36,6 +36,9 @@
ifeq ($(PLATFORM), linux)
FILES_m = mapfile-linux
@@ -7393,8 +8732,8 @@
include $(BUILDDIR)/common/Mapfile-vers.gmk
#
---- jdk/make/com/sun/tools/attach/mapfile-bsd 2011-02-01 17:20:23.000000000 -0500
-+++ jdk/make/com/sun/tools/attach/mapfile-bsd 2011-02-01 17:46:55.000000000 -0500
+--- jdk/make/com/sun/tools/attach/mapfile-bsd 2011-07-07 19:16:00.000000000 -0400
++++ jdk/make/com/sun/tools/attach/mapfile-bsd 2011-07-07 19:17:03.000000000 -0400
@@ -30,14 +30,12 @@
Java_sun_tools_attach_BsdVirtualMachine_checkPermissions;
Java_sun_tools_attach_BsdVirtualMachine_close;
@@ -7411,8 +8750,8 @@
local:
*;
};
---- jdk/make/common/Defs-bsd.gmk 2011-02-01 17:20:23.000000000 -0500
-+++ jdk/make/common/Defs-bsd.gmk 2011-02-01 17:46:55.000000000 -0500
+--- jdk/make/common/Defs-bsd.gmk 2011-07-07 19:16:00.000000000 -0400
++++ jdk/make/common/Defs-bsd.gmk 2011-07-07 19:17:03.000000000 -0400
@@ -43,12 +43,6 @@
# Get shared JDK settings
include $(JDK_MAKE_SHARED_DIR)/Defs.gmk
@@ -7563,8 +8902,8 @@
#
# Japanese manpages
#
---- jdk/make/common/Defs-linux.gmk 2011-01-20 18:54:05.000000000 -0500
-+++ jdk/make/common/Defs-linux.gmk 2011-02-01 17:46:55.000000000 -0500
+--- jdk/make/common/Defs-linux.gmk 2011-07-05 14:35:27.000000000 -0400
++++ jdk/make/common/Defs-linux.gmk 2011-07-07 19:17:03.000000000 -0400
@@ -318,7 +318,7 @@
override LIBTHREAD =
override MOOT_PRIORITIES = true
@@ -7574,8 +8913,8 @@
ifeq ($(ARCH), amd64)
override OPENWIN_LIB = $(OPENWIN_HOME)/lib64
else
---- jdk/make/common/Defs.gmk 2011-01-20 18:54:05.000000000 -0500
-+++ jdk/make/common/Defs.gmk 2011-02-01 17:46:55.000000000 -0500
+--- jdk/make/common/Defs.gmk 2011-07-05 14:35:27.000000000 -0400
++++ jdk/make/common/Defs.gmk 2011-07-07 19:17:03.000000000 -0400
@@ -117,6 +117,24 @@
_OUTPUTDIR=$(JDK_TOPDIR)/build/$(PLATFORM)-$(ARCH)
endif
@@ -7620,8 +8959,8 @@
endif # PROGRAM
LDLIBS_COMMON += $(EXTRA_LIBS)
---- jdk/make/common/Program.gmk 2011-01-20 18:54:05.000000000 -0500
-+++ jdk/make/common/Program.gmk 2011-02-01 17:46:55.000000000 -0500
+--- jdk/make/common/Program.gmk 2011-07-05 14:35:27.000000000 -0400
++++ jdk/make/common/Program.gmk 2011-07-07 19:17:03.000000000 -0400
@@ -67,11 +67,27 @@
# Create a dependency on libjli (Java Launcher Infrastructure)
#
@@ -7682,8 +9021,8 @@
OTHER_CPPFLAGS += -DPROGNAME='"$(PROGRAM)"'
VERSION_DEFINES += -DFULL_VERSION='"$(FULL_VERSION)"'
---- jdk/make/common/Release.gmk 2011-01-20 18:54:05.000000000 -0500
-+++ jdk/make/common/Release.gmk 2011-02-01 17:46:55.000000000 -0500
+--- jdk/make/common/Release.gmk 2011-07-05 14:35:27.000000000 -0400
++++ jdk/make/common/Release.gmk 2011-07-07 19:17:03.000000000 -0400
@@ -145,14 +145,13 @@
tnameserv.1 \
unpack200.1
@@ -7752,8 +9091,8 @@
| ($(CD) $(JDK_IMAGE_DIR)/src && $(TAR) xf -); \
fi; \
done
---- jdk/make/common/shared/Compiler-gcc.gmk 2011-01-20 18:54:05.000000000 -0500
-+++ jdk/make/common/shared/Compiler-gcc.gmk 2011-02-01 17:46:55.000000000 -0500
+--- jdk/make/common/shared/Compiler-gcc.gmk 2011-07-05 14:35:27.000000000 -0400
++++ jdk/make/common/shared/Compiler-gcc.gmk 2011-07-07 19:17:03.000000000 -0400
@@ -99,6 +99,24 @@
endif
@@ -7779,8 +9118,8 @@
ifeq ($(PLATFORM), solaris)
# Settings specific to Solaris
---- jdk/make/common/shared/Compiler.gmk 2011-01-20 18:54:05.000000000 -0500
-+++ jdk/make/common/shared/Compiler.gmk 2011-02-01 17:46:55.000000000 -0500
+--- jdk/make/common/shared/Compiler.gmk 2011-07-05 14:35:27.000000000 -0400
++++ jdk/make/common/shared/Compiler.gmk 2011-07-07 19:17:03.000000000 -0400
@@ -37,8 +37,8 @@
override CC_VERSION = sun
endif
@@ -7792,8 +9131,8 @@
override CC_VERSION = gcc
endif
---- jdk/make/common/shared/Defs-bsd.gmk 2011-02-01 17:20:23.000000000 -0500
-+++ jdk/make/common/shared/Defs-bsd.gmk 2011-02-01 17:46:55.000000000 -0500
+--- jdk/make/common/shared/Defs-bsd.gmk 2011-07-07 19:16:00.000000000 -0400
++++ jdk/make/common/shared/Defs-bsd.gmk 2011-07-07 19:17:03.000000000 -0400
@@ -70,7 +70,7 @@
endef
@@ -7832,8 +9171,8 @@
# Import JDK images allow for partial builds, components not built are
# imported (or copied from) these import areas when needed.
---- jdk/make/common/shared/Defs-java.gmk 2011-01-20 18:54:05.000000000 -0500
-+++ jdk/make/common/shared/Defs-java.gmk 2011-02-01 17:46:55.000000000 -0500
+--- jdk/make/common/shared/Defs-java.gmk 2011-07-05 14:35:27.000000000 -0400
++++ jdk/make/common/shared/Defs-java.gmk 2011-07-07 19:17:03.000000000 -0400
@@ -42,7 +42,7 @@
# Suspect this may not be needed anymore.
JAVA_MEM_FLAGS += -Xms$(MAX_VM_MEMORY)m -XX:-Inline
@@ -7843,8 +9182,8 @@
endif
#
---- jdk/make/common/shared/Defs-utils.gmk 2011-01-20 18:54:05.000000000 -0500
-+++ jdk/make/common/shared/Defs-utils.gmk 2011-02-01 17:46:55.000000000 -0500
+--- jdk/make/common/shared/Defs-utils.gmk 2011-07-05 14:35:27.000000000 -0400
++++ jdk/make/common/shared/Defs-utils.gmk 2011-07-07 19:17:03.000000000 -0400
@@ -80,6 +80,13 @@
endif
endif
@@ -7892,8 +9231,8 @@
+ TAR = $(UTILS_USR_BIN_PATH)tar
+ endif
+endif
---- jdk/make/common/shared/Defs.gmk 2011-01-20 18:54:05.000000000 -0500
-+++ jdk/make/common/shared/Defs.gmk 2011-02-01 17:46:55.000000000 -0500
+--- jdk/make/common/shared/Defs.gmk 2011-07-05 14:35:27.000000000 -0400
++++ jdk/make/common/shared/Defs.gmk 2011-07-07 19:17:03.000000000 -0400
@@ -143,7 +143,7 @@
echo older; \
else \
@@ -7903,9 +9242,9 @@
echo older; \
else \
echo newer; \
---- jdk/make/common/shared/Platform.gmk 2011-01-20 18:54:05.000000000 -0500
-+++ jdk/make/common/shared/Platform.gmk 2011-02-01 17:46:55.000000000 -0500
-@@ -275,6 +275,76 @@
+--- jdk/make/common/shared/Platform.gmk 2011-07-05 14:35:27.000000000 -0400
++++ jdk/make/common/shared/Platform.gmk 2011-07-07 19:17:03.000000000 -0400
+@@ -264,6 +264,76 @@
MB_OF_MEMORY := $(shell free -m | fgrep Mem: | sed -e 's@\ \ *@ @g' | cut -d' ' -f2)
endif
@@ -7982,7 +9321,7 @@
# Windows with and without CYGWIN will be slightly different
ifeq ($(SYSTEM_UNAME), Windows_NT)
PLATFORM = windows
-@@ -394,6 +464,13 @@
+@@ -380,6 +450,13 @@
# system swapping during the build.
# If we don't know, assume 512. Subtract 128 from MB for VM MAX.
# Don't set VM max over 1024-128=896.
@@ -7996,7 +9335,7 @@
ifneq ($(MB_OF_MEMORY),)
LOW_MEMORY_MACHINE := $(shell \
if [ $(MB_OF_MEMORY) -le 512 ] ; then \
-@@ -405,7 +482,7 @@
+@@ -391,7 +468,7 @@
if [ $(MB_OF_MEMORY) -le 1024 ] ; then \
expr $(MB_OF_MEMORY) '-' 128 ; \
else \
@@ -8005,7 +9344,7 @@
fi)
MIN_VM_MEMORY := $(shell \
if [ $(MAX_VM_MEMORY) -le 128 ] ; then \
-@@ -457,6 +534,15 @@
+@@ -443,6 +520,15 @@
ARCH_VM_SUBDIR=jre/lib/$(LIBARCH)
endif
@@ -8021,9 +9360,9 @@
# If blanks in the username, use the first 4 words and pack them together
_USER1:=$(subst ', ,$(_USER))
_USER2:=$(subst ", ,$(_USER1))
---- jdk/make/common/shared/Sanity-Settings.gmk 2011-01-20 18:54:05.000000000 -0500
-+++ jdk/make/common/shared/Sanity-Settings.gmk 2011-02-01 17:46:55.000000000 -0500
-@@ -244,6 +244,7 @@
+--- jdk/make/common/shared/Sanity-Settings.gmk 2011-07-05 14:35:27.000000000 -0400
++++ jdk/make/common/shared/Sanity-Settings.gmk 2011-07-07 19:17:03.000000000 -0400
+@@ -242,6 +242,7 @@
ALL_SETTINGS+=$(call addAltSetting,FREETYPE_HEADERS_PATH)
ALL_SETTINGS+=$(call addAltSetting,FREETYPE_LIB_PATH)
endif
@@ -8031,9 +9370,9 @@
ALL_SETTINGS+=$(call addOptionalSetting,PLUG_LIBRARY_NAMES)
ifdef OPENJDK
---- jdk/make/common/shared/Sanity.gmk 2011-01-20 18:54:05.000000000 -0500
-+++ jdk/make/common/shared/Sanity.gmk 2011-02-01 17:46:55.000000000 -0500
-@@ -96,6 +96,11 @@
+--- jdk/make/common/shared/Sanity.gmk 2011-07-05 14:35:27.000000000 -0400
++++ jdk/make/common/shared/Sanity.gmk 2011-07-07 19:17:03.000000000 -0400
+@@ -90,6 +90,11 @@
$(EGREP) "\#define" | $(NAWK) '{print $$3}')
endif
@@ -8045,8 +9384,8 @@
# Get the version numbers of what we are using
_MAKE_VER :=$(shell $(MAKE) --version 2>&1 | $(HEAD) -n 1)
_ZIP_VER :=$(shell $(ZIPEXE) -help 2>&1 | $(HEAD) -n 4 | $(EGREP) '^Zip')
---- jdk/make/java/Makefile 2011-01-20 18:54:05.000000000 -0500
-+++ jdk/make/java/Makefile 2011-02-01 17:46:55.000000000 -0500
+--- jdk/make/java/Makefile 2011-07-05 14:35:27.000000000 -0400
++++ jdk/make/java/Makefile 2011-07-07 19:17:03.000000000 -0400
@@ -49,7 +49,7 @@
endif
endif # PLATFORM
@@ -8056,8 +9395,8 @@
SUBDIRS += jexec
endif # PLATFORM
---- jdk/make/java/hpi/hpi_common.gmk 2011-01-20 18:54:05.000000000 -0500
-+++ jdk/make/java/hpi/hpi_common.gmk 2011-02-01 17:46:55.000000000 -0500
+--- jdk/make/java/hpi/hpi_common.gmk 2011-07-05 14:35:27.000000000 -0400
++++ jdk/make/java/hpi/hpi_common.gmk 2011-07-07 19:17:03.000000000 -0400
@@ -86,5 +86,9 @@
# Things that must be linked in.
#
@@ -8068,8 +9407,8 @@
OTHER_LDLIBS += $(LIBSOCKET) -lnsl $(LIBM) -ldl
endif
+endif
---- jdk/make/java/hpi/native/Makefile 2011-01-20 18:54:05.000000000 -0500
-+++ jdk/make/java/hpi/native/Makefile 2011-02-01 17:46:55.000000000 -0500
+--- jdk/make/java/hpi/native/Makefile 2011-07-05 14:35:28.000000000 -0400
++++ jdk/make/java/hpi/native/Makefile 2011-07-07 19:17:03.000000000 -0400
@@ -72,11 +72,18 @@
ifeq ($(MOOT_PRIORITIES),true)
OTHER_CPPFLAGS += -DMOOT_PRIORITIES
@@ -8089,8 +9428,8 @@
ifeq ($(HAVE_GETHRVTIME),true)
OTHER_CPPFLAGS += -DHAVE_GETHRVTIME
endif
---- jdk/make/java/instrument/Makefile 2011-01-20 18:54:05.000000000 -0500
-+++ jdk/make/java/instrument/Makefile 2011-02-01 17:46:55.000000000 -0500
+--- jdk/make/java/instrument/Makefile 2011-07-05 14:35:28.000000000 -0400
++++ jdk/make/java/instrument/Makefile 2011-07-07 19:17:03.000000000 -0400
@@ -102,6 +102,21 @@
# equivalent of strcasecmp is stricmp on Windows
CPPFLAGS_COMMON += -Dstrcasecmp=stricmp
@@ -8121,8 +9460,8 @@
#
# Library to compile.
---- jdk/make/java/java/Makefile 2011-01-20 18:54:05.000000000 -0500
-+++ jdk/make/java/java/Makefile 2011-02-01 17:46:55.000000000 -0500
+--- jdk/make/java/java/Makefile 2011-07-05 14:35:28.000000000 -0400
++++ jdk/make/java/java/Makefile 2011-07-07 19:17:03.000000000 -0400
@@ -167,8 +167,10 @@
# Is the altzone extern documented in ctime(3C) available?
#
@@ -8149,8 +9488,8 @@
#
# Rules.
---- jdk/make/java/java/genlocales.gmk 2011-01-20 18:54:05.000000000 -0500
-+++ jdk/make/java/java/genlocales.gmk 2011-02-01 17:46:55.000000000 -0500
+--- jdk/make/java/java/genlocales.gmk 2011-07-05 14:35:28.000000000 -0400
++++ jdk/make/java/java/genlocales.gmk 2011-07-07 19:17:03.000000000 -0400
@@ -76,11 +76,16 @@
$(LocaleDataMetaInfo_Dest):$(LocaleDataMetaInfo_Src) $(LOCALEGEN_SH)
@$(RM) $@.tmp.euro $@.tmp.noneuro;
@@ -8173,8 +9512,8 @@
$@.tmp.noneuro $< $@
@$(RM) $@.tmp.euro $@.tmp.noneuro;
---- jdk/make/java/java/localegen.sh 2011-01-20 18:54:05.000000000 -0500
-+++ jdk/make/java/java/localegen.sh 2011-02-01 17:46:55.000000000 -0500
+--- jdk/make/java/java/localegen.sh 2011-07-05 14:35:28.000000000 -0400
++++ jdk/make/java/java/localegen.sh 2011-07-07 19:17:03.000000000 -0400
@@ -29,7 +29,7 @@
# This script is to generate the supported locale list string and replace the
# LocaleDataMetaInfo-XLocales.java in <ws>/src/share/classes/sun/util
@@ -8205,8 +9544,8 @@
done
sed_script=$sed_script"$INPUT_FILE > $OUTPUT_FILE"
---- jdk/make/java/java_hprof_demo/Makefile 2011-01-20 18:54:05.000000000 -0500
-+++ jdk/make/java/java_hprof_demo/Makefile 2011-02-01 17:46:55.000000000 -0500
+--- jdk/make/java/java_hprof_demo/Makefile 2011-07-05 14:35:28.000000000 -0400
++++ jdk/make/java/java_hprof_demo/Makefile 2011-07-07 19:17:03.000000000 -0400
@@ -83,8 +83,10 @@
ifeq ($(PLATFORM), windows)
OTHER_LDLIBS += wsock32.lib winmm.lib
@@ -8218,8 +9557,8 @@
#
# Tell library.gmk to copy the txt file first
---- jdk/make/java/jli/Makefile 2011-01-20 18:54:05.000000000 -0500
-+++ jdk/make/java/jli/Makefile 2011-02-01 17:46:55.000000000 -0500
+--- jdk/make/java/jli/Makefile 2011-07-05 14:35:28.000000000 -0400
++++ jdk/make/java/jli/Makefile 2011-07-07 19:17:03.000000000 -0400
@@ -44,8 +44,10 @@
include $(BUILDDIR)/common/Defs.gmk
@@ -8295,8 +9634,8 @@
+endif
+
---- jdk/make/java/management/Makefile 2011-01-20 18:54:05.000000000 -0500
-+++ jdk/make/java/management/Makefile 2011-02-01 17:46:55.000000000 -0500
+--- jdk/make/java/management/Makefile 2011-07-05 14:35:28.000000000 -0400
++++ jdk/make/java/management/Makefile 2011-07-07 19:17:03.000000000 -0400
@@ -85,6 +85,11 @@
OTHER_INCLUDES += \
-I$(SHARE_SRC)/native/sun/management
@@ -8309,8 +9648,8 @@
ifeq ($(PLATFORM),windows)
OTHER_LDLIBS += $(JVMLIB)
endif
---- jdk/make/java/net/FILES_c.gmk 2011-01-20 18:54:05.000000000 -0500
-+++ jdk/make/java/net/FILES_c.gmk 2011-02-01 17:46:55.000000000 -0500
+--- jdk/make/java/net/FILES_c.gmk 2011-07-05 14:35:28.000000000 -0400
++++ jdk/make/java/net/FILES_c.gmk 2011-07-07 19:17:03.000000000 -0400
@@ -43,6 +43,10 @@
FILES_c += linux_close.c
endif
@@ -8322,8 +9661,8 @@
ifeq ($(PLATFORM), windows)
FILES_c += TwoStacksPlainSocketImpl.c
FILES_c += DualStackPlainSocketImpl.c
---- jdk/make/java/net/Makefile 2011-01-20 18:54:05.000000000 -0500
-+++ jdk/make/java/net/Makefile 2011-02-01 17:46:55.000000000 -0500
+--- jdk/make/java/net/Makefile 2011-07-05 14:35:28.000000000 -0400
++++ jdk/make/java/net/Makefile 2011-07-07 19:17:03.000000000 -0400
@@ -92,6 +92,12 @@
include $(BUILDDIR)/common/Library.gmk
@@ -8345,8 +9684,8 @@
CLASSES.export += java.lang.Integer java.io.FileDescriptor java.net.InetAddressImplFactory java.net.Inet4AddressImpl java.net.Inet6AddressImpl
---- jdk/make/java/nio/Makefile 2011-01-20 18:54:05.000000000 -0500
-+++ jdk/make/java/nio/Makefile 2011-02-01 17:46:55.000000000 -0500
+--- jdk/make/java/nio/Makefile 2011-07-05 14:35:28.000000000 -0400
++++ jdk/make/java/nio/Makefile 2011-07-07 19:17:03.000000000 -0400
@@ -104,6 +104,28 @@
sun/nio/ch/NativeThread.java
endif # PLATFORM = linux
@@ -8408,8 +9747,8 @@
include $(BUILDDIR)/common/Mapfile-vers.gmk
include $(BUILDDIR)/common/Library.gmk
---- jdk/make/java/npt/Makefile 2011-01-20 18:54:05.000000000 -0500
-+++ jdk/make/java/npt/Makefile 2011-02-01 17:46:55.000000000 -0500
+--- jdk/make/java/npt/Makefile 2011-07-05 14:35:28.000000000 -0400
++++ jdk/make/java/npt/Makefile 2011-07-07 19:17:03.000000000 -0400
@@ -70,6 +70,18 @@
OTHER_LCF += -export:nptInitialize -export:nptTerminate
endif
@@ -8429,8 +9768,8 @@
#
# Add to ambient vpath so we pick up the library files
#
---- jdk/make/java/redist/FILES.gmk 2011-01-20 18:54:05.000000000 -0500
-+++ jdk/make/java/redist/FILES.gmk 2011-02-01 17:46:55.000000000 -0500
+--- jdk/make/java/redist/FILES.gmk 2011-07-05 14:35:28.000000000 -0400
++++ jdk/make/java/redist/FILES.gmk 2011-07-07 19:17:03.000000000 -0400
@@ -38,6 +38,14 @@
$(LIBDIR)/fonts/LucidaSansDemiBold.ttf \
@@ -8446,8 +9785,8 @@
# The oblique versions of the font are derived from the base versions
# and since 2D can do this derivation on the fly at run time there is no
---- jdk/make/java/redist/Makefile 2011-01-20 18:54:05.000000000 -0500
-+++ jdk/make/java/redist/Makefile 2011-02-01 17:46:55.000000000 -0500
+--- jdk/make/java/redist/Makefile 2011-07-05 14:35:28.000000000 -0400
++++ jdk/make/java/redist/Makefile 2011-07-07 19:17:03.000000000 -0400
@@ -311,7 +311,7 @@
$(FONTSDIRFILE): $(PLATFORM_SRC)/classes/sun/awt/motif/java.fonts.dir
$(install-file)
@@ -8466,8 +9805,8 @@
endif # !OPENJDK
# Import internal files (ones that are stashed in this source tree)
---- jdk/make/java/security/Makefile 2011-01-20 18:54:05.000000000 -0500
-+++ jdk/make/java/security/Makefile 2011-02-01 17:46:55.000000000 -0500
+--- jdk/make/java/security/Makefile 2011-07-05 14:35:28.000000000 -0400
++++ jdk/make/java/security/Makefile 2011-07-07 19:17:03.000000000 -0400
@@ -51,7 +51,15 @@
ifneq ($(ARCH_DATA_MODEL), 64)
PROPS_SRC = $(TOPDIR)/src/share/lib/security/java.security-windows
@@ -8484,8 +9823,8 @@
endif # PLATFORM
---- jdk/make/java/zip/FILES_c.gmk 2011-01-20 18:54:05.000000000 -0500
-+++ jdk/make/java/zip/FILES_c.gmk 2011-02-01 17:46:55.000000000 -0500
+--- jdk/make/java/zip/FILES_c.gmk 2011-07-05 14:35:28.000000000 -0400
++++ jdk/make/java/zip/FILES_c.gmk 2011-07-07 19:17:03.000000000 -0400
@@ -30,6 +30,10 @@
Inflater.c \
ZipFile.c \
@@ -8505,8 +9844,8 @@
- zip_util.c
+ inffast.c
+endif
---- jdk/make/java/zip/Makefile 2011-01-20 18:54:05.000000000 -0500
-+++ jdk/make/java/zip/Makefile 2011-02-01 17:46:55.000000000 -0500
+--- jdk/make/java/zip/Makefile 2011-07-05 14:35:28.000000000 -0400
++++ jdk/make/java/zip/Makefile 2011-07-07 19:17:03.000000000 -0400
@@ -72,16 +72,24 @@
CPPFLAGS += -UDEBUG
endif
@@ -8533,8 +9872,8 @@
OTHER_LDLIBS = $(JVMLIB)
+endif
+
---- jdk/make/javax/crypto/Makefile 2011-01-20 18:54:05.000000000 -0500
-+++ jdk/make/javax/crypto/Makefile 2011-02-01 17:46:55.000000000 -0500
+--- jdk/make/javax/crypto/Makefile 2011-07-05 14:35:28.000000000 -0400
++++ jdk/make/javax/crypto/Makefile 2011-07-07 19:17:03.000000000 -0400
@@ -155,7 +155,7 @@
#
@@ -8544,8 +9883,8 @@
else # OPENJDK
ifeq ($(strip $(FILES_java)),)
all:
---- jdk/make/javax/sound/FILES_c.gmk 2011-01-20 18:54:05.000000000 -0500
-+++ jdk/make/javax/sound/FILES_c.gmk 2011-02-01 17:46:55.000000000 -0500
+--- jdk/make/javax/sound/FILES_c.gmk 2011-07-05 14:35:28.000000000 -0400
++++ jdk/make/javax/sound/FILES_c.gmk 2011-07-07 19:17:03.000000000 -0400
@@ -34,6 +34,8 @@
FILES_linux =
@@ -8555,8 +9894,8 @@
FILES_windows = \
PLATFORM_API_WinOS_MidiIn.c \
PLATFORM_API_WinOS_MidiOut.c \
---- jdk/make/javax/sound/SoundDefs.gmk 2011-01-20 18:54:05.000000000 -0500
-+++ jdk/make/javax/sound/SoundDefs.gmk 2011-02-01 17:46:55.000000000 -0500
+--- jdk/make/javax/sound/SoundDefs.gmk 2011-07-05 14:35:28.000000000 -0400
++++ jdk/make/javax/sound/SoundDefs.gmk 2011-07-07 19:17:03.000000000 -0400
@@ -40,6 +40,10 @@
CPPFLAGS += -DX_PLATFORM=X_LINUX
endif # PLATFORM linux
@@ -8568,8 +9907,8 @@
ifeq ($(PLATFORM), solaris)
CPPFLAGS += -DX_PLATFORM=X_SOLARIS
---- jdk/make/javax/sound/jsoundalsa/Makefile 2011-01-20 18:54:05.000000000 -0500
-+++ jdk/make/javax/sound/jsoundalsa/Makefile 2011-02-11 16:20:52.000000000 -0500
+--- jdk/make/javax/sound/jsoundalsa/Makefile 2011-07-05 14:35:28.000000000 -0400
++++ jdk/make/javax/sound/jsoundalsa/Makefile 2011-07-07 19:17:03.000000000 -0400
@@ -65,6 +65,15 @@
$(MIDIFILES_export) \
$(PORTFILES_export)
@@ -8594,8 +9933,8 @@
#
# Add to the ambient VPATH.
---- jdk/make/jpda/back/Makefile 2011-01-20 18:54:05.000000000 -0500
-+++ jdk/make/jpda/back/Makefile 2011-02-01 17:46:55.000000000 -0500
+--- jdk/make/jpda/back/Makefile 2011-07-05 14:35:28.000000000 -0400
++++ jdk/make/jpda/back/Makefile 2011-07-07 19:17:03.000000000 -0400
@@ -49,8 +49,10 @@
-I$(GENNATIVESRCDIR)/jdwp
@@ -8607,8 +9946,8 @@
#
# This turns off all assert() checking in the optimized library
---- jdk/make/sun/awt/Makefile 2011-01-20 18:54:06.000000000 -0500
-+++ jdk/make/sun/awt/Makefile 2011-02-01 17:46:55.000000000 -0500
+--- jdk/make/sun/awt/Makefile 2011-07-05 14:35:28.000000000 -0400
++++ jdk/make/sun/awt/Makefile 2011-07-07 19:17:03.000000000 -0400
@@ -129,6 +129,14 @@
OTHER_LDLIBS = $(JVMLIB) $(LIBM) -ldl
endif
@@ -8678,8 +10017,8 @@
LDFLAGS += -L$(MOTIF_LIB) -L$(OPENWIN_LIB)
endif
---- jdk/make/sun/awt/mawt.gmk 2011-01-20 18:54:06.000000000 -0500
-+++ jdk/make/sun/awt/mawt.gmk 2011-02-01 17:46:55.000000000 -0500
+--- jdk/make/sun/awt/mawt.gmk 2011-07-05 14:35:28.000000000 -0400
++++ jdk/make/sun/awt/mawt.gmk 2011-07-07 19:17:03.000000000 -0400
@@ -174,7 +174,7 @@
OTHER_LDLIBS = $(LIBXM) -lXt -lXext $(LIBXTST) $(LIBXMU) -lX11 -lXi
endif
@@ -8736,8 +10075,8 @@
LDFLAGS += -L$(LIBDIR)/$(LIBARCH)/$(TSOBJDIR) \
$(AWT_RUNPATH)
---- jdk/make/sun/font/Makefile 2011-01-20 18:54:06.000000000 -0500
-+++ jdk/make/sun/font/Makefile 2011-02-01 17:46:55.000000000 -0500
+--- jdk/make/sun/font/Makefile 2011-07-05 14:35:29.000000000 -0400
++++ jdk/make/sun/font/Makefile 2011-07-07 19:17:03.000000000 -0400
@@ -177,6 +177,15 @@
# Libraries to link, and other C flags.
#
@@ -8762,8 +10101,8 @@
endif # PLATFORM
---- jdk/make/sun/image/generic/Makefile 2011-01-20 18:54:06.000000000 -0500
-+++ jdk/make/sun/image/generic/Makefile 2011-02-01 17:46:55.000000000 -0500
+--- jdk/make/sun/image/generic/Makefile 2011-07-05 14:35:29.000000000 -0400
++++ jdk/make/sun/image/generic/Makefile 2011-07-07 19:17:03.000000000 -0400
@@ -69,5 +69,9 @@
-I$(PLATFORM_SRC)/native/$(PKGDIR)/medialib
@@ -8775,8 +10114,8 @@
+endif
+
---- jdk/make/sun/jawt/Makefile 2011-01-20 18:54:06.000000000 -0500
-+++ jdk/make/sun/jawt/Makefile 2011-02-01 17:46:55.000000000 -0500
+--- jdk/make/sun/jawt/Makefile 2011-07-05 14:35:29.000000000 -0400
++++ jdk/make/sun/jawt/Makefile 2011-07-07 19:17:03.000000000 -0400
@@ -98,9 +98,7 @@
#
# Other extra flags needed for compiling.
@@ -8806,8 +10145,8 @@
OTHER_LDLIBS = -L$(LIBDIR)/$(LIBARCH) -lawt -L$(LIBDIR)/$(LIBARCH)/xawt -lmawt
endif # PLATFORM
---- jdk/make/sun/security/jgss/wrapper/Makefile 2011-01-20 18:54:06.000000000 -0500
-+++ jdk/make/sun/security/jgss/wrapper/Makefile 2011-02-01 17:46:55.000000000 -0500
+--- jdk/make/sun/security/jgss/wrapper/Makefile 2011-07-05 14:35:29.000000000 -0400
++++ jdk/make/sun/security/jgss/wrapper/Makefile 2011-07-07 19:17:03.000000000 -0400
@@ -71,6 +71,10 @@
#
# Libraries to link
@@ -8820,8 +10159,8 @@
+ifeq ($(PLATFORM), bsd)
+ OTHER_LDLIBS = $(JVMLIB)
+endif
---- jdk/make/sun/security/pkcs11/Makefile 2011-01-20 18:54:06.000000000 -0500
-+++ jdk/make/sun/security/pkcs11/Makefile 2011-02-01 17:46:55.000000000 -0500
+--- jdk/make/sun/security/pkcs11/Makefile 2011-07-05 14:35:29.000000000 -0400
++++ jdk/make/sun/security/pkcs11/Makefile 2011-07-07 19:17:03.000000000 -0400
@@ -155,7 +155,7 @@
#
# Libraries to link
@@ -8831,8 +10170,8 @@
OTHER_LDLIBS = $(JVMLIB)
else
OTHER_LDLIBS = -ldl $(JVMLIB)
---- jdk/make/sun/security/smartcardio/Makefile 2011-01-20 18:54:06.000000000 -0500
-+++ jdk/make/sun/security/smartcardio/Makefile 2011-02-01 17:46:55.000000000 -0500
+--- jdk/make/sun/security/smartcardio/Makefile 2011-07-05 14:35:29.000000000 -0400
++++ jdk/make/sun/security/smartcardio/Makefile 2011-07-07 19:17:03.000000000 -0400
@@ -75,6 +75,10 @@
ifeq ($(PLATFORM), windows)
OTHER_LDLIBS = $(JVMLIB) winscard.lib
@@ -8845,8 +10184,8 @@
+ endif
OTHER_CFLAGS = -D__sun_jdk
endif
---- jdk/make/sun/splashscreen/FILES_c.gmk 2011-01-20 18:54:06.000000000 -0500
-+++ jdk/make/sun/splashscreen/FILES_c.gmk 2011-02-01 17:46:55.000000000 -0500
+--- jdk/make/sun/splashscreen/FILES_c.gmk 2011-07-05 14:35:29.000000000 -0400
++++ jdk/make/sun/splashscreen/FILES_c.gmk 2011-07-07 19:17:03.000000000 -0400
@@ -49,20 +49,6 @@
dgif_lib.c \
gif_err.c \
@@ -8889,8 +10228,8 @@
+ zcrc32.c \
+ zutil.c
+endif
---- jdk/make/sun/splashscreen/Makefile 2011-01-20 18:54:06.000000000 -0500
-+++ jdk/make/sun/splashscreen/Makefile 2011-02-01 17:46:55.000000000 -0500
+--- jdk/make/sun/splashscreen/Makefile 2011-07-05 14:35:29.000000000 -0400
++++ jdk/make/sun/splashscreen/Makefile 2011-07-07 19:17:03.000000000 -0400
@@ -61,10 +61,26 @@
CFLAGS += -DSPLASHSCREEN
@@ -8938,8 +10277,8 @@
ifeq ($(PLATFORM), linux)
ifeq ($(ARCH_DATA_MODEL), 64)
# 64-bit gcc has problems compiling MMX instructions.
---- jdk/make/sun/xawt/Makefile 2011-01-20 18:54:06.000000000 -0500
-+++ jdk/make/sun/xawt/Makefile 2011-02-01 17:46:55.000000000 -0500
+--- jdk/make/sun/xawt/Makefile 2011-07-05 14:35:29.000000000 -0400
++++ jdk/make/sun/xawt/Makefile 2011-07-07 19:17:03.000000000 -0400
@@ -53,6 +53,11 @@
dummy := $(shell $(MKDIR) -p $(LIB_LOCATION))
endif
@@ -9003,8 +10342,8 @@
ifeq ($(MILESTONE), internal)
CPPFLAGS += -DINTERNAL_BUILD
endif
---- jdk/make/tools/freetypecheck/Makefile 2011-01-20 18:54:06.000000000 -0500
-+++ jdk/make/tools/freetypecheck/Makefile 2011-02-01 17:46:55.000000000 -0500
+--- jdk/make/tools/freetypecheck/Makefile 2011-07-05 14:35:29.000000000 -0400
++++ jdk/make/tools/freetypecheck/Makefile 2011-07-07 19:17:03.000000000 -0400
@@ -60,8 +60,12 @@
#add runtime lib search path to ensure test will be runnable
ifeq ($(PLATFORM), solaris)
@@ -9020,8 +10359,8 @@
endif
endif
---- jdk/src/share/back/commonRef.c 2011-01-20 18:54:07.000000000 -0500
-+++ jdk/src/share/back/commonRef.c 2011-02-01 17:46:55.000000000 -0500
+--- jdk/src/share/back/commonRef.c 2011-07-05 14:35:30.000000000 -0400
++++ jdk/src/share/back/commonRef.c 2011-07-07 19:17:03.000000000 -0400
@@ -23,6 +23,10 @@
* questions.
*/
@@ -9033,8 +10372,8 @@
#include "util.h"
#include "commonRef.h"
---- jdk/src/share/bin/java.c 2011-01-20 18:54:07.000000000 -0500
-+++ jdk/src/share/bin/java.c 2011-02-01 17:46:55.000000000 -0500
+--- jdk/src/share/bin/java.c 2011-07-05 14:35:31.000000000 -0400
++++ jdk/src/share/bin/java.c 2011-07-07 19:17:03.000000000 -0400
@@ -104,6 +104,11 @@
static char *launchername;
jboolean _launcher_debug = JNI_FALSE;
@@ -9229,8 +10568,8 @@
static void
FreeKnownVMs()
{
---- jdk/src/share/bin/java.h 2011-01-20 18:54:07.000000000 -0500
-+++ jdk/src/share/bin/java.h 2011-02-01 17:46:55.000000000 -0500
+--- jdk/src/share/bin/java.h 2011-07-05 14:35:31.000000000 -0400
++++ jdk/src/share/bin/java.h 2011-07-07 19:17:03.000000000 -0400
@@ -91,11 +91,17 @@
void PrintMachineDependentOptions();
@@ -9251,8 +10590,8 @@
/* sun.java.launcher.* platform properties. */
void SetJavaLauncherPlatformProps(void);
---- jdk/src/share/classes/com/sun/java/swing/plaf/gtk/Metacity.java 2011-01-20 18:54:08.000000000 -0500
-+++ jdk/src/share/classes/com/sun/java/swing/plaf/gtk/Metacity.java 2011-02-01 17:46:55.000000000 -0500
+--- jdk/src/share/classes/com/sun/java/swing/plaf/gtk/Metacity.java 2011-07-05 14:35:32.000000000 -0400
++++ jdk/src/share/classes/com/sun/java/swing/plaf/gtk/Metacity.java 2011-07-07 19:17:03.000000000 -0400
@@ -477,6 +477,10 @@
String[] dirs = new String[] {
userHome + sep + ".themes",
@@ -9264,8 +10603,8 @@
"/usr/share/themes",
"/usr/gnome/share/themes", // Debian/Redhat/Solaris
"/opt/gnome2/share/themes" // SuSE
---- jdk/src/share/classes/com/sun/jmx/snmp/SnmpPduTrap.java 2011-01-20 18:54:10.000000000 -0500
-+++ jdk/src/share/classes/com/sun/jmx/snmp/SnmpPduTrap.java 2011-02-01 17:46:55.000000000 -0500
+--- jdk/src/share/classes/com/sun/jmx/snmp/SnmpPduTrap.java 2011-07-05 14:35:33.000000000 -0400
++++ jdk/src/share/classes/com/sun/jmx/snmp/SnmpPduTrap.java 2011-07-07 19:17:03.000000000 -0400
@@ -78,6 +78,9 @@
*/
public long timeStamp ;
@@ -9276,8 +10615,8 @@
/**
---- jdk/src/share/classes/java/awt/Font.java 2011-01-20 18:54:13.000000000 -0500
-+++ jdk/src/share/classes/java/awt/Font.java 2011-02-01 17:46:55.000000000 -0500
+--- jdk/src/share/classes/java/awt/Font.java 2011-07-05 14:35:37.000000000 -0400
++++ jdk/src/share/classes/java/awt/Font.java 2011-07-07 19:17:03.000000000 -0400
@@ -449,18 +449,19 @@
*/
private AttributeValues getAttributeValues() {
@@ -9304,8 +10643,8 @@
}
return values;
---- jdk/src/share/classes/java/awt/GraphicsEnvironment.java 2011-01-20 18:54:13.000000000 -0500
-+++ jdk/src/share/classes/java/awt/GraphicsEnvironment.java 2011-02-01 17:46:55.000000000 -0500
+--- jdk/src/share/classes/java/awt/GraphicsEnvironment.java 2011-07-05 14:35:37.000000000 -0400
++++ jdk/src/share/classes/java/awt/GraphicsEnvironment.java 2011-07-07 19:17:03.000000000 -0400
@@ -148,7 +148,12 @@
} else {
String osName = System.getProperty("os.name");
@@ -9320,8 +10659,8 @@
(System.getenv("DISPLAY") == null));
}
} else if (nm.equals("true")) {
---- jdk/src/share/classes/java/util/TimeZone.java 2011-01-20 18:54:18.000000000 -0500
-+++ jdk/src/share/classes/java/util/TimeZone.java 2011-02-01 17:46:55.000000000 -0500
+--- jdk/src/share/classes/java/util/TimeZone.java 2011-07-05 14:35:42.000000000 -0400
++++ jdk/src/share/classes/java/util/TimeZone.java 2011-07-07 19:17:03.000000000 -0400
@@ -776,15 +776,13 @@
}
int gmtOffset = (hours * 60 + num) * 60 * 1000;
@@ -9339,8 +10678,8 @@
}
return zi;
}
---- jdk/src/share/classes/sun/awt/FontConfiguration.java 2011-01-20 18:54:24.000000000 -0500
-+++ jdk/src/share/classes/sun/awt/FontConfiguration.java 2011-02-01 17:46:55.000000000 -0500
+--- jdk/src/share/classes/sun/awt/FontConfiguration.java 2011-07-05 14:35:50.000000000 -0400
++++ jdk/src/share/classes/sun/awt/FontConfiguration.java 2011-07-07 19:17:03.000000000 -0400
@@ -1073,7 +1073,7 @@
*/
HashMap<String, Boolean> existsMap;
@@ -9359,8 +10698,8 @@
errors++;
}
}
---- jdk/src/share/classes/sun/font/TrueTypeFont.java 2011-01-20 18:54:25.000000000 -0500
-+++ jdk/src/share/classes/sun/font/TrueTypeFont.java 2011-02-01 17:46:55.000000000 -0500
+--- jdk/src/share/classes/sun/font/TrueTypeFont.java 2011-07-05 14:35:51.000000000 -0400
++++ jdk/src/share/classes/sun/font/TrueTypeFont.java 2011-07-07 19:17:03.000000000 -0400
@@ -160,6 +160,13 @@
private boolean supportsJA;
private boolean supportsCJK;
@@ -9375,7 +10714,7 @@
/**
* - does basic verification of the file
* - reads the header table for this font (within a collection)
-@@ -1060,6 +1067,10 @@
+@@ -1061,6 +1068,10 @@
* greater than 32767, so read and store those as ints
*/
int stringPtr = sbuffer.get() & 0xffff;
@@ -9386,7 +10725,7 @@
for (int i=0; i<numRecords; i++) {
short platformID = sbuffer.get();
if (platformID != MS_PLATFORM_ID) {
-@@ -1071,15 +1082,24 @@
+@@ -1072,15 +1083,24 @@
short nameID = sbuffer.get();
int nameLen = ((int) sbuffer.get()) & 0xffff;
int namePtr = (((int) sbuffer.get()) & 0xffff) + stringPtr;
@@ -9414,7 +10753,7 @@
}
/*
for (int ii=0;ii<nameLen;ii++) {
-@@ -1097,15 +1117,29 @@
+@@ -1098,15 +1118,29 @@
case FULL_NAME_ID:
@@ -9447,7 +10786,7 @@
}
}
-@@ -1188,6 +1222,8 @@
+@@ -1189,6 +1223,8 @@
public String getFontName(Locale locale) {
if (locale == null) {
return fullName;
@@ -9456,7 +10795,7 @@
} else {
short localeID = FontManager.getLCIDFromLocale(locale);
String name = lookupName(localeID, FULL_NAME_ID);
-@@ -1202,11 +1238,13 @@
+@@ -1203,11 +1239,13 @@
public String getFamilyName(Locale locale) {
if (locale == null) {
return familyName;
@@ -9471,8 +10810,8 @@
} else {
return name;
}
---- jdk/src/share/classes/sun/java2d/SunGraphicsEnvironment.java 2011-01-20 18:54:26.000000000 -0500
-+++ jdk/src/share/classes/sun/java2d/SunGraphicsEnvironment.java 2011-02-01 17:46:55.000000000 -0500
+--- jdk/src/share/classes/sun/java2d/SunGraphicsEnvironment.java 2011-07-05 14:35:52.000000000 -0400
++++ jdk/src/share/classes/sun/java2d/SunGraphicsEnvironment.java 2011-07-07 19:17:03.000000000 -0400
@@ -76,7 +76,7 @@
public abstract class SunGraphicsEnvironment extends GraphicsEnvironment
implements FontSupport, DisplayChangedListener {
@@ -9510,8 +10849,8 @@
registerFontDir(jreFontDirName);
}
registerFontsInDir(jreFontDirName, true, Font2D.JRE_RANK,
---- jdk/src/share/classes/sun/nio/ch/KqueueSelectorProvider.java 1969-12-31 19:00:00.000000000 -0500
-+++ jdk/src/share/classes/sun/nio/ch/KqueueSelectorProvider.java 2011-02-01 17:46:55.000000000 -0500
+--- jdk/src/share/classes/sun/nio/ch/KqueueSelectorProvider.java 2011-07-07 19:17:03.000000000 -0400
++++ jdk/src/share/classes/sun/nio/ch/KqueueSelectorProvider.java 2011-07-07 19:17:03.000000000 -0400
@@ -0,0 +1,17 @@
+package sun.nio.ch;
+
@@ -9530,8 +10869,8 @@
+ return InheritedChannel.getChannel();
+ }
+}
---- jdk/src/share/classes/sun/print/PSPrinterJob.java 2011-01-20 18:54:30.000000000 -0500
-+++ jdk/src/share/classes/sun/print/PSPrinterJob.java 2011-02-01 17:46:55.000000000 -0500
+--- jdk/src/share/classes/sun/print/PSPrinterJob.java 2011-07-05 14:35:57.000000000 -0400
++++ jdk/src/share/classes/sun/print/PSPrinterJob.java 2011-07-07 19:17:03.000000000 -0400
@@ -1531,7 +1531,9 @@
pFlags |= NOSHEET;
ncomps+=1;
@@ -9543,8 +10882,8 @@
execCmd = new String[ncomps];
execCmd[n++] = "/usr/bin/lpr";
if ((pFlags & PRINTER) != 0) {
---- jdk/src/share/classes/sun/security/jgss/GSSManagerImpl.java 2011-01-20 18:54:31.000000000 -0500
-+++ jdk/src/share/classes/sun/security/jgss/GSSManagerImpl.java 2011-02-01 17:46:55.000000000 -0500
+--- jdk/src/share/classes/sun/security/jgss/GSSManagerImpl.java 2011-07-05 14:35:58.000000000 -0400
++++ jdk/src/share/classes/sun/security/jgss/GSSManagerImpl.java 2011-07-07 19:17:03.000000000 -0400
@@ -49,8 +49,12 @@
AccessController.doPrivileged(new PrivilegedAction<Boolean>() {
public Boolean run() {
@@ -9560,8 +10899,8 @@
return new Boolean(System.getProperty
(USE_NATIVE_PROP));
}
---- jdk/src/share/classes/sun/security/jgss/wrapper/SunNativeProvider.java 2011-01-20 18:54:31.000000000 -0500
-+++ jdk/src/share/classes/sun/security/jgss/wrapper/SunNativeProvider.java 2011-02-01 17:46:55.000000000 -0500
+--- jdk/src/share/classes/sun/security/jgss/wrapper/SunNativeProvider.java 2011-07-05 14:35:58.000000000 -0400
++++ jdk/src/share/classes/sun/security/jgss/wrapper/SunNativeProvider.java 2011-07-07 19:17:03.000000000 -0400
@@ -82,7 +82,11 @@
String osname = System.getProperty("os.name");
if (osname.startsWith("SunOS")) {
@@ -9575,8 +10914,8 @@
gssLib = "libgssapi.so";
}
}
---- jdk/src/share/classes/sun/security/krb5/Config.java 2011-01-20 18:54:31.000000000 -0500
-+++ jdk/src/share/classes/sun/security/krb5/Config.java 2011-02-01 17:46:55.000000000 -0500
+--- jdk/src/share/classes/sun/security/krb5/Config.java 2011-07-05 14:35:58.000000000 -0400
++++ jdk/src/share/classes/sun/security/krb5/Config.java 2011-07-07 19:17:03.000000000 -0400
@@ -711,7 +711,11 @@
}
} else if (osname.startsWith("SunOS")) {
@@ -9590,8 +10929,8 @@
name = "/etc/krb5.conf";
}
}
---- jdk/src/share/classes/sun/security/krb5/internal/ccache/FileCredentialsCache.java 2011-01-20 18:54:31.000000000 -0500
-+++ jdk/src/share/classes/sun/security/krb5/internal/ccache/FileCredentialsCache.java 2011-02-01 17:46:55.000000000 -0500
+--- jdk/src/share/classes/sun/security/krb5/internal/ccache/FileCredentialsCache.java 2011-07-05 14:35:58.000000000 -0400
++++ jdk/src/share/classes/sun/security/krb5/internal/ccache/FileCredentialsCache.java 2011-07-07 19:17:03.000000000 -0400
@@ -383,8 +383,12 @@
String uidStr = null;
long uid = 0;
@@ -9607,15 +10946,15 @@
try {
Class<?> c = Class.forName
("com.sun.security.auth.module.UnixSystem");
---- jdk/src/share/classes/sun/tools/attach/META-INF/services/com.sun.tools.attach.spi.AttachProvider 2011-01-20 18:54:33.000000000 -0500
-+++ jdk/src/share/classes/sun/tools/attach/META-INF/services/com.sun.tools.attach.spi.AttachProvider 2011-02-01 17:46:55.000000000 -0500
+--- jdk/src/share/classes/sun/tools/attach/META-INF/services/com.sun.tools.attach.spi.AttachProvider 2011-07-05 14:36:01.000000000 -0400
++++ jdk/src/share/classes/sun/tools/attach/META-INF/services/com.sun.tools.attach.spi.AttachProvider 2011-07-07 19:17:03.000000000 -0400
@@ -30,3 +30,4 @@
#[solaris]sun.tools.attach.SolarisAttachProvider
#[windows]sun.tools.attach.WindowsAttachProvider
#[linux]sun.tools.attach.LinuxAttachProvider
+#[bsd]sun.tools.attach.BsdAttachProvider
---- jdk/src/share/classes/sun/tools/jar/Main.java 2011-01-20 18:54:34.000000000 -0500
-+++ jdk/src/share/classes/sun/tools/jar/Main.java 2011-02-01 17:46:55.000000000 -0500
+--- jdk/src/share/classes/sun/tools/jar/Main.java 2011-07-05 14:36:01.000000000 -0400
++++ jdk/src/share/classes/sun/tools/jar/Main.java 2011-07-07 19:17:03.000000000 -0400
@@ -48,6 +48,7 @@
String zname = "";
String[] files;
@@ -9663,8 +11002,8 @@
if (!d.exists() && !d.mkdirs() || !d.isDirectory()) {
throw new IOException(formatMsg(
"error.create.dir", d.getPath()));
---- jdk/src/share/classes/sun/tools/jar/resources/jar.properties 2011-01-20 18:54:34.000000000 -0500
-+++ jdk/src/share/classes/sun/tools/jar/resources/jar.properties 2011-02-01 17:46:55.000000000 -0500
+--- jdk/src/share/classes/sun/tools/jar/resources/jar.properties 2011-07-05 14:36:01.000000000 -0400
++++ jdk/src/share/classes/sun/tools/jar/resources/jar.properties 2011-07-07 19:17:03.000000000 -0400
@@ -44,6 +44,8 @@
{0} : could not create directory
error.incorrect.length=\
@@ -9674,8 +11013,8 @@
out.added.manifest=\
added manifest
out.update.manifest=\
---- jdk/src/share/hpi/include/hpi_impl.h 2011-01-20 18:54:36.000000000 -0500
-+++ jdk/src/share/hpi/include/hpi_impl.h 2011-02-01 17:46:55.000000000 -0500
+--- jdk/src/share/hpi/include/hpi_impl.h 2011-07-05 14:36:05.000000000 -0400
++++ jdk/src/share/hpi/include/hpi_impl.h 2011-07-07 19:17:03.000000000 -0400
@@ -138,7 +138,11 @@
int sysBind(int fd, struct sockaddr *him, int len);
int sysAccept(int fd, struct sockaddr *him, int *len);
@@ -9689,8 +11028,8 @@
ssize_t sysSendTo(int fd, char *buf, int len, int flags, struct sockaddr *to,
int tolen);
ssize_t sysRecvFrom(int fd, char *buf, int nbytes, int flags,
---- jdk/src/share/native/com/sun/java/util/jar/pack/defines.h 2011-01-20 18:54:37.000000000 -0500
-+++ jdk/src/share/native/com/sun/java/util/jar/pack/defines.h 2011-02-01 17:46:55.000000000 -0500
+--- jdk/src/share/native/com/sun/java/util/jar/pack/defines.h 2011-07-05 14:36:05.000000000 -0400
++++ jdk/src/share/native/com/sun/java/util/jar/pack/defines.h 2011-07-07 19:17:03.000000000 -0400
@@ -32,6 +32,10 @@
#include <unistd.h>
#endif
@@ -9716,8 +11055,8 @@
#ifdef _MSC_VER
typedef LONGLONG jlong;
typedef DWORDLONG julong;
---- jdk/src/share/native/com/sun/java/util/jar/pack/main.cpp 2011-01-20 18:54:37.000000000 -0500
-+++ jdk/src/share/native/com/sun/java/util/jar/pack/main.cpp 2011-02-01 17:46:55.000000000 -0500
+--- jdk/src/share/native/com/sun/java/util/jar/pack/main.cpp 2011-07-05 14:36:05.000000000 -0400
++++ jdk/src/share/native/com/sun/java/util/jar/pack/main.cpp 2011-07-07 19:17:03.000000000 -0400
@@ -33,9 +33,14 @@
#include <limits.h>
#include <time.h>
@@ -9755,8 +11094,8 @@
true));
}
---- jdk/src/share/native/com/sun/media/sound/DirectAudioDevice.c 2011-01-20 18:54:37.000000000 -0500
-+++ jdk/src/share/native/com/sun/media/sound/DirectAudioDevice.c 2011-02-01 17:46:55.000000000 -0500
+--- jdk/src/share/native/com/sun/media/sound/DirectAudioDevice.c 2011-07-05 14:36:05.000000000 -0400
++++ jdk/src/share/native/com/sun/media/sound/DirectAudioDevice.c 2011-07-07 19:17:03.000000000 -0400
@@ -33,7 +33,11 @@
#include <jni.h>
@@ -9769,8 +11108,8 @@
#include "SoundDefs.h"
#include "DirectAudio.h"
#include "Utilities.h"
---- jdk/src/share/native/com/sun/media/sound/SoundDefs.h 2011-01-20 18:54:37.000000000 -0500
-+++ jdk/src/share/native/com/sun/media/sound/SoundDefs.h 2011-02-01 17:46:55.000000000 -0500
+--- jdk/src/share/native/com/sun/media/sound/SoundDefs.h 2011-07-05 14:36:05.000000000 -0400
++++ jdk/src/share/native/com/sun/media/sound/SoundDefs.h 2011-07-07 19:17:03.000000000 -0400
@@ -31,6 +31,7 @@
#define X_WINDOWS 1
#define X_SOLARIS 2
@@ -9798,8 +11137,8 @@
+
+
#endif // __SOUNDDEFS_INCLUDED__
---- jdk/src/share/native/common/check_code.c 2011-01-20 18:54:37.000000000 -0500
-+++ jdk/src/share/native/common/check_code.c 2011-02-01 17:46:56.000000000 -0500
+--- jdk/src/share/native/common/check_code.c 2011-07-05 14:36:05.000000000 -0400
++++ jdk/src/share/native/common/check_code.c 2011-07-07 19:17:03.000000000 -0400
@@ -1069,7 +1069,7 @@
* Make sure that branches don't go into the middle of nowhere.
*/
@@ -9861,8 +11200,8 @@
/* There can't be more than 64K labels because of the limit
* on per-method byte code length.
*/
---- jdk/src/share/native/java/io/io_util.h 2011-01-20 18:54:37.000000000 -0500
-+++ jdk/src/share/native/java/io/io_util.h 2011-02-01 17:46:56.000000000 -0500
+--- jdk/src/share/native/java/io/io_util.h 2011-07-05 14:36:05.000000000 -0400
++++ jdk/src/share/native/java/io/io_util.h 2011-07-07 19:17:03.000000000 -0400
@@ -29,7 +29,15 @@
extern jfieldID IO_fd_fdID;
extern jfieldID IO_handle_fdID;
@@ -9880,8 +11219,8 @@
#define O_SYNC (0x0800)
#define O_DSYNC (0x2000)
#endif
---- jdk/src/share/native/java/lang/fdlibm/include/fdlibm.h 2011-01-20 18:54:37.000000000 -0500
-+++ jdk/src/share/native/java/lang/fdlibm/include/fdlibm.h 2011-02-01 17:46:56.000000000 -0500
+--- jdk/src/share/native/java/lang/fdlibm/include/fdlibm.h 2011-07-05 14:36:05.000000000 -0400
++++ jdk/src/share/native/java/lang/fdlibm/include/fdlibm.h 2011-07-07 19:17:03.000000000 -0400
@@ -25,6 +25,10 @@
* questions.
*/
@@ -9907,8 +11246,8 @@
/*
* ANSI/POSIX
---- jdk/src/share/native/java/lang/fdlibm/include/jfdlibm.h 2011-01-20 18:54:37.000000000 -0500
-+++ jdk/src/share/native/java/lang/fdlibm/include/jfdlibm.h 2011-02-01 17:46:56.000000000 -0500
+--- jdk/src/share/native/java/lang/fdlibm/include/jfdlibm.h 2011-07-05 14:36:05.000000000 -0400
++++ jdk/src/share/native/java/lang/fdlibm/include/jfdlibm.h 2011-07-07 19:17:03.000000000 -0400
@@ -61,7 +61,7 @@
#define log1p jlog1p
#define expm1 jexpm1
@@ -9918,8 +11257,8 @@
#define __ieee754_sqrt __j__ieee754_sqrt
#define __ieee754_acos __j__ieee754_acos
#define __ieee754_acosh __j__ieee754_acosh
---- jdk/src/share/native/java/util/zip/Inflater.c 2011-01-20 18:54:37.000000000 -0500
-+++ jdk/src/share/native/java/util/zip/Inflater.c 2011-02-01 17:46:56.000000000 -0500
+--- jdk/src/share/native/java/util/zip/Inflater.c 2011-07-05 14:36:06.000000000 -0400
++++ jdk/src/share/native/java/util/zip/Inflater.c 2011-07-07 19:17:03.000000000 -0400
@@ -65,6 +65,10 @@
return jlong_zero;
} else {
@@ -9942,8 +11281,8 @@
}
JNIEXPORT void JNICALL
---- jdk/src/share/native/java/util/zip/zlib-1.1.3/zconf.h 2011-01-20 18:54:37.000000000 -0500
-+++ jdk/src/share/native/java/util/zip/zlib-1.1.3/zconf.h 2011-02-01 17:46:56.000000000 -0500
+--- jdk/src/share/native/java/util/zip/zlib-1.1.3/zconf.h 2011-07-05 14:36:06.000000000 -0400
++++ jdk/src/share/native/java/util/zip/zlib-1.1.3/zconf.h 2011-07-07 19:17:03.000000000 -0400
@@ -42,44 +42,49 @@
/* for _LP64 */
#include <sys/types.h>
@@ -10027,8 +11366,8 @@
#endif
#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32)
---- jdk/src/share/native/sun/awt/debug/debug_util.h 2011-01-20 18:54:37.000000000 -0500
-+++ jdk/src/share/native/sun/awt/debug/debug_util.h 2011-02-01 17:46:56.000000000 -0500
+--- jdk/src/share/native/sun/awt/debug/debug_util.h 2011-07-05 14:36:06.000000000 -0400
++++ jdk/src/share/native/sun/awt/debug/debug_util.h 2011-07-07 19:17:03.000000000 -0400
@@ -50,7 +50,9 @@
#include <stdio.h>
#include <string.h>
@@ -10039,8 +11378,8 @@
#include <limits.h>
/* keep these after the other headers */
---- jdk/src/share/native/sun/awt/image/BufImgSurfaceData.c 2011-01-20 18:54:37.000000000 -0500
-+++ jdk/src/share/native/sun/awt/image/BufImgSurfaceData.c 2011-02-01 17:46:56.000000000 -0500
+--- jdk/src/share/native/sun/awt/image/BufImgSurfaceData.c 2011-07-05 14:36:06.000000000 -0400
++++ jdk/src/share/native/sun/awt/image/BufImgSurfaceData.c 2011-07-07 19:17:03.000000000 -0400
@@ -24,7 +24,11 @@
*/
@@ -10053,8 +11392,8 @@
#include "sun_awt_image_BufImgSurfaceData.h"
---- jdk/src/share/native/sun/awt/image/DataBufferNative.c 2011-01-20 18:54:37.000000000 -0500
-+++ jdk/src/share/native/sun/awt/image/DataBufferNative.c 2011-02-01 17:46:56.000000000 -0500
+--- jdk/src/share/native/sun/awt/image/DataBufferNative.c 2011-07-05 14:36:06.000000000 -0400
++++ jdk/src/share/native/sun/awt/image/DataBufferNative.c 2011-07-07 19:17:04.000000000 -0400
@@ -23,7 +23,11 @@
* questions.
*/
@@ -10067,8 +11406,8 @@
#include "SurfaceData.h"
#include "sun_awt_image_DataBufferNative.h"
---- jdk/src/share/native/sun/awt/medialib/mlib_ImageConv2x2_f.c 2011-01-20 18:54:38.000000000 -0500
-+++ jdk/src/share/native/sun/awt/medialib/mlib_ImageConv2x2_f.c 2011-02-01 17:46:56.000000000 -0500
+--- jdk/src/share/native/sun/awt/medialib/mlib_ImageConv2x2_f.c 2011-07-05 14:36:07.000000000 -0400
++++ jdk/src/share/native/sun/awt/medialib/mlib_ImageConv2x2_f.c 2011-07-07 19:17:04.000000000 -0400
@@ -86,7 +86,7 @@
#endif /* MLIB_USE_FTOI_CLAMPING */
@@ -10108,8 +11447,8 @@
#endif /* _NO_LONGLONG */
---- jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_16ext.c 2011-01-20 18:54:38.000000000 -0500
-+++ jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_16ext.c 2011-02-01 17:46:56.000000000 -0500
+--- jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_16ext.c 2011-07-05 14:36:07.000000000 -0400
++++ jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_16ext.c 2011-07-07 19:17:04.000000000 -0400
@@ -126,7 +126,7 @@
#define D2I(x) CLAMP_S32((x) SAT_OFF)
@@ -10149,8 +11488,8 @@
#endif /* _NO_LONGLONG */
/***************************************************************/
---- jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_16nw.c 2011-01-20 18:54:38.000000000 -0500
-+++ jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_16nw.c 2011-02-01 17:46:56.000000000 -0500
+--- jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_16nw.c 2011-07-05 14:36:07.000000000 -0400
++++ jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_16nw.c 2011-07-07 19:17:04.000000000 -0400
@@ -94,7 +94,7 @@
#define D2I(x) CLAMP_S32((x) SAT_OFF)
@@ -10190,8 +11529,8 @@
#endif /* _NO_LONGLONG */
/***************************************************************/
---- jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_8ext.c 2011-01-20 18:54:38.000000000 -0500
-+++ jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_8ext.c 2011-02-01 17:46:56.000000000 -0500
+--- jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_8ext.c 2011-07-05 14:36:07.000000000 -0400
++++ jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_8ext.c 2011-07-07 19:17:04.000000000 -0400
@@ -126,7 +126,7 @@
#define D2I(x) CLAMP_S32((x) SAT_OFF)
@@ -10231,8 +11570,8 @@
#endif /* _NO_LONGLONG */
/***************************************************************/
---- jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_8nw.c 2011-01-20 18:54:38.000000000 -0500
-+++ jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_8nw.c 2011-02-01 17:46:56.000000000 -0500
+--- jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_8nw.c 2011-07-05 14:36:07.000000000 -0400
++++ jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_8nw.c 2011-07-07 19:17:04.000000000 -0400
@@ -95,7 +95,7 @@
#define D2I(x) CLAMP_S32((x) SAT_OFF)
@@ -10272,8 +11611,8 @@
#endif /* _NO_LONGLONG */
/***************************************************************/
---- jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_u16ext.c 2011-01-20 18:54:38.000000000 -0500
-+++ jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_u16ext.c 2011-02-01 17:46:56.000000000 -0500
+--- jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_u16ext.c 2011-07-05 14:36:07.000000000 -0400
++++ jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_u16ext.c 2011-07-07 19:17:04.000000000 -0400
@@ -126,7 +126,7 @@
#define D2I(x) CLAMP_S32((x) SAT_OFF)
@@ -10313,8 +11652,8 @@
#endif /* _NO_LONGLONG */
/***************************************************************/
---- jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_u16nw.c 2011-01-20 18:54:38.000000000 -0500
-+++ jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_u16nw.c 2011-02-01 17:46:56.000000000 -0500
+--- jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_u16nw.c 2011-07-05 14:36:07.000000000 -0400
++++ jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_u16nw.c 2011-07-07 19:17:04.000000000 -0400
@@ -94,7 +94,7 @@
#define D2I(x) CLAMP_S32((x) SAT_OFF)
@@ -10354,8 +11693,8 @@
#endif /* _NO_LONGLONG */
/***************************************************************/
---- jdk/src/share/native/sun/awt/medialib/mlib_ImageCopy_Bit.c 2011-01-20 18:54:38.000000000 -0500
-+++ jdk/src/share/native/sun/awt/medialib/mlib_ImageCopy_Bit.c 2011-02-01 17:46:56.000000000 -0500
+--- jdk/src/share/native/sun/awt/medialib/mlib_ImageCopy_Bit.c 2011-07-05 14:36:07.000000000 -0400
++++ jdk/src/share/native/sun/awt/medialib/mlib_ImageCopy_Bit.c 2011-07-07 19:17:04.000000000 -0400
@@ -95,7 +95,7 @@
dst = dp[0];
if (ld_offset + size < 32) {
@@ -10575,8 +11914,8 @@
}
#else /* _LONGLONG */
---- jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_64.c 2011-01-20 18:54:38.000000000 -0500
-+++ jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_64.c 2011-02-01 17:46:56.000000000 -0500
+--- jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_64.c 2011-07-05 14:36:07.000000000 -0400
++++ jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_64.c 2011-07-07 19:17:04.000000000 -0400
@@ -168,7 +168,7 @@
}
@@ -10857,8 +12196,8 @@
dp[12] = t0;
dp[13] = t1;
dp[14] = t2;
---- jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_Bit.c 2011-01-20 18:54:38.000000000 -0500
-+++ jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_Bit.c 2011-02-01 17:46:56.000000000 -0500
+--- jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_Bit.c 2011-07-05 14:36:07.000000000 -0400
++++ jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_Bit.c 2011-07-07 19:17:04.000000000 -0400
@@ -88,7 +88,7 @@
} d64_2_f32;
@@ -11010,8 +12349,8 @@
((mlib_u32*)lh)[0] = l; ((mlib_u32*)lh)[1] = l;
((mlib_u32*)lh)[2] = l; ((mlib_u32*)lh)[3] = h;
---- jdk/src/share/native/sun/awt/medialib/mlib_ImageUtils.c 2011-01-20 18:54:38.000000000 -0500
-+++ jdk/src/share/native/sun/awt/medialib/mlib_ImageUtils.c 2011-02-01 17:46:56.000000000 -0500
+--- jdk/src/share/native/sun/awt/medialib/mlib_ImageUtils.c 2011-07-05 14:36:07.000000000 -0400
++++ jdk/src/share/native/sun/awt/medialib/mlib_ImageUtils.c 2011-07-07 19:17:04.000000000 -0400
@@ -30,7 +30,7 @@
typedef union {
mlib_d64 db;
@@ -11021,8 +12360,8 @@
mlib_s32 int1, int0;
#else
mlib_s32 int0, int1;
---- jdk/src/share/native/sun/awt/medialib/mlib_c_ImageCopy.c 2011-01-20 18:54:38.000000000 -0500
-+++ jdk/src/share/native/sun/awt/medialib/mlib_c_ImageCopy.c 2011-02-01 17:46:56.000000000 -0500
+--- jdk/src/share/native/sun/awt/medialib/mlib_c_ImageCopy.c 2011-07-05 14:36:07.000000000 -0400
++++ jdk/src/share/native/sun/awt/medialib/mlib_c_ImageCopy.c 2011-07-07 19:17:04.000000000 -0400
@@ -275,11 +275,11 @@
for (i = 0; j <= (b_size - 4); j += 4, i++) {
src0 = src1;
@@ -11121,8 +12460,8 @@
s0 = s1;
dp += SIZE;
sp += SIZE;
---- jdk/src/share/native/sun/awt/medialib/mlib_c_ImageLookUp_f.c 2011-01-20 18:54:38.000000000 -0500
-+++ jdk/src/share/native/sun/awt/medialib/mlib_c_ImageLookUp_f.c 2011-02-01 17:46:56.000000000 -0500
+--- jdk/src/share/native/sun/awt/medialib/mlib_c_ImageLookUp_f.c 2011-07-05 14:36:07.000000000 -0400
++++ jdk/src/share/native/sun/awt/medialib/mlib_c_ImageLookUp_f.c 2011-07-07 19:17:04.000000000 -0400
@@ -120,7 +120,7 @@
} \
}
@@ -12355,8 +13694,8 @@
dp[12] = t0;
dp[13] = t1;
dp[14] = t2;
---- jdk/src/share/native/sun/awt/medialib/mlib_image.h 2011-01-20 18:54:38.000000000 -0500
-+++ jdk/src/share/native/sun/awt/medialib/mlib_image.h 2011-02-01 17:46:56.000000000 -0500
+--- jdk/src/share/native/sun/awt/medialib/mlib_image.h 2011-07-05 14:36:07.000000000 -0400
++++ jdk/src/share/native/sun/awt/medialib/mlib_image.h 2011-07-07 19:17:04.000000000 -0400
@@ -27,6 +27,11 @@
#ifndef MLIB_IMAGE_H
#define MLIB_IMAGE_H
@@ -12369,8 +13708,8 @@
#include <mlib_types.h>
#include <mlib_status.h>
#include <mlib_sys.h>
---- jdk/src/share/native/sun/awt/medialib/mlib_sys.c 2011-01-20 18:54:38.000000000 -0500
-+++ jdk/src/share/native/sun/awt/medialib/mlib_sys.c 2011-02-01 17:46:56.000000000 -0500
+--- jdk/src/share/native/sun/awt/medialib/mlib_sys.c 2011-07-05 14:36:07.000000000 -0400
++++ jdk/src/share/native/sun/awt/medialib/mlib_sys.c 2011-07-07 19:17:04.000000000 -0400
@@ -26,9 +26,15 @@
#include <stdlib.h>
@@ -12401,8 +13740,8 @@
return (void *) memalign(8, size);
#endif /* _MSC_VER */
}
---- jdk/src/share/native/sun/awt/medialib/mlib_types.h 2011-01-20 18:54:38.000000000 -0500
-+++ jdk/src/share/native/sun/awt/medialib/mlib_types.h 2011-02-01 17:46:56.000000000 -0500
+--- jdk/src/share/native/sun/awt/medialib/mlib_types.h 2011-07-05 14:36:07.000000000 -0400
++++ jdk/src/share/native/sun/awt/medialib/mlib_types.h 2011-07-07 19:17:04.000000000 -0400
@@ -59,7 +59,10 @@
#if defined(__SUNPRO_C) || defined(__SUNPRO_CC) || defined(__GNUC__)
@@ -12415,8 +13754,8 @@
#include <stdint.h> /* for uintptr_t */
#include <malloc.h> /* for ptrdiff_t */
#else
---- jdk/src/share/native/sun/font/AccelGlyphCache.c 2011-01-20 18:54:38.000000000 -0500
-+++ jdk/src/share/native/sun/font/AccelGlyphCache.c 2011-02-01 17:46:56.000000000 -0500
+--- jdk/src/share/native/sun/font/AccelGlyphCache.c 2011-07-05 14:36:07.000000000 -0400
++++ jdk/src/share/native/sun/font/AccelGlyphCache.c 2011-07-07 19:17:04.000000000 -0400
@@ -23,7 +23,11 @@
* questions.
*/
@@ -12429,8 +13768,8 @@
#include "jni.h"
#include "AccelGlyphCache.h"
#include "Trace.h"
---- jdk/src/share/native/sun/font/DrawGlyphList.c 2011-01-20 18:54:38.000000000 -0500
-+++ jdk/src/share/native/sun/font/DrawGlyphList.c 2011-02-01 17:46:56.000000000 -0500
+--- jdk/src/share/native/sun/font/DrawGlyphList.c 2011-07-05 14:36:07.000000000 -0400
++++ jdk/src/share/native/sun/font/DrawGlyphList.c 2011-07-07 19:17:04.000000000 -0400
@@ -26,7 +26,11 @@
#include "jlong.h"
#include "math.h"
@@ -12443,8 +13782,8 @@
#include "sunfontids.h"
#include "fontscalerdefs.h"
#include "glyphblitting.h"
---- jdk/src/share/native/sun/font/sunFont.c 2011-01-20 18:54:39.000000000 -0500
-+++ jdk/src/share/native/sun/font/sunFont.c 2011-02-01 17:46:56.000000000 -0500
+--- jdk/src/share/native/sun/font/sunFont.c 2011-07-05 14:36:07.000000000 -0400
++++ jdk/src/share/native/sun/font/sunFont.c 2011-07-07 19:17:04.000000000 -0400
@@ -24,7 +24,9 @@
*/
@@ -12455,8 +13794,8 @@
#include "string.h"
#include "gdefs.h"
#include "jlong.h"
---- jdk/src/share/native/sun/java2d/SurfaceData.c 2011-01-20 18:54:39.000000000 -0500
-+++ jdk/src/share/native/sun/java2d/SurfaceData.c 2011-02-01 17:46:56.000000000 -0500
+--- jdk/src/share/native/sun/java2d/SurfaceData.c 2011-07-05 14:36:07.000000000 -0400
++++ jdk/src/share/native/sun/java2d/SurfaceData.c 2011-07-07 19:17:04.000000000 -0400
@@ -28,7 +28,11 @@
#include "jni_util.h"
#include "Disposer.h"
@@ -12469,8 +13808,8 @@
#include "string.h"
/**
---- jdk/src/share/native/sun/java2d/opengl/OGLFuncs.h 2011-01-20 18:54:39.000000000 -0500
-+++ jdk/src/share/native/sun/java2d/opengl/OGLFuncs.h 2011-02-01 17:46:56.000000000 -0500
+--- jdk/src/share/native/sun/java2d/opengl/OGLFuncs.h 2011-07-05 14:36:08.000000000 -0400
++++ jdk/src/share/native/sun/java2d/opengl/OGLFuncs.h 2011-07-07 19:17:04.000000000 -0400
@@ -26,6 +26,9 @@
#ifndef OGLFuncs_h_Included
#define OGLFuncs_h_Included
@@ -12481,8 +13820,8 @@
#include "jni.h"
#include "J2D_GL/gl.h"
#include "J2D_GL/glext.h"
---- jdk/src/share/native/sun/java2d/opengl/OGLRenderQueue.c 2011-01-20 18:54:39.000000000 -0500
-+++ jdk/src/share/native/sun/java2d/opengl/OGLRenderQueue.c 2011-02-01 17:46:56.000000000 -0500
+--- jdk/src/share/native/sun/java2d/opengl/OGLRenderQueue.c 2011-07-05 14:36:08.000000000 -0400
++++ jdk/src/share/native/sun/java2d/opengl/OGLRenderQueue.c 2011-07-07 19:17:04.000000000 -0400
@@ -25,7 +25,11 @@
#ifndef HEADLESS
@@ -12495,8 +13834,8 @@
#include "sun_java2d_pipe_BufferedOpCodes.h"
---- jdk/src/share/native/sun/java2d/opengl/OGLTextRenderer.c 2011-01-20 18:54:39.000000000 -0500
-+++ jdk/src/share/native/sun/java2d/opengl/OGLTextRenderer.c 2011-02-01 17:46:56.000000000 -0500
+--- jdk/src/share/native/sun/java2d/opengl/OGLTextRenderer.c 2011-07-05 14:36:08.000000000 -0400
++++ jdk/src/share/native/sun/java2d/opengl/OGLTextRenderer.c 2011-07-07 19:17:04.000000000 -0400
@@ -25,7 +25,11 @@
#ifndef HEADLESS
@@ -12509,8 +13848,8 @@
#include <math.h>
#include <jlong.h>
---- jdk/src/share/transport/socket/socketTransport.c 2011-01-20 18:54:40.000000000 -0500
-+++ jdk/src/share/transport/socket/socketTransport.c 2011-02-01 17:46:56.000000000 -0500
+--- jdk/src/share/transport/socket/socketTransport.c 2011-07-05 14:36:09.000000000 -0400
++++ jdk/src/share/transport/socket/socketTransport.c 2011-07-07 19:17:04.000000000 -0400
@@ -65,6 +65,9 @@
#define HEADER_SIZE 11
#define MAX_DATA_SIZE 1000
@@ -12598,8 +13937,8 @@
return res;
} else if (res == 0) {
break; /* eof, return nbytes which is less than len */
---- jdk/src/solaris/back/exec_md.c 2011-01-20 18:54:40.000000000 -0500
-+++ jdk/src/solaris/back/exec_md.c 2011-02-01 17:46:56.000000000 -0500
+--- jdk/src/solaris/back/exec_md.c 2011-07-05 14:36:09.000000000 -0400
++++ jdk/src/solaris/back/exec_md.c 2011-07-07 19:17:04.000000000 -0400
@@ -30,7 +30,7 @@
#include "sys.h"
#include "util.h"
@@ -12609,8 +13948,8 @@
/* Linux */
#define FORK() fork()
#else
---- jdk/src/solaris/back/linker_md.c 2011-01-20 18:54:40.000000000 -0500
-+++ jdk/src/solaris/back/linker_md.c 2011-02-01 17:46:56.000000000 -0500
+--- jdk/src/solaris/back/linker_md.c 2011-07-05 14:36:09.000000000 -0400
++++ jdk/src/solaris/back/linker_md.c 2011-07-07 19:17:04.000000000 -0400
@@ -48,6 +48,12 @@
#include "threads_md.h"
#endif
@@ -12636,8 +13975,8 @@
}
}
---- jdk/src/solaris/back/util_md.h 2011-01-20 18:54:40.000000000 -0500
-+++ jdk/src/solaris/back/util_md.h 2011-02-01 17:46:56.000000000 -0500
+--- jdk/src/solaris/back/util_md.h 2011-07-05 14:36:09.000000000 -0400
++++ jdk/src/solaris/back/util_md.h 2011-07-07 19:17:04.000000000 -0400
@@ -29,7 +29,7 @@
#include <stddef.h>
@@ -12664,8 +14003,8 @@
#define HOST_TO_JAVA_CHAR(x) (((x & 0xff) << 8) | ((x >> 8) & (0xff)))
#define HOST_TO_JAVA_SHORT(x) (((x & 0xff) << 8) | ((x >> 8) & (0xff)))
---- jdk/src/solaris/bin/java_md.c 2011-01-20 18:54:40.000000000 -0500
-+++ jdk/src/solaris/bin/java_md.c 2011-02-01 17:46:56.000000000 -0500
+--- jdk/src/solaris/bin/java_md.c 2011-07-05 14:36:09.000000000 -0400
++++ jdk/src/solaris/bin/java_md.c 2011-07-07 19:17:04.000000000 -0400
@@ -24,6 +24,7 @@
*/
@@ -12880,8 +14219,8 @@
/* Coarse estimation of number of digits assuming the worst case is a 64-bit pid. */
#define MAX_PID_STR_SZ 20
---- jdk/src/solaris/bin/java_md.h 2011-01-20 18:54:40.000000000 -0500
-+++ jdk/src/solaris/bin/java_md.h 2011-02-01 17:46:56.000000000 -0500
+--- jdk/src/solaris/bin/java_md.h 2011-07-05 14:36:09.000000000 -0400
++++ jdk/src/solaris/bin/java_md.h 2011-07-07 19:17:04.000000000 -0400
@@ -58,10 +58,14 @@
#include <sys/time.h>
#define CounterGet() (gethrtime()/1000)
@@ -12898,8 +14237,8 @@
/*
* Function prototypes.
---- jdk/src/solaris/classes/sun/awt/X11GraphicsEnvironment.java 2011-01-20 18:54:40.000000000 -0500
-+++ jdk/src/solaris/classes/sun/awt/X11GraphicsEnvironment.java 2011-02-01 17:46:56.000000000 -0500
+--- jdk/src/solaris/classes/sun/awt/X11GraphicsEnvironment.java 2011-07-05 14:36:09.000000000 -0400
++++ jdk/src/solaris/classes/sun/awt/X11GraphicsEnvironment.java 2011-07-07 19:17:04.000000000 -0400
@@ -403,7 +403,7 @@
if (fontID != null) {
fileName = (String)fontNameMap.get(fontID);
@@ -12918,8 +14257,8 @@
fontConfigDirs.add(jreLibDirName+File.separator+"oblique-fonts");
}
fontdirs = (String[])fontConfigDirs.toArray(new String[0]);
---- jdk/src/solaris/classes/sun/nio/ch/DefaultSelectorProvider.java 2011-01-20 18:54:41.000000000 -0500
-+++ jdk/src/solaris/classes/sun/nio/ch/DefaultSelectorProvider.java 2011-02-01 17:46:56.000000000 -0500
+--- jdk/src/solaris/classes/sun/nio/ch/DefaultSelectorProvider.java 2011-07-05 14:36:10.000000000 -0400
++++ jdk/src/solaris/classes/sun/nio/ch/DefaultSelectorProvider.java 2011-07-07 19:17:04.000000000 -0400
@@ -47,6 +47,10 @@
public static SelectorProvider create() {
String osname = AccessController.doPrivileged(
@@ -12931,8 +14270,8 @@
if ("SunOS".equals(osname)) {
return new sun.nio.ch.DevPollSelectorProvider();
}
---- jdk/src/solaris/classes/sun/nio/ch/KqueueArrayWrapper.java 1969-12-31 19:00:00.000000000 -0500
-+++ jdk/src/solaris/classes/sun/nio/ch/KqueueArrayWrapper.java 2011-02-01 17:46:56.000000000 -0500
+--- jdk/src/solaris/classes/sun/nio/ch/KqueueArrayWrapper.java 2011-07-07 19:17:04.000000000 -0400
++++ jdk/src/solaris/classes/sun/nio/ch/KqueueArrayWrapper.java 2011-07-07 19:17:04.000000000 -0400
@@ -0,0 +1,231 @@
+/*
+ * Scratched by davidxu@freebsd.org
@@ -13165,8 +14504,8 @@
+ private static native short getKeventFlags(long address, int index);
+ private static native int getKeventIdent(long address, int index);
+}
---- jdk/src/solaris/classes/sun/nio/ch/KqueueSelectorImpl.java 1969-12-31 19:00:00.000000000 -0500
-+++ jdk/src/solaris/classes/sun/nio/ch/KqueueSelectorImpl.java 2011-02-01 17:46:56.000000000 -0500
+--- jdk/src/solaris/classes/sun/nio/ch/KqueueSelectorImpl.java 2011-07-07 19:17:04.000000000 -0400
++++ jdk/src/solaris/classes/sun/nio/ch/KqueueSelectorImpl.java 2011-07-07 19:17:04.000000000 -0400
@@ -0,0 +1,205 @@
+/*
+ * scratched by davidxu@freebsd.org
@@ -13373,8 +14712,8 @@
+ }
+
+}
---- jdk/src/solaris/classes/sun/print/UnixPrintServiceLookup.java 2011-01-20 18:54:41.000000000 -0500
-+++ jdk/src/solaris/classes/sun/print/UnixPrintServiceLookup.java 2011-02-01 17:46:56.000000000 -0500
+--- jdk/src/solaris/classes/sun/print/UnixPrintServiceLookup.java 2011-07-05 14:36:10.000000000 -0400
++++ jdk/src/solaris/classes/sun/print/UnixPrintServiceLookup.java 2011-07-07 19:17:04.000000000 -0400
@@ -119,7 +119,11 @@
}
@@ -13388,8 +14727,8 @@
}
static final int UNINITIALIZED = -1;
---- jdk/src/solaris/classes/sun/tools/attach/BsdVirtualMachine.java 2011-02-01 17:20:23.000000000 -0500
-+++ jdk/src/solaris/classes/sun/tools/attach/BsdVirtualMachine.java 2011-02-01 17:46:56.000000000 -0500
+--- jdk/src/solaris/classes/sun/tools/attach/BsdVirtualMachine.java 2011-07-07 19:16:00.000000000 -0400
++++ jdk/src/solaris/classes/sun/tools/attach/BsdVirtualMachine.java 2011-07-07 19:17:04.000000000 -0400
@@ -38,9 +38,6 @@
*/
public class BsdVirtualMachine extends HotSpotVirtualMachine {
@@ -13493,8 +14832,8 @@
- isBsdThreads = isBsdThreads();
}
}
---- jdk/src/solaris/demo/jvmti/hprof/hprof_md.c 2011-01-20 18:54:41.000000000 -0500
-+++ jdk/src/solaris/demo/jvmti/hprof/hprof_md.c 2011-02-01 17:46:56.000000000 -0500
+--- jdk/src/solaris/demo/jvmti/hprof/hprof_md.c 2011-07-05 14:36:10.000000000 -0400
++++ jdk/src/solaris/demo/jvmti/hprof/hprof_md.c 2011-07-07 19:17:04.000000000 -0400
@@ -33,7 +33,7 @@
#include <sys/stat.h>
#include <fcntl.h>
@@ -13540,8 +14879,8 @@
addr = (void*)&Agent_OnLoad;
#else
/* Just using &Agent_OnLoad will get the first external symbol with
---- jdk/src/solaris/hpi/include/interrupt.h 2011-01-20 18:54:41.000000000 -0500
-+++ jdk/src/solaris/hpi/include/interrupt.h 2011-02-01 17:46:56.000000000 -0500
+--- jdk/src/solaris/hpi/include/interrupt.h 2011-07-05 14:36:10.000000000 -0400
++++ jdk/src/solaris/hpi/include/interrupt.h 2011-07-07 19:17:04.000000000 -0400
@@ -75,7 +75,7 @@
* N_INTERRUPTS - The number of interrupt channels. These
* are numbered from 0 to (N_INTERRUPTS - 1).
@@ -13562,8 +14901,8 @@
#ifdef SA_SIGINFO
/* Thread implementation dependent interrupt dispatcher. */
void intrDispatchMD(int sig, siginfo_t *info, void *uc);
---- jdk/src/solaris/hpi/include/largefile.h 2011-01-20 18:54:41.000000000 -0500
-+++ jdk/src/solaris/hpi/include/largefile.h 2011-02-01 17:46:56.000000000 -0500
+--- jdk/src/solaris/hpi/include/largefile.h 2011-07-05 14:36:10.000000000 -0400
++++ jdk/src/solaris/hpi/include/largefile.h 2011-07-07 19:17:04.000000000 -0400
@@ -34,6 +34,10 @@
#include "largefile_linux.h"
#endif
@@ -13575,8 +14914,8 @@
/*
* Prototypes for wrappers that we define. These wrapper functions
* are low-level I/O routines that will use 64 bit versions if
---- jdk/src/solaris/hpi/include/largefile_bsd.h 2011-02-01 17:20:23.000000000 -0500
-+++ jdk/src/solaris/hpi/include/largefile_bsd.h 2011-02-01 17:46:56.000000000 -0500
+--- jdk/src/solaris/hpi/include/largefile_bsd.h 2011-07-07 19:16:00.000000000 -0400
++++ jdk/src/solaris/hpi/include/largefile_bsd.h 2011-07-07 19:17:04.000000000 -0400
@@ -23,14 +23,28 @@
* questions.
*/
@@ -13613,8 +14952,8 @@
+#define pwrite64 pwrite
+
+#endif /* _JAVASOFT_BSD_LARGEFILE_SUPPORT_H_ */
---- jdk/src/solaris/hpi/native_threads/include/threads_md.h 2011-01-20 18:54:41.000000000 -0500
-+++ jdk/src/solaris/hpi/native_threads/include/threads_md.h 2011-02-01 17:46:56.000000000 -0500
+--- jdk/src/solaris/hpi/native_threads/include/threads_md.h 2011-07-05 14:36:10.000000000 -0400
++++ jdk/src/solaris/hpi/native_threads/include/threads_md.h 2011-07-07 19:17:04.000000000 -0400
@@ -36,6 +36,8 @@
#define N_TRACED_REGS 12
#elif i386
@@ -13661,8 +15000,8 @@
#ifdef __linux__
extern thread_key_t intrJmpbufkey;
---- jdk/src/solaris/hpi/native_threads/src/condvar_md.c 2011-01-20 18:54:41.000000000 -0500
-+++ jdk/src/solaris/hpi/native_threads/src/condvar_md.c 2011-02-01 17:46:56.000000000 -0500
+--- jdk/src/solaris/hpi/native_threads/src/condvar_md.c 2011-07-05 14:36:10.000000000 -0400
++++ jdk/src/solaris/hpi/native_threads/src/condvar_md.c 2011-07-07 19:17:04.000000000 -0400
@@ -58,7 +58,7 @@
{
int err;
@@ -13672,8 +15011,8 @@
err = pthread_cond_destroy((cond_t *) &condvar->cond);
#else
err = cond_destroy((cond_t *) condvar);
---- jdk/src/solaris/hpi/native_threads/src/monitor_md.c 2011-01-20 18:54:41.000000000 -0500
-+++ jdk/src/solaris/hpi/native_threads/src/monitor_md.c 2011-02-01 17:46:56.000000000 -0500
+--- jdk/src/solaris/hpi/native_threads/src/monitor_md.c 2011-07-05 14:36:10.000000000 -0400
++++ jdk/src/solaris/hpi/native_threads/src/monitor_md.c 2011-07-07 19:17:04.000000000 -0400
@@ -147,7 +147,7 @@
mid->monitor_owner = self;
mid->entry_count = 1;
@@ -13683,8 +15022,8 @@
if (mid->monitor_owner == self) {
mid->entry_count++;
return SYS_OK;
---- jdk/src/solaris/hpi/native_threads/src/sys_api_td.c 2011-01-20 18:54:41.000000000 -0500
-+++ jdk/src/solaris/hpi/native_threads/src/sys_api_td.c 2011-02-01 17:46:56.000000000 -0500
+--- jdk/src/solaris/hpi/native_threads/src/sys_api_td.c 2011-07-05 14:36:10.000000000 -0400
++++ jdk/src/solaris/hpi/native_threads/src/sys_api_td.c 2011-07-07 19:17:04.000000000 -0400
@@ -39,6 +39,10 @@
#include <sys/ioctl.h>
#endif
@@ -13707,8 +15046,8 @@
#ifdef NO_INTERRUPTIBLE_IO
#undef CLOSEIO
#else
---- jdk/src/solaris/hpi/native_threads/src/threads_bsd.c 2011-02-01 17:20:23.000000000 -0500
-+++ jdk/src/solaris/hpi/native_threads/src/threads_bsd.c 2011-02-01 17:46:56.000000000 -0500
+--- jdk/src/solaris/hpi/native_threads/src/threads_bsd.c 2011-07-07 19:16:00.000000000 -0400
++++ jdk/src/solaris/hpi/native_threads/src/threads_bsd.c 2011-07-07 19:17:04.000000000 -0400
@@ -23,79 +23,44 @@
* questions.
*/
@@ -14584,8 +15923,8 @@
-
- print_lwps();
}
---- jdk/src/solaris/hpi/native_threads/src/threads_md.c 2011-01-20 18:54:41.000000000 -0500
-+++ jdk/src/solaris/hpi/native_threads/src/threads_md.c 2011-02-01 17:46:56.000000000 -0500
+--- jdk/src/solaris/hpi/native_threads/src/threads_md.c 2011-07-05 14:36:10.000000000 -0400
++++ jdk/src/solaris/hpi/native_threads/src/threads_md.c 2011-07-07 19:17:04.000000000 -0400
@@ -54,6 +54,10 @@
#error That can NOT possibly be right.
#endif
@@ -14667,8 +16006,8 @@
info.isMP = (cpus < 0) ? 1 : (cpus > 1);
info.name = "native threads";
---- jdk/src/solaris/hpi/src/linker_md.c 2011-01-20 18:54:41.000000000 -0500
-+++ jdk/src/solaris/hpi/src/linker_md.c 2011-02-01 17:46:56.000000000 -0500
+--- jdk/src/solaris/hpi/src/linker_md.c 2011-07-05 14:36:10.000000000 -0400
++++ jdk/src/solaris/hpi/src/linker_md.c 2011-07-07 19:17:04.000000000 -0400
@@ -44,11 +44,19 @@
#include "threads_md.h"
#endif
@@ -14735,8 +16074,8 @@
#endif
/*
* This is a bit of bulletproofing to catch the commonly occurring
---- jdk/src/solaris/hpi/src/memory_md.c 2011-01-20 18:54:41.000000000 -0500
-+++ jdk/src/solaris/hpi/src/memory_md.c 2011-02-01 17:46:56.000000000 -0500
+--- jdk/src/solaris/hpi/src/memory_md.c 2011-07-05 14:36:10.000000000 -0400
++++ jdk/src/solaris/hpi/src/memory_md.c 2011-07-07 19:17:04.000000000 -0400
@@ -50,12 +50,24 @@
#include <stdlib.h>
#include <stdio.h> /* For perror() */
@@ -14826,8 +16165,8 @@
ret = committedAddr;
#else
ret = requestedAddr;
---- jdk/src/solaris/hpi/src/system_md.c 2011-01-20 18:54:41.000000000 -0500
-+++ jdk/src/solaris/hpi/src/system_md.c 2011-02-01 17:46:56.000000000 -0500
+--- jdk/src/solaris/hpi/src/system_md.c 2011-07-05 14:36:10.000000000 -0400
++++ jdk/src/solaris/hpi/src/system_md.c 2011-07-07 19:17:04.000000000 -0400
@@ -41,6 +41,7 @@
#include <dlfcn.h>
@@ -14881,8 +16220,8 @@
fd = open64_w(path, oflag, mode);
if (delete != 0) {
unlink(path);
---- jdk/src/solaris/instrument/EncodingSupport_md.c 2011-01-20 18:54:41.000000000 -0500
-+++ jdk/src/solaris/instrument/EncodingSupport_md.c 2011-02-01 17:46:56.000000000 -0500
+--- jdk/src/solaris/instrument/EncodingSupport_md.c 2011-07-05 14:36:10.000000000 -0400
++++ jdk/src/solaris/instrument/EncodingSupport_md.c 2011-07-07 19:17:04.000000000 -0400
@@ -28,7 +28,10 @@
#include <string.h>
#include <ctype.h>
@@ -14912,8 +16251,8 @@
/* Open conversion descriptors */
iconvToPlatform = iconv_open(codeset, "UTF-8");
---- jdk/src/solaris/javavm/export/jvm_md.h 2011-01-20 18:54:41.000000000 -0500
-+++ jdk/src/solaris/javavm/export/jvm_md.h 2011-02-01 17:46:56.000000000 -0500
+--- jdk/src/solaris/javavm/export/jvm_md.h 2011-07-05 14:36:10.000000000 -0400
++++ jdk/src/solaris/javavm/export/jvm_md.h 2011-07-07 19:17:04.000000000 -0400
@@ -39,7 +39,14 @@
#define JNI_ONUNLOAD_SYMBOLS {"JNI_OnUnload"}
@@ -14938,8 +16277,8 @@
/* Signals */
---- jdk/src/solaris/native/com/sun/management/UnixOperatingSystem_md.c 2011-01-20 18:54:41.000000000 -0500
-+++ jdk/src/solaris/native/com/sun/management/UnixOperatingSystem_md.c 2011-02-10 18:31:00.000000000 -0500
+--- jdk/src/solaris/native/com/sun/management/UnixOperatingSystem_md.c 2011-07-05 14:36:10.000000000 -0400
++++ jdk/src/solaris/native/com/sun/management/UnixOperatingSystem_md.c 2011-07-07 19:17:04.000000000 -0400
@@ -32,10 +32,16 @@
#include <sys/types.h>
@@ -15161,8 +16500,8 @@
}
JNIEXPORT jlong JNICALL
---- jdk/src/solaris/native/java/io/UnixFileSystem_md.c 2011-01-20 18:54:41.000000000 -0500
-+++ jdk/src/solaris/native/java/io/UnixFileSystem_md.c 2011-02-01 17:46:56.000000000 -0500
+--- jdk/src/solaris/native/java/io/UnixFileSystem_md.c 2011-07-05 14:36:10.000000000 -0400
++++ jdk/src/solaris/native/java/io/UnixFileSystem_md.c 2011-07-07 19:17:04.000000000 -0400
@@ -41,6 +41,11 @@
#include "java_io_FileSystem.h"
#include "java_io_UnixFileSystem.h"
@@ -15218,8 +16557,8 @@
struct stat sb;
if (stat(path, &sb) == 0) {
---- jdk/src/solaris/native/java/io/canonicalize_md.c 2011-01-20 18:54:41.000000000 -0500
-+++ jdk/src/solaris/native/java/io/canonicalize_md.c 2011-02-01 17:46:56.000000000 -0500
+--- jdk/src/solaris/native/java/io/canonicalize_md.c 2011-07-05 14:36:10.000000000 -0400
++++ jdk/src/solaris/native/java/io/canonicalize_md.c 2011-07-07 19:17:04.000000000 -0400
@@ -33,7 +33,9 @@
#include <sys/stat.h>
#include <errno.h>
@@ -15230,8 +16569,8 @@
/* Note: The comments in this file use the terminology
---- jdk/src/solaris/native/java/io/io_util_md.c 2011-01-20 18:54:41.000000000 -0500
-+++ jdk/src/solaris/native/java/io/io_util_md.c 2011-02-01 17:46:56.000000000 -0500
+--- jdk/src/solaris/native/java/io/io_util_md.c 2011-07-05 14:36:10.000000000 -0400
++++ jdk/src/solaris/native/java/io/io_util_md.c 2011-07-07 19:17:04.000000000 -0400
@@ -36,7 +36,7 @@
WITH_PLATFORM_STRING(env, path, ps) {
FD fd;
@@ -15241,8 +16580,8 @@
/* Remove trailing slashes, since the kernel won't */
char *p = (char *)ps + strlen(ps) - 1;
while ((p > ps) && (*p == '/'))
---- jdk/src/solaris/native/java/lang/ProcessEnvironment_md.c 2011-01-20 18:54:41.000000000 -0500
-+++ jdk/src/solaris/native/java/lang/ProcessEnvironment_md.c 2011-02-01 17:46:56.000000000 -0500
+--- jdk/src/solaris/native/java/lang/ProcessEnvironment_md.c 2011-07-05 14:36:10.000000000 -0400
++++ jdk/src/solaris/native/java/lang/ProcessEnvironment_md.c 2011-07-07 19:17:04.000000000 -0400
@@ -28,6 +28,11 @@
#include "jni.h"
#include "jni_util.h"
@@ -15283,8 +16622,8 @@
jbyteArray var, val;
const char * valBeg = varEnd + 1;
jsize varLength = varEnd - environ[i];
---- jdk/src/solaris/native/java/lang/UNIXProcess_md.c 2011-01-20 18:54:41.000000000 -0500
-+++ jdk/src/solaris/native/java/lang/UNIXProcess_md.c 2011-02-01 17:46:56.000000000 -0500
+--- jdk/src/solaris/native/java/lang/UNIXProcess_md.c 2011-07-05 14:36:10.000000000 -0400
++++ jdk/src/solaris/native/java/lang/UNIXProcess_md.c 2011-07-07 19:17:04.000000000 -0400
@@ -40,7 +40,11 @@
#include <stdlib.h>
#include <sys/types.h>
@@ -15487,8 +16826,8 @@
/* Close the parent sides of the pipe.
Give the child sides of the pipes the right fileno's.
Closing pipe fds here is redundant, since closeDescriptors()
---- jdk/src/solaris/native/java/lang/java_props_md.c 2011-01-20 18:54:41.000000000 -0500
-+++ jdk/src/solaris/native/java/lang/java_props_md.c 2011-02-01 17:46:56.000000000 -0500
+--- jdk/src/solaris/native/java/lang/java_props_md.c 2011-07-05 14:36:10.000000000 -0400
++++ jdk/src/solaris/native/java/lang/java_props_md.c 2011-07-07 19:17:04.000000000 -0400
@@ -23,7 +23,7 @@
* questions.
*/
@@ -15622,8 +16961,8 @@
return &sprops;
}
---- jdk/src/solaris/native/java/net/Inet4AddressImpl.c 2011-01-20 18:54:41.000000000 -0500
-+++ jdk/src/solaris/native/java/net/Inet4AddressImpl.c 2011-02-01 17:46:56.000000000 -0500
+--- jdk/src/solaris/native/java/net/Inet4AddressImpl.c 2011-07-05 14:36:10.000000000 -0400
++++ jdk/src/solaris/native/java/net/Inet4AddressImpl.c 2011-07-07 19:17:04.000000000 -0400
@@ -35,17 +35,293 @@
#include <stdlib.h>
#include <ctype.h>
@@ -15980,8 +17319,8 @@
#define SET_NONBLOCKING(fd) { \
int flags = fcntl(fd, F_GETFL); \
flags |= O_NONBLOCK; \
---- jdk/src/solaris/native/java/net/Inet6AddressImpl.c 2011-01-20 18:54:41.000000000 -0500
-+++ jdk/src/solaris/native/java/net/Inet6AddressImpl.c 2011-02-01 17:46:56.000000000 -0500
+--- jdk/src/solaris/native/java/net/Inet6AddressImpl.c 2011-07-05 14:36:10.000000000 -0400
++++ jdk/src/solaris/native/java/net/Inet6AddressImpl.c 2011-07-07 19:17:04.000000000 -0400
@@ -32,6 +32,9 @@
#include <strings.h>
#include <stdlib.h>
@@ -16031,8 +17370,8 @@
}
return (*env)->NewStringUTF(env, hostname);
}
---- jdk/src/solaris/native/java/net/NetworkInterface.c 2011-01-20 18:54:41.000000000 -0500
-+++ jdk/src/solaris/native/java/net/NetworkInterface.c 2011-02-01 17:46:56.000000000 -0500
+--- jdk/src/solaris/native/java/net/NetworkInterface.c 2011-07-05 14:36:10.000000000 -0400
++++ jdk/src/solaris/native/java/net/NetworkInterface.c 2011-07-07 19:17:04.000000000 -0400
@@ -23,13 +23,13 @@
* questions.
*/
@@ -16309,8 +17648,8 @@
memset((char *) &if2, 0, sizeof(if2));
strcpy(if2.ifr_name, name_utf);
---- jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c 2011-02-28 11:06:49.000000000 -0500
-+++ jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c 2011-03-03 15:31:37.000000000 -0500
+--- jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c 2011-07-05 14:36:11.000000000 -0400
++++ jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c 2011-07-07 19:17:04.000000000 -0400
@@ -23,12 +23,12 @@
* questions.
*/
@@ -16479,8 +17818,8 @@
}
}
}
---- jdk/src/solaris/native/java/net/PlainSocketImpl.c 2011-02-28 11:06:49.000000000 -0500
-+++ jdk/src/solaris/native/java/net/PlainSocketImpl.c 2011-03-03 15:31:37.000000000 -0500
+--- jdk/src/solaris/native/java/net/PlainSocketImpl.c 2011-07-05 14:36:11.000000000 -0400
++++ jdk/src/solaris/native/java/net/PlainSocketImpl.c 2011-07-07 19:17:04.000000000 -0400
@@ -253,7 +253,12 @@
jboolean stream) {
jobject fdObj, ssObj;
@@ -16566,8 +17905,8 @@
} else if (errno == ECONNREFUSED) {
NET_ThrowByNameWithLastError(env, JNU_JAVANETPKG "ConnectException",
"Connection refused");
---- jdk/src/solaris/native/java/net/bsd_close.c 2011-02-01 17:20:23.000000000 -0500
-+++ jdk/src/solaris/native/java/net/bsd_close.c 2011-02-01 17:46:57.000000000 -0500
+--- jdk/src/solaris/native/java/net/bsd_close.c 2011-07-07 19:16:00.000000000 -0400
++++ jdk/src/solaris/native/java/net/bsd_close.c 2011-07-07 19:17:04.000000000 -0400
@@ -57,7 +57,7 @@
/*
* Signal to unblock thread
@@ -16577,8 +17916,8 @@
/*
* The fd table and the number of file descriptors
---- jdk/src/solaris/native/java/net/net_util_md.c 2011-02-28 11:06:49.000000000 -0500
-+++ jdk/src/solaris/native/java/net/net_util_md.c 2011-03-17 15:21:37.000000000 -0400
+--- jdk/src/solaris/native/java/net/net_util_md.c 2011-07-05 14:36:11.000000000 -0400
++++ jdk/src/solaris/native/java/net/net_util_md.c 2011-07-07 19:17:04.000000000 -0400
@@ -34,6 +34,15 @@
#include <stdlib.h>
#include <dlfcn.h>
@@ -16776,8 +18115,8 @@
return setsockopt(fd, level, opt, arg, len);
}
---- jdk/src/solaris/native/java/net/net_util_md.h 2011-01-20 18:54:41.000000000 -0500
-+++ jdk/src/solaris/native/java/net/net_util_md.h 2011-02-01 17:46:57.000000000 -0500
+--- jdk/src/solaris/native/java/net/net_util_md.h 2011-07-05 14:36:11.000000000 -0400
++++ jdk/src/solaris/native/java/net/net_util_md.h 2011-07-07 19:17:04.000000000 -0400
@@ -37,7 +37,7 @@
#endif
@@ -16787,8 +18126,8 @@
extern int NET_Timeout(int s, long timeout);
extern int NET_Read(int s, void* buf, size_t len);
extern int NET_RecvFrom(int s, void *buf, int len, unsigned int flags,
---- jdk/src/solaris/native/java/nio/MappedByteBuffer.c 2011-01-20 18:54:41.000000000 -0500
-+++ jdk/src/solaris/native/java/nio/MappedByteBuffer.c 2011-02-01 17:46:57.000000000 -0500
+--- jdk/src/solaris/native/java/nio/MappedByteBuffer.c 2011-07-05 14:36:11.000000000 -0400
++++ jdk/src/solaris/native/java/nio/MappedByteBuffer.c 2011-07-07 19:17:04.000000000 -0400
@@ -38,7 +38,11 @@
jlong address, jlong len)
{
@@ -16813,8 +18152,8 @@
unsigned long lAddress = address;
jlong offset = lAddress % pageSize;
---- jdk/src/solaris/native/java/util/FileSystemPreferences.c 2011-01-20 18:54:41.000000000 -0500
-+++ jdk/src/solaris/native/java/util/FileSystemPreferences.c 2011-02-01 17:46:57.000000000 -0500
+--- jdk/src/solaris/native/java/util/FileSystemPreferences.c 2011-07-05 14:36:11.000000000 -0400
++++ jdk/src/solaris/native/java/util/FileSystemPreferences.c 2011-07-07 19:17:04.000000000 -0400
@@ -47,8 +47,11 @@
return (jint) result;
}
@@ -16852,8 +18191,8 @@
if (rc < 0) {
close(fd);
---- jdk/src/solaris/native/java/util/TimeZone_md.c 2011-01-20 18:54:41.000000000 -0500
-+++ jdk/src/solaris/native/java/util/TimeZone_md.c 2011-02-01 17:46:57.000000000 -0500
+--- jdk/src/solaris/native/java/util/TimeZone_md.c 2011-07-05 14:36:11.000000000 -0400
++++ jdk/src/solaris/native/java/util/TimeZone_md.c 2011-07-07 19:17:04.000000000 -0400
@@ -31,7 +31,7 @@
#include <errno.h>
#include <stddef.h>
@@ -16986,8 +18325,8 @@
sprintf(buf, (const char *)"GMT%c%02d:%02d",
sign, (int)(offset/3600), (int)((offset%3600)/60));
return strdup(buf);
---- jdk/src/solaris/native/sun/awt/CUPSfuncs.c 2011-01-20 18:54:41.000000000 -0500
-+++ jdk/src/solaris/native/sun/awt/CUPSfuncs.c 2011-02-01 17:46:57.000000000 -0500
+--- jdk/src/solaris/native/sun/awt/CUPSfuncs.c 2011-07-05 14:36:11.000000000 -0400
++++ jdk/src/solaris/native/sun/awt/CUPSfuncs.c 2011-07-07 19:17:04.000000000 -0400
@@ -25,6 +25,7 @@
#include <jni.h>
@@ -17010,8 +18349,8 @@
if (handle == NULL) {
return JNI_FALSE;
}
---- jdk/src/solaris/native/sun/awt/VDrawingArea.c 2011-01-20 18:54:42.000000000 -0500
-+++ jdk/src/solaris/native/sun/awt/VDrawingArea.c 2011-02-01 17:46:57.000000000 -0500
+--- jdk/src/solaris/native/sun/awt/VDrawingArea.c 2011-07-05 14:36:11.000000000 -0400
++++ jdk/src/solaris/native/sun/awt/VDrawingArea.c 2011-07-07 19:17:04.000000000 -0400
@@ -31,7 +31,11 @@
#endif /* !HEADLESS */
@@ -17024,8 +18363,8 @@
#ifdef __linux__
/* XXX: Shouldn't be necessary. */
---- jdk/src/solaris/native/sun/awt/X11Color.c 2011-01-20 18:54:42.000000000 -0500
-+++ jdk/src/solaris/native/sun/awt/X11Color.c 2011-02-01 17:46:57.000000000 -0500
+--- jdk/src/solaris/native/sun/awt/X11Color.c 2011-07-05 14:36:11.000000000 -0400
++++ jdk/src/solaris/native/sun/awt/X11Color.c 2011-07-07 19:17:04.000000000 -0400
@@ -33,7 +33,9 @@
#include <math.h>
#include <sys/time.h>
@@ -17036,8 +18375,8 @@
#ifndef HEADLESS
#include <X11/Xlib.h>
#include <X11/Xatom.h>
---- jdk/src/solaris/native/sun/awt/XDrawingArea.c 2011-01-20 18:54:42.000000000 -0500
-+++ jdk/src/solaris/native/sun/awt/XDrawingArea.c 2011-02-01 17:46:57.000000000 -0500
+--- jdk/src/solaris/native/sun/awt/XDrawingArea.c 2011-07-05 14:36:11.000000000 -0400
++++ jdk/src/solaris/native/sun/awt/XDrawingArea.c 2011-07-07 19:17:04.000000000 -0400
@@ -30,7 +30,11 @@
#include <Xm/XmP.h>
@@ -17050,8 +18389,8 @@
#ifdef DEBUG
#include <jvm.h> /* To get jio_fprintf() */
---- jdk/src/solaris/native/sun/awt/awt_Font.c 2011-01-20 18:54:42.000000000 -0500
-+++ jdk/src/solaris/native/sun/awt/awt_Font.c 2011-02-01 17:46:57.000000000 -0500
+--- jdk/src/solaris/native/sun/awt/awt_Font.c 2011-07-05 14:36:11.000000000 -0400
++++ jdk/src/solaris/native/sun/awt/awt_Font.c 2011-07-07 19:17:04.000000000 -0400
@@ -334,7 +334,7 @@
if (strcmp(style, "regular") == 0) {
altstyle = "roman";
@@ -17061,8 +18400,8 @@
if (!strcmp(family, "lucidasans")) {
family = "lucida";
}
---- jdk/src/solaris/native/sun/awt/awt_GraphicsEnv.c 2011-01-20 18:54:42.000000000 -0500
-+++ jdk/src/solaris/native/sun/awt/awt_GraphicsEnv.c 2011-02-01 17:46:57.000000000 -0500
+--- jdk/src/solaris/native/sun/awt/awt_GraphicsEnv.c 2011-07-05 14:36:11.000000000 -0400
++++ jdk/src/solaris/native/sun/awt/awt_GraphicsEnv.c 2011-07-07 19:17:04.000000000 -0400
@@ -40,6 +40,7 @@
#include <jni.h>
#include <jni_util.h>
@@ -17187,8 +18526,8 @@
if (pLibRandR == NULL) {
J2dRlsTraceLn(J2D_TRACE_ERROR,
"X11GD_InitXrandrFuncs: Could not open libXrandr.so.2");
---- jdk/src/solaris/native/sun/awt/awt_InputMethod.c 2011-01-20 18:54:42.000000000 -0500
-+++ jdk/src/solaris/native/sun/awt/awt_InputMethod.c 2011-02-01 17:46:57.000000000 -0500
+--- jdk/src/solaris/native/sun/awt/awt_InputMethod.c 2011-07-05 14:36:11.000000000 -0400
++++ jdk/src/solaris/native/sun/awt/awt_InputMethod.c 2011-07-07 19:17:04.000000000 -0400
@@ -69,7 +69,7 @@
XIMPreeditDrawCallbackStruct *);
static void PreeditCaretCallback(XIC, XPointer,
@@ -17428,8 +18767,8 @@
AWT_LOCK();
adjustStatusWindow(window);
AWT_UNLOCK();
---- jdk/src/solaris/native/sun/awt/awt_LoadLibrary.c 2011-01-20 18:54:42.000000000 -0500
-+++ jdk/src/solaris/native/sun/awt/awt_LoadLibrary.c 2011-02-01 17:46:57.000000000 -0500
+--- jdk/src/solaris/native/sun/awt/awt_LoadLibrary.c 2011-07-05 14:36:11.000000000 -0400
++++ jdk/src/solaris/native/sun/awt/awt_LoadLibrary.c 2011-07-07 19:17:04.000000000 -0400
@@ -260,7 +260,11 @@
}
}
@@ -17442,8 +18781,8 @@
JNU_CallStaticMethodByName(env, NULL, "java/lang/System", "load",
"(Ljava/lang/String;)V",
---- jdk/src/solaris/native/sun/awt/awt_MToolkit.c 2011-01-20 18:54:42.000000000 -0500
-+++ jdk/src/solaris/native/sun/awt/awt_MToolkit.c 2011-02-01 17:46:57.000000000 -0500
+--- jdk/src/solaris/native/sun/awt/awt_MToolkit.c 2011-07-05 14:36:11.000000000 -0400
++++ jdk/src/solaris/native/sun/awt/awt_MToolkit.c 2011-07-07 19:17:04.000000000 -0400
@@ -63,8 +63,9 @@
extern JavaVM *jvm;
@@ -17464,8 +18803,8 @@
statusWindowEventHandler(xev);
#endif
xembed_eventHandler(&xev);
---- jdk/src/solaris/native/sun/awt/awt_Mlib.c 2011-01-20 18:54:42.000000000 -0500
-+++ jdk/src/solaris/native/sun/awt/awt_Mlib.c 2011-02-01 17:46:57.000000000 -0500
+--- jdk/src/solaris/native/sun/awt/awt_Mlib.c 2011-07-05 14:36:11.000000000 -0400
++++ jdk/src/solaris/native/sun/awt/awt_Mlib.c 2011-07-07 19:17:04.000000000 -0400
@@ -32,6 +32,7 @@
#include <dlfcn.h>
#include "jni.h"
@@ -17488,8 +18827,8 @@
}
if (handle == NULL) {
---- jdk/src/solaris/native/sun/awt/awt_Robot.c 2011-01-20 18:54:42.000000000 -0500
-+++ jdk/src/solaris/native/sun/awt/awt_Robot.c 2011-02-01 17:46:57.000000000 -0500
+--- jdk/src/solaris/native/sun/awt/awt_Robot.c 2011-07-05 14:36:11.000000000 -0400
++++ jdk/src/solaris/native/sun/awt/awt_Robot.c 2011-07-07 19:17:04.000000000 -0400
@@ -45,7 +45,7 @@
#include "wsutils.h"
#include "list.h"
@@ -17499,8 +18838,8 @@
#include <sys/socket.h>
#endif
---- jdk/src/solaris/native/sun/awt/awt_util.h 2011-01-20 18:54:42.000000000 -0500
-+++ jdk/src/solaris/native/sun/awt/awt_util.h 2011-02-01 17:46:57.000000000 -0500
+--- jdk/src/solaris/native/sun/awt/awt_util.h 2011-07-05 14:36:11.000000000 -0400
++++ jdk/src/solaris/native/sun/awt/awt_util.h 2011-07-07 19:17:04.000000000 -0400
@@ -187,15 +187,20 @@
#ifdef __solaris__
extern Widget awt_util_getXICStatusAreaWindow(Widget w);
@@ -17523,8 +18862,8 @@
typedef struct _XmImRefRec {
Cardinal num_refs; /* Number of referencing widgets. */
Cardinal max_refs; /* Maximum length of refs array. */
---- jdk/src/solaris/native/sun/awt/awt_wm.c 2011-01-20 18:54:42.000000000 -0500
-+++ jdk/src/solaris/native/sun/awt/awt_wm.c 2011-02-01 17:46:57.000000000 -0500
+--- jdk/src/solaris/native/sun/awt/awt_wm.c 2011-07-05 14:36:11.000000000 -0400
++++ jdk/src/solaris/native/sun/awt/awt_wm.c 2011-07-07 19:17:04.000000000 -0400
@@ -121,12 +121,19 @@
static Atom XA_KWM_WIN_MAXIMIZED;
@@ -17622,8 +18961,8 @@
awt_wmgr = OPENLOOK_WM;
}
else {
---- jdk/src/solaris/native/sun/awt/awt_wm.h 2011-01-20 18:54:42.000000000 -0500
-+++ jdk/src/solaris/native/sun/awt/awt_wm.h 2011-02-01 17:46:57.000000000 -0500
+--- jdk/src/solaris/native/sun/awt/awt_wm.h 2011-07-05 14:36:11.000000000 -0400
++++ jdk/src/solaris/native/sun/awt/awt_wm.h 2011-07-07 19:17:04.000000000 -0400
@@ -45,7 +45,10 @@
KDE2_WM,
SAWFISH_WM,
@@ -17636,8 +18975,8 @@
};
extern void awt_wm_init(void);
---- jdk/src/solaris/native/sun/awt/extutil.h 2011-01-20 18:54:42.000000000 -0500
-+++ jdk/src/solaris/native/sun/awt/extutil.h 2011-02-01 17:46:57.000000000 -0500
+--- jdk/src/solaris/native/sun/awt/extutil.h 2011-07-05 14:36:11.000000000 -0400
++++ jdk/src/solaris/native/sun/awt/extutil.h 2011-07-07 19:17:04.000000000 -0400
@@ -58,7 +58,7 @@
*/
/* $XFree86: xc/include/extensions/extutil.h,v 1.5 2001/01/17 17:53:20 dawes Exp $ */
@@ -17653,8 +18992,8 @@
-#endif /* __linux__ */
+#endif /* __linux__ || _ALLBSD_SOURCE */
---- jdk/src/solaris/native/sun/awt/fontpath.c 2011-01-20 18:54:42.000000000 -0500
-+++ jdk/src/solaris/native/sun/awt/fontpath.c 2011-02-01 17:46:57.000000000 -0500
+--- jdk/src/solaris/native/sun/awt/fontpath.c 2011-07-05 14:36:11.000000000 -0400
++++ jdk/src/solaris/native/sun/awt/fontpath.c 2011-07-07 19:17:04.000000000 -0400
@@ -23,7 +23,7 @@
* questions.
*/
@@ -17812,8 +19151,8 @@
if (libfontconfig == NULL) {
return NULL;
}
---- jdk/src/solaris/native/sun/awt/gtk2_interface.c 2011-01-20 18:54:42.000000000 -0500
-+++ jdk/src/solaris/native/sun/awt/gtk2_interface.c 2011-02-01 17:46:57.000000000 -0500
+--- jdk/src/solaris/native/sun/awt/gtk2_interface.c 2011-07-05 14:36:11.000000000 -0400
++++ jdk/src/solaris/native/sun/awt/gtk2_interface.c 2011-07-07 19:17:04.000000000 -0400
@@ -30,8 +30,9 @@
#include <string.h>
#include "gtk2_interface.h"
@@ -17825,8 +19164,8 @@
#define G_TYPE_INVALID G_TYPE_MAKE_FUNDAMENTAL (0)
#define G_TYPE_NONE G_TYPE_MAKE_FUNDAMENTAL (1)
---- jdk/src/solaris/native/sun/awt/list.c 2011-01-20 18:54:42.000000000 -0500
-+++ jdk/src/solaris/native/sun/awt/list.c 2011-02-01 17:46:57.000000000 -0500
+--- jdk/src/solaris/native/sun/awt/list.c 2011-07-05 14:36:11.000000000 -0400
++++ jdk/src/solaris/native/sun/awt/list.c 2011-07-07 19:17:04.000000000 -0400
@@ -66,7 +66,11 @@
----------------------------------------------------------------------- **/
@@ -17839,8 +19178,8 @@
#include "list.h"
---- jdk/src/solaris/native/sun/awt/robot_common.c 2011-01-20 18:54:42.000000000 -0500
-+++ jdk/src/solaris/native/sun/awt/robot_common.c 2011-02-01 17:46:57.000000000 -0500
+--- jdk/src/solaris/native/sun/awt/robot_common.c 2011-07-05 14:36:11.000000000 -0400
++++ jdk/src/solaris/native/sun/awt/robot_common.c 2011-07-07 19:17:04.000000000 -0400
@@ -27,6 +27,9 @@
#error This file should not be included in headless library
#endif
@@ -17851,8 +19190,8 @@
#include "robot_common.h"
/*
---- jdk/src/solaris/native/sun/font/X11FontScaler.c 2011-01-20 18:54:42.000000000 -0500
-+++ jdk/src/solaris/native/sun/font/X11FontScaler.c 2011-02-01 17:46:57.000000000 -0500
+--- jdk/src/solaris/native/sun/font/X11FontScaler.c 2011-07-05 14:36:11.000000000 -0400
++++ jdk/src/solaris/native/sun/font/X11FontScaler.c 2011-07-07 19:17:04.000000000 -0400
@@ -32,7 +32,11 @@
* into X11FontScaler_md.c, which is compiled into another library.
*/
@@ -17865,8 +19204,8 @@
#include <ctype.h>
#include <sys/utsname.h>
---- jdk/src/solaris/native/sun/font/X11TextRenderer.c 2011-01-20 18:54:42.000000000 -0500
-+++ jdk/src/solaris/native/sun/font/X11TextRenderer.c 2011-02-01 17:46:57.000000000 -0500
+--- jdk/src/solaris/native/sun/font/X11TextRenderer.c 2011-07-05 14:36:11.000000000 -0400
++++ jdk/src/solaris/native/sun/font/X11TextRenderer.c 2011-07-07 19:17:04.000000000 -0400
@@ -39,7 +39,11 @@
#include "GraphicsPrimitiveMgr.h"
#include "glyphblitting.h"
@@ -17879,8 +19218,8 @@
JNIEXPORT void JNICALL AWTDrawGlyphList
---- jdk/src/solaris/native/sun/java2d/j2d_md.h 2011-01-20 18:54:42.000000000 -0500
-+++ jdk/src/solaris/native/sun/java2d/j2d_md.h 2011-02-01 17:46:57.000000000 -0500
+--- jdk/src/solaris/native/sun/java2d/j2d_md.h 2011-07-05 14:36:11.000000000 -0400
++++ jdk/src/solaris/native/sun/java2d/j2d_md.h 2011-07-07 19:17:04.000000000 -0400
@@ -28,11 +28,11 @@
#include <sys/types.h>
@@ -17896,8 +19235,8 @@
typedef unsigned char jubyte;
typedef unsigned short jushort;
---- jdk/src/solaris/native/sun/java2d/loops/mlib_ImageZoom_NN.c 2011-01-20 18:54:42.000000000 -0500
-+++ jdk/src/solaris/native/sun/java2d/loops/mlib_ImageZoom_NN.c 2011-02-01 17:46:57.000000000 -0500
+--- jdk/src/solaris/native/sun/java2d/loops/mlib_ImageZoom_NN.c 2011-07-05 14:36:11.000000000 -0400
++++ jdk/src/solaris/native/sun/java2d/loops/mlib_ImageZoom_NN.c 2011-07-07 19:17:04.000000000 -0400
@@ -66,6 +66,10 @@
* MLIB_EDGE_SRC_PADDED
*/
@@ -18003,8 +19342,8 @@
LOGIC(da[0], dtmp, dtmp1, |);
}
else { /* aligned */
---- jdk/src/solaris/native/sun/java2d/loops/vis_FuncArray.c 2011-01-20 18:54:42.000000000 -0500
-+++ jdk/src/solaris/native/sun/java2d/loops/vis_FuncArray.c 2011-02-01 17:46:57.000000000 -0500
+--- jdk/src/solaris/native/sun/java2d/loops/vis_FuncArray.c 2011-07-05 14:36:12.000000000 -0400
++++ jdk/src/solaris/native/sun/java2d/loops/vis_FuncArray.c 2011-07-07 19:17:04.000000000 -0400
@@ -794,7 +794,7 @@
static int initialized;
static int usevis = JNI_TRUE;
@@ -18014,8 +19353,8 @@
# define ULTRA_CHIP "sparc64"
#else
# define ULTRA_CHIP "sun4u"
---- jdk/src/solaris/native/sun/java2d/opengl/OGLFuncs_md.h 2011-01-20 18:54:42.000000000 -0500
-+++ jdk/src/solaris/native/sun/java2d/opengl/OGLFuncs_md.h 2011-02-01 17:46:57.000000000 -0500
+--- jdk/src/solaris/native/sun/java2d/opengl/OGLFuncs_md.h 2011-07-05 14:36:12.000000000 -0400
++++ jdk/src/solaris/native/sun/java2d/opengl/OGLFuncs_md.h 2011-07-07 19:17:04.000000000 -0400
@@ -27,7 +27,10 @@
#define OGLFuncs_md_h_Included
@@ -18036,8 +19375,8 @@
} \
OGL_LIB_HANDLE = dlopen(libGLPath, RTLD_LAZY | RTLD_LOCAL); \
} \
---- jdk/src/solaris/native/sun/java2d/x11/X11SurfaceData.c 2011-01-20 18:54:42.000000000 -0500
-+++ jdk/src/solaris/native/sun/java2d/x11/X11SurfaceData.c 2011-02-01 17:46:57.000000000 -0500
+--- jdk/src/solaris/native/sun/java2d/x11/X11SurfaceData.c 2011-07-05 14:36:12.000000000 -0400
++++ jdk/src/solaris/native/sun/java2d/x11/X11SurfaceData.c 2011-07-07 19:17:04.000000000 -0400
@@ -32,6 +32,7 @@
#include "gdefs.h"
@@ -18055,8 +19394,8 @@
}
dgaAvailable = JNI_FALSE;
if (lib != NULL) {
---- jdk/src/solaris/native/sun/jdga/dgalock.c 2011-01-20 18:54:42.000000000 -0500
-+++ jdk/src/solaris/native/sun/jdga/dgalock.c 2011-02-01 17:46:57.000000000 -0500
+--- jdk/src/solaris/native/sun/jdga/dgalock.c 2011-07-05 14:36:12.000000000 -0400
++++ jdk/src/solaris/native/sun/jdga/dgalock.c 2011-07-07 19:17:04.000000000 -0400
@@ -44,6 +44,7 @@
#include <X11/Xlib.h>
@@ -18079,8 +19418,8 @@
void *sym = dlsym(handle, "IsXineramaOn");
IsXineramaOn = (IsXineramaOnFunc *)sym;
if (IsXineramaOn != 0 && (*IsXineramaOn)(display)) {
---- jdk/src/solaris/native/sun/management/FileSystemImpl.c 2011-01-20 18:54:43.000000000 -0500
-+++ jdk/src/solaris/native/sun/management/FileSystemImpl.c 2011-02-01 17:46:57.000000000 -0500
+--- jdk/src/solaris/native/sun/management/FileSystemImpl.c 2011-07-05 14:36:12.000000000 -0400
++++ jdk/src/solaris/native/sun/management/FileSystemImpl.c 2011-07-07 19:17:04.000000000 -0400
@@ -26,6 +26,10 @@
#include <sys/types.h>
#include <sys/stat.h>
@@ -18092,8 +19431,8 @@
#include "jni.h"
#include "jni_util.h"
#include "sun_management_FileSystemImpl.h"
---- jdk/src/solaris/native/sun/net/dns/ResolverConfigurationImpl.c 2011-01-20 18:54:43.000000000 -0500
-+++ jdk/src/solaris/native/sun/net/dns/ResolverConfigurationImpl.c 2011-02-01 17:46:57.000000000 -0500
+--- jdk/src/solaris/native/sun/net/dns/ResolverConfigurationImpl.c 2011-07-05 14:36:12.000000000 -0400
++++ jdk/src/solaris/native/sun/net/dns/ResolverConfigurationImpl.c 2011-07-07 19:17:04.000000000 -0400
@@ -33,7 +33,7 @@
#include <strings.h>
#endif
@@ -18103,8 +19442,8 @@
#include <string.h>
#endif
---- jdk/src/solaris/native/sun/net/spi/DefaultProxySelector.c 2011-01-20 18:54:43.000000000 -0500
-+++ jdk/src/solaris/native/sun/net/spi/DefaultProxySelector.c 2011-02-01 17:46:57.000000000 -0500
+--- jdk/src/solaris/native/sun/net/spi/DefaultProxySelector.c 2011-07-05 14:36:12.000000000 -0400
++++ jdk/src/solaris/native/sun/net/spi/DefaultProxySelector.c 2011-07-07 19:17:04.000000000 -0400
@@ -26,11 +26,12 @@
#include "jni.h"
#include "jni_util.h"
@@ -18131,8 +19470,8 @@
gconf_ver = 2;
}
if (gconf_ver > 0) {
---- jdk/src/solaris/native/sun/nio/ch/DatagramChannelImpl.c 2011-01-20 18:54:43.000000000 -0500
-+++ jdk/src/solaris/native/sun/nio/ch/DatagramChannelImpl.c 2011-02-01 17:46:57.000000000 -0500
+--- jdk/src/solaris/native/sun/nio/ch/DatagramChannelImpl.c 2011-07-05 14:36:12.000000000 -0400
++++ jdk/src/solaris/native/sun/nio/ch/DatagramChannelImpl.c 2011-07-07 19:17:04.000000000 -0400
@@ -35,7 +35,7 @@
#include <string.h>
#include <errno.h>
@@ -18182,8 +19521,8 @@
}
#endif
---- jdk/src/solaris/native/sun/nio/ch/DatagramDispatcher.c 2011-01-20 18:54:43.000000000 -0500
-+++ jdk/src/solaris/native/sun/nio/ch/DatagramDispatcher.c 2011-02-01 17:46:57.000000000 -0500
+--- jdk/src/solaris/native/sun/nio/ch/DatagramDispatcher.c 2011-07-05 14:36:12.000000000 -0400
++++ jdk/src/solaris/native/sun/nio/ch/DatagramDispatcher.c 2011-07-07 19:17:04.000000000 -0400
@@ -72,7 +72,7 @@
m.msg_accrightslen = 0;
#endif
@@ -18202,8 +19541,8 @@
m.msg_control = NULL;
m.msg_controllen = 0;
#endif
---- jdk/src/solaris/native/sun/nio/ch/FileChannelImpl.c 2011-01-20 18:54:43.000000000 -0500
-+++ jdk/src/solaris/native/sun/nio/ch/FileChannelImpl.c 2011-02-01 17:46:57.000000000 -0500
+--- jdk/src/solaris/native/sun/nio/ch/FileChannelImpl.c 2011-07-05 14:36:12.000000000 -0400
++++ jdk/src/solaris/native/sun/nio/ch/FileChannelImpl.c 2011-07-07 19:17:04.000000000 -0400
@@ -26,15 +26,21 @@
#include "jni.h"
#include "jni_util.h"
@@ -18345,8 +19684,8 @@
if (lockResult < 0) {
JNU_ThrowIOExceptionWithLastError(env, "Release failed");
}
---- jdk/src/solaris/native/sun/nio/ch/FileDispatcher.c 2011-01-20 18:54:43.000000000 -0500
-+++ jdk/src/solaris/native/sun/nio/ch/FileDispatcher.c 2011-02-01 17:46:57.000000000 -0500
+--- jdk/src/solaris/native/sun/nio/ch/FileDispatcher.c 2011-07-05 14:36:12.000000000 -0400
++++ jdk/src/solaris/native/sun/nio/ch/FileDispatcher.c 2011-07-07 19:17:04.000000000 -0400
@@ -32,8 +32,12 @@
#include <sys/socket.h>
#include <fcntl.h>
@@ -18360,8 +19699,8 @@
static int preCloseFD = -1; /* File descriptor to which we dup other fd's
before closing them for real */
---- jdk/src/solaris/native/sun/nio/ch/FileKey.c 2011-01-20 18:54:43.000000000 -0500
-+++ jdk/src/solaris/native/sun/nio/ch/FileKey.c 2011-02-01 17:46:57.000000000 -0500
+--- jdk/src/solaris/native/sun/nio/ch/FileKey.c 2011-07-05 14:36:12.000000000 -0400
++++ jdk/src/solaris/native/sun/nio/ch/FileKey.c 2011-07-07 19:17:04.000000000 -0400
@@ -30,6 +30,10 @@
#include "nio_util.h"
#include "sun_nio_ch_FileKey.h"
@@ -18373,8 +19712,8 @@
static jfieldID key_st_dev; /* id for FileKey.st_dev */
static jfieldID key_st_ino; /* id for FileKey.st_ino */
---- jdk/src/solaris/native/sun/nio/ch/KqueueArrayWrapper.c 1969-12-31 19:00:00.000000000 -0500
-+++ jdk/src/solaris/native/sun/nio/ch/KqueueArrayWrapper.c 2011-02-01 17:46:57.000000000 -0500
+--- jdk/src/solaris/native/sun/nio/ch/KqueueArrayWrapper.c 2011-07-07 19:17:04.000000000 -0400
++++ jdk/src/solaris/native/sun/nio/ch/KqueueArrayWrapper.c 2011-07-07 19:17:04.000000000 -0400
@@ -0,0 +1,186 @@
+/*
+ * Scratched by davidxu@freebsd.org
@@ -18562,8 +19901,8 @@
+#ifdef __cplusplus
+}
+#endif
---- jdk/src/solaris/native/sun/nio/ch/Net.c 2011-02-28 11:06:50.000000000 -0500
-+++ jdk/src/solaris/native/sun/nio/ch/Net.c 2011-03-03 16:07:56.000000000 -0500
+--- jdk/src/solaris/native/sun/nio/ch/Net.c 2011-07-05 14:36:12.000000000 -0400
++++ jdk/src/solaris/native/sun/nio/ch/Net.c 2011-07-07 19:17:04.000000000 -0400
@@ -60,17 +60,33 @@
jboolean reuse)
{
@@ -18734,8 +20073,8 @@
case ECONNREFUSED:
xn = JNU_JAVANETPKG "ConnectException";
break;
---- jdk/src/solaris/native/sun/security/jgss/wrapper/NativeFunc.c 2011-01-20 18:54:43.000000000 -0500
-+++ jdk/src/solaris/native/sun/security/jgss/wrapper/NativeFunc.c 2011-02-01 17:46:57.000000000 -0500
+--- jdk/src/solaris/native/sun/security/jgss/wrapper/NativeFunc.c 2011-07-05 14:36:12.000000000 -0400
++++ jdk/src/solaris/native/sun/security/jgss/wrapper/NativeFunc.c 2011-07-07 19:17:04.000000000 -0400
@@ -26,7 +26,9 @@
#include <stdio.h>
#include <stdlib.h>
@@ -18746,8 +20085,8 @@
#include "NativeFunc.h"
/* standard GSS method names (ordering is from mapfile) */
---- jdk/src/solaris/native/sun/security/pkcs11/j2secmod_md.c 2011-01-20 18:54:43.000000000 -0500
-+++ jdk/src/solaris/native/sun/security/pkcs11/j2secmod_md.c 2011-02-01 17:46:57.000000000 -0500
+--- jdk/src/solaris/native/sun/security/pkcs11/j2secmod_md.c 2011-07-05 14:36:12.000000000 -0400
++++ jdk/src/solaris/native/sun/security/pkcs11/j2secmod_md.c 2011-07-07 19:17:04.000000000 -0400
@@ -28,12 +28,19 @@
#include <string.h>
@@ -18790,8 +20129,8 @@
(*env)->ReleaseStringUTFChars(env, jLibName, libName);
dprintf2("-handle: %u (0X%X)\n", hModule, hModule);
---- jdk/src/solaris/native/sun/security/pkcs11/wrapper/p11_md.c 2011-01-20 18:54:43.000000000 -0500
-+++ jdk/src/solaris/native/sun/security/pkcs11/wrapper/p11_md.c 2011-02-01 17:46:57.000000000 -0500
+--- jdk/src/solaris/native/sun/security/pkcs11/wrapper/p11_md.c 2011-07-05 14:36:12.000000000 -0400
++++ jdk/src/solaris/native/sun/security/pkcs11/wrapper/p11_md.c 2011-07-07 19:17:04.000000000 -0400
@@ -64,7 +64,9 @@
#include <assert.h>
@@ -18802,8 +20141,8 @@
#include <jni.h>
---- jdk/src/solaris/native/sun/security/smartcardio/pcsc_md.c 2011-01-20 18:54:43.000000000 -0500
-+++ jdk/src/solaris/native/sun/security/smartcardio/pcsc_md.c 2011-02-01 17:46:57.000000000 -0500
+--- jdk/src/solaris/native/sun/security/smartcardio/pcsc_md.c 2011-07-05 14:36:12.000000000 -0400
++++ jdk/src/solaris/native/sun/security/smartcardio/pcsc_md.c 2011-07-07 19:17:04.000000000 -0400
@@ -29,7 +29,9 @@
#include <assert.h>
@@ -18814,8 +20153,8 @@
#include <winscard.h>
---- jdk/src/solaris/native/sun/tools/attach/BsdVirtualMachine.c 2011-02-01 17:20:23.000000000 -0500
-+++ jdk/src/solaris/native/sun/tools/attach/BsdVirtualMachine.c 2011-02-01 17:46:57.000000000 -0500
+--- jdk/src/solaris/native/sun/tools/attach/BsdVirtualMachine.c 2011-07-07 19:16:00.000000000 -0400
++++ jdk/src/solaris/native/sun/tools/attach/BsdVirtualMachine.c 2011-07-07 19:17:04.000000000 -0400
@@ -35,10 +35,10 @@
#include <dirent.h>
#include <ctype.h>
@@ -19120,8 +20459,8 @@
+ JNU_ReleaseStringPlatformChars(env, path, _path);
+ }
+}
---- jdk/src/solaris/native/sun/xawt/XWindow.c 2011-01-20 18:54:43.000000000 -0500
-+++ jdk/src/solaris/native/sun/xawt/XWindow.c 2011-02-01 17:46:57.000000000 -0500
+--- jdk/src/solaris/native/sun/xawt/XWindow.c 2011-07-05 14:36:12.000000000 -0400
++++ jdk/src/solaris/native/sun/xawt/XWindow.c 2011-07-07 19:17:04.000000000 -0400
@@ -228,10 +228,10 @@
{java_awt_event_KeyEvent_VK_DOWN, XK_Down, FALSE, java_awt_event_KeyEvent_KEY_LOCATION_STANDARD},
@@ -19146,8 +20485,8 @@
/* The following code on Linux will cause the keypad keys
* not to echo on JTextField when the NumLock is on. The
* keysyms will be 0, because the last parameter 2 is not defined.
---- jdk/src/solaris/native/sun/xawt/awt_Desktop.c 2011-01-20 18:54:43.000000000 -0500
-+++ jdk/src/solaris/native/sun/xawt/awt_Desktop.c 2011-02-01 17:46:57.000000000 -0500
+--- jdk/src/solaris/native/sun/xawt/awt_Desktop.c 2011-07-05 14:36:12.000000000 -0400
++++ jdk/src/solaris/native/sun/xawt/awt_Desktop.c 2011-07-07 19:17:04.000000000 -0400
@@ -24,6 +24,7 @@
*/
@@ -19174,8 +20513,8 @@
if (gnome_handle == NULL) {
#ifdef INTERNAL_BUILD
fprintf(stderr, "can not load libgnome-2.so\n");
---- jdk/src/solaris/npt/npt_md.h 2011-01-20 18:54:43.000000000 -0500
-+++ jdk/src/solaris/npt/npt_md.h 2011-02-01 17:46:57.000000000 -0500
+--- jdk/src/solaris/npt/npt_md.h 2011-07-05 14:36:12.000000000 -0400
++++ jdk/src/solaris/npt/npt_md.h 2011-07-07 19:17:04.000000000 -0400
@@ -32,9 +32,10 @@
#include <string.h>
#include <errno.h>
@@ -19198,8 +20537,8 @@
if ( _handle == NULL ) NPT_ERROR("Cannot open library"); \
_sym = dlsym(_handle, "nptInitialize"); \
if ( _sym == NULL ) NPT_ERROR("Cannot find nptInitialize"); \
---- jdk/src/solaris/transport/socket/socket_md.c 2011-01-20 18:54:43.000000000 -0500
-+++ jdk/src/solaris/transport/socket/socket_md.c 2011-02-01 17:46:57.000000000 -0500
+--- jdk/src/solaris/transport/socket/socket_md.c 2011-07-05 14:36:12.000000000 -0400
++++ jdk/src/solaris/transport/socket/socket_md.c 2011-07-07 19:17:04.000000000 -0400
@@ -36,7 +36,7 @@
#ifdef __solaris__
#include <thread.h>
@@ -19218,8 +20557,8 @@
int
dbgsysTlsAlloc() {
pthread_key_t key;
---- langtools/src/share/classes/com/sun/tools/javah/Util.java 2011-01-20 18:55:18.000000000 -0500
-+++ langtools/src/share/classes/com/sun/tools/javah/Util.java 2011-02-01 17:46:57.000000000 -0500
+--- langtools/src/share/classes/com/sun/tools/javah/Util.java 2011-07-05 14:36:55.000000000 -0400
++++ langtools/src/share/classes/com/sun/tools/javah/Util.java 2011-07-07 19:17:04.000000000 -0400
@@ -180,6 +180,14 @@
os = "win32";
} else if (os.indexOf("Linux") >= 0) {
diff --git a/java/openjdk6/files/plugin.patch b/java/openjdk6/files/plugin.patch
deleted file mode 100644
index 64d8816bc9b9..000000000000
--- a/java/openjdk6/files/plugin.patch
+++ /dev/null
@@ -1,409 +0,0 @@
-$FreeBSD$
-
-Applied patches from IcedTea6-1.9.4 and updated for IcedTea-Web 1.0:
-
-patches/hotspot/original/update-bootclasspath.patch
-patches/icedtea-demo-swingapplet.patch
-patches/extensions/netx.patch
-patches/extensions/netx-umask.patch
-patches/extensions/liveconnect.patch
-
-Note: patches/hotspot/original/update-bootclasspath.patch was applied without
- rhino support.
-
---- hotspot/src/share/vm/runtime/os.cpp.orig 2011-01-20 18:51:22.000000000 -0500
-+++ hotspot/src/share/vm/runtime/os.cpp 2011-01-25 15:56:17.000000000 -0500
-@@ -1032,6 +1032,8 @@
- "%/lib/jsse.jar:"
- "%/lib/jce.jar:"
- "%/lib/charsets.jar:"
-+ "%/lib/netx.jar:"
-+ "%/lib/plugin.jar:"
-
- // ## TEMPORARY hack to keep the legacy launcher working when
- // ## only the boot module is installed (cf. j.l.ClassLoader)
---- jdk/make/docs/NON_CORE_PKGS.gmk.orig 2010-06-21 17:15:08.000000000 -0400
-+++ jdk/make/docs/NON_CORE_PKGS.gmk 2010-09-09 16:26:01.000000000 -0400
-@@ -84,6 +84,10 @@
-
- SMARTCARDIO_PKGS = javax.smartcardio
-
-+JNLP_PKGS = javax.jnlp
-+
-+JAVASCRIPT_PKGS = netscape.javascript
-+
- # non-core packages in rt.jar
- NON_CORE_PKGS = $(DOMAPI_PKGS) \
- $(MGMT_PKGS) \
-@@ -91,4 +95,6 @@
- $(JGSS_PKGS) \
- $(OLD_JSSE_PKGS) \
- $(HTTPSERVER_PKGS) \
-- $(SMARTCARDIO_PKGS)
-+ $(SMARTCARDIO_PKGS) \
-+ $(JNLP_PKGS) \
-+ $(JAVASCRIPT_PKGS)
---- jdk/make/launchers/Makefile.orig 2011-01-20 18:54:05.000000000 -0500
-+++ jdk/make/launchers/Makefile 2011-02-09 12:58:47.000000000 -0500
-@@ -61,12 +61,14 @@
- $(call make-launcher, apt, com.sun.tools.apt.Main, , )
- $(call make-launcher, extcheck, com.sun.tools.extcheck.Main, , )
- $(call make-launcher, idlj, com.sun.tools.corba.se.idl.toJavaPortable.Compile, , )
-+$(call make-launcher, itweb-settings, net.sourceforge.jnlp.controlpanel.ControlPanel, , )
- $(call make-launcher, jar, sun.tools.jar.Main, , )
- $(call make-launcher, jarsigner, sun.security.tools.JarSigner, , )
- $(call make-launcher, javac, com.sun.tools.javac.Main, , )
- $(call make-launcher, javadoc, com.sun.tools.javadoc.Main, , )
- $(call make-launcher, javah, com.sun.tools.javah.Main, , )
- $(call make-launcher, javap, sun.tools.javap.Main, , )
-+$(call make-launcher, javaws, net.sourceforge.jnlp.runtime.Boot, , )
- $(call make-launcher, jconsole, sun.tools.jconsole.JConsole, \
- -J-Djconsole.showOutputViewer, )
- $(call make-launcher, jdb, com.sun.tools.example.debug.tty.TTY, , )
---- jdk/make/launchers/Makefile.launcher.orig 2010-06-21 17:15:08.000000000 -0400
-+++ jdk/make/launchers/Makefile.launcher 2010-09-09 16:25:12.000000000 -0400
-@@ -148,6 +148,16 @@
- endif
- endif
-
-+# pluginappletviewer only
-+ifeq ($(PROGRAM), pluginappletviewer)
-+ OTHER_CPPFLAGS += -DUSE_UMASK=\"077\"
-+endif
-+
-+# javaws only
-+ifeq ($(PROGRAM), javaws)
-+ OTHER_CPPFLAGS += -DUSE_UMASK=\"077\"
-+endif
-+
- # GUI tools
- ifeq ($(GUI_TOOL),true)
- ifneq ($(PLATFORM), windows)
---- jdk/make/mkdemo/jfc/SwingApplet/Makefile.orig 2010-06-21 17:15:08.000000000 -0400
-+++ jdk/make/mkdemo/jfc/SwingApplet/Makefile 2010-09-09 16:24:23.000000000 -0400
-@@ -33,7 +33,7 @@
- include $(BUILDDIR)/common/Defs.gmk
-
- DEMO_ROOT = $(SHARE_SRC)/demo/jfc/$(DEMONAME)
--DEMO_TOPFILES = ./README.txt
-+DEMO_TOPFILES = ./README.txt ./SwingApplet.html
- DEMO_MAINCLASS = $(DEMONAME)
- DEMO_DESTDIR = $(DEMODIR)/jfc/$(DEMONAME)
-
---- jdk/make/sun/Makefile.orig 2010-06-21 17:15:08.000000000 -0400
-+++ jdk/make/sun/Makefile 2010-09-09 16:26:01.000000000 -0400
-@@ -66,6 +66,7 @@
- $(HEADLESS_SUBDIR) $(DGA_SUBDIR) \
- font jpeg cmm applet rmi beans $(JDBC_SUBDIR) \
- jawt text nio launcher management $(ORG_SUBDIR) \
-+ plugin \
- native2ascii serialver tools jconsole
-
- all build clean clobber::
---- jdk/make/sun/plugin/Makefile.orig 2010-09-09 16:26:01.000000000 -0400
-+++ jdk/make/sun/plugin/Makefile 2010-09-09 16:26:01.000000000 -0400
-@@ -0,0 +1,53 @@
-+#
-+# Copyright 1995-2005 Sun Microsystems, Inc. All Rights Reserved.
-+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-+#
-+# This code is free software; you can redistribute it and/or modify it
-+# under the terms of the GNU General Public License version 2 only, as
-+# published by the Free Software Foundation. Sun designates this
-+# particular file as subject to the "Classpath" exception as provided
-+# by Sun in the LICENSE file that accompanied this code.
-+#
-+# This code is distributed in the hope that it will be useful, but WITHOUT
-+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-+# version 2 for more details (a copy is included in the LICENSE file that
-+# accompanied this code).
-+#
-+# You should have received a copy of the GNU General Public License version
-+# 2 along with this work; if not, write to the Free Software Foundation,
-+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-+#
-+# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
-+# CA 95054 USA or visit www.sun.com if you need additional information or
-+# have any questions.
-+#
-+
-+#
-+# Makefile for pluginappletviewer wrapper.
-+#
-+
-+BUILDDIR = ../..
-+PACKAGE = sun.applet
-+PRODUCT = sun
-+PROGRAM = pluginappletviewer
-+include $(BUILDDIR)/common/Defs.gmk
-+
-+#
-+# Files to compile.
-+#
-+AUTO_FILES_JAVA_DIRS = sun/applet
-+
-+ifneq ($(PLATFORM), windows)
-+ #
-+ # Anything with a GUI needs X11 to be linked in.
-+ #
-+ OTHER_LDLIBS += -L$(OPENWIN_LIB) -lX11
-+endif # PLATFORM
-+
-+#
-+# Rules
-+#
-+JAVA_ARGS = { "sun.applet.PluginMain" }
-+include $(BUILDDIR)/common/Program.gmk
-+
---- jdk/src/share/bin/java.c.orig 2010-06-21 17:15:10.000000000 -0400
-+++ jdk/src/share/bin/java.c 2010-09-09 16:25:12.000000000 -0400
-@@ -56,6 +56,7 @@
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
-+#include <sys/stat.h>
-
- #include <jni.h>
- #include <jvm.h>
-@@ -69,6 +70,8 @@
- #define FULL_VERSION JDK_MAJOR_VERSION "." JDK_MINOR_VERSION
- #endif
-
-+#define MAXMASK 4095 /* Same as octal 07777 */
-+
- /*
- * The following environment variable is used to influence the behavior
- * of the jre exec'd through the SelectVersion routine. The command line
-@@ -184,6 +187,10 @@
-
- int JNICALL JavaMain(void * args); /* entry point */
-
-+/* umask things */
-+static int FindUMask(int *, char ***, int *);
-+static int VerifyMask(char *, int*);
-+
- struct JavaMainArgs {
- int argc;
- char ** argv;
-@@ -307,6 +314,26 @@
- SetClassPath(s);
- #endif
-
-+#ifdef USE_UMASK
-+ /* Set umask */
-+ int mask;
-+ // Check to see if we can find a umask on the command line.
-+ if (FindUMask(&argc, &argv, &mask) < 0)
-+ {
-+ // We didn't find a umask, so fall back to the default one.
-+ char * defaultMask = (char *) JLI_MemAlloc(5 * sizeof(char));
-+ strcpy(defaultMask, USE_UMASK);
-+ int converted;
-+ VerifyMask(defaultMask, &converted);
-+ JLI_MemFree(defaultMask);
-+ umask(converted); /* from sys/stat.h */
-+ }
-+ else
-+ {
-+ umask(mask);
-+ }
-+#endif
-+
- /*
- * Parse command line options; if the return value of
- * ParseArguments is false, the program should exit.
-@@ -2017,3 +2044,87 @@
- }
- DoSplashSetFileJarName(file_name, jar_name);
- }
-+
-+/**
-+ * Searches argv to find any parameters that start with "-umask=".
-+ * Sets maskToSet with the mask if a -umask is found, and if the mask
-+ * supplied is valid. Returns 1 if a valid mask was found and set,
-+ * -1 otherwise.
-+ */
-+int FindUMask(int *pargc, char *** pargv, int *maskToSet)
-+{
-+ int found_mask = -1;
-+
-+ // our handles to the original list
-+ int argc = *pargc;
-+ char **argv = *pargv;
-+
-+ // the new set
-+ int nargc = argc;
-+ char ** nargv = (char **) JLI_MemAlloc((nargc + 1) * sizeof(char *));
-+
-+ // set the original set to the new set
-+ *pargv = nargv;
-+ *pargc = nargc;
-+
-+ char *maskString = (char *) JLI_MemAlloc(6 * sizeof(char *));
-+ int i;
-+ for (i = 0; i < argc; i++)
-+ {
-+ char *arg = argv[i];
-+ if (strncmp(arg, "-umask=",7) == 0)
-+ {
-+ strncpy(maskString, arg+7, 5);
-+
-+ if (VerifyMask(maskString, maskToSet) < 0)
-+ {
-+ printf("Invalid umask %s, application stopped.\n", maskString);
-+ exit(1);
-+ }
-+
-+ found_mask = 1;
-+ nargc--;
-+ (*pargc)--;
-+ }
-+ else
-+ {
-+ *nargv++ = arg;
-+ }
-+ }
-+
-+ JLI_MemFree(maskString);
-+
-+ return found_mask;
-+}
-+
-+/**
-+ * Takes an octal mask in string form, and converts it to
-+ * decimal form in convertedMask. The decimal form can then be
-+ * easily passed to umask(). Returns 1 if the mask is valid, -1 otherwise.
-+ */
-+int VerifyMask(char * maskString, int * convertedMask)
-+{
-+ // Borrowed from coreutils modechange.c
-+ if ('0' <= *maskString && *maskString < '8')
-+ {
-+ unsigned int decimal_mode = 0;
-+
-+ do {
-+ decimal_mode = 8 * decimal_mode + *maskString++ - '0';
-+ } while ('0' <= *maskString && *maskString < '8');
-+
-+ if (decimal_mode > MAXMASK)
-+ return -1;
-+ else if (*maskString)
-+ return -1;
-+ else
-+ *convertedMask = decimal_mode;
-+
-+ return 1;
-+ }
-+ else
-+ {
-+ return -1;
-+ }
-+
-+}
---- jdk/src/share/classes/sun/applet/AppletViewerPanel.java.orig 2010-06-21 17:15:27.000000000 -0400
-+++ jdk/src/share/classes/sun/applet/AppletViewerPanel.java 2010-09-09 16:25:06.000000000 -0400
-@@ -42,25 +42,25 @@
- *
- * @author Arthur van Hoff
- */
--class AppletViewerPanel extends AppletPanel {
-+public class AppletViewerPanel extends AppletPanel {
-
- /* Are we debugging? */
-- static boolean debug = false;
-+ protected static boolean debug = false;
-
- /**
- * The document url.
- */
-- URL documentURL;
-+ protected URL documentURL;
-
- /**
- * The base url.
- */
-- URL baseURL;
-+ protected URL baseURL;
-
- /**
- * The attributes of the applet.
- */
-- Hashtable atts;
-+ protected Hashtable atts;
-
- /*
- * JDK 1.1 serialVersionUID
-@@ -70,7 +70,7 @@
- /**
- * Construct an applet viewer and start the applet.
- */
-- AppletViewerPanel(URL documentURL, Hashtable atts) {
-+ protected AppletViewerPanel(URL documentURL, Hashtable atts) {
- this.documentURL = documentURL;
- this.atts = atts;
-
-@@ -202,12 +202,12 @@
- return (AppletContext)getParent();
- }
-
-- static void debug(String s) {
-+ protected static void debug(String s) {
- if(debug)
- System.err.println("AppletViewerPanel:::" + s);
- }
-
-- static void debug(String s, Throwable t) {
-+ protected static void debug(String s, Throwable t) {
- if(debug) {
- t.printStackTrace();
- debug(s);
---- jdk/src/share/classes/sun/applet/AppletPanel.java.orig 2010-06-21 17:15:27.000000000 -0400
-+++ jdk/src/share/classes/sun/applet/AppletPanel.java 2010-09-09 16:25:06.000000000 -0400
-@@ -68,7 +68,7 @@
- /**
- * The applet (if loaded).
- */
-- Applet applet;
-+ protected Applet applet;
-
- /**
- * Applet will allow initialization. Should be
-@@ -117,7 +117,7 @@
- /**
- * The thread for the applet.
- */
-- Thread handler;
-+ protected Thread handler;
-
-
- /**
-@@ -162,7 +162,8 @@
- * Creates a thread to run the applet. This method is called
- * each time an applet is loaded and reloaded.
- */
-- synchronized void createAppletThread() {
-+ //Overridden by NetxPanel.
-+ protected synchronized void createAppletThread() {
- // Create a thread group for the applet, and start a new
- // thread to load the applet.
- String nm = "applet-" + getCode();
-@@ -306,7 +307,7 @@
- /**
- * Get an event from the queue.
- */
-- synchronized AppletEvent getNextEvent() throws InterruptedException {
-+ protected synchronized AppletEvent getNextEvent() throws InterruptedException {
- while (queue == null || queue.isEmpty()) {
- wait();
- }
-@@ -695,7 +696,8 @@
- * applet event processing so that it can be gracefully interrupted from
- * things like HotJava.
- */
-- private void runLoader() {
-+ //Overridden by NetxPanel.
-+ protected void runLoader() {
- if (status != APPLET_DISPOSE) {
- showAppletStatus("notdisposed");
- return;