This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Patch: Fix DISABLE_JAVA_NET
- From: Anthony Green <green at cygnus dot com>
- To: java-patches at gcc dot gnu dot org
- Date: Wed, 6 Feb 2002 07:19:57 -0800 (PST)
- Subject: Patch: Fix DISABLE_JAVA_NET
- Reply-to: green at redhat dot com
The networking code was recently updated without having updated
DISABLE_JAVA_NET builds. Ok?
2002-02-06 Anthony Green <green@redhat.com>
* java/net/natPlainSocketImpl.cc: Fix DISABLE_JAVA_NET targets.
Implement missing method stubs.
java/net/natPlainDatagramSocketImpl.cc: Fix DISABLE_JAVA_NET
targets.
Index: java/net/natPlainDatagramSocketImpl.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/net/natPlainDatagramSocketImpl.cc,v
retrieving revision 1.29
diff -c -r1.29 natPlainDatagramSocketImpl.cc
*** natPlainDatagramSocketImpl.cc 2001/08/01 17:53:00 1.29
--- natPlainDatagramSocketImpl.cc 2002/02/06 14:55:31
***************
*** 36,41 ****
--- 36,42 ----
#include <bstring.h>
#endif
+ #ifndef DISABLE_JAVA_NET
// Avoid macro definitions of bind from system headers, e.g. on
// Solaris 7 with _XOPEN_SOURCE. FIXME
static inline int
***************
*** 43,48 ****
--- 44,50 ----
{
return ::bind (fd, addr, addrlen);
}
+ #endif /* DISABLE_JAVA_NET */
#ifdef bind
#undef bind
Index: java/net/natPlainSocketImpl.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/net/natPlainSocketImpl.cc,v
retrieving revision 1.29
diff -c -r1.29 natPlainSocketImpl.cc
*** natPlainSocketImpl.cc 2002/01/30 22:22:36 1.29
--- natPlainSocketImpl.cc 2002/02/06 14:55:31
***************
*** 37,42 ****
--- 37,44 ----
typedef int socklen_t;
#endif
+ #ifndef DISABLE_JAVA_NET
+
// Avoid macro definitions of bind, connect from system headers, e.g. on
// Solaris 7 with _XOPEN_SOURCE. FIXME
static inline int
***************
*** 79,84 ****
--- 81,87 ----
{
return recv_func ((T_fd) s, (T_buf) buf, (T_len) len, (T_flags) flags);
}
+ #endif /* DISABLE_JAVA_NET */
#include <gcj/cni.h>
#include <gcj/javaprims.h>
***************
*** 149,154 ****
--- 152,199 ----
{
throw new SocketException (
JvNewStringLatin1 ("SocketImpl.getOption: unimplemented"));
+ }
+
+ jint
+ java::net::PlainSocketImpl::read(void)
+ {
+ throw new SocketException (
+ JvNewStringLatin1 ("SocketImpl.read: unimplemented"));
+ }
+
+ jint
+ java::net::PlainSocketImpl::read(jbyteArray buffer, jint offset, jint count)
+ {
+ throw new SocketException (
+ JvNewStringLatin1 ("SocketImpl.read: unimplemented"));
+ }
+
+ void
+ java::net::PlainSocketImpl::write(jint b)
+ {
+ throw new SocketException (
+ JvNewStringLatin1 ("SocketImpl.write: unimplemented"));
+ }
+
+ void
+ java::net::PlainSocketImpl::write(jbyteArray b, jint offset, jint len)
+ {
+ throw new SocketException (
+ JvNewStringLatin1 ("SocketImpl.write: unimplemented"));
+ }
+
+ jint
+ java::net::PlainSocketImpl::available(void)
+ {
+ throw new SocketException (
+ JvNewStringLatin1 ("SocketImpl.available: unimplemented"));
+ }
+
+ void
+ java::net::PlainSocketImpl::close(void)
+ {
+ throw new SocketException (
+ JvNewStringLatin1 ("SocketImpl.close: unimplemented"));
}
#else /* DISABLE_JAVA_NET */
--
Anthony Green Red Hat
Sunnyvale, California