You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by qi...@apache.org on 2009/03/19 18:10:53 UTC
svn commit: r756095 [1/3] - in /harmony/enhanced/classlib/branches/java6:
depends/build/ depends/files/ depends/oss/ make/ make/freebsd.x86/
make/macosx.ppc32/ modules/archive/src/main/native/archive/shared/
modules/auth/ modules/auth/src/main/native/a...
Author: qiuxx
Date: Thu Mar 19 17:10:51 2009
New Revision: 756095
URL: http://svn.apache.org/viewvc?rev=756095&view=rev
Log:
Merge updates from classlib trunk@755805 since r735919
Added:
harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/IntList.java
- copied unchanged from r755805, harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/IntList.java
harmony/enhanced/classlib/branches/java6/modules/pack200/src/test/resources/org/apache/harmony/pack200/tests/annotationsUnpacked.jar
- copied unchanged from r755805, harmony/enhanced/classlib/trunk/modules/pack200/src/test/resources/org/apache/harmony/pack200/tests/annotationsUnpacked.jar
harmony/enhanced/classlib/branches/java6/modules/pack200/src/test/resources/org/apache/harmony/pack200/tests/sqlUnpackedNoDebug.jar
- copied unchanged from r755805, harmony/enhanced/classlib/trunk/modules/pack200/src/test/resources/org/apache/harmony/pack200/tests/sqlUnpackedNoDebug.jar
Removed:
harmony/enhanced/classlib/branches/java6/make/freebsd.x86/
harmony/enhanced/classlib/branches/java6/make/macosx.ppc32/
Modified:
harmony/enhanced/classlib/branches/java6/depends/build/defines.mk
harmony/enhanced/classlib/branches/java6/depends/build/rules.mk
harmony/enhanced/classlib/branches/java6/depends/files/bootclasspath.properties
harmony/enhanced/classlib/branches/java6/depends/oss/zlib_1.2.3.zip
harmony/enhanced/classlib/branches/java6/make/build-java.xml
harmony/enhanced/classlib/branches/java6/make/build-native.xml
harmony/enhanced/classlib/branches/java6/make/build-test.xml
harmony/enhanced/classlib/branches/java6/make/depends.properties
harmony/enhanced/classlib/branches/java6/make/depends.xml
harmony/enhanced/classlib/branches/java6/make/properties.xml
harmony/enhanced/classlib/branches/java6/modules/archive/src/main/native/archive/shared/inflater.c
harmony/enhanced/classlib/branches/java6/modules/archive/src/main/native/archive/shared/zip.h
harmony/enhanced/classlib/branches/java6/modules/auth/build.xml
harmony/enhanced/classlib/branches/java6/modules/auth/src/main/native/auth/unix/exports.txt
harmony/enhanced/classlib/branches/java6/modules/awt/build.xml
harmony/enhanced/classlib/branches/java6/modules/imageio/build.xml
harmony/enhanced/classlib/branches/java6/modules/imageio/src/main/native/jpegencoder/unix/makefile
harmony/enhanced/classlib/branches/java6/modules/imageio/src/main/native/pngencoder/unix/makefile
harmony/enhanced/classlib/branches/java6/modules/instrument/build.xml
harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/net/MulticastSocket.java
harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/net/URI.java
harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/net/URLClassLoader.java
harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Arrays.java
harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/org/apache/harmony/luni/platform/OSNetworkSystem.java
harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/include/unix/jclprots.h
harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/socket.c
harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/socket.h
harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/unix/OSNetworkSystemLinux.c
harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/unix/helpers.c
harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/windows/OSNetworkSystemWin32.c
harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/IntegerTest.java
harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/SocketTest.java
harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/URITest.java
harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/ArraysTest.java
harmony/enhanced/classlib/branches/java6/modules/misc/build.xml
harmony/enhanced/classlib/branches/java6/modules/nio/build.xml
harmony/enhanced/classlib/branches/java6/modules/nio_char/build.xml
harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/Archive.java
harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/BcBands.java
harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/ClassBands.java
harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/IcBands.java
harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/Segment.java
harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/SegmentHeader.java
harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/unpack200/ClassBands.java
harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/unpack200/IcTuple.java
harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/unpack200/Segment.java
harmony/enhanced/classlib/branches/java6/modules/pack200/src/test/java/org/apache/harmony/pack200/tests/ArchiveTest.java
harmony/enhanced/classlib/branches/java6/modules/pack200/src/test/java/org/apache/harmony/unpack200/tests/ArchiveTest.java
harmony/enhanced/classlib/branches/java6/modules/prefs/build.xml
harmony/enhanced/classlib/branches/java6/modules/print/build.xml
harmony/enhanced/classlib/branches/java6/modules/security/build.xml
harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/JComboBox.java
harmony/enhanced/classlib/branches/java6/modules/swing/src/test/api/java.injected/javax/swing/JComboBoxTest.java
Modified: harmony/enhanced/classlib/branches/java6/depends/build/defines.mk
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/depends/build/defines.mk?rev=756095&r1=756094&r2=756095&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/depends/build/defines.mk (original)
+++ harmony/enhanced/classlib/branches/java6/depends/build/defines.mk Thu Mar 19 17:10:51 2009
@@ -34,7 +34,11 @@
EXERPATHPREFIX = -Xlinker -z -Xlinker origin -Xlinker -rpath \
-Xlinker \$$ORIGIN/ -Xlinker -rpath-link \
-Xlinker
+ifneq ($(HY_OS),zos)
WARNFLAGS=-Werror
+else
+WARNFLAGS=
+endif
include $(HY_HDK)/build/make/platform/$(HY_PLATFORM).mk
Modified: harmony/enhanced/classlib/branches/java6/depends/build/rules.mk
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/depends/build/rules.mk?rev=756095&r1=756094&r2=756095&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/depends/build/rules.mk (original)
+++ harmony/enhanced/classlib/branches/java6/depends/build/rules.mk Thu Mar 19 17:10:51 2009
@@ -21,12 +21,18 @@
CXXFLAGS := $(DEFINES) $(INCLUDES) $(OPT) $(CXXFLAGS) $(WARNFLAGS)
EXPFILE = $(notdir $(basename $(DLLNAME))).exp
+ifneq ($(HY_OS),zos)
# Convert $(LIBPATH)libblah.so to -L$(LIBPATH) ... -lblah, also for $(DLLPATH)
MDLLIBARGS := \
$(MDLLIBPREFIX) -L$(LIBPATH) -L$(DLLPATH) \
$(patsubst $(LIBPATH)lib%$(HY_LINKLIB_SUFFIX),-l%, \
$(patsubst $(DLLPATH)lib%$(HY_LINKLIB_SUFFIX),-l%, $(MDLLIBFILES))) \
$(MDLLIBSUFFIX)
+else
+# Do not change on zOS
+MDLLIBARGS := \
+ $(MDLLIBPREFIX) $(MDLLIBFILES) $(MDLLIBSUFFIX)
+endif
all: $(DLLNAME) $(EXENAME) $(LIBNAME)
Modified: harmony/enhanced/classlib/branches/java6/depends/files/bootclasspath.properties
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/depends/files/bootclasspath.properties?rev=756095&r1=756094&r2=756095&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/depends/files/bootclasspath.properties (original)
+++ harmony/enhanced/classlib/branches/java6/depends/files/bootclasspath.properties Thu Mar 19 17:10:51 2009
@@ -183,10 +183,10 @@
# Apache Yoko
# Yoko has a dependency on Jakata BCEL
-bootclasspath.41=yoko-1.0-SNAPSHOT-20080304/yoko.jar
-bootclasspath.42=yoko-1.0-SNAPSHOT-20080304/yoko-core.jar
-bootclasspath.43=yoko-1.0-SNAPSHOT-20080304/yoko-rmi-spec.jar
-bootclasspath.44=yoko-1.0-SNAPSHOT-20080304/yoko-rmi-impl.jar
+bootclasspath.41=yoko-1.0/yoko.jar
+bootclasspath.42=yoko-1.0/yoko-core.jar
+bootclasspath.43=yoko-1.0/yoko-rmi-spec.jar
+bootclasspath.44=yoko-1.0/yoko-rmi-impl.jar
bootclasspath.45=bcel-5.2/bcel-5.2.jar
bootclasspath.46=pack200.jar
Modified: harmony/enhanced/classlib/branches/java6/depends/oss/zlib_1.2.3.zip
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/depends/oss/zlib_1.2.3.zip?rev=756095&r1=756094&r2=756095&view=diff
==============================================================================
Binary files - no diff available.
Modified: harmony/enhanced/classlib/branches/java6/make/build-java.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/make/build-java.xml?rev=756095&r1=756094&r2=756095&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/make/build-java.xml (original)
+++ harmony/enhanced/classlib/branches/java6/make/build-java.xml Thu Mar 19 17:10:51 2009
@@ -66,7 +66,7 @@
-clean-bin-catch-all"/>
<target name="-modules-clean-bin">
- <call-modules target="clean" />
+ <poll-modules target="clean" />
</target>
<target name="-clean-bin-catch-all-test">
@@ -178,7 +178,7 @@
</bootclasspath>
</hy.javac>
- <call-modules target="build" />
+ <poll-modules target="build" />
</target>
@@ -215,6 +215,12 @@
<fileset dir="${depends.manifests}"/>
</copy>
+ <unjar src="${hy.jdk}/jre/lib/boot/xalan-j_2.7.0/xalan.jar" dest="${hy.jdk}/jre/lib/boot/xalan-j_2.7.0.tmp"/>
+ <delete file="${hy.jdk}/jre/lib/boot/xalan-j_2.7.0/xalan.jar"/>
+ <replace file="${hy.jdk}/jre/lib/boot/xalan-j_2.7.0.tmp/META-INF/MANIFEST.MF" token="Class-Path: xercesImpl.jar xml-apis.jar serializer.jar" value="" />
+ <jar destfile="${hy.jdk}/jre/lib/boot/xalan-j_2.7.0/xalan.jar" basedir="${hy.jdk}/jre/lib/boot/xalan-j_2.7.0.tmp" manifest="${hy.jdk}/jre/lib/boot/xalan-j_2.7.0.tmp/META-INF/MANIFEST.MF"/>
+ <delete dir="${hy.jdk}/jre/lib/boot/xalan-j_2.7.0.tmp" />
+
<!-- Copy across the extension dependency jars -->
<copy tofile="${hy.jdk}/jre/lib/ext/bcprov.jar" verbose="true"
flatten="yes" overwrite="true">
Modified: harmony/enhanced/classlib/branches/java6/make/build-native.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/make/build-native.xml?rev=756095&r1=756094&r2=756095&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/make/build-native.xml (original)
+++ harmony/enhanced/classlib/branches/java6/make/build-native.xml Thu Mar 19 17:10:51 2009
@@ -70,20 +70,14 @@
<!-- These module targets take care of building and copying
their shared libs -->
- <ant dir="modules/portlib" antfile="build.xml" target="build-native" />
- <ant dir="modules/luni" antfile="build.xml" target="build-native-core" />
- <ant dir="modules/archive" antfile="build.xml" target="build-native" />
- <ant dir="modules/auth" antfile="build.xml" target="build-native" />
- <ant dir="modules/prefs" antfile="build.xml" target="build-native" />
- <ant dir="modules/luni" antfile="build.xml" target="build-native-secondary" />
- <ant dir="modules/nio" antfile="build.xml" target="build-native" />
- <ant dir="modules/nio_char" antfile="build.xml" target="build-native" />
- <ant dir="modules/misc" antfile="build.xml" target="build-native" />
- <ant dir="modules/awt" antfile="build.xml" target="build-native" />
- <ant dir="modules/security" antfile="build.xml" target="build-native" />
- <ant dir="modules/instrument" antfile="build.xml" target="build-native" />
- <ant dir="modules/imageio" antfile="build.xml" target="build-native" />
- <ant dir="modules/print" antfile="build.xml" target="build-native" />
+ <!-- these must be run in a specific order due to dependencies -->
+ <ant dir="modules/portlib" target="build-native" />
+ <ant dir="modules/luni" target="build-native-core" />
+ <ant dir="modules/archive" target="build-native" />
+ <ant dir="modules/luni" target="build-native-secondary" />
+
+ <!-- the rest can be run in any order -->
+ <poll-modules target="build-native-all" />
</target>
@@ -94,19 +88,7 @@
depends="copy-makefile-includes,-make-clean,clean-makefile-includes" />
<target name="-make-clean">
- <ant dir="modules/portlib" antfile="build.xml" target="clean-native" />
- <ant dir="modules/auth" antfile="build.xml" target="clean-native" />
- <ant dir="modules/archive" antfile="build.xml" target="clean-native" />
- <ant dir="modules/prefs" antfile="build.xml" target="clean-native" />
- <ant dir="modules/luni" antfile="build.xml" target="clean-native" />
- <ant dir="modules/nio" antfile="build.xml" target="clean-native" />
- <ant dir="modules/nio_char" antfile="build.xml" target="clean-native" />
- <ant dir="modules/misc" antfile="build.xml" target="clean-native" />
- <ant dir="modules/awt" antfile="build.xml" target="clean-native" />
- <ant dir="modules/security" antfile="build.xml" target="clean-native" />
- <ant dir="modules/instrument" antfile="build.xml" target="clean-native" />
- <ant dir="modules/imageio" antfile="build.xml" target="clean-native" />
- <ant dir="modules/print" antfile="build.xml" target="clean-native" />
+ <poll-modules target="clean-native" />
<delete dir="${native.lib.target}" />
</target>
@@ -131,8 +113,7 @@
</target>
- <target name="-layout.windows" if="is.windows"
- depends="-select-win-deps-x86_64,-select-win-deps-x86">
+ <target name="-layout.windows" if="is.windows">
<!-- workaround until msdll is moved. -->
<copy file="${msvcr.dll}" todir="${hy.jdk}/jre/bin" overwrite="yes" />
<copy file="${msvcp.dll}" todir="${hy.jdk}/jre/bin" overwrite="yes" />
@@ -174,11 +155,7 @@
target: overlay-oss
================================= -->
<target name="overlay-oss">
- <ant dir="modules/luni" antfile="build.xml"
- target="overlay-oss" />
-
- <ant dir="modules/archive" antfile="build.xml"
- target="overlay-oss" />
+ <poll-modules target="overlay-oss" />
</target>
<!-- =================================
@@ -187,12 +164,7 @@
<target name="copy-includes" >
<!-- Call copy-native-includes targets to copy across
global includes to deploy/includes/harmony -->
- <ant dir="modules/archive" antfile="build.xml"
- target="copy-native-includes" />
- <ant dir="modules/luni" antfile="build.xml"
- target="copy-native-includes" />
- <ant dir="modules/portlib" antfile="build.xml"
- target="copy-native-includes" />
+ <poll-modules target="copy-native-includes" />
</target>
@@ -203,12 +175,8 @@
<!-- Call clean.native.includes targets to delete global
includes under deploy/includes/harmony -->
- <ant dir="modules/archive" antfile="build.xml"
- target="clean-native-includes" />
- <ant dir="modules/luni" antfile="build.xml"
- target="clean-native-includes" />
- <ant dir="modules/portlib" antfile="build.xml"
- target="clean-native-includes" />
+ <poll-modules target="clean-native-includes" />
+
<!-- delete the deploy/include and deploy/jdk/include directories -->
<delete dir="${hy.hdk}/include" />
<delete dir="${hy.hdk}/jdk/include" />
@@ -240,10 +208,7 @@
target: clean-overlay-oss
================================= -->
<target name="clean-overlay-oss">
- <ant dir="modules/luni" antfile="build.xml"
- target="clean-overlay-oss" />
- <ant dir="modules/archive" antfile="build.xml"
- target="clean-overlay-oss" />
+ <poll-modules target="clean-overlay-oss" />
</target>
</project>
Modified: harmony/enhanced/classlib/branches/java6/make/build-test.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/make/build-test.xml?rev=756095&r1=756094&r2=756095&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/make/build-test.xml (original)
+++ harmony/enhanced/classlib/branches/java6/make/build-test.xml Thu Mar 19 17:10:51 2009
@@ -53,7 +53,7 @@
</target>
<target name="test-modules" depends="support-jar, test-jre-vm-info">
- <call-modules target="-test-module" />
+ <poll-modules target="-test-module" />
</target>
<target name="gen-report" depends="full-report,short-report" />
@@ -298,6 +298,14 @@
<!-- now let's delete empty reports -->
<delete><fileset refid="empty.test.reports"/></delete>
+
+ <!-- Need to ensure the file is UTF-8 on non-ASCII platforms -->
+ <move file="${per.crashed.tests.file}"
+ tofile="${per.crashed.tests.file}.orig" />
+ <copy file="${per.crashed.tests.file}.orig"
+ tofile="${per.crashed.tests.file}" outputencoding="UTF-8" />
+ <delete file="${per.crashed.tests.file}.orig" />
+
</target>
</project>
Modified: harmony/enhanced/classlib/branches/java6/make/depends.properties
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/make/depends.properties?rev=756095&r1=756094&r2=756095&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/make/depends.properties (original)
+++ harmony/enhanced/classlib/branches/java6/make/depends.properties Thu Mar 19 17:10:51 2009
@@ -38,33 +38,32 @@
junit.url=${maven2.base}/junit/junit/4.4/junit-4.4.jar
junit.md5=f852bbb2bbe0471cef8e5b833cb36078
-msvcr.dir.x86=${depends.dir}/libs/windows.x86
-msvcr.dll.x86=${msvcr.dir.x86}/msvcr71.dll
-msvcr.url.x86=file:///${hyenv.SystemRoot}/system32/msvcr71.dll
+msvcr.dir=${depends.dir}/libs/${hy.platform}
+msvcp.dir=${depends.dir}/libs/${hy.platform}
+
+msvcr.dll@x86@=${msvcr.dir}/msvcr71.dll
+msvcr.url@x86@=file:///${hyenv.SystemRoot}/system32/msvcr71.dll
# This is the md5 hash for the VS2003 version, 7.10.3052.4
-msvcr_VS2003.md5.x86=86f1895ae8c5e8b17d99ece768a70732
+msvcr.md5.deprecated@x86@=86f1895ae8c5e8b17d99ece768a70732
# This is the md5 hash for the VS2003 SP1 version, 7.10.6030.0
-msvcr_VS2003SP1.md5.x86=ca2f560921b7b8be1cf555a5a18d54c3
+msvcr.md5@x86@=ca2f560921b7b8be1cf555a5a18d54c3
-msvcp.dir.x86=${depends.dir}/libs/windows.x86
-msvcp.dll.x86=${msvcr.dir.x86}/msvcp71.dll
-msvcp.url.x86=file:///${hyenv.SystemRoot}/system32/msvcp71.dll
+msvcp.dll@x86@=${msvcr.dir}/msvcp71.dll
+msvcp.url@x86@=file:///${hyenv.SystemRoot}/system32/msvcp71.dll
# This is the md5 hash for the VS2003 version, 7.10.3077.0
-msvcp_VS2003.md5.x86=561fa2abb31dfa8fab762145f81667c2
+msvcp.md5.deprecated@x86@=561fa2abb31dfa8fab762145f81667c2
# This is the md5 hash for the VS2003 SP1 version, 7.10.6030.0
-msvcp_VS2003SP1.md5.x86=a94dc60a90efd7a35c36d971e3ee7470
+msvcp.md5@x86@=a94dc60a90efd7a35c36d971e3ee7470
-msvcr.dir.x86_64=${depends.dir}/libs/windows.x86_64
-msvcr.dll.x86_64=${msvcr.dir.x86_64}/msvcr80.dll
-msvcr.url.x86_64=file:///C:/Program%20Files%20(x86)/Microsoft%20Visual%20Studio%208/VC/redist/amd64/Microsoft.VC80.CRT/msvcr80.dll
+msvcr.dll@x86_64@=${msvcr.dir}/msvcr80.dll
+msvcr.url@x86_64@=file:///C:/Program%20Files%20(x86)/Microsoft%20Visual%20Studio%208/VC/redist/amd64/Microsoft.VC80.CRT/msvcr80.dll
# VS2005 version 8.00.50727.42
-msvcr.md5.x86_64=465cebd7da2ceaba5e552fc9118a1415
+msvcr.md5@x86_64@=465cebd7da2ceaba5e552fc9118a1415
-msvcp.dir.x86_64=${depends.dir}/libs/windows.x86_64
-msvcp.dll.x86_64=${msvcp.dir.x86_64}/msvcp80.dll
-msvcp.url.x86_64=file:///C:/Program%20Files%20(x86)/Microsoft%20Visual%20Studio%208/VC/redist/amd64/Microsoft.VC80.CRT/msvcp80.dll
+msvcp.dll@x86_64@=${msvcp.dir}/msvcp80.dll
+msvcp.url@x86_64@=file:///C:/Program%20Files%20(x86)/Microsoft%20Visual%20Studio%208/VC/redist/amd64/Microsoft.VC80.CRT/msvcp80.dll
# VS2005 version 8.00.50727.42
-msvcp.md5.x86_64=5ae0f01f02a03558da0cbd249e4df263
+msvcp.md5@x86_64@=5ae0f01f02a03558da0cbd249e4df263
mx4j.dir=${depends.jars}/mx4j_3.0.2
mx4j.zip=${mx4j.dir}/mx4j.zip
@@ -112,21 +111,19 @@
servlet-api.md5=c27c02fb0a00cc3a7d05ea993a9bf56e
servlet-api.url=${maven2.base}/jetty/servlet-api/2.5-6.0.0/servlet-api-2.5-6.0.0.jar
-awtdeps.base.x86=http://people.apache.org/~geirm/harmony/
-awtdeps.dir.x86=${depends.dir}/libs/windows.x86
-awtdeps.tar.x86=${awtdeps.dir.x86}/swing_awt_deps_winxp_2006-09-28.tgz
-awtdeps.url.x86=${awtdeps.base.x86}swing_awt_deps_winxp_2006-09-28.tgz
-awtdeps.md5.x86=d61a27e4b305d9fcabaaacf34f8f534a
-awtdeps.extract.dir.x86=${depends.dir}/libs/build
-awtdeps.testfile.x86=${awtdeps.extract.dir.x86}/winxp_2006-09-28.txt
-
-awtdeps.base.x86_64=http://people.apache.org/~ayza/harmony/64bit/
-awtdeps.dir.x86_64=${depends.dir}/libs/windows.x86_64
-awtdeps.tar.x86_64=${awtdeps.dir.x86_64}/swing_awt_deps_win64_2007-02-08.tgz
-awtdeps.url.x86_64=${awtdeps.base.x86_64}swing_awt_deps_win64_2007-02-08.tgz
-awtdeps.md5.x86_64=f2bbb1f4f23100393783fd02a77fcc68
-awtdeps.extract.dir.x86_64=${depends.dir}/libs/build
-awtdeps.testfile.x86_64=${awtdeps.extract.dir.x86_64}/win64_2007-02-08.txt
+awtdeps.extract.dir=${depends.dir}/libs/build
+awtdeps.dir=${depends.dir}/libs/${hy.platform}
+awtdeps.base@x86@=http://people.apache.org/~geirm/harmony/
+awtdeps.tar@x86@=${awtdeps.dir}/swing_awt_deps_winxp_2006-09-28.tgz
+awtdeps.url@x86@=${awtdeps.base@x86@}swing_awt_deps_winxp_2006-09-28.tgz
+awtdeps.md5@x86@=d61a27e4b305d9fcabaaacf34f8f534a
+awtdeps.testfile@x86@=${awtdeps.extract.dir}/winxp_2006-09-28.txt
+
+awtdeps.base@x86_64@=http://people.apache.org/~ayza/harmony/64bit/
+awtdeps.tar@x86_64@=${awtdeps.dir}/swing_awt_deps_win64_2007-02-08.tgz
+awtdeps.url@x86_64@=${awtdeps.base@x86_64@}swing_awt_deps_win64_2007-02-08.tgz
+awtdeps.md5@x86_64@=f2bbb1f4f23100393783fd02a77fcc68
+awtdeps.testfile@x86_64@=${awtdeps.extract.dir}/win64_2007-02-08.txt
dejavu-fonts.dir=${depends.dir}/dejavu-fonts
dejavu-fonts.fonts.dir=${depends.dir}/dejavu-fonts/dejavu-ttf-2.18
Modified: harmony/enhanced/classlib/branches/java6/make/depends.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/make/depends.xml?rev=756095&r1=756094&r2=756095&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/make/depends.xml (original)
+++ harmony/enhanced/classlib/branches/java6/make/depends.xml Thu Mar 19 17:10:51 2009
@@ -26,7 +26,16 @@
</description>
<import file="${basedir}/make/properties.xml" />
- <property file="make/depends.properties" />
+ <loadproperties srcfile="${basedir}/make/depends.properties">
+ <filterchain>
+ <filterreader classname="org.apache.tools.ant.filters.ReplaceTokens">
+ <param type="token" name="${hy.arch}" value=""/>
+ <param type="token" name="${hy.os.family}" value=""/>
+ <param type="token" name="${hy.platform}" value=""/>
+ <param type="token" name="${hy.platform.variant}" value=""/>
+ </filterreader>
+ </filterchain>
+ </loadproperties>
<target name="check" description="Check whether dependencies are available"
depends="-check,-check-win,-check-unix,-extract" />
@@ -53,49 +62,7 @@
<target name="-check-win" if="is.windows" depends="-really-check-win" />
- <target name="-select-win-deps-x86" if="is.x86">
- <property name="people.apache.base" value="${people.apache.base.x86}"/>
- <property name="awtdeps.dir" value="${awtdeps.dir.x86}"/>
- <property name="awtdeps.tar" value="${awtdeps.tar.x86}"/>
- <property name="awtdeps.url" value="${awtdeps.url.x86}"/>
- <property name="awtdeps.md5" value="${awtdeps.md5.x86}"/>
- <property name="awtdeps.extract.dir" value="${awtdeps.extract.dir.x86}"/>
- <property name="awtdeps.testfile" value="${awtdeps.testfile.x86}"/>
-
- <property name="msvcr.dir" value="${msvcr.dir.x86}"/>
- <property name="msvcr.dll" value="${msvcr.dll.x86}"/>
- <property name="msvcr.url" value="${msvcr.url.x86}"/>
- <property name="msvcr.md5" value="${msvcr_VS2003SP1.md5.x86}"/>
- <property name="msvcr.md5.deprecated" value="${msvcr_VS2003.md5.x86}"/>
-
- <property name="msvcp.dir" value="${msvcp.dir.x86}"/>
- <property name="msvcp.dll" value="${msvcp.dll.x86}"/>
- <property name="msvcp.url" value="${msvcp.url.x86}"/>
- <property name="msvcp.md5" value="${msvcp_VS2003SP1.md5.x86}"/>
- <property name="msvcp.md5.deprecated" value="${msvcp_VS2003.md5.x86}"/>
- </target>
-
- <target name="-select-win-deps-x86_64" if="is.x86_64">
- <property name="people.apache.base" value="${people.apache.base.x86_64}"/>
- <property name="awtdeps.dir" value="${awtdeps.dir.x86_64}"/>
- <property name="awtdeps.tar" value="${awtdeps.tar.x86_64}"/>
- <property name="awtdeps.url" value="${awtdeps.url.x86_64}"/>
- <property name="awtdeps.md5" value="${awtdeps.md5.x86_64}"/>
- <property name="awtdeps.extract.dir" value="${awtdeps.extract.dir.x86_64}"/>
- <property name="awtdeps.testfile" value="${awtdeps.testfile.x86_64}"/>
-
- <property name="msvcr.dir" value="${msvcr.dir.x86_64}"/>
- <property name="msvcr.dll" value="${msvcr.dll.x86_64}"/>
- <property name="msvcr.url" value="${msvcr.url.x86_64}"/>
- <property name="msvcr.md5" value="${msvcr.md5.x86_64}"/>
-
- <property name="msvcp.dir" value="${msvcp.dir.x86_64}"/>
- <property name="msvcp.dll" value="${msvcp.dll.x86_64}"/>
- <property name="msvcp.url" value="${msvcp.url.x86_64}"/>
- <property name="msvcp.md5" value="${msvcp.md5.x86_64}"/>
- </target>
-
- <target name="-really-check-win" if="is.windows" depends="-select-win-deps-x86_64,-select-win-deps-x86">
+ <target name="-really-check-win" if="is.windows">
<property environment="hyenv" />
<check-one-file src="${msvcr.url}" dest="${msvcr.dll}" />
@@ -265,7 +232,7 @@
md5="${asm.md5}" />
</target>
- <target name="-download-win" if="is.windows" depends="-select-win-deps-x86_64,-select-win-deps-x86">
+ <target name="-download-win" if="is.windows">
<property environment="hyenv" />
Modified: harmony/enhanced/classlib/branches/java6/make/properties.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/make/properties.xml?rev=756095&r1=756094&r2=756095&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/make/properties.xml (original)
+++ harmony/enhanced/classlib/branches/java6/make/properties.xml Thu Mar 19 17:10:51 2009
@@ -273,7 +273,7 @@
</condition>
<property name="jpeg.home" value="/usr" />
- <!-- default property for call-modules macro - i.e. all modules -->
+ <!-- default property for poll-modules macro - i.e. all modules -->
<property name="build.module" value="*" />
<property name="exclude.module" value="nothing" />
@@ -315,8 +315,8 @@
</condition>
<property name="hy.portlib.stubs" value="false" />
- <condition property="hy.libstdc++.suffix" value=".libstdc++6">
- <isset property="use.libstdc++6"/>
+ <condition property="hy.libstdc++.suffix" value=".libstdc++5">
+ <isset property="use.libstdc++5"/>
</condition>
<property name="hy.libstdc++.suffix" value="" />
@@ -469,16 +469,54 @@
</exec>
</target>
- <macrodef name="call-modules">
+ <macrodef name="poll-modules"
+ description="directory-based macros for polling sub-builds">
<attribute name="target" />
+ <attribute name="dir" default="modules" />
+ <attribute name="includes" default="${build.module}"/>
+ <attribute name="excludes" default="${exclude.module}"/>
+ <attribute name="antfile" default="*.xml"/>
<sequential>
+ <!-- convert dirset pattern to fileset pattern-->
+ <property name="@{dir}.loc" location="@{dir}"/>
+ <pathconvert property="list.@{dir}.@{target}"
+ pathsep="${file.separator}@{antfile}," setonempty="no">
+ <path>
+ <dirset dir="@{dir}"
+ includes="@{includes}"
+ excludes="@{excludes}">
+ <exclude name=".*" />
+ </dirset>
+ </path>
+ <map from="${@{dir}.loc}${file.separator}" to=""/>
+ </pathconvert>
+ <!-- append antfile suffix to last item in the list, if any -->
+ <condition property="poll.@{dir}.@{target}"
+ value="${list.@{dir}.@{target}}${file.separator}@{antfile}"
+ else="">
+ <isset property="list.@{dir}.@{target}"/>
+ </condition>
+ <poll-build target="@{target}" dir="@{dir}"
+ includes="${poll.@{dir}.@{target}}"/>
+ </sequential>
+ </macrodef>
+
+ <macrodef name="poll-build"
+ description="plain-filter macros for polling sub-builds">
+ <attribute name="target" />
+ <attribute name="dir" />
+ <attribute name="includes" default="**/*.xml"/>
+ <attribute name="excludes" default=""/>
+ <sequential>
+ <echo message="polling @{includes}"/>
<subant target="@{target}">
+ <!-- TODO: modules probably need to work these properties
+ out for themselves in order to reduce coupling -->
<property name="hy.test.vm.name" value="${hy.test.vm.name}"/>
- <dirset dir="modules"
- includes="${build.module}"
- excludes="${exclude.module}">
- <exclude name=".*" />
- </dirset>
+ <property name="depends.oss" value="${depends.oss}"/>
+ <fileset dir="@{dir}" includes="@{includes}" excludes="@{excludes}">
+ <containsregexp expression="<target[^>]*name="@{target}""/>
+ </fileset>
</subant>
</sequential>
</macrodef>
Modified: harmony/enhanced/classlib/branches/java6/modules/archive/src/main/native/archive/shared/inflater.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/archive/src/main/native/archive/shared/inflater.c?rev=756095&r1=756094&r2=756095&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/archive/src/main/native/archive/shared/inflater.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/archive/src/main/native/archive/shared/inflater.c Thu Mar 19 17:10:51 2009
@@ -19,7 +19,7 @@
#include "iohelp.h"
#include "exceptions.h"
#include "jclglob.h"
-#include "jclprots.h"
+#include "zip.h"
#include "inflater.h"
Modified: harmony/enhanced/classlib/branches/java6/modules/archive/src/main/native/archive/shared/zip.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/archive/src/main/native/archive/shared/zip.h?rev=756095&r1=756094&r2=756095&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/archive/src/main/native/archive/shared/zip.h (original)
+++ harmony/enhanced/classlib/branches/java6/modules/archive/src/main/native/archive/shared/zip.h Thu Mar 19 17:10:51 2009
@@ -52,4 +52,9 @@
throwNew##type(env, (const char*) zError(err)); \
}
+void throwNewIllegalStateException PROTOTYPE((JNIEnv* env,
+ const char* message));
+void throwNewIllegalArgumentException PROTOTYPE((JNIEnv* env,
+ const char* message));
+
#endif /* zip_h */
Modified: harmony/enhanced/classlib/branches/java6/modules/auth/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/auth/build.xml?rev=756095&r1=756094&r2=756095&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/auth/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/auth/build.xml Thu Mar 19 17:10:51 2009
@@ -71,7 +71,8 @@
<target name="-test-module" depends="build, compile-tests, prepare-exclude, run-tests" />
<!-- Build native code -->
- <target name="build-native" >
+ <target name="build-native" depends="build-native-all" />
+ <target name="build-native-all" >
<make dir="${hy.auth.src.main.native}/auth/${hy.os.family}" />
<!-- Copy the built shared libs over to the jre/bin dir -->
Modified: harmony/enhanced/classlib/branches/java6/modules/auth/src/main/native/auth/unix/exports.txt
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/auth/src/main/native/auth/unix/exports.txt?rev=756095&r1=756094&r2=756095&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/auth/src/main/native/auth/unix/exports.txt (original)
+++ harmony/enhanced/classlib/branches/java6/modules/auth/src/main/native/auth/unix/exports.txt Thu Mar 19 17:10:51 2009
@@ -1,3 +1 @@
Java_org_apache_harmony_auth_module_UnixSystem_load
-JNI_OnLoad
-JNI_OnUnload
Modified: harmony/enhanced/classlib/branches/java6/modules/awt/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/build.xml?rev=756095&r1=756094&r2=756095&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/build.xml Thu Mar 19 17:10:51 2009
@@ -151,7 +151,8 @@
</jar>
</target>
- <target name="build-native"
+ <target name="build-native" depends="build-native-all" />
+ <target name="build-native-all"
depends="-build-native-common,-build-native-unix,-build-native-windows" />
<target name="-build-native-common">
Modified: harmony/enhanced/classlib/branches/java6/modules/imageio/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/imageio/build.xml?rev=756095&r1=756094&r2=756095&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/imageio/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/imageio/build.xml Thu Mar 19 17:10:51 2009
@@ -100,7 +100,8 @@
</javac>
</target>
- <target name="build-native">
+ <target name="build-native" depends="build-native-all" />
+ <target name="build-native-all" >
<make dir="${hy.imageio.src.main.native}/jpegencoder/${hy.os.family}" />
<!-- Copy the built shared libs over to the jre/bin dir -->
<copy todir="${hy.jdk}/jre/bin" overwrite="yes">
Modified: harmony/enhanced/classlib/branches/java6/modules/imageio/src/main/native/jpegencoder/unix/makefile
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/imageio/src/main/native/jpegencoder/unix/makefile?rev=756095&r1=756094&r2=756095&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/imageio/src/main/native/jpegencoder/unix/makefile (original)
+++ harmony/enhanced/classlib/branches/java6/modules/imageio/src/main/native/jpegencoder/unix/makefile Thu Mar 19 17:10:51 2009
@@ -19,7 +19,11 @@
BUILDFILES = $(SHAREDSUB)JpegEncoder.o
+ifneq ($(HY_OS),zos)
OSLIBS += -ljpeg
+else
+MDLLIBFILES += $(LIBPATH)libjpeg.a
+endif
ifneq ($(HY_ZIP_API),true)
MDLLIBFILES += $(LIBPATH)libhyzip.a $(MDLLIBZLIB)
Modified: harmony/enhanced/classlib/branches/java6/modules/imageio/src/main/native/pngencoder/unix/makefile
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/imageio/src/main/native/pngencoder/unix/makefile?rev=756095&r1=756094&r2=756095&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/imageio/src/main/native/pngencoder/unix/makefile (original)
+++ harmony/enhanced/classlib/branches/java6/modules/imageio/src/main/native/pngencoder/unix/makefile Thu Mar 19 17:10:51 2009
@@ -19,7 +19,12 @@
BUILDFILES = $(SHAREDSUB)pngencoder.o
+ifneq ($(HY_OS),zos)
OSLIBS += -lpng
+else
+MDLLIBFILES += $(LIBPATH)libpng.a
+DEFINES += -DPNGAPI=
+endif
ifneq ($(HY_ZIP_API),true)
MDLLIBFILES += $(LIBPATH)libhyzip.a $(MDLLIBZLIB)
Modified: harmony/enhanced/classlib/branches/java6/modules/instrument/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/instrument/build.xml?rev=756095&r1=756094&r2=756095&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/instrument/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/instrument/build.xml Thu Mar 19 17:10:51 2009
@@ -56,7 +56,8 @@
<target name="-test-module" depends="build, compile-tests, prepare-exclude, run-tests" />
<!-- Build native code -->
- <target name="build-native" >
+ <target name="build-native" depends="build-native-all" />
+ <target name="build-native-all" >
<make dir="${hy.instrument.src.main.native}/instrument/${hy.os.family}" />
<!-- Copy the built shared libs over to the jre/bin dir -->
Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/net/MulticastSocket.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/net/MulticastSocket.java?rev=756095&r1=756094&r2=756095&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/net/MulticastSocket.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/net/MulticastSocket.java Thu Mar 19 17:10:51 2009
@@ -176,7 +176,6 @@
* @deprecated Replaced by getTimeToLive
* @see #getTimeToLive()
*/
- @SuppressWarnings("deprecation")
@Deprecated
public byte getTTL() throws IOException {
checkClosedAndBind(false);
@@ -345,7 +344,6 @@
*
* @deprecated use MulticastSocket#setTimeToLive
*/
- @SuppressWarnings("deprecation")
@Deprecated
public void send(DatagramPacket pack, byte ttl) throws IOException {
checkClosedAndBind(false);
@@ -540,7 +538,6 @@
* @deprecated Replaced by setTimeToLive
* @see #setTimeToLive(int)
*/
- @SuppressWarnings("deprecation")
@Deprecated
public void setTTL(byte ttl) throws IOException {
checkClosedAndBind(false);
Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/net/URI.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/net/URI.java?rev=756095&r1=756094&r2=756095&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/net/URI.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/net/URI.java Thu Mar 19 17:10:51 2009
@@ -1321,6 +1321,7 @@
result.query = relative.query;
// the result URI is the remainder of the relative URI's path
result.path = relativePath.substring(thisPath.length());
+ result.setSchemeSpecificPart();
return result;
}
Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/net/URLClassLoader.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/net/URLClassLoader.java?rev=756095&r1=756094&r2=756095&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/net/URLClassLoader.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/net/URLClassLoader.java Thu Mar 19 17:10:51 2009
@@ -330,6 +330,7 @@
return index;
}
+ @Override
void findResources(String name, ArrayList<URL> resources) {
URL res = findResourceInOwn(name);
if (res != null && !resources.contains(res)) {
@@ -353,6 +354,7 @@
}
+ @Override
Class<?> findClass(String packageName, String name, String origName) {
String entryName = prefixName + name;
JarEntry entry = jf.getJarEntry(entryName);
@@ -443,6 +445,7 @@
return null;
}
+ @Override
URL findResource(String name) {
URL res = findResourceInOwn(name);
if (res != null) {
@@ -540,6 +543,7 @@
prefix = buf.toString();
}
+ @Override
Class<?> findClass(String packageName, String name, String origName) {
String filename = prefix + name;
try {
@@ -561,13 +565,14 @@
return null;
}
+ @Override
URL findResource(String name) {
int idx = 0;
String filename;
// Do not create a UNC path, i.e. \\host
- while (idx < name.length() && ((name.charAt(idx) == '/') //$NON-NLS-1$
- || (name.charAt(idx) == '\\'))) { //$NON-NLS-1$
+ while (idx < name.length() &&
+ ((name.charAt(idx) == '/') || (name.charAt(idx) == '\\'))) {
idx++;
}
@@ -580,13 +585,13 @@
if (new File(filename).exists()) {
return targetURL(url, name);
- } else {
- return null;
}
+ return null;
} catch (IllegalArgumentException e) {
return null;
} catch (UnsupportedEncodingException e) {
- return null;
+ // must not happen
+ throw new AssertionError(e);
}
}
Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Arrays.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Arrays.java?rev=756095&r1=756094&r2=756095&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Arrays.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Arrays.java Thu Mar 19 17:10:51 2009
@@ -2795,7 +2795,7 @@
Object fromVal = in[start];
Object rVal = in[r];
if (c.compare(fromVal, rVal) <= 0) {
- int l_1 = find(in, rVal, 0, start + 1, med - 1, c);
+ int l_1 = find(in, rVal, -1, start + 1, med - 1, c);
int toCopy = l_1 - start + 1;
System.arraycopy(in, start, out, i, toCopy);
i += toCopy;
Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/org/apache/harmony/luni/platform/OSNetworkSystem.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/org/apache/harmony/luni/platform/OSNetworkSystem.java?rev=756095&r1=756094&r2=756095&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/org/apache/harmony/luni/platform/OSNetworkSystem.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/org/apache/harmony/luni/platform/OSNetworkSystem.java Thu Mar 19 17:10:51 2009
@@ -32,6 +32,7 @@
final class OSNetworkSystem implements INetworkSystem {
private static final int ERRORCODE_SOCKET_TIMEOUT = -209;
+ private static final int ERRORCODE_SOCKET_INTERRUPTED = -208;
private static final int INETADDR_REACHABLE = 0;
@@ -365,7 +366,8 @@
if (0 <= result) {
return flags;
}
- if (ERRORCODE_SOCKET_TIMEOUT == result) {
+ if (ERRORCODE_SOCKET_TIMEOUT == result ||
+ ERRORCODE_SOCKET_INTERRUPTED == result) {
return new int[0];
}
throw new SocketException();
Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/include/unix/jclprots.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/include/unix/jclprots.h?rev=756095&r1=756094&r2=756095&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/include/unix/jclprots.h (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/include/unix/jclprots.h Thu Mar 19 17:10:51 2009
@@ -1,348 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#if !defined(JCLPROTS_H)
-#define JCLPROTS_H
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
-#include "vmi.h"
-
-/************************************************************
- ** COMPONENT: NativesCommon
- ************************************************************/
-
-/* NativesCommonDeflater*/
-void JNICALL Java_java_util_zip_Deflater_setDictionaryImpl PROTOTYPE(( JNIEnv * env, jobject recv, jbyteArray dict, int off, int len, jlong handle));
-void JNICALL Java_java_util_zip_Deflater_resetImpl PROTOTYPE(( JNIEnv * env, jobject recv, jlong handle));
-jlong JNICALL Java_java_util_zip_Deflater_getTotalOutImpl PROTOTYPE(( JNIEnv * env, jobject recv, jlong handle));
-void JNICALL Java_java_util_zip_Deflater_endImpl PROTOTYPE(( JNIEnv * env, jobject recv, jlong handle));
-jint JNICALL Java_java_util_zip_Deflater_deflateImpl PROTOTYPE((JNIEnv * env, jobject recv, jbyteArray buf, int off, int len,
- jlong handle, int flushParm));
-void JNICALL Java_java_util_zip_Deflater_setLevelsImpl PROTOTYPE(( JNIEnv * env, jobject recv, int level, int strategy, jlong handle));
-void JNICALL Java_java_util_zip_Deflater_oneTimeInitialization PROTOTYPE((JNIEnv * env, jclass clazz));
-void JNICALL Java_java_util_zip_Deflater_setInputImpl PROTOTYPE(( JNIEnv * env, jobject recv, jbyteArray buf, jint off, jint len, jlong handle));
-jlong JNICALL Java_java_util_zip_Deflater_createStream PROTOTYPE(( JNIEnv * env, jobject recv, jint level, jint strategy, jboolean noHeader));
-jlong JNICALL Java_java_util_zip_Deflater_getTotalInImpl PROTOTYPE(( JNIEnv * env, jobject recv, jlong handle));
-jint JNICALL Java_java_util_zip_Deflater_getAdlerImpl PROTOTYPE(( JNIEnv * env, jobject recv, jlong handle));
-
-/* NativesCommonDoubleParsing*/
-JNIEXPORT jdouble JNICALL Java_org_apache_harmony_luni_util_FloatingPointParser_parseDblImpl
- PROTOTYPE((JNIEnv *env, jclass clazz, jstring s, jint e));
-JNIEXPORT void JNICALL Java_org_apache_harmony_luni_util_NumberConverter_bigIntDigitGeneratorInstImpl
- PROTOTYPE((JNIEnv *env, jobject inst, jlong f, jint e, jboolean isDenormalized, jboolean mantissaIsZero, jint p));
-
-/* NativesCommonAdler32*/
-jlong JNICALL Java_java_util_zip_Adler32_updateImpl PROTOTYPE(( JNIEnv * env, jobject recv, jbyteArray buf, int off, int len, jlong crc));
-jlong JNICALL Java_java_util_zip_Adler32_updateByteImpl PROTOTYPE(( JNIEnv * env, jobject recv, jint val, jlong crc));
-
-/* NativesCommonCRC32*/
-jlong JNICALL Java_java_util_zip_CRC32_updateByteImpl PROTOTYPE(( JNIEnv * env, jobject recv, jbyte val, jlong crc));
-jlong JNICALL Java_java_util_zip_CRC32_updateImpl PROTOTYPE(( JNIEnv * env, jobject recv, jbyteArray buf, int off, int len, jlong crc));
-
-/* NativesCommonFile*/
-jboolean JNICALL Java_java_io_File_mkdirImpl PROTOTYPE((JNIEnv *env, jobject recv, jbyteArray path));
-jboolean JNICALL Java_java_io_File_setLastModifiedImpl PROTOTYPE((JNIEnv *env, jobject recv, jbyteArray path, jlong time));
-jboolean JNICALL Java_java_io_File_isDirectoryImpl PROTOTYPE((JNIEnv *env, jobject recv, jbyteArray path));
-jboolean JNICALL Java_java_io_File_isReadOnlyImpl PROTOTYPE((JNIEnv *env, jobject recv, jbyteArray path));
-jlong JNICALL Java_java_io_File_lastModifiedImpl PROTOTYPE((JNIEnv *env, jobject recv, jbyteArray path));
-jboolean JNICALL Java_java_io_File_renameToImpl PROTOTYPE((JNIEnv *env, jobject recv, jbyteArray pathExist, jbyteArray pathNew));
-jobject JNICALL Java_java_io_File_rootsImpl PROTOTYPE((JNIEnv *env, jclass clazz));
-jboolean JNICALL Java_java_io_File_deleteDirImpl PROTOTYPE((JNIEnv *env, jobject recv, jbyteArray path));
-jboolean JNICALL Java_java_io_File_isCaseSensitiveImpl PROTOTYPE((JNIEnv *env, jclass clazz));
-jlong JNICALL Java_java_io_File_lengthImpl PROTOTYPE((JNIEnv *env, jobject recv, jbyteArray path));
-jboolean JNICALL Java_java_io_File_isAbsoluteImpl PROTOTYPE((JNIEnv *env, jobject recv, jbyteArray path));
-jboolean JNICALL Java_java_io_File_isWriteOnlyImpl PROTOTYPE((JNIEnv *env, jobject recv, jbyteArray path));
-jboolean JNICALL Java_java_io_File_isFileImpl PROTOTYPE((JNIEnv *env, jobject recv, jbyteArray path));
-jint JNICALL Java_java_io_File_newFileImpl PROTOTYPE((JNIEnv *env, jobject recv, jbyteArray path));
-jboolean JNICALL Java_java_io_File_deleteFileImpl PROTOTYPE((JNIEnv *env, jobject recv, jbyteArray path));
-jobject JNICALL Java_java_io_File_getCanonImpl PROTOTYPE((JNIEnv *env, jobject recv, jbyteArray path));
-jobject JNICALL Java_java_io_File_listImpl PROTOTYPE((JNIEnv *env, jobject recv, jbyteArray path));
-jboolean JNICALL Java_java_io_File_isHiddenImpl PROTOTYPE((JNIEnv *env, jobject recv, jbyteArray path));
-jobject JNICALL Java_java_io_File_getLinkImpl PROTOTYPE((JNIEnv *env, jobject recv, jbyteArray path));
-jbyteArray JNICALL Java_java_io_File_properPathImpl PROTOTYPE((JNIEnv *env, jobject recv, jbyteArray path));
-void JNICALL Java_java_io_File_oneTimeInitialization PROTOTYPE((JNIEnv * env, jclass clazz));
-jboolean JNICALL Java_java_io_File_existsImpl PROTOTYPE((JNIEnv *env, jobject recv, jbyteArray path));
-jboolean JNICALL Java_java_io_File_setReadOnlyImpl PROTOTYPE((JNIEnv *env, jobject recv, jbyteArray path));
-
-/* NativesCommonObjectInputStream*/
-void JNICALL Java_java_io_ObjectInputStream_setField__Ljava_lang_Object_2Ljava_lang_Class_2Ljava_lang_String_2I PROTOTYPE((JNIEnv *env, jclass clazz, jobject targetObject, jobject declaringClass, jobject fieldName, jint newValue));
-void JNICALL Java_java_io_ObjectInputStream_objSetField PROTOTYPE((JNIEnv *env, jclass clazz, jobject targetObject, jobject declaringClass, jobject fieldName, jobject fieldTypeName, jobject newValue));
-void JNICALL Java_java_io_ObjectInputStream_setField__Ljava_lang_Object_2Ljava_lang_Class_2Ljava_lang_String_2C PROTOTYPE((JNIEnv *env, jclass clazz, jobject targetObject, jobject declaringClass, jobject fieldName, jchar newValue));
-void JNICALL Java_java_io_ObjectInputStream_setField__Ljava_lang_Object_2Ljava_lang_Class_2Ljava_lang_String_2D PROTOTYPE((JNIEnv *env, jclass clazz, jobject targetObject, jobject declaringClass, jobject fieldName, jdouble newValue));
-void JNICALL Java_java_io_ObjectInputStream_setField__Ljava_lang_Object_2Ljava_lang_Class_2Ljava_lang_String_2F PROTOTYPE((JNIEnv *env, jclass clazz, jobject targetObject, jobject declaringClass, jobject fieldName, jfloat newValue));
-void JNICALL Java_java_io_ObjectInputStream_setField__Ljava_lang_Object_2Ljava_lang_Class_2Ljava_lang_String_2B PROTOTYPE((JNIEnv *env, jclass clazz, jobject targetObject, jobject declaringClass, jobject fieldName, jbyte newValue));
-jobject JNICALL Java_java_io_ObjectInputStream_newInstance PROTOTYPE((JNIEnv *env, jclass clazz, jobject instantiationClass, jobject constructorClass));
-void JNICALL Java_java_io_ObjectInputStream_setField__Ljava_lang_Object_2Ljava_lang_Class_2Ljava_lang_String_2S PROTOTYPE((JNIEnv *env, jclass clazz, jobject targetObject, jobject declaringClass, jobject fieldName, jshort newValue));
-void JNICALL Java_java_io_ObjectInputStream_setField__Ljava_lang_Object_2Ljava_lang_Class_2Ljava_lang_String_2J PROTOTYPE((JNIEnv *env, jclass clazz, jobject targetObject, jobject declaringClass, jobject fieldName, jlong newValue));
-void JNICALL Java_java_io_ObjectInputStream_setField__Ljava_lang_Object_2Ljava_lang_Class_2Ljava_lang_String_2Z PROTOTYPE((JNIEnv *env, jclass clazz, jobject targetObject, jobject declaringClass, jobject fieldName, jboolean newValue));
-
-/* NativesCommonAccessController*/
-jboolean JNICALL Java_java_security_AccessController_initializeInternal PROTOTYPE((JNIEnv *env, jclass thisClz));
-
-/* NativesCommonNetworkInterface*/
-jobjectArray JNICALL Java_java_net_NetworkInterface_getNetworkInterfacesImpl PROTOTYPE((JNIEnv* env, jclass clazz));
-
-/* NativesCommonObjectStreamClass*/
-jboolean JNICALL Java_java_io_ObjectStreamClass_hasClinit PROTOTYPE((JNIEnv *env, jclass clazz, jobject targetClass));
-jobject JNICALL Java_java_io_ObjectStreamClass_getFieldSignature PROTOTYPE((JNIEnv * env, jclass clazz, jobject reflectField));
-jobject JNICALL Java_java_io_ObjectStreamClass_getConstructorSignature PROTOTYPE((JNIEnv * env, jclass clazz,
- jobject reflectConstructor));
-jobject JNICALL Java_java_io_ObjectStreamClass_getMethodSignature PROTOTYPE((JNIEnv * env, jclass clazz, jobject reflectMethod));
-void JNICALL Java_java_io_ObjectStreamClass_oneTimeInitialization PROTOTYPE((JNIEnv * env, jclass clazz));
-
-/* NativesCommonInflater*/
-void JNICALL Java_java_util_zip_Inflater_endImpl PROTOTYPE(( JNIEnv * env, jobject recv, jlong handle));
-void JNICALL Java_java_util_zip_Inflater_setInputImpl PROTOTYPE(( JNIEnv * env, jobject recv, jbyteArray buf, jint off, jint len, jlong handle));
-jint JNICALL Java_java_util_zip_Inflater_inflateImpl PROTOTYPE((JNIEnv * env, jobject recv, jbyteArray buf, int off, int len,
- jlong handle));
-void JNICALL Java_java_util_zip_Inflater_setDictionaryImpl PROTOTYPE(( JNIEnv * env, jobject recv, jbyteArray dict, int off, int len, jlong handle));
-void JNICALL Java_java_util_zip_Inflater_oneTimeInitialization PROTOTYPE((JNIEnv * env, jclass clazz));
-void JNICALL Java_java_util_zip_Inflater_resetImpl PROTOTYPE(( JNIEnv * env, jobject recv, jlong handle));
-jlong JNICALL Java_java_util_zip_Inflater_getTotalOutImpl PROTOTYPE(( JNIEnv * env, jobject recv, jlong handle));
-jlong JNICALL Java_java_util_zip_Inflater_createStream PROTOTYPE(( JNIEnv * env, jobject recv, jboolean noHeader));
-jlong JNICALL Java_java_util_zip_Inflater_getTotalInImpl PROTOTYPE(( JNIEnv * env, jobject recv, jlong handle));
-jint JNICALL Java_java_util_zip_Inflater_getAdlerImpl PROTOTYPE(( JNIEnv * env, jobject recv, jlong handle));
-
-/* NativesCommonSystem*/
-void JNICALL Java_java_lang_System_setFieldImpl PROTOTYPE((JNIEnv * env, jclass cls, jstring name, jobject stream));
-jobject createSystemPropertyList PROTOTYPE((JNIEnv *env, const char *defaultValues[], int defaultCount));
-jstring JNICALL Java_java_lang_System_getCommPortList PROTOTYPE((JNIEnv *env, jclass clazz));
-jstring JNICALL Java_java_lang_System_getEncoding PROTOTYPE((JNIEnv *env, jclass clazz, jint encodingType));
-jobject JNICALL Java_java_lang_System_getPropertyList PROTOTYPE((JNIEnv *env, jclass clazz));
-jstring JNICALL Java_java_lang_SystemProperties_getEncoding PROTOTYPE((JNIEnv *env, jclass clazz, jint encodingType));
-jstring JNICALL Java_java_lang_System_mapLibraryName PROTOTYPE((JNIEnv * env, jclass unusedClass, jstring inName));
-void JNICALL Java_java_lang_System_initLocale PROTOTYPE((JNIEnv *env, jclass clazz));
-jobject JNICALL Java_java_lang_SystemProperties_getPropertyList PROTOTYPE((JNIEnv *env, jclass clazz));
-char *readCodepageMappings PROTOTYPE((JNIEnv *env, char* codepage, char *codepageResult, int resultSize));
-
-/* NativesCommonProxy*/
-jclass JNICALL Java_java_lang_reflect_Proxy_defineClassImpl PROTOTYPE((JNIEnv * env, jclass recvClass, jobject classLoader, jstring className, jbyteArray classBytes));
-
-/* NativesCommonGlobals*/
-void JNICALL JNI_OnUnload PROTOTYPE((JavaVM * vm, void *reserved));
-jint JNICALL JCL_OnLoad PROTOTYPE((JavaVM * vm, void *reserved));
-
-/* NativesCommonJarFile*/
-jarray JNICALL Java_java_util_jar_JarFile_getMetaEntriesImpl PROTOTYPE((JNIEnv * env, jobject recv, jbyteArray zipName));
-
-/* NativesCommonObjectOutputStream*/
-jfloat JNICALL Java_java_io_ObjectOutputStream_getFieldFloat PROTOTYPE((JNIEnv *env, jclass clazz, jobject targetObject, jobject declaringClass, jobject fieldName));
-jobject JNICALL Java_java_io_ObjectOutputStream_getFieldObj PROTOTYPE((JNIEnv *env, jclass clazz, jobject targetObject, jobject declaringClass, jobject fieldName, jobject fieldTypeName));
-jshort JNICALL Java_java_io_ObjectOutputStream_getFieldShort PROTOTYPE((JNIEnv *env, jclass clazz, jobject targetObject, jobject declaringClass, jobject fieldName));
-jbyte JNICALL Java_java_io_ObjectOutputStream_getFieldByte PROTOTYPE((JNIEnv *env, jclass clazz, jobject targetObject, jobject declaringClass, jobject fieldName));
-jlong JNICALL Java_java_io_ObjectOutputStream_getFieldLong PROTOTYPE((JNIEnv *env, jclass clazz, jobject targetObject, jobject declaringClass, jobject fieldName));
-jdouble JNICALL Java_java_io_ObjectOutputStream_getFieldDouble PROTOTYPE((JNIEnv *env, jclass clazz, jobject targetObject, jobject declaringClass, jobject fieldName));
-jboolean JNICALL Java_java_io_ObjectOutputStream_getFieldBool PROTOTYPE((JNIEnv *env, jclass clazz, jobject targetObject, jobject declaringClass, jobject fieldName));
-jint JNICALL Java_java_io_ObjectOutputStream_getFieldInt PROTOTYPE((JNIEnv *env, jclass clazz, jobject targetObject, jobject declaringClass, jobject fieldName));
-jchar JNICALL Java_java_io_ObjectOutputStream_getFieldChar PROTOTYPE((JNIEnv *env, jclass clazz, jobject targetObject, jobject declaringClass, jobject fieldName));
-
-/* NativesCommonSocket*/
-void createSocket PROTOTYPE((JNIEnv* env, jobject thisObjFD, int sockType, jboolean preferIPv4Stack));
-I_32 pollSelectRead PROTOTYPE((JNIEnv * env, jobject fileDescriptor, jint timeout, BOOLEAN poll));
-
-/* NativesCommonZipFile*/
-void throwJavaZIOException PROTOTYPE((JNIEnv * env, const char *message));
-void throwNewInternalError PROTOTYPE((JNIEnv * env, const char * message));
-void JNICALL Java_java_util_zip_ZipFile_closeZipImpl PROTOTYPE((JNIEnv * env, jobject recv, jlong descriptor));
-jobject JNICALL Java_java_util_zip_ZipFile_00024ZFEnum_getNextEntry PROTOTYPE((JNIEnv * env, jobject recv, jlong descriptor, jlong nextEntry));
-void JNICALL Java_java_util_zip_ZipFile_ntvinit PROTOTYPE((JNIEnv * env, jclass cls));
-void throwNewIllegalStateException PROTOTYPE((JNIEnv * env, const char * message));
-jlong JNICALL Java_java_util_zip_ZipFile_00024ZFEnum_resetZip PROTOTYPE((JNIEnv * env, jobject recv, jlong descriptor));
-jint JNICALL Java_java_util_zip_ZipFile_openZipImpl PROTOTYPE((JNIEnv * env, jobject recv, jbyteArray zipName));
-jobject JNICALL Java_java_util_zip_ZipFile_getEntryImpl PROTOTYPE((JNIEnv * env, jobject recv, jlong zipPointer, jstring entryName));
-jbyteArray JNICALL Java_java_util_zip_ZipFile_inflateEntryImpl2 PROTOTYPE((JNIEnv * env, jobject recv, jlong zipPointer, jstring entryName));
-void throwNewIllegalArgumentException PROTOTYPE((JNIEnv * env, const char * message));
-
-/* NativesCommonInetAddress*/
-void JNICALL Java_java_net_InetAddress_oneTimeInitialization PROTOTYPE((JNIEnv * env, jclass clazz, jboolean ipv6_support ));
-jint JNICALL Java_java_net_InetAddress_inetAddrImpl PROTOTYPE((JNIEnv* env, jclass clazz, jstring host));
-jstring JNICALL Java_java_net_InetAddress_getHostNameImpl PROTOTYPE((JNIEnv* env, jclass clazz));
-jobjectArray JNICALL Java_java_net_InetAddress_getAliasesByNameImpl PROTOTYPE((JNIEnv* env, jclass clazz, jstring aName));
-jstring JNICALL Java_java_net_InetAddress_inetNtoaImpl PROTOTYPE((JNIEnv* env, jclass clazz, jint hipAddr));
-jobject JNICALL Java_java_net_InetAddress_getHostByAddrImpl PROTOTYPE((JNIEnv* env, jclass clazz, jbyteArray addr));
-jobject JNICALL Java_java_net_InetAddress_getHostByNameImpl PROTOTYPE((JNIEnv* env, jclass clazz, jstring aName, jboolean preferIPv6Addresses));
-
-/* NativesCommonTimeZone*/
-jstring JNICALL Java_java_util_TimeZone_getCustomTimeZone PROTOTYPE((JNIEnv *env, jclass clazz, jintArray tzinfo, jbooleanArray isCustomTimeZone));
-
-/* NativesCommonFloatParsing*/
-JNIEXPORT jfloat JNICALL Java_org_apache_harmony_luni_util_FloatingPointParser_parseFltImpl
- PROTOTYPE((JNIEnv *env, jclass clazz, jstring s, jint e));
-
-/* NativesCommonNetHelpers*/
-void throwJavaNetBindException PROTOTYPE((JNIEnv* env, I_32 errorNumber));
-jobject newJavaNetInetAddressGenericBS PROTOTYPE((JNIEnv * env, jbyte *address, U_32 length, const char *hostName, U_32 scope_id ));
-void throwJavaNetUnknownHostException PROTOTYPE((JNIEnv* env, I_32 errorNumber));
-jobject newJavaNetInetAddressGenericB PROTOTYPE((JNIEnv * env, jbyte *address, U_32 length, U_32 scope_id ));
-jobject newJavaLangByte PROTOTYPE((JNIEnv * env, U_8 aByte));
-U_8 byteValue PROTOTYPE((JNIEnv * env, jobject aByte));
-I_32 intValue PROTOTYPE((JNIEnv * env, jobject anInteger));
-void throwJavaNetPortUnreachableException PROTOTYPE((JNIEnv* env, I_32 errorNumber));
-jobject newJavaByteArray PROTOTYPE((JNIEnv * env, jbyte *bytes, jint length));
-jobjectArray createAliasArrayFromAddrinfo PROTOTYPE((JNIEnv* env, hyaddrinfo_t addresses, const char* hName ));
-BOOLEAN booleanValue PROTOTYPE((JNIEnv * env, jobject aBoolean));
-jobject newJavaLangInteger PROTOTYPE((JNIEnv * env, I_32 anInt));
-BOOLEAN preferIPv4Stack PROTOTYPE((JNIEnv * env));
-char* netLookupErrorString PROTOTYPE((JNIEnv* env, I_32 anErrorNum));
-void netInitializeIDCaches PROTOTYPE((JNIEnv * env, jboolean ipv6_support));
-jobject newJavaLangBoolean PROTOTYPE((JNIEnv * env, BOOLEAN aBool));
-void throwJavaLangIllegalArgumentException PROTOTYPE((JNIEnv* env, I_32 errorNumber));
-void netGetJavaNetInetAddressValue PROTOTYPE((JNIEnv * env, jobject anInetAddress, U_8 *buffer, U_32 *length));
-void throwJavaIoInterruptedIOException PROTOTYPE((JNIEnv* env, I_32 errorNumber));
-void throwJavaNetSocketTimeoutException PROTOTYPE((JNIEnv* env, I_32 errorNumber));
-void callThreadYield PROTOTYPE((JNIEnv * env));
-void throwJavaNetConnectException PROTOTYPE((JNIEnv* env, I_32 errorNumber));
-void netGetJavaNetInetAddressScopeId PROTOTYPE((JNIEnv * env, jobject anInetAddress, U_32 *scope_id));
-BOOLEAN preferIPv6Addresses PROTOTYPE((JNIEnv * env));
-jobjectArray createAliasArray PROTOTYPE((JNIEnv* env, jbyte **addresses, I_32 *family, U_32 count, const char* hName, U_32* scope_id_array ));
-void throwJavaNetSocketException PROTOTYPE((JNIEnv* env, I_32 errorNumber));
-I_32 netGetSockAddr PROTOTYPE((JNIEnv *env, jobject fileDescriptor, hysockaddr_t sockaddrP, jboolean preferIPv6Addresses));
-
-/* NativesCommonIoHelpers*/
-void throwNewExceptionByName PROTOTYPE((JNIEnv* env,
- const char* name, const char* message));
-void throwNewOutOfMemoryError PROTOTYPE((JNIEnv* env, const char* message));
-void throwJavaIoIOException PROTOTYPE((JNIEnv* env, const char* message));
-void throwJavaIoIOExceptionClosed PROTOTYPE((JNIEnv* env));
-void ioh_convertToPlatform PROTOTYPE((char *path));
-void throwNPException PROTOTYPE((JNIEnv* env, const char* message));
-void throwIndexOutOfBoundsException PROTOTYPE((JNIEnv* env));
-
-/* NativesCommonFileDescriptor*/
-void JNICALL Java_java_io_FileDescriptor_oneTimeInitialization PROTOTYPE((JNIEnv * env, jclass fdClazz));
-void JNICALL Java_java_io_FileDescriptor_sync PROTOTYPE((JNIEnv * env, jobject recv));
-
-/* NativesCommonProcess*/
-jint JNICALL Java_org_apache_harmony_luni_internal_process_ProcessInputStream_availableImpl PROTOTYPE((JNIEnv * env, jobject recv));
-void JNICALL Java_org_apache_harmony_luni_internal_process_ProcessInputStream_oneTimeInitialization PROTOTYPE((JNIEnv * env, jclass clazz));
-void JNICALL Java_org_apache_harmony_luni_internal_process_SystemProcess_destroyImpl PROTOTYPE((JNIEnv * env, jobject recv));
-void JNICALL Java_org_apache_harmony_luni_internal_process_ProcessOutputStream_writeImpl PROTOTYPE((JNIEnv *env, jobject recv, jbyteArray buffer, jint offset, jint nbytes,jlong handle));
-jint JNICALL Java_org_apache_harmony_luni_internal_process_SystemProcess_waitForCompletionImpl PROTOTYPE((JNIEnv * env, jobject recv));
-void JNICALL Java_org_apache_harmony_luni_internal_process_SystemProcess_closeImpl PROTOTYPE((JNIEnv * env, jobject recv));
-void JNICALL Java_org_apache_harmony_luni_internal_process_ProcessOutputStream_closeImpl PROTOTYPE((JNIEnv *env, jobject recv));
-void JNICALL Java_org_apache_harmony_luni_internal_process_ProcessOutputStream_oneTimeInitialization PROTOTYPE((JNIEnv * env, jclass clazz));
-jint JNICALL Java_org_apache_harmony_luni_internal_process_ProcessInputStream_readImpl PROTOTYPE((JNIEnv *env, jobject recv, jbyteArray buffer, jint offset, jint nbytes, jlong handle));
-void JNICALL Java_org_apache_harmony_luni_internal_process_ProcessOutputStream_setFDImpl PROTOTYPE((JNIEnv *env, jobject recv, jobject arg1, jlong arg2));
-void JNICALL Java_org_apache_harmony_luni_internal_process_ProcessInputStream_closeImpl PROTOTYPE((JNIEnv * env, jobject recv));
-jlongArray JNICALL Java_org_apache_harmony_luni_internal_process_SystemProcess_createImpl PROTOTYPE((JNIEnv * env, jclass clazz, jobject recv,
- jobjectArray arg1, jobjectArray arg2, jbyteArray dir));
-void JNICALL Java_org_apache_harmony_luni_internal_process_ProcessInputStream_setFDImpl PROTOTYPE((JNIEnv *env, jobject recv, jobject arg1, jlong arg2));
-void JNICALL Java_org_apache_harmony_luni_internal_process_SystemProcess_oneTimeInitialization PROTOTYPE((JNIEnv * env, jclass clazz));
-
-/************************************************************
- ** COMPONENT: NativesCommonFileSystem
- ************************************************************/
-/* NativesCommonVMFileSystem*/
-jbyteArray JNICALL Java_org_apache_harmony_kernel_vm_VM_getPathFromClassPath PROTOTYPE((JNIEnv * env, jclass clazz, jint cpIndex));
-jbyteArray JNICALL Java_org_apache_harmony_kernel_vm_VM_readManifestFromClassPath PROTOTYPE((JNIEnv * env, jclass clazz, jint cpIndex));
-jbyteArray JNICALL Java_org_apache_harmony_kernel_vm_VM_readZip PROTOTYPE((JNIEnv * env, jclass clazz, jbyteArray zipName, jstring fileNameString));
-jbyteArray JNICALL Java_org_apache_harmony_kernel_vm_VM_readZipFromClassPath PROTOTYPE((JNIEnv * env, jclass clazz, jint cpIndex, jstring fileNameString));
-jbyteArray JNICALL Java_org_apache_harmony_kernel_vm_VM_readManifest PROTOTYPE((JNIEnv * env, jclass clazz, jbyteArray zipName));
-
-/************************************************************
- ** COMPONENT: NativesUNIX
- ************************************************************/
-/* NativesUNIXHelpers*/
-int platformReadLink PROTOTYPE((char *link));
-jbyteArray getPlatformPath PROTOTYPE((JNIEnv *env, jbyteArray path));
-void setDefaultServerSocketOptions PROTOTYPE((JNIEnv *env, hysocket_t socketP));
-I_32 getPlatformRoots PROTOTYPE((char *rootStrings));
-char * getCommports PROTOTYPE((JNIEnv * env));
-jint getPlatformDatagramNominalSize PROTOTYPE((JNIEnv *env, hysocket_t socketP));
-I_32 getPlatformIsHidden PROTOTYPE((JNIEnv *env, char * path));
-jstring getCustomTimeZoneInfo PROTOTYPE((JNIEnv *env, jintArray tzinfo, jbooleanArray isCustomTimeZone));
-jint getPlatformDatagramMaxSize PROTOTYPE((JNIEnv *env, hysocket_t socketP));
-I_32 getPlatformIsWriteOnly PROTOTYPE((JNIEnv *env, char * path));
-I_32 setPlatformFileLength PROTOTYPE((JNIEnv *env, IDATA descriptor,jlong newLength));
-I_32 getPlatformIsReadOnly PROTOTYPE((JNIEnv *env, char * path));
-void setPlatformBindOptions PROTOTYPE((JNIEnv *env, hysocket_t socketP));
-I_32 setPlatformLastModified PROTOTYPE((JNIEnv *env, char * path, I_64 time));
-I_32 setPlatformReadOnly PROTOTYPE((JNIEnv *env, char * path));
-
-/* NativesUNIXSystemHelpers*/
-char *getPlatformFileEncoding PROTOTYPE((JNIEnv * env, char *codepageProp, int propSize));
-char * getTmpDir PROTOTYPE((JNIEnv *env, char**envSpace));
-jobject getPlatformPropertyList PROTOTYPE((JNIEnv * env, const char *strings[], int propIndex));
-void mapLibraryToPlatformName PROTOTYPE((const char *inPath, char *outPath));
-
-/************************************************************
- ** COMPONENT: harmonyNativesCommon
- ************************************************************/
-/* NativesCommonFloatAndDouble*/
-JNIEXPORT jlong JNICALL Java_java_lang_Double_doubleToLongBits PROTOTYPE((JNIEnv *env, jclass cls, jdouble doubleValue));
-JNIEXPORT jint JNICALL Java_java_lang_Float_floatToIntBits PROTOTYPE((JNIEnv *env, jclass cls, jfloat floatValue));
-JNIEXPORT jint JNICALL Java_java_lang_Float_floatToRawIntBits PROTOTYPE((JNIEnv *env, jclass cls, jfloat floatValue));
-JNIEXPORT jdouble JNICALL Java_java_lang_Double_longBitsToDouble PROTOTYPE((JNIEnv *env, jclass cls, jlong longValue));
-JNIEXPORT jlong JNICALL Java_java_lang_Double_doubleToRawLongBits PROTOTYPE((JNIEnv *env, jclass cls, jdouble doubleValue));
-JNIEXPORT jfloat JNICALL Java_java_lang_Float_intBitsToFloat PROTOTYPE((JNIEnv *env, jclass cls, jint intValue));
-
-/* harmonyNativesCommonMath*/
-jdouble JNICALL Java_java_lang_Math_asin PROTOTYPE((JNIEnv *env, jclass jclazz, jdouble arg1));
-jdouble JNICALL Java_java_lang_StrictMath_rint PROTOTYPE((JNIEnv *env, jclass jclazz, jdouble arg1));
-jdouble JNICALL Java_java_lang_StrictMath_atan PROTOTYPE((JNIEnv *env, jclass jclazz, jdouble arg1));
-jdouble JNICALL Java_java_lang_Math_exp PROTOTYPE((JNIEnv *env, jclass jclazz, jdouble arg1));
-jdouble JNICALL Java_java_lang_StrictMath_tan PROTOTYPE((JNIEnv *env, jclass jclazz, jdouble arg1));
-jdouble JNICALL Java_java_lang_Math_rint PROTOTYPE((JNIEnv *env, jclass jclazz, jdouble arg1));
-jdouble JNICALL Java_java_lang_StrictMath_ceil PROTOTYPE((JNIEnv *env, jclass jclazz, jdouble arg1));
-jdouble JNICALL Java_java_lang_StrictMath_IEEEremainder PROTOTYPE((JNIEnv *env, jclass jclazz, jdouble arg1, jdouble arg2));
-jdouble JNICALL Java_java_lang_Math_floor PROTOTYPE((JNIEnv *env, jclass jclazz, jdouble arg1));
-jdouble JNICALL Java_java_lang_StrictMath_sin PROTOTYPE((JNIEnv *env, jclass jclazz, jdouble arg1));
-jdouble JNICALL Java_java_lang_Math_log PROTOTYPE((JNIEnv *env, jclass jclazz, jdouble arg1));
-jdouble JNICALL Java_java_lang_Math_acos PROTOTYPE((JNIEnv *env, jclass jclazz, jdouble arg1));
-jdouble JNICALL Java_java_lang_Math_ceil PROTOTYPE((JNIEnv *env, jclass jclazz, jdouble arg1));
-jdouble JNICALL Java_java_lang_StrictMath_sqrt PROTOTYPE((JNIEnv *env, jclass jclazz, jdouble arg1));
-jdouble JNICALL Java_java_lang_Math_pow PROTOTYPE((JNIEnv *env, jclass jclazz, jdouble arg1, jdouble arg2));
-jdouble JNICALL Java_java_lang_StrictMath_exp PROTOTYPE((JNIEnv *env, jclass jclazz, jdouble arg1));
-jdouble JNICALL Java_java_lang_StrictMath_acos PROTOTYPE((JNIEnv *env, jclass jclazz, jdouble arg1));
-jdouble JNICALL Java_java_lang_StrictMath_floor PROTOTYPE((JNIEnv *env, jclass jclazz, jdouble arg1));
-jdouble JNICALL Java_java_lang_StrictMath_cos PROTOTYPE((JNIEnv *env, jclass jclazz, jdouble arg1));
-jdouble JNICALL Java_java_lang_Math_cos PROTOTYPE((JNIEnv *env, jclass jclazz, jdouble arg1));
-jdouble JNICALL Java_java_lang_Math_sqrt PROTOTYPE((JNIEnv *env, jclass jclazz, jdouble arg1));
-jdouble JNICALL Java_java_lang_Math_tan PROTOTYPE((JNIEnv *env, jclass jclazz, jdouble arg1));
-jdouble JNICALL Java_java_lang_Math_sin PROTOTYPE((JNIEnv *env, jclass jclazz, jdouble arg1));
-jdouble JNICALL Java_java_lang_StrictMath_pow PROTOTYPE((JNIEnv *env, jclass jclazz, jdouble arg1, jdouble arg2));
-jdouble JNICALL Java_java_lang_StrictMath_asin PROTOTYPE((JNIEnv *env, jclass jclazz, jdouble arg1));
-jdouble JNICALL Java_java_lang_StrictMath_atan2 PROTOTYPE((JNIEnv *env, jclass jclazz, jdouble arg1, jdouble arg2));
-jdouble JNICALL Java_java_lang_Math_IEEEremainder PROTOTYPE((JNIEnv *env, jclass jclazz, jdouble arg1, jdouble arg2));
-jdouble JNICALL Java_java_lang_StrictMath_log PROTOTYPE((JNIEnv *env, jclass jclazz, jdouble arg1));
-jdouble JNICALL Java_java_lang_Math_atan PROTOTYPE((JNIEnv *env, jclass jclazz, jdouble arg1));
-jdouble JNICALL Java_java_lang_Math_atan2 PROTOTYPE((JNIEnv *env, jclass jclazz, jdouble arg1, jdouble arg2));
-
-/* harmonyNativesLUNIGlobals*/
-jint JNICALL JNI_OnLoad PROTOTYPE((JavaVM * vm, void *reserved));
-void JNICALL JNI_OnUnload PROTOTYPE((JavaVM * vm, void *reserved));
-
-/* harmonyNativesLibGlobals*/
-jint JNICALL ClearLibAttach PROTOTYPE((JNIEnv *env));
-void JNICALL ClearLibDetach PROTOTYPE((JNIEnv *env));
-
-/* BBharmonyNativesMathGlobals*/
-jint JNICALL JNI_OnLoad PROTOTYPE((JavaVM * vm, void *reserved));
-void JNICALL JNI_OnUnload PROTOTYPE((JavaVM * vm, void *reserved));
-
-/* BBharmonyNativesArchiveGlobals*/
-jint JNICALL JNI_OnLoad PROTOTYPE((JavaVM * vm, void *reserved));
-void JNICALL JNI_OnUnload PROTOTYPE((JavaVM * vm, void *reserved));
-
-#if defined(__cplusplus)
-}
-#endif
-
-#endif /* JCLPROTS_H */
Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/socket.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/socket.c?rev=756095&r1=756094&r2=756095&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/socket.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/socket.c Thu Mar 19 17:10:51 2009
@@ -800,179 +800,6 @@
}
/**
- * A helper method, call selectRead with a small timeout until read is ready or an error occurs.
- *
- * @param env pointer to the JNI library
- * @param hysocketP socket pointer
- * @param timeout timeout value
- */
-
-I_32
-pollSelectRead (JNIEnv * env, jobject fileDescriptor, jint timeout,
- BOOLEAN poll)
-{
-
- I_32 result;
- hysocket_t hysocketP;
-
-#if defined(WIN32)
- PORT_ACCESS_FROM_ENV (env);
- hysocketP = getJavaIoFileDescriptorContentsAsAPointer (env, fileDescriptor);
- if (!hysock_socketIsValid (hysocketP))
- {
- throwJavaNetSocketException (env, HYPORT_ERROR_SOCKET_BADSOCKET);
- return (jint) - 1;
- }
-
- if (0 == timeout)
- {
- result = hysock_select_read (hysocketP, 0, 0, FALSE);
- }
- else
- {
- result =
- hysock_select_read (hysocketP, timeout / 1000,
- (timeout % 1000) * 1000, FALSE);
- }
- if (HYPORT_ERROR_SOCKET_TIMEOUT == result)
- throwJavaIoInterruptedIOException (env, result);
- else if (0 > result)
- throwJavaNetSocketException (env, result);
-#else
- PORT_ACCESS_FROM_ENV (env);
-
- if (!poll) {
- UDATA finishTime;
-
- /*
- * A zero timeout means wait forever. If not polling, return success
- * and call receive() or accept() to block.
- */
-
- if (!timeout) {
- return 0;
- }
-
- finishTime = hytime_msec_clock() + (UDATA) timeout;
-
- SELECT_NOPOLL:
-
- hysocketP = getJavaIoFileDescriptorContentsAsAPointer (env, fileDescriptor);
-
- if (!hysock_socketIsValid (hysocketP)) {
- throwJavaNetSocketException (env, HYPORT_ERROR_SOCKET_BADSOCKET);
- return (jint) - 1;
- }
-
- result = hysock_select_read (hysocketP, timeout / 1000,
- (timeout % 1000) * 1000, FALSE);
-
- /*
- * if we time out, then throw the InterruptedIO exception
- * which gets converted by a caller into the appropriate thing
- *
- * if we are interrupted, recalculate our timeout and if we
- * have time left or 0, try again. If no time lest, throw InterruptedIO
- * Exception
- *
- * If some other error, just throw exceptionand bail
- */
- if (HYPORT_ERROR_SOCKET_TIMEOUT == result) {
- throwJavaIoInterruptedIOException (env, result);
- }
- else if (HYPORT_ERROR_SOCKET_INTERRUPTED == result) {
-
- timeout = finishTime - hytime_msec_clock();
-
- if (timeout < 0) {
- throwJavaIoInterruptedIOException (env, result);
- }
- else {
- goto SELECT_NOPOLL;
- }
- }
- else if (0 > result) {
- throwJavaNetSocketException (env, result);
- }
- }
- else /* we are polling */
- {
- I_32 pollTimeoutUSec = 100000, pollMsec = 100;
- UDATA finishTime = 0;
- IDATA timeLeft = timeout;
- BOOLEAN hasTimeout = timeout > 0;
-
- if (hasTimeout) {
- finishTime = hytime_msec_clock () + (UDATA) timeout;
- }
-
- select:
-
- /*
- * Fetch the handle every time in case the socket is closed.
- */
-
- hysocketP =
- getJavaIoFileDescriptorContentsAsAPointer (env, fileDescriptor);
-
- if (!hysock_socketIsValid (hysocketP))
- {
- throwJavaNetSocketException (env, HYPORT_ERROR_SOCKET_INTERRUPTED);
- return (jint) - 1;
- }
-
- if (hasTimeout)
- {
- if (timeLeft - 10 < pollMsec) {
- pollTimeoutUSec = timeLeft <= 0 ? 0 : (timeLeft * 1000);
- }
-
- result = hysock_select_read (hysocketP, 0, pollTimeoutUSec, FALSE);
-
- /*
- * because we are polling at a time smaller than timeout (presumably)
- * lets treat an interrupt and timeout the same - go see if we're done
- * timewise, and then just try again if not
- */
- if (HYPORT_ERROR_SOCKET_TIMEOUT == result ||
- HYPORT_ERROR_SOCKET_INTERRUPTED == result)
- {
- timeLeft = finishTime - hytime_msec_clock ();
-
- if (timeLeft <= 0) {
- throwJavaIoInterruptedIOException (env, result);
- }
- else
- {
- goto select;
- }
- }
- else if (0 > result) {
- throwJavaNetSocketException (env, result);
- }
- }
- else /* polling with no timeout (why would you do this?)*/
- {
- result = hysock_select_read (hysocketP, 0, pollTimeoutUSec, FALSE);
-
- /*
- * if interrupted (or a timeout) just retry
- */
- if (HYPORT_ERROR_SOCKET_TIMEOUT == result ||
- HYPORT_ERROR_SOCKET_INTERRUPTED == result)
- {
- goto select;
- }
- else if (0 > result)
- throwJavaNetSocketException (env, result);
- }
- }
-#endif
-
- return result;
-}
-
-/**
* Answer the status of the specified boolean option for the socket argument.
*
* @param env pointer to the JNI library
Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/socket.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/socket.h?rev=756095&r1=756094&r2=756095&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/socket.h (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/socket.h Thu Mar 19 17:10:51 2009
@@ -52,5 +52,10 @@
jobject getLingerOption (JNIEnv * env, hysocket_t hysocketP);
void setReceiveBufferSize (JNIEnv * env, hysocket_t hysocketP,
jobject optVal);
+void createSocket (JNIEnv* env, jobject thisObjFD, int sockType,
+ jboolean preferIPv4Stack);
+I_32 pollSelectRead (JNIEnv * env, jobject fileDescriptor, jint timeout,
+ BOOLEAN poll);
+
#endif /* socket_h */
Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/unix/OSNetworkSystemLinux.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/unix/OSNetworkSystemLinux.c?rev=756095&r1=756094&r2=756095&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/unix/OSNetworkSystemLinux.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/unix/OSNetworkSystemLinux.c Thu Mar 19 17:10:51 2009
@@ -318,7 +318,20 @@
}
}
(*env)->ReleaseIntArrayElements(env, outFlags, flagArray, changed ? 0 : JNI_ABORT);
+ } else if (result == 0) {
+
+ result = HYPORT_ERROR_SOCKET_TIMEOUT;
+
+ } else {
+
+ if (errno == EINTR) {
+ result = HYPORT_ERROR_SOCKET_INTERRUPTED;
+ } else {
+ result = HYPORT_ERROR_SOCKET_OPFAILED;
+ }
+
}
+
hymem_free_memory(my_pollfds);
/* return both correct and error result, let java code handle exceptions */
@@ -524,3 +537,151 @@
return (jint) nbytes;
}
+
+/**
+ * A helper method, call selectRead with a small timeout until read is ready or an error occurs.
+ *
+ * @param env pointer to the JNI library
+ * @param hysocketP socket pointer
+ * @param timeout timeout value
+ */
+
+I_32
+pollSelectRead (JNIEnv * env, jobject fileDescriptor, jint timeout,
+ BOOLEAN poll)
+{
+
+ I_32 result;
+ hysocket_t hysocketP;
+
+ PORT_ACCESS_FROM_ENV (env);
+
+ if (!poll) {
+ UDATA finishTime;
+
+ /*
+ * A zero timeout means wait forever. If not polling, return success
+ * and call receive() or accept() to block.
+ */
+
+ if (!timeout) {
+ return 0;
+ }
+
+ finishTime = hytime_msec_clock() + (UDATA) timeout;
+
+ SELECT_NOPOLL:
+
+ hysocketP = getJavaIoFileDescriptorContentsAsAPointer (env, fileDescriptor);
+
+ if (!hysock_socketIsValid (hysocketP)) {
+ throwJavaNetSocketException (env, HYPORT_ERROR_SOCKET_BADSOCKET);
+ return (jint) - 1;
+ }
+
+ result = hysock_select_read (hysocketP, timeout / 1000,
+ (timeout % 1000) * 1000, FALSE);
+
+ /*
+ * if we time out, then throw the InterruptedIO exception
+ * which gets converted by a caller into the appropriate thing
+ *
+ * if we are interrupted, recalculate our timeout and if we
+ * have time left or 0, try again. If no time lest, throw InterruptedIO
+ * Exception
+ *
+ * If some other error, just throw exceptionand bail
+ */
+ if (HYPORT_ERROR_SOCKET_TIMEOUT == result) {
+ throwJavaIoInterruptedIOException (env, result);
+ }
+ else if (HYPORT_ERROR_SOCKET_INTERRUPTED == result) {
+
+ timeout = finishTime - hytime_msec_clock();
+
+ if (timeout < 0) {
+ throwJavaIoInterruptedIOException (env, result);
+ }
+ else {
+ goto SELECT_NOPOLL;
+ }
+ }
+ else if (0 > result) {
+ throwJavaNetSocketException (env, result);
+ }
+ }
+ else /* we are polling */
+ {
+ I_32 pollTimeoutUSec = 100000, pollMsec = 100;
+ UDATA finishTime = 0;
+ IDATA timeLeft = timeout;
+ BOOLEAN hasTimeout = timeout > 0;
+
+ if (hasTimeout) {
+ finishTime = hytime_msec_clock () + (UDATA) timeout;
+ }
+
+ select:
+
+ /*
+ * Fetch the handle every time in case the socket is closed.
+ */
+
+ hysocketP =
+ getJavaIoFileDescriptorContentsAsAPointer (env, fileDescriptor);
+
+ if (!hysock_socketIsValid (hysocketP))
+ {
+ throwJavaNetSocketException (env, HYPORT_ERROR_SOCKET_INTERRUPTED);
+ return (jint) - 1;
+ }
+
+ if (hasTimeout)
+ {
+ if (timeLeft - 10 < pollMsec) {
+ pollTimeoutUSec = timeLeft <= 0 ? 0 : (timeLeft * 1000);
+ }
+
+ result = hysock_select_read (hysocketP, 0, pollTimeoutUSec, FALSE);
+
+ /*
+ * because we are polling at a time smaller than timeout (presumably)
+ * lets treat an interrupt and timeout the same - go see if we're done
+ * timewise, and then just try again if not
+ */
+ if (HYPORT_ERROR_SOCKET_TIMEOUT == result ||
+ HYPORT_ERROR_SOCKET_INTERRUPTED == result)
+ {
+ timeLeft = finishTime - hytime_msec_clock ();
+
+ if (timeLeft <= 0) {
+ throwJavaIoInterruptedIOException (env, result);
+ }
+ else
+ {
+ goto select;
+ }
+ }
+ else if (0 > result) {
+ throwJavaNetSocketException (env, result);
+ }
+ }
+ else /* polling with no timeout (why would you do this?)*/
+ {
+ result = hysock_select_read (hysocketP, 0, pollTimeoutUSec, FALSE);
+
+ /*
+ * if interrupted (or a timeout) just retry
+ */
+ if (HYPORT_ERROR_SOCKET_TIMEOUT == result ||
+ HYPORT_ERROR_SOCKET_INTERRUPTED == result)
+ {
+ goto select;
+ }
+ else if (0 > result)
+ throwJavaNetSocketException (env, result);
+ }
+ }
+
+ return result;
+}
Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/unix/helpers.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/unix/helpers.c?rev=756095&r1=756094&r2=756095&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/unix/helpers.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/unix/helpers.c Thu Mar 19 17:10:51 2009
@@ -39,7 +39,7 @@
#include <dirent.h>
#include "helpers.h"
-#include "jclprots.h"
+#include "nethelp.h"
#include "harmonyglob.h"
#if defined(LINUX)