This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Patch: Explicitly Redeclare Miranda-Bug-Causing Methods in java.net.[Datagram]SocketImpl
- From: Mohan Embar <gnustuff at thisiscool dot com>
- To: GCJ Patches <java-patches at gcc dot gnu dot org>
- Date: Tue, 16 Sep 2003 02:40:56 -0500
- Subject: Patch: Explicitly Redeclare Miranda-Bug-Causing Methods in java.net.[Datagram]SocketImpl
- Reply-to: gnustuff at thisiscool dot com
Hi People,
Although it has been discussed here:
http://gcc.gnu.org/ml/java/2003-09/msg00150.html
...that we didn't want this patch because we want to
address the real issue:
http://gcc.gnu.org/ml/java/2003-09/msg00089.html
...the fact that both Michael and I have failed
in producing a simple testcase for this, and the
fact that things like setSoTimeout() are now
broken in CVS for both MinGW and Linux, and the
fact that people are wasting time on this issue:
http://gcc.gnu.org/ml/java/2003-09/threads.html#00173
...makes me uncomfortable not fixing this in CVS,
especially since we can simply reverse this patch
and use the simple testcase here to reproduce the
problem locally:
http://gcc.gnu.org/ml/java/2003-09/msg00175.html
Even if this patch isn't accepted, its presence on
this list means that people can at least apply it
locally, though I personally am in favor of putting
it in.
Tested on a i686-pc-linux-gnu native compiler with
the aforementioned testcase.
-- Mohan
http://www.thisiscool.com/
http://www.animalsong.org/
ChangeLog
2003-09-16 Mohan Embar <gnustuff@thisiscool.com>
* java/net/DatagramSocketImpl.java: (setOption) Propagated
declaration from java.net.SocketOptions to work around
a gcj Miranda bug
(getOption) likewise
* java/net/SocketImpl.java: (setOption) Propagated
declaration from java.net.SocketOptions to work around
a gcj Miranda bug
(getOption) likewise
Index: java/net/DatagramSocketImpl.java
===================================================================
RCS file: /cvsroot/gcc/gcc/libjava/java/net/DatagramSocketImpl.java,v
retrieving revision 1.14
diff -u -2 -r1.14 DatagramSocketImpl.java
--- java/net/DatagramSocketImpl.java 8 Jun 2003 09:25:54 -0000 1.14
+++ java/net/DatagramSocketImpl.java 16 Sep 2003 07:04:17 -0000
@@ -77,4 +77,13 @@
}
+ // These next two methods are redeclared from SocketOptions to avoid
+ // a Miranda method bug when compiled with gcj
+
+ public abstract void setOption(int optionId, Object val)
+ throws SocketException;
+
+ public abstract Object getOption(int optionId)
+ throws SocketException;
+
/**
* This method binds the socket to the specified local port and address.
Index: java/net/SocketImpl.java
===================================================================
RCS file: /cvsroot/gcc/gcc/libjava/java/net/SocketImpl.java,v
retrieving revision 1.17
diff -u -2 -r1.17 SocketImpl.java
--- java/net/SocketImpl.java 1 Aug 2003 21:08:33 -0000 1.17
+++ java/net/SocketImpl.java 16 Sep 2003 07:04:18 -0000
@@ -94,4 +94,13 @@
}
+ // These next two methods are redeclared from SocketOptions to avoid
+ // a Miranda method bug when compiled with gcj
+
+ public abstract void setOption(int optionId, Object val)
+ throws SocketException;
+
+ public abstract Object getOption(int optionId)
+ throws SocketException;
+
/**
* Creates a new socket that is not bound to any local address/port and