You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by hi...@apache.org on 2010/06/05 10:54:09 UTC
svn commit: r951681 [2/2] - in /harmony/enhanced/java/branches/mrh: ./
classlib/ classlib/depends/build/ classlib/depends/build/platform/
classlib/make/ classlib/modules/archive/make/
classlib/modules/archive/src/main/native/archive/unix/ classlib/modu...
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/luni/make/exclude.windows.x86_64.drl
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/luni/make/exclude.windows.x86_64.drl?rev=951681&r1=951680&r2=951681&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/luni/make/exclude.windows.x86_64.drl (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/luni/make/exclude.windows.x86_64.drl Sat Jun 5 08:54:06 2010
@@ -1,5 +1 @@
org/apache/harmony/luni/tests/java/net/MulticastSocketTest.java
-org/apache/harmony/luni/tests/java/util/ArrayListTest.java
-
-# HARMONY-4043 (was duplicate HARMONY-4753)
-org/apache/harmony/luni/tests/java/lang/SecurityManager2Test.java
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/main/java/java/lang/reflect/Proxy.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/main/java/java/lang/reflect/Proxy.java?rev=951681&r1=951680&r2=951681&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/main/java/java/lang/reflect/Proxy.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/main/java/java/lang/reflect/Proxy.java Sat Jun 5 08:54:06 2010
@@ -77,7 +77,7 @@ public class Proxy implements Serializab
* @param loader
* the class loader that will define the proxy class
* @param interfaces
- * an array of {@code Class} objects, each one identifying an
+ * a list of {@code Class} objects, each one identifying an
* interface that will be implemented by the returned proxy
* class
* @return a proxy class that implements all of the interfaces referred to
@@ -89,7 +89,7 @@ public class Proxy implements Serializab
* {@code null}
*/
public static Class<?> getProxyClass(ClassLoader loader,
- Class<?>[] interfaces) throws IllegalArgumentException {
+ Class<?>... interfaces) throws IllegalArgumentException {
// check that interfaces are a valid array of visible interfaces
if (interfaces == null) {
throw new NullPointerException();
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/main/native/hyzip/unix/makefile
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/main/native/hyzip/unix/makefile?rev=951681&r1=951680&r2=951681&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/main/native/hyzip/unix/makefile (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/main/native/hyzip/unix/makefile Sat Jun 5 08:54:06 2010
@@ -21,7 +21,10 @@ include $(HY_HDK)/build/make/defines.mk
INCLUDES += -I../../include/shared
BUILDFILES = $(SHAREDSUB)hyzip.o $(SHAREDSUB)zcpool.o $(SHAREDSUB)zipalloc.o \
- $(SHAREDSUB)zipcache.o $(SHAREDSUB)zipsup.o
+ $(SHAREDSUB)zipcache.o $(SHAREDSUB)zipsup.o pool.o pool_cap.o
LIBNAME = $(LIBPATH)libhyzip.a
+%.o: $(LIBPATH)libhypool.a(%.o)
+ ar $(ARFLAGS) xo $(LIBPATH)libhypool.a $@
+
include $(HY_HDK)/build/make/rules.mk
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/main/native/hyzip/windows/makefile
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/main/native/hyzip/windows/makefile?rev=951681&r1=951680&r2=951681&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/main/native/hyzip/windows/makefile (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/main/native/hyzip/windows/makefile Sat Jun 5 08:54:06 2010
@@ -26,5 +26,6 @@ BUILDFILES = \
$(SHAREDSUB)zipcache.obj $(SHAREDSUB)zipsup.obj
HYCFLAGS = $(HYCFLAGS) /I$(SHAREDSUB) /I..\..\include\shared /I..\..\include\windows
+MDLLIBFILES = $(MDLLIBFILES) $(LIBPATH)hypool$(HY_LINKLIB_SUFFIX)
!include <$(HY_HDK)\build\make\rules.mak>
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/main/native/luni/unix/makefile
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/main/native/luni/unix/makefile?rev=951681&r1=951680&r2=951681&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/main/native/luni/unix/makefile (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/main/native/luni/unix/makefile Sat Jun 5 08:54:06 2010
@@ -40,13 +40,11 @@ BUILDFILES = \
$(SHAREDSUB)OSMemory.o OSMemoryLinux32.o $(SHAREDSUB)OSNetworkSystem.o \
OSNetworkSystemLinux.o hyenv.o
-ifneq ($(HY_ZIP_API),true)
-MDLLIBFILES += $(LIBPATH)libhyzip.a $(MDLLIBZLIB)
-endif
-
-MDLLIBFILES += $(LIBPATH)libhypool.a $(LIBPATH)libhyfdlibm.a \
+MDLLIBFILES += $(LIBPATH)libhyfdlibm.a \
$(LIBPATH)libvmi$(HY_LINKLIB_SUFFIX)
+OSLIBS += -lm
+
DLLNAME = $(DLLPATH)libhyluni$(HY_SHLIB_SUFFIX)
EXPNAME = HYLUNI_0.1
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/main/native/luni/windows/OSFileSystemWin32.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/main/native/luni/windows/OSFileSystemWin32.c?rev=951681&r1=951680&r2=951681&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/main/native/luni/windows/OSFileSystemWin32.c (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/main/native/luni/windows/OSFileSystemWin32.c Sat Jun 5 08:54:06 2010
@@ -307,7 +307,7 @@ JNIEXPORT jlong JNICALL Java_org_apache_
BY_HANDLE_FILE_INFORMATION info;
HANDLE hfile = (HANDLE)fd;
if (GetFileInformationByHandle(hfile, (LPBY_HANDLE_FILE_INFORMATION) &info)) {
- return (jlong) ((info.nFileSizeHigh<<0x20) + info.nFileSizeLow);
+ return (jlong) (((DWORDLONG)info.nFileSizeHigh<<0x20) + info.nFileSizeLow);
} else {
return (jlong)-1;
}
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/main/native/luni/windows/makefile
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/main/native/luni/windows/makefile?rev=951681&r1=951680&r2=951681&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/main/native/luni/windows/makefile (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/main/native/luni/windows/makefile Sat Jun 5 08:54:06 2010
@@ -42,12 +42,7 @@ VIRTFILES = hyluni.res
SYSLIBFILES = ws2_32.lib Iphlpapi.lib Mswsock.lib
-!IF "$(HY_ZIP_API)" != "true"
MDLLIBFILES = $(MDLLIBFILES) \
- $(LIBPATH)hyzip$(HY_LINKLIB_SUFFIX) $(LIBPATH)hyzlib$(HY_LINKLIB_SUFFIX)
-!ENDIF
-
-MDLLIBFILES = $(MDLLIBFILES) $(LIBPATH)hypool$(HY_LINKLIB_SUFFIX) \
$(LIBPATH)hyfdlibm$(HY_LINKLIB_SUFFIX) $(LIBPATH)vmi$(HY_LINKLIB_SUFFIX)
DLLBASE=0x13200000
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/main/native/vmi/unix/makefile
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/main/native/vmi/unix/makefile?rev=951681&r1=951680&r2=951681&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/main/native/vmi/unix/makefile (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/main/native/vmi/unix/makefile Sat Jun 5 08:54:06 2010
@@ -20,7 +20,7 @@
include $(HY_HDK)/build/make/defines.mk
BUILDFILES = $(SHAREDSUB)vmi_copyright.o $(SHAREDSUB)vmi.o
-MDLLIBFILES = $(LIBPATH)libhypool.a
+MDLLIBFILES =
DLLNAME = ../libvmi$(HY_SHLIB_SUFFIX)
EXPNAME = VMI_0.1
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/misc/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/misc/build.xml?rev=951681&r1=951680&r2=951681&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/misc/build.xml (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/misc/build.xml Sat Jun 5 08:54:06 2010
@@ -55,7 +55,7 @@
<delete-patternset module="${hy.module}" />
</target>
- <target name="-clean-native" unless="skip.java.build">
+ <target name="-clean-native" unless="skip.java.native">
<make dir="src/main/native/accessors/${hy.os.family}" target="clean" />
</target>
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/misc/src/main/native/accessors/unix/makefile
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/misc/src/main/native/accessors/unix/makefile?rev=951681&r1=951680&r2=951681&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/misc/src/main/native/accessors/unix/makefile (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/misc/src/main/native/accessors/unix/makefile Sat Jun 5 08:54:06 2010
@@ -24,13 +24,6 @@ BUILDFILES = \
$(SHAREDSUB)org_apache_harmony_misc_accessors_ObjectAccessorImpl.o \
$(SHAREDSUB)org_apache_harmony_misc_accessors_StringAccessorImpl.o
-ifneq ($(HY_ZIP_API),true)
-MDLLIBFILES += $(LIBPATH)libhyzip.a $(MDLLIBZLIB)
-endif
-
-MDLLIBFILES += $(LIBPATH)libhypool.a \
- $(LIBPATH)libvmi$(HY_LINKLIB_SUFFIX)
-
DLLNAME=$(DLLPATH)libaccessors$(HY_SHLIB_SUFFIX)
EXPNAME=HYMISC_0.1
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/misc/src/main/native/accessors/windows/makefile
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/misc/src/main/native/accessors/windows/makefile?rev=951681&r1=951680&r2=951681&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/misc/src/main/native/accessors/windows/makefile (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/misc/src/main/native/accessors/windows/makefile Sat Jun 5 08:54:06 2010
@@ -29,9 +29,6 @@ BUILDFILES = \
VIRTFILES = accessors.res
SYSLIBFILES = ws2_32.lib Iphlpapi.lib
-MDLLIBFILES = $(MDLLIBFILES) \
- $(LIBPATH)hypool$(HY_LINKLIB_SUFFIX) $(LIBPATH)vmi$(HY_LINKLIB_SUFFIX)
-
DLLBASE=0x13300000
!include <$(HY_HDK)\build\make\rules.mak>
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/nio/src/main/java/common/java/nio/DirectByteBuffer.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/nio/src/main/java/common/java/nio/DirectByteBuffer.java?rev=951681&r1=951680&r2=951681&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/nio/src/main/java/common/java/nio/DirectByteBuffer.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/nio/src/main/java/common/java/nio/DirectByteBuffer.java Sat Jun 5 08:54:06 2010
@@ -34,10 +34,7 @@ import org.apache.harmony.nio.internal.n
* </p>
*
*/
-abstract class DirectByteBuffer extends BaseByteBuffer implements DirectBuffer {
-
- // This is the base address of the buffer memory.
- protected PlatformAddress address;
+abstract class DirectByteBuffer extends MappedByteBuffer implements DirectBuffer {
// This is the offset from the base address at which this buffer logically
// starts.
@@ -59,6 +56,7 @@ abstract class DirectByteBuffer extends
super(capacity);
this.address = address;
this.offset = offset;
+ address.autoFree();
}
/*
@@ -275,4 +273,54 @@ abstract class DirectByteBuffer extends
public final int getByteCapacity() {
return capacity;
}
+
+ @Override
+ public final CharBuffer asCharBuffer() {
+ return CharToByteBufferAdapter.wrap(this);
+ }
+
+ @Override
+ public final DoubleBuffer asDoubleBuffer() {
+ return DoubleToByteBufferAdapter.wrap(this);
+ }
+
+ @Override
+ public final FloatBuffer asFloatBuffer() {
+ return FloatToByteBufferAdapter.wrap(this);
+ }
+
+ @Override
+ public final IntBuffer asIntBuffer() {
+ return IntToByteBufferAdapter.wrap(this);
+ }
+
+ @Override
+ public final LongBuffer asLongBuffer() {
+ return LongToByteBufferAdapter.wrap(this);
+ }
+
+ @Override
+ public final ShortBuffer asShortBuffer() {
+ return ShortToByteBufferAdapter.wrap(this);
+ }
+
+ @Override
+ public final char getChar() {
+ return (char) getShort();
+ }
+
+ @Override
+ public final char getChar(int index) {
+ return (char) getShort(index);
+ }
+
+ @Override
+ public final ByteBuffer putChar(char value) {
+ return putShort((short) value);
+ }
+
+ @Override
+ public final ByteBuffer putChar(int index, char value) {
+ return putShort(index, (short) value);
+ }
}
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/nio/src/main/java/common/java/nio/HeapByteBuffer.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/nio/src/main/java/common/java/nio/HeapByteBuffer.java?rev=951681&r1=951680&r2=951681&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/nio/src/main/java/common/java/nio/HeapByteBuffer.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/nio/src/main/java/common/java/nio/HeapByteBuffer.java Sat Jun 5 08:54:06 2010
@@ -31,7 +31,7 @@ import org.apache.harmony.luni.platform.
* </p>
*
*/
-abstract class HeapByteBuffer extends BaseByteBuffer {
+abstract class HeapByteBuffer extends ByteBuffer {
protected final byte[] backingArray;
@@ -261,4 +261,54 @@ abstract class HeapByteBuffer extends Ba
backingArray[baseOffset] = (byte) (value & 0xFF);
}
}
+
+ @Override
+ public final CharBuffer asCharBuffer() {
+ return CharToByteBufferAdapter.wrap(this);
+ }
+
+ @Override
+ public final DoubleBuffer asDoubleBuffer() {
+ return DoubleToByteBufferAdapter.wrap(this);
+ }
+
+ @Override
+ public final FloatBuffer asFloatBuffer() {
+ return FloatToByteBufferAdapter.wrap(this);
+ }
+
+ @Override
+ public final IntBuffer asIntBuffer() {
+ return IntToByteBufferAdapter.wrap(this);
+ }
+
+ @Override
+ public final LongBuffer asLongBuffer() {
+ return LongToByteBufferAdapter.wrap(this);
+ }
+
+ @Override
+ public final ShortBuffer asShortBuffer() {
+ return ShortToByteBufferAdapter.wrap(this);
+ }
+
+ @Override
+ public final char getChar() {
+ return (char) getShort();
+ }
+
+ @Override
+ public final char getChar(int index) {
+ return (char) getShort(index);
+ }
+
+ @Override
+ public final ByteBuffer putChar(char value) {
+ return putShort((short) value);
+ }
+
+ @Override
+ public final ByteBuffer putChar(int index, char value) {
+ return putShort(index, (short) value);
+ }
}
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/nio/src/main/java/common/java/nio/MappedByteBuffer.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/nio/src/main/java/common/java/nio/MappedByteBuffer.java?rev=951681&r1=951680&r2=951681&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/nio/src/main/java/common/java/nio/MappedByteBuffer.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/nio/src/main/java/common/java/nio/MappedByteBuffer.java Sat Jun 5 08:54:06 2010
@@ -37,34 +37,13 @@ import org.apache.harmony.nio.internal.D
*/
public abstract class MappedByteBuffer extends ByteBuffer {
- final DirectByteBuffer wrapped;
+ // This is the base address of the direct byte buffer memory.
+ protected PlatformAddress address;
- private int mapMode;
+ protected int mapMode;
- MappedByteBuffer(ByteBuffer directBuffer) {
- super(directBuffer.capacity);
- if (!directBuffer.isDirect()) {
- throw new IllegalArgumentException();
- }
- this.wrapped = (DirectByteBuffer) directBuffer;
-
- }
-
- MappedByteBuffer(PlatformAddress addr, int capa, int offset, int mode) {
- super(capa);
- mapMode = mode;
- switch (mapMode) {
- case IMemorySystem.MMAP_READ_ONLY:
- wrapped = new ReadOnlyDirectByteBuffer(addr, capa, offset);
- break;
- case IMemorySystem.MMAP_READ_WRITE:
- case IMemorySystem.MMAP_WRITE_COPY:
- wrapped = new ReadWriteDirectByteBuffer(addr, capa, offset);
- break;
- default:
- throw new IllegalArgumentException();
- }
- addr.autoFree();
+ MappedByteBuffer(int capacity) {
+ super(capacity);
}
/**
@@ -76,8 +55,7 @@ public abstract class MappedByteBuffer e
* otherwise.
*/
public final boolean isLoaded() {
- return ((MappedPlatformAddress) ((DirectBuffer) wrapped)
- .getBaseAddress()).mmapIsLoaded();
+ return ((MappedPlatformAddress)address).mmapIsLoaded();
}
/**
@@ -87,8 +65,7 @@ public abstract class MappedByteBuffer e
* @return this buffer.
*/
public final MappedByteBuffer load() {
- ((MappedPlatformAddress) ((DirectBuffer) wrapped).getBaseAddress())
- .mmapLoad();
+ ((MappedPlatformAddress)address).mmapLoad();
return this;
}
@@ -102,8 +79,7 @@ public abstract class MappedByteBuffer e
*/
public final MappedByteBuffer force() {
if (mapMode == IMemorySystem.MMAP_READ_WRITE) {
- ((MappedPlatformAddress) ((DirectBuffer) wrapped).getBaseAddress())
- .mmapFlush();
+ ((MappedPlatformAddress)address).mmapFlush();
}
return this;
}
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/nio/src/main/java/common/java/nio/ReadOnlyDirectByteBuffer.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/nio/src/main/java/common/java/nio/ReadOnlyDirectByteBuffer.java?rev=951681&r1=951680&r2=951681&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/nio/src/main/java/common/java/nio/ReadOnlyDirectByteBuffer.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/nio/src/main/java/common/java/nio/ReadOnlyDirectByteBuffer.java Sat Jun 5 08:54:06 2010
@@ -48,6 +48,15 @@ final class ReadOnlyDirectByteBuffer ext
super(address, capacity, offset);
}
+ /*
+ * This constructor is specifically for MappedByteBuffer construction
+ */
+ protected ReadOnlyDirectByteBuffer(PlatformAddress address, int capacity,
+ int offset, int mapMode) {
+ super(address, capacity, offset);
+ this.mapMode = mapMode;
+ }
+
@Override
public ByteBuffer asReadOnlyBuffer() {
return copy(this, mark);
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/nio/src/main/java/common/java/nio/ReadWriteDirectByteBuffer.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/nio/src/main/java/common/java/nio/ReadWriteDirectByteBuffer.java?rev=951681&r1=951680&r2=951681&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/nio/src/main/java/common/java/nio/ReadWriteDirectByteBuffer.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/nio/src/main/java/common/java/nio/ReadWriteDirectByteBuffer.java Sat Jun 5 08:54:06 2010
@@ -52,6 +52,15 @@ final class ReadWriteDirectByteBuffer ex
super(address, capacity, offset);
}
+ /*
+ * This constructor is specifically for MappedByteBuffer construction
+ */
+ ReadWriteDirectByteBuffer(PlatformAddress address, int capacity,
+ int offset, int mapMode) {
+ super(address, capacity, offset);
+ this.mapMode = mapMode;
+ }
+
@Override
public ByteBuffer asReadOnlyBuffer() {
return ReadOnlyDirectByteBuffer.copy(this, mark);
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/nio/src/main/java/common/org/apache/harmony/nio/internal/MappedByteBufferFactory.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/nio/src/main/java/common/org/apache/harmony/nio/internal/MappedByteBufferFactory.java?rev=951681&r1=951680&r2=951681&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/nio/src/main/java/common/org/apache/harmony/nio/internal/MappedByteBufferFactory.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/nio/src/main/java/common/org/apache/harmony/nio/internal/MappedByteBufferFactory.java Sat Jun 5 08:54:06 2010
@@ -24,20 +24,45 @@ import java.security.PrivilegedAction;
import org.apache.harmony.luni.platform.PlatformAddress;
+import org.apache.harmony.luni.platform.IMemorySystem;
+import org.apache.harmony.luni.platform.MappedPlatformAddress;
+import org.apache.harmony.luni.platform.PlatformAddress;
+import org.apache.harmony.nio.internal.DirectBuffer;
+
class MappedByteBufferFactory {
- static final Constructor<?> constructor;
+ static final Constructor<?> readOnlyConstructor;
+ static final Constructor<?> readWriteConstructor;
static {
- constructor = AccessController
+ readOnlyConstructor = AccessController
+ .doPrivileged(new PrivilegedAction<Constructor<?>>() {
+ public Constructor<?> run() {
+ try {
+ Class<?> wrapperClazz = ClassLoader
+ .getSystemClassLoader().loadClass(
+ "java.nio.ReadOnlyDirectByteBuffer"); //$NON-NLS-1$
+ Constructor<?> result = wrapperClazz
+ .getDeclaredConstructor(new Class[] {
+ PlatformAddress.class, int.class,
+ int.class, int.class });
+ result.setAccessible(true);
+ return result;
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+ });
+
+ readWriteConstructor = AccessController
.doPrivileged(new PrivilegedAction<Constructor<?>>() {
public Constructor<?> run() {
try {
Class<?> wrapperClazz = ClassLoader
.getSystemClassLoader().loadClass(
- "java.nio.MappedByteBufferAdapter"); //$NON-NLS-1$
+ "java.nio.ReadWriteDirectByteBuffer"); //$NON-NLS-1$
Constructor<?> result = wrapperClazz
- .getConstructor(new Class[] {
+ .getDeclaredConstructor(new Class[] {
PlatformAddress.class, int.class,
int.class, int.class });
result.setAccessible(true);
@@ -55,8 +80,18 @@ class MappedByteBufferFactory {
* Spec points out explicitly that the size of map should be no greater
* than Integer.MAX_VALUE, so long to int cast is safe here.
*/
- return (MappedByteBuffer) constructor.newInstance(new Object[] { addr,
+ switch (mapmode) {
+ case IMemorySystem.MMAP_READ_ONLY:
+ return (MappedByteBuffer) readOnlyConstructor.newInstance(new Object[] { addr,
+ Integer.valueOf((int)size), Integer.valueOf(offset),
+ Integer.valueOf(mapmode) });
+ case IMemorySystem.MMAP_READ_WRITE:
+ case IMemorySystem.MMAP_WRITE_COPY:
+ return (MappedByteBuffer) readWriteConstructor.newInstance(new Object[] { addr,
Integer.valueOf((int)size), Integer.valueOf(offset),
Integer.valueOf(mapmode) });
+ default:
+ throw new IllegalArgumentException();
+ }
}
}
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/nio/src/main/native/nio/unix/makefile
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/nio/src/main/native/nio/unix/makefile?rev=951681&r1=951680&r2=951681&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/nio/src/main/native/nio/unix/makefile (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/nio/src/main/native/nio/unix/makefile Sat Jun 5 08:54:06 2010
@@ -25,13 +25,7 @@ ifeq ($(HY_OS),linux)
BUILDFILES += EpollSelectorImpl.o
endif
-ifneq ($(HY_ZIP_API),true)
-MDLLIBFILES += $(LIBPATH)libhyzip.a
-endif
-
-MDLLIBFILES = \
- $(LIBPATH)libhycommon.a \
- $(LIBPATH)libhypool.a
+MDLLIBFILES = $(LIBPATH)libhycommon.a
DLLNAME = $(DLLPATH)libhynio$(HY_SHLIB_SUFFIX)
EXPNAME = HYNIO_0.1
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/nio/src/main/native/nio/windows/makefile
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/nio/src/main/native/nio/windows/makefile?rev=951681&r1=951680&r2=951681&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/nio/src/main/native/nio/windows/makefile (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/nio/src/main/native/nio/windows/makefile Sat Jun 5 08:54:06 2010
@@ -31,13 +31,7 @@ VIRTFILES = hynio.res
SYSLIBFILES = ws2_32.lib Iphlpapi.lib
-!IF "$(HY_ZIP_API)" != "true"
-MDLLIBFILES = \
- $(LIBPATH)hyzip$(HY_LINKLIB_SUFFIX) $(LIBPATH)hyzlib$(HY_LINKLIB_SUFFIX)
-!ENDIF
-
MDLLIBFILES = $(LIBPATH)hycommon$(HY_LINKLIB_SUFFIX) \
- $(LIBPATH)hypool$(HY_LINKLIB_SUFFIX) \
$(LIBPATH)hythr$(HY_LINKLIB_SUFFIX) $(LIBPATH)vmi$(HY_LINKLIB_SUFFIX)
DLLBASE=0x13200000
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/MappedByteBufferTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/MappedByteBufferTest.java?rev=951681&r1=951680&r2=951681&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/MappedByteBufferTest.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/MappedByteBufferTest.java Sat Jun 5 08:54:06 2010
@@ -208,4 +208,24 @@ public class MappedByteBufferTest extend
emptyFile = File.createTempFile("harmony", "test"); //$NON-NLS-1$//$NON-NLS-2$
emptyFile.deleteOnExit();
}
+
+ public void test_position() throws IOException {
+ File tmp = File.createTempFile("hmy", "tmp");
+ tmp.deleteOnExit();
+ RandomAccessFile f = new RandomAccessFile(tmp, "rw");
+ FileChannel ch = f.getChannel();
+ MappedByteBuffer mbb = ch.map(MapMode.READ_WRITE, 0L, 100L);
+ ch.close();
+
+ mbb.putInt(1, 1);
+ mbb.position(50);
+ mbb.putInt(50);
+
+ mbb.flip();
+ mbb.get();
+ assertEquals(1, mbb.getInt());
+
+ mbb.position(50);
+ assertEquals(50, mbb.getInt());
+ }
}
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/channels/SocketChannelTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/channels/SocketChannelTest.java?rev=951681&r1=951680&r2=951681&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/channels/SocketChannelTest.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/channels/SocketChannelTest.java Sat Jun 5 08:54:06 2010
@@ -491,8 +491,6 @@ public class SocketChannelTest extends T
assertEquals(s.getPort(), address.getPort());
assertNotNull(s.getLocalSocketAddress());
assertTrue(s.getReceiveBufferSize() >= 8192);
- // equal , not same
- assertNotSame(s.getRemoteSocketAddress(), (SocketAddress) address);
assertEquals(s.getRemoteSocketAddress(), (SocketAddress) address);
// assertFalse(s.getReuseAddress());
assertTrue(s.getSendBufferSize() >= 8192);
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/portlib/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/portlib/build.xml?rev=951681&r1=951680&r2=951681&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/portlib/build.xml (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/portlib/build.xml Sat Jun 5 08:54:06 2010
@@ -158,8 +158,8 @@
</copy>
</target>
- <target name="-build-copy-thread" unless="hy.thr.nodeploy">
- <!-- TOFIX: should add property for: unless="skip.native.build" -->
+ <target name="-build-copy-thread" if="hy.thr.deploy"
+ unless="skip.native.build">
<copy todir="${hy.jdk}/jre/bin" preservelastmodified="true">
<fileset dir="src/main/native/thread">
<include name="*${shlib.suffix}*" />
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/prefs/make/exclude.linux.x86.drl
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/prefs/make/exclude.linux.x86.drl?rev=951681&r1=951680&r2=951681&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/prefs/make/exclude.linux.x86.drl (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/prefs/make/exclude.linux.x86.drl Sat Jun 5 08:54:06 2010
@@ -1,2 +0,0 @@
-#HARMONY-4289
-org/apache/harmony/prefs/tests/java/util/prefs/AbstractPreferencesTest.java
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/prefs/make/exclude.linux.x86_64.drl
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/prefs/make/exclude.linux.x86_64.drl?rev=951681&r1=951680&r2=951681&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/prefs/make/exclude.linux.x86_64.drl (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/prefs/make/exclude.linux.x86_64.drl Sat Jun 5 08:54:06 2010
@@ -1,2 +0,0 @@
-#HARMONY-4289
-org/apache/harmony/prefs/tests/java/util/prefs/AbstractPreferencesTest.java
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/prefs/make/exclude.windows.x86.drl
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/prefs/make/exclude.windows.x86.drl?rev=951681&r1=951680&r2=951681&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/prefs/make/exclude.windows.x86.drl (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/prefs/make/exclude.windows.x86.drl Sat Jun 5 08:54:06 2010
@@ -1,2 +0,0 @@
-#HARMONY-3617
-org/apache/harmony/prefs/tests/java/util/prefs/AbstractPreferencesTest.java
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/prefs/make/exclude.windows.x86_64.drl
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/prefs/make/exclude.windows.x86_64.drl?rev=951681&r1=951680&r2=951681&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/prefs/make/exclude.windows.x86_64.drl (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/prefs/make/exclude.windows.x86_64.drl Sat Jun 5 08:54:06 2010
@@ -1,2 +0,0 @@
-#HARMONY-3617
-org/apache/harmony/prefs/tests/java/util/prefs/AbstractPreferencesTest.java
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/prefs/src/main/native/prefs/windows/makefile
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/prefs/src/main/native/prefs/windows/makefile?rev=951681&r1=951680&r2=951681&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/prefs/src/main/native/prefs/windows/makefile (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/prefs/src/main/native/prefs/windows/makefile Sat Jun 5 08:54:06 2010
@@ -31,13 +31,7 @@ VIRTFILES = $(LIBBASE).res
SYSLIBFILES = ws2_32.lib Iphlpapi.lib
-!IF "$(HY_ZIP_API)" != "true"
-MDLLIBFILES = \
- $(LIBPATH)hyzip$(HY_LINKLIB_SUFFIX) $(LIBPATH)hyzlib$(HY_LINKLIB_SUFFIX)
-!ENDIF
-
-MDLLIBFILES = $(MDLLIBFILES) \
- $(LIBPATH)hypool$(HY_LINKLIB_SUFFIX) $(LIBPATH)vmi$(HY_LINKLIB_SUFFIX)
+MDLLIBFILES = $(MDLLIBFILES) $(LIBPATH)vmi$(HY_LINKLIB_SUFFIX)
DLLBASE=0x13300000
!include <$(HY_HDK)\build\make\rules.mak>
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/security/src/main/native/security/windows/makefile
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/security/src/main/native/security/windows/makefile?rev=951681&r1=951680&r2=951681&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/security/src/main/native/security/windows/makefile (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/security/src/main/native/security/windows/makefile Sat Jun 5 08:54:06 2010
@@ -28,7 +28,7 @@ HYLDFLAGS = $(HYLDFLAGS) -def:$(LIBBASE)
SYSLIBFILES = ws2_32.lib Iphlpapi.lib
-MDLLIBFILES = $(LIBPATH)hycommon$(HY_LINKLIB_SUFFIX) $(LIBPATH)hypool$(HY_LINKLIB_SUFFIX)
+MDLLIBFILES = $(LIBPATH)hycommon$(HY_LINKLIB_SUFFIX)
DLLBASE=0x1300000
!include <$(HY_HDK)\build\make\rules.mak>
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/text/make/exclude.common
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/text/make/exclude.common?rev=951681&r1=951680&r2=951681&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/text/make/exclude.common (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/text/make/exclude.common Sat Jun 5 08:54:06 2010
@@ -1,5 +1,11 @@
+#HARMONY-6524
+org/apache/harmony/text/tests/java/text/RuleBasedCollatorTest.java
+
+#HARMONY-6525
org/apache/harmony/text/tests/java/text/DecimalFormatTest.java
-org/apache/harmony/text/tests/java/text/MessageFormatTest.java
+
+#HARMONY-6526
org/apache/harmony/text/tests/java/text/SimpleDateFormatTest.java
-org/apache/harmony/text/tests/java/text/RuleBasedCollatorTest.java
+
+#HARMONY-6527
org/apache/harmony/text/tests/java/text/CollationElementIteratorTest.java
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/text/make/exclude.linux.x86_64.drl
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/text/make/exclude.linux.x86_64.drl?rev=951681&r1=951680&r2=951681&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/text/make/exclude.linux.x86_64.drl (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/text/make/exclude.linux.x86_64.drl Sat Jun 5 08:54:06 2010
@@ -1,2 +0,0 @@
-org/apache/harmony/text/tests/java/text/DateFormatSymbolsTest.java
-org/apache/harmony/text/tests/java/text/RuleBasedCollatorTest.java
Propchange: harmony/enhanced/java/branches/mrh/common_resources/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Jun 5 08:54:06 2010
@@ -1,4 +1,4 @@
/harmony/enhanced/java/branches/mrh/common_resources:935751
-/harmony/enhanced/java/trunk/common_resources:935751-946978
+/harmony/enhanced/java/trunk/common_resources:935751-951343
/harmony/enhanced/trunk/common_resources:476395-921782
/incubator/harmony/enhanced/trunk/common_resources:292550-476394
Modified: harmony/enhanced/java/branches/mrh/common_resources/make/depends.properties
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/common_resources/make/depends.properties?rev=951681&r1=951680&r2=951681&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/common_resources/make/depends.properties (original)
+++ harmony/enhanced/java/branches/mrh/common_resources/make/depends.properties Sat Jun 5 08:54:06 2010
@@ -144,9 +144,11 @@ yoko-rmi-spec.url=http://people.apache.o
yoko-rmi-spec.md5=8ef16849448ecccabc0f1aac8b840e9c
# bcel is needed by yoko-rmi
-bcel.dir=${depends.jars}/bcel-5.2
-bcel.jar=${bcel.dir}/bcel-5.2.jar
-bcel.url=${maven2.base}/org/apache/bcel/bcel/5.2/bcel-5.2.jar
+bcel.version=5.2
+bcel.base=bcel-${bcel.version}
+bcel.dir=${depends.jars}/${bcel.base}
+bcel.jar=${bcel.dir}/${bcel.base}.jar
+bcel.url=${maven2.base}/org/apache/bcel/bcel/${bcel.version}/${bcel.base}.jar
bcel.md5=43d54687362fc2991d61201c453a8286
jetty.dir=${depends.jars}/jetty
Modified: harmony/enhanced/java/branches/mrh/common_resources/make/properties.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/common_resources/make/properties.xml?rev=951681&r1=951680&r2=951681&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/common_resources/make/properties.xml (original)
+++ harmony/enhanced/java/branches/mrh/common_resources/make/properties.xml Sat Jun 5 08:54:06 2010
@@ -276,18 +276,7 @@ properties in preference to these:
<exec failonerror="true"
executable="${make.command}"
dir="@{dir}">
- <env key="HY_ZIP_API" value="${hy.zip.api}" />
- <env key="HY_PORTLIB_STUBS" value="${hy.portlib.stubs}" />
<env key="HY_HDK" value="${hy.hdk}" />
- <env key="HY_CFG" value="${hy.cfg}" />
- <env key="HY_ARCH" value="${hy.arch}" />
- <env key="HY_OS" value="${hy.os}" />
- <env key="HY_PLATFORM" value="${hy.platform}" />
- <env key="HY_NO_THR" value="${hy.no.thr}" />
- <env key="HY_THR_NO_DEPLOY" value="${hy.thr.nodeploy}" />
- <env key="HY_LOCAL_ZLIB" value="${hy.local.zlib}" />
- <env key="HY_SHLIB_SUFFIX" value="${shlib.suffix}" />
- <env key="HY_LINKLIB_SUFFIX" value="${linklib.suffix}" />
<arg line="${make.arg}" />
<arg line="@{target}" />
<make-elements />
Modified: harmony/enhanced/java/branches/mrh/common_resources/make/svn.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/common_resources/make/svn.xml?rev=951681&r1=951680&r2=951681&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/common_resources/make/svn.xml (original)
+++ harmony/enhanced/java/branches/mrh/common_resources/make/svn.xml Sat Jun 5 08:54:06 2010
@@ -35,6 +35,12 @@
value="${global.entry.repository.root} ${svn.revision}">
<isset property="is.svn"/>
</condition>
+ <condition property="svn.root"
+ value="${global.entry.repository.root}"
+ else="http://svn.apache.org/repos/asf">
+ <isset property="is.svn"/>
+ </condition>
+
<tstamp>
<format property="svn.info" pattern="'Unknown revision at' dd-MMM-yyyy hh:mm aa"/>
</tstamp>
Modified: harmony/enhanced/java/branches/mrh/debian/changelog
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/debian/changelog?rev=951681&r1=951680&r2=951681&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/debian/changelog (original)
+++ harmony/enhanced/java/branches/mrh/debian/changelog Sat Jun 5 08:54:06 2010
@@ -1,3 +1,9 @@
+harmony-5.0 (0.0r946978-1) unstable; urgency=low
+
+ * Milestone 14 release.
+
+ -- Mark Hindess <ma...@googlemail.com> Fri, 21 May 2010 13:16:53 +0100
+
harmony-5.0 (0.0r916432-1) unstable; urgency=low
* Milestone 13 release.
Modified: harmony/enhanced/java/branches/mrh/debian/control
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/debian/control?rev=951681&r1=951680&r2=951681&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/debian/control (original)
+++ harmony/enhanced/java/branches/mrh/debian/control Sat Jun 5 08:54:06 2010
@@ -2,7 +2,7 @@ Source: harmony-5.0
Section: devel
Priority: extra
Maintainer: Mark Hindess <ma...@googlemail.com>
-Build-Depends: debhelper (>= 5), ecj-bootstrap | libecj-java, junit, ant (>= 1.7.0), subversion, ant-optional, liblcms1-dev, libjpeg62-dev, libpng-dev, libxft-dev, libxml2-dev, libxtst-dev, libxext-dev
+Build-Depends: debhelper (>= 5), ecj-bootstrap | libecj-java, junit, ant (>= 1.7.0), subversion, ant-optional, liblcms1-dev, libjpeg62-dev, libpng-dev, libxft-dev, libxtst-dev, libxext-dev
Standards-Version: 3.7.2
Package: harmony-5.0-drlvm
Propchange: harmony/enhanced/java/branches/mrh/drlvm/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Jun 5 08:54:06 2010
@@ -1,5 +1,5 @@
/harmony/enhanced/java/branches/mrh/drlvm:935751
-/harmony/enhanced/java/trunk/drlvm:935751-946978
+/harmony/enhanced/java/trunk/drlvm:935751-951343
/harmony/enhanced/trunk/drlvm:476395-926313
/harmony/enhanced/trunk/working_vm:476396-920147
/incubator/harmony/enhanced/trunk/working_vm:423974-476394
Modified: harmony/enhanced/java/branches/mrh/drlvm/make/vm/em.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/drlvm/make/vm/em.xml?rev=951681&r1=951680&r2=951681&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/drlvm/make/vm/em.xml (original)
+++ harmony/enhanced/java/branches/mrh/drlvm/make/vm/em.xml Sat Jun 5 08:54:06 2010
@@ -46,9 +46,8 @@
<libset libs="harmonyvm,hythr" dir="${drlvm.shlib.dir}" />
<libset libs="port,apr-1" dir="${drlvm.lib.dir}" />
- <syslibset type="shared" libs="m,dl,stdc++,z,xml2,pthread" if="is.linux"/>
+ <syslibset type="shared" libs="m,dl,stdc++,z,pthread" if="is.linux"/>
<syslibset type="shared" libs="m,stdc++,z,pthread" if="is.freebsd"/>
- <libset libs="xml2" dir="/usr/local/lib" if="is.freebsd"/>
<linkerarg value="--export-dynamic" if="is.freebsd"/>
<linkerarg value="--version-script=${vm.home}/em/build/em.exp" if="is.unix"/>
Modified: harmony/enhanced/java/branches/mrh/drlvm/make/vm/vmcore.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/drlvm/make/vm/vmcore.xml?rev=951681&r1=951680&r2=951681&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/drlvm/make/vm/vmcore.xml (original)
+++ harmony/enhanced/java/branches/mrh/drlvm/make/vm/vmcore.xml Sat Jun 5 08:54:06 2010
@@ -195,9 +195,8 @@
<linkerarg value="/DEF:${vm.home}/vmcore/src/harmonyvm.def" if="is.windows.x86"/>
<linkerarg value="--version-script=${vm.home}/vmcore/build/vmcore.exp" if="is.unix"/>
- <syslibset type="shared" libs="m,dl,stdc++,xml2,pthread,gcc_s,rt" if="is.linux"/>
+ <syslibset type="shared" libs="m,dl,stdc++,pthread,gcc_s,rt" if="is.linux"/>
<syslibset type="shared" libs="m,stdc++,pthread" if="is.freebsd"/>
- <libset libs="xml2" dir="/usr/local/lib" if="is.freebsd"/>
<linkerarg value="--export-dynamic" if="is.freebsd"/>
</linker>
</link-lib>
Modified: harmony/enhanced/java/branches/mrh/jdktools/modules/jdktools/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/jdktools/modules/jdktools/build.xml?rev=951681&r1=951680&r2=951681&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/jdktools/modules/jdktools/build.xml (original)
+++ harmony/enhanced/java/branches/mrh/jdktools/modules/jdktools/build.xml Sat Jun 5 08:54:06 2010
@@ -36,12 +36,14 @@
<check-one-file src="${icu.url}" dest="${icu.jar}" />
<check-one-file src="${ecj.jar.url}" dest="${ecj.jar}" />
<check-one-file src="${bcel.jar}" dest="${bcel.jar}" />
- <copy todir="${hy.hdk}/jdk/jre/lib/boot">
- <fileset dir="${depends.jars}">
- <patternset includes="${bcel.version}/*.jar" />
- </fileset>
- <fileset dir="depends/manifests"/>
+ <mkdir dir="${hy.hdk}/jdk/jre/lib/boot/${bcel.base}" />
+ <copy todir="${hy.hdk}/jdk/jre/lib/boot/${bcel.base}">
+ <fileset file="${bcel.jar}" />
+ <fileset dir="depends/bcel" />
</copy>
+ <check-one-file dest="${junit.jar}" src="${junit.jar.url}"/>
+ <check-one-file dest="${hamcrest-library.jar}"
+ src="${hamcrest-library.jar.url}"/>
</target>
<target name="fetch-depends" unless="skip.java.build">
@@ -52,6 +54,8 @@
<mkdir dir="${bcel.dir}" />
<download-one-file dest="${bcel.jar}"
src="${bcel.url}" md5="${bcel.md5}"/>
+ <fetch dep="junit.jar"/>
+ <fetch dep="hamcrest-library.jar"/>
</target>
<target name="build" unless="skip.java.build"
@@ -112,6 +116,13 @@
<pathelement path="${ant.library.dir}/ant-launcher.jar" />
<pathelement path="${ant.library.dir}/ant-nodeps.jar" />
</classpath>
+
+ <exclude name="org/apache/harmony/tools/appletviewer/**"
+ if="is.select"/>
+ <exclude name="org/apache/harmony/tools/rmi*/**" if="is.select"/>
+ <exclude name="org/apache/harmony/tools/serialver/**"
+ if="is.select"/>
+
</hy.javac>
</target>
@@ -179,6 +190,8 @@
<src>
<pathelement location="src/test/java" />
</src>
+ <exclude name="org/apache/harmony/tests/tools/serialver/**"
+ if="is.select"/>
<classpath>
<pathelement path="${hy.jdk}/lib/tools.jar"/>
</classpath>
Modified: harmony/enhanced/java/branches/mrh/jdktools/modules/jpda/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/jdktools/modules/jpda/build.xml?rev=951681&r1=951680&r2=951681&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/jdktools/modules/jpda/build.xml (original)
+++ harmony/enhanced/java/branches/mrh/jdktools/modules/jpda/build.xml Sat Jun 5 08:54:06 2010
@@ -34,12 +34,17 @@
<check-one-file src="${jdt.jdimodel.jar.url}"
dest="${jdt.jdimodel.jar}" />
<check-one-file src="${icu.url}" dest="${icu.jar}" />
+ <check-one-file dest="${junit.jar}" src="${junit.jar.url}"/>
+ <check-one-file dest="${hamcrest-library.jar}"
+ src="${hamcrest-library.jar.url}"/>
</target>
<target name="fetch-depends" unless="skip.java.build">
<fetch dep="jdt.jdi.jar"/>
<fetch dep="jdt.jdimodel.jar"/>
<fetch dep="icu"/>
+ <fetch dep="junit.jar"/>
+ <fetch dep="hamcrest-library.jar"/>
</target>
<target name="build"
Modified: harmony/enhanced/java/branches/mrh/jdktools/modules/jpda/src/main/native/jdwp/unix/transport/dt_socket/SocketTransport_pd.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/jdktools/modules/jpda/src/main/native/jdwp/unix/transport/dt_socket/SocketTransport_pd.h?rev=951681&r1=951680&r2=951681&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/jdktools/modules/jpda/src/main/native/jdwp/unix/transport/dt_socket/SocketTransport_pd.h (original)
+++ harmony/enhanced/java/branches/mrh/jdktools/modules/jpda/src/main/native/jdwp/unix/transport/dt_socket/SocketTransport_pd.h Sat Jun 5 08:54:06 2010
@@ -57,7 +57,9 @@ typedef int SOCKET;
typedef timeval TIMEVAL;
typedef int BOOL;
-const int TRUE = 1;
+#ifndef TRUE
+#define TRUE 1
+#endif
const int SOCKET_ERROR = -1;
const int SOCKET_ERROR_EINTR = EINTR;
const int INVALID_SOCKET = -1;
Modified: harmony/enhanced/java/branches/mrh/jdktools/modules/jretools/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/jdktools/modules/jretools/build.xml?rev=951681&r1=951680&r2=951681&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/jdktools/modules/jretools/build.xml (original)
+++ harmony/enhanced/java/branches/mrh/jdktools/modules/jretools/build.xml Sat Jun 5 08:54:06 2010
@@ -28,6 +28,17 @@
<property file="../../make/depends.properties" />
<property file="${common.resources}/make/depends.properties" />
+ <target name="check-depends" unless="skip.test.build">
+ <check-one-file dest="${junit.jar}" src="${junit.jar.url}"/>
+ <check-one-file dest="${hamcrest-library.jar}"
+ src="${hamcrest-library.jar.url}"/>
+ </target>
+
+ <target name="fetch-depends" unless="skip.test.build">
+ <fetch dep="junit.jar"/>
+ <fetch dep="hamcrest-library.jar"/>
+ </target>
+
<target name="build" depends="-build-jar,-test-jar" />
<target name="test" depends="-test-module">
@@ -76,6 +87,10 @@
<include name="**/*.jar" />
</fileset>
</bootclasspath>
+
+ <exclude name="org/apache/harmony/jretools/policytool/**"
+ if="is.select"/>
+
</hy.javac>
</target>
Modified: harmony/enhanced/java/branches/mrh/jdktools/modules/samsa/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/jdktools/modules/samsa/build.xml?rev=951681&r1=951680&r2=951681&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/jdktools/modules/samsa/build.xml (original)
+++ harmony/enhanced/java/branches/mrh/jdktools/modules/samsa/build.xml Sat Jun 5 08:54:06 2010
@@ -31,7 +31,7 @@
<target name="-test-module" depends="run-tests" />
<target name="build-native" unless="skip.native.build"
- depends="-compile-native,-copy-native-exe,
+ depends="-compile-native,-copy-native-exe,-copy-native-not-select,
-copy-native-exe-windows,-copy-native-data" />
<!-- compile universal samsa binary -->
@@ -64,9 +64,6 @@
<copy file="${hy.samsa.exe}" tofile="${hy.jdk}/bin/jarsigner${exe.suffix}" />
<chmod file="${hy.jdk}/bin/jarsigner${exe.suffix}" perm="ugo+x" />
- <copy file="${hy.samsa.exe}" tofile="${hy.jdk}/bin/appletviewer${exe.suffix}" />
- <chmod file="${hy.jdk}/bin/appletviewer${exe.suffix}" perm="ugo+x" />
-
<copy file="${hy.samsa.exe}" tofile="${hy.jdk}/bin/keytool${exe.suffix}" />
<chmod file="${hy.jdk}/bin/keytool${exe.suffix}" perm="ugo+x" />
@@ -82,16 +79,6 @@
<copy file="${hy.samsa.exe}" tofile="${hy.jdk}/bin/jar${exe.suffix}" />
<chmod file="${hy.jdk}/bin/jar${exe.suffix}" perm="ugo+x" />
- <copy file="${hy.samsa.exe}" tofile="${hy.jdk}/bin/rmic${exe.suffix}" />
- <chmod file="${hy.jdk}/bin/rmic${exe.suffix}" perm="ugo+x" />
- <copy file="${hy.samsa.exe}" tofile="${hy.jdk}/bin/rmid${exe.suffix}" />
- <chmod file="${hy.jdk}/bin/rmid${exe.suffix}" perm="ugo+x" />
- <copy file="${hy.samsa.exe}" tofile="${hy.jdk}/bin/rmiregistry${exe.suffix}" />
- <chmod file="${hy.jdk}/bin/rmiregistry${exe.suffix}" perm="ugo+x" />
-
- <copy file="${hy.samsa.exe}" tofile="${hy.jdk}/bin/serialver${exe.suffix}" />
- <chmod file="${hy.jdk}/bin/serialver${exe.suffix}" perm="ugo+x" />
-
<copy file="${hy.samsa.exe}" tofile="${hy.jre}/bin/keytool${exe.suffix}" />
<chmod file="${hy.jre}/bin/keytool${exe.suffix}" perm="ugo+x" />
@@ -101,7 +88,30 @@
<copy file="${hy.samsa.exe}" tofile="${hy.jre}/bin/pack200${exe.suffix}" />
<chmod file="${hy.jre}/bin/pack200${exe.suffix}" perm="ugo+x" />
- <copy file="${hy.samsa.exe}" tofile="${hy.jre}/bin/policytool${exe.suffix}" />
+ </target>
+
+ <!-- copy samsa executable for different tools -->
+ <target name="-copy-native-not-select" unless="skip.native.build"
+ if="is.not.select">
+
+ <copy file="${hy.samsa.exe}"
+ tofile="${hy.jdk}/bin/appletviewer${exe.suffix}" />
+ <chmod file="${hy.jdk}/bin/appletviewer${exe.suffix}" perm="ugo+x" />
+
+ <copy file="${hy.samsa.exe}" tofile="${hy.jdk}/bin/rmic${exe.suffix}" />
+ <chmod file="${hy.jdk}/bin/rmic${exe.suffix}" perm="ugo+x" />
+ <copy file="${hy.samsa.exe}" tofile="${hy.jdk}/bin/rmid${exe.suffix}" />
+ <chmod file="${hy.jdk}/bin/rmid${exe.suffix}" perm="ugo+x" />
+ <copy file="${hy.samsa.exe}"
+ tofile="${hy.jdk}/bin/rmiregistry${exe.suffix}" />
+ <chmod file="${hy.jdk}/bin/rmiregistry${exe.suffix}" perm="ugo+x" />
+
+ <copy file="${hy.samsa.exe}"
+ tofile="${hy.jdk}/bin/serialver${exe.suffix}" />
+ <chmod file="${hy.jdk}/bin/serialver${exe.suffix}" perm="ugo+x" />
+
+ <copy file="${hy.samsa.exe}"
+ tofile="${hy.jre}/bin/policytool${exe.suffix}" />
<chmod file="${hy.jre}/bin/policytool${exe.suffix}" perm="ugo+x" />
</target>
Modified: harmony/enhanced/java/branches/mrh/jdktools/modules/samsa/src/main/native/samsa/samsa.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/jdktools/modules/samsa/src/main/native/samsa/samsa.c?rev=951681&r1=951680&r2=951681&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/jdktools/modules/samsa/src/main/native/samsa/samsa.c (original)
+++ harmony/enhanced/java/branches/mrh/jdktools/modules/samsa/src/main/native/samsa/samsa.c Sat Jun 5 08:54:06 2010
@@ -15,6 +15,10 @@
* limitations under the License.
*/
+#if defined(FREEBSD)
+#include <sys/param.h>
+#endif
+
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
@@ -85,8 +89,8 @@ typedef struct ToolData {
} TOOLDATA;
char *cleanToolName(const char *);
-char *getExeDir();
-char *getRoot();
+char *getExeDir(const char*);
+char *getRoot(const char*);
TOOLDATA *getToolData(const char *, const char *, int toolType);
int getToolType(const char*, const char*);
char* jarFile(const char*, const char*);
@@ -135,7 +139,7 @@ int main (int argc, char **argv, char **
* and the full paths to jars. This way, we can be called
* from anywhere
*/
- root = getRoot();
+ root = getRoot(argv[0]);
// printf("root = %s\n", root);
@@ -411,7 +415,7 @@ char *cleanToolName(const char *name)
}
return temp;
- #elif defined(LINUX) || defined(FREEBSD)
+ #else
/*
* if we found a slash (and someone didn't do something
@@ -423,20 +427,18 @@ char *cleanToolName(const char *name)
else {
return strdup(name);
}
- #else
- #error Need to define basename-type function
#endif
}
/******************************************************************
- * getRoot()
+ * getRoot(const char* argv0)
*
* returns the root (JDK or JRE) where this executable is located
* if it can figure it out or NULL if it can't
*/
-char *getRoot() {
+char *getRoot(const char* argv0) {
- char *exeDir = getExeDir();
+ char *exeDir = getExeDir(argv0);
char *last = strrchr(exeDir, PATH_SEPARATOR_CHAR);
@@ -449,36 +451,27 @@ char *getRoot() {
}
/*****************************************************************
- * getExeDir()
+ * getExeDir(const char* argv0)
*
* returns directory of running exe
*/
-char *getExeDir() {
+char *getExeDir(const char* argv0) {
char *last = NULL;
-#if defined(LINUX)
- char buffer[PATH_MAX + 1];
-
- int size = readlink ("/proc/self/exe", buffer, sizeof(buffer)-2);
-
- buffer[size+1] = '\0';
-#elif defined(FREEBSD)
- Dl_info info;
- char buffer[PATH_MAX + 1];
- if (dladdr( (const void*)&main, &info) == 0) {
- return NULL;
- }
- strncpy(buffer, info.dli_fname, PATH_MAX);
- buffer[PATH_MAX] = '\0';
-
-#elif defined(WIN32)
+#if defined(WIN32)
char buffer[512];
DWORD dwRet = GetModuleFileName(NULL, buffer, 512);
// FIXME - handle this right - it could be that 512 isn't enough
#else
-#error Need to implement executable name code
+ char buffer[PATH_MAX + 1];
+
+ char *rc = realpath(argv0, buffer);
+ if (!rc) {
+ return NULL;
+ }
+ buffer[PATH_MAX] = '\0';
#endif
last = strrchr(buffer, PATH_SEPARATOR_CHAR);