From ffde862e033a0825e1e9972a89c0f1f80b261a8e Mon Sep 17 00:00:00 2001 From: mark Date: Mon, 14 Aug 2006 23:12:35 +0000 Subject: 2006-08-14 Mark Wielaard Imported GNU Classpath 0.92 * HACKING: Add more importing hints. Update automake version requirement. * configure.ac (gconf-peer): New enable AC argument. Add --disable-gconf-peer and --enable-default-preferences-peer to classpath configure when gconf is disabled. * scripts/makemake.tcl: Set gnu/java/util/prefs/gconf and gnu/java/awt/dnd/peer/gtk to bc. Classify gnu/java/security/Configuration.java as generated source file. * gnu/java/lang/management/VMGarbageCollectorMXBeanImpl.java, gnu/java/lang/management/VMMemoryPoolMXBeanImpl.java, gnu/java/lang/management/VMClassLoadingMXBeanImpl.java, gnu/java/lang/management/VMRuntimeMXBeanImpl.java, gnu/java/lang/management/VMMemoryManagerMXBeanImpl.java, gnu/java/lang/management/VMThreadMXBeanImpl.java, gnu/java/lang/management/VMMemoryMXBeanImpl.java, gnu/java/lang/management/VMCompilationMXBeanImpl.java: New VM stub classes. * java/lang/management/VMManagementFactory.java: Likewise. * java/net/VMURLConnection.java: Likewise. * gnu/java/nio/VMChannel.java: Likewise. * java/lang/Thread.java (getState): Add stub implementation. * java/lang/Class.java (isEnum): Likewise. * java/lang/Class.h (isEnum): Likewise. * gnu/awt/xlib/XToolkit.java (getClasspathTextLayoutPeer): Removed. * javax/naming/spi/NamingManager.java: New override for StackWalker functionality. * configure, sources.am, Makefile.in, gcj/Makefile.in, include/Makefile.in, testsuite/Makefile.in: Regenerated. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@116139 138bc75d-0d04-0410-961f-82ee72b054a4 --- libjava/classpath/gnu/java/net/local/LocalSocket.java | 5 +++-- .../classpath/gnu/java/net/local/LocalSocketImpl.java | 19 +++++++++++++------ 2 files changed, 16 insertions(+), 8 deletions(-) (limited to 'libjava/classpath/gnu/java/net/local') diff --git a/libjava/classpath/gnu/java/net/local/LocalSocket.java b/libjava/classpath/gnu/java/net/local/LocalSocket.java index b977d69c1bc..b262c794e3d 100644 --- a/libjava/classpath/gnu/java/net/local/LocalSocket.java +++ b/libjava/classpath/gnu/java/net/local/LocalSocket.java @@ -247,12 +247,13 @@ public final class LocalSocket extends Socket public void setSoTimeout (int i) throws SocketException { - throw new SocketException ("local sockets do not support this option"); + // Ignore. } public int getSoTimeout () throws SocketException { - throw new SocketException ("local sockets do not support this option"); + // We don't support timeout, so we return 0. + return 0; } public void setSendBufferSize (int i) throws SocketException diff --git a/libjava/classpath/gnu/java/net/local/LocalSocketImpl.java b/libjava/classpath/gnu/java/net/local/LocalSocketImpl.java index f907e5f469f..f43305a8027 100644 --- a/libjava/classpath/gnu/java/net/local/LocalSocketImpl.java +++ b/libjava/classpath/gnu/java/net/local/LocalSocketImpl.java @@ -57,7 +57,8 @@ final class LocalSocketImpl extends SocketImpl private boolean created; private InputStream in; private OutputStream out; - private int socket_fd; + // Package private to avoid synthetic accessor method. + int socket_fd; private LocalSocketAddress local; private LocalSocketAddress remote; @@ -104,7 +105,7 @@ final class LocalSocketImpl extends SocketImpl protected native void create (boolean stream) throws IOException; protected native void listen (int timeout) throws IOException; protected native void accept (LocalSocketImpl socket) throws IOException; - protected native int available () throws IOException; + protected native int available (int fd) throws IOException; protected native void close () throws IOException; protected native void sendUrgentData (int data) throws IOException; protected native void shutdownInput () throws IOException; @@ -113,8 +114,14 @@ final class LocalSocketImpl extends SocketImpl native void unlink () throws IOException; native void localBind (LocalSocketAddress addr) throws IOException; native void localConnect (LocalSocketAddress addr) throws IOException; - native int read (byte[] buf, int off, int len) throws IOException; - native void write (byte[] buf, int off, int len) throws IOException; + native int read (int fd, byte[] buf, int off, int len) throws IOException; + native void write (int fd, byte[] buf, int off, int len) throws IOException; + + protected int available() + throws IOException + { + return available(socket_fd); + } void doCreate () throws IOException { @@ -263,7 +270,7 @@ final class LocalSocketImpl extends SocketImpl public int read (byte[] buf, int off, int len) throws IOException { - int ret = impl.read (buf, off, len); + int ret = impl.read (socket_fd, buf, off, len); if (ret == 0) { @@ -316,7 +323,7 @@ final class LocalSocketImpl extends SocketImpl public void write (byte[] buf, int off, int len) throws IOException { - impl.write (buf, off, len); + impl.write (socket_fd, buf, off, len); } } } -- cgit v1.2.3