configure: Rebuilt.
* configure: Rebuilt. * configure.in: Set classpath when invoking gcj. Use changequote around sed invocation. * java/net/natPlainSocketImpl.cc: Stub native functions if DISABLE_JAVA_NET is defined. * java/net/natPlainDatagramSocketImpl.cc (setTimeToLive): Fixed typo in exception string. (getTimeToLive): Likewise. Stub native functions if DISABLE_JAVA_NET is defined. * java/net/natInetAddress.cc: Stub native functions if DISABLE_JAVA_NET is defined. * configure.host: Disable java.net for mips-tx39. * configure, include/config.h.in: Rebuilt. * acconfig.h (DISABLE_JAVA_NET): Undefine. * configure.in: Added --disable-java-net and new define `DISABLE_JAVA_NET'. From-SVN: r29759
This commit is contained in:
parent
95f1a0447f
commit
4b68fe8a36
9 changed files with 414 additions and 210 deletions
|
@ -49,6 +49,28 @@ details. */
|
|||
extern "C" int gethostname (char *name, int namelen);
|
||||
#endif
|
||||
|
||||
#ifdef DISABLE_JAVA_NET
|
||||
|
||||
jbyteArray
|
||||
java::net::InetAddress::aton (jstring)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
JArray<java::net::InetAddress*> *
|
||||
java::net::InetAddress::lookup (jstring, java::net::InetAddress *, jboolean)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
jstring
|
||||
java::net::InetAddress::getLocalHostname ()
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#else /* DISABLE_JAVA_NET */
|
||||
|
||||
jbyteArray
|
||||
java::net::InetAddress::aton (jstring host)
|
||||
{
|
||||
|
@ -300,3 +322,5 @@ java::net::InetAddress::getLocalHostname ()
|
|||
// anyway, thanks to the InetAddress.localhost cache.
|
||||
return JvNewStringUTF (chars);
|
||||
}
|
||||
|
||||
#endif /* DISABLE_JAVA_NET */
|
||||
|
|
|
@ -47,6 +47,71 @@ details. */
|
|||
#include <java/lang/Boolean.h>
|
||||
#include <java/lang/Integer.h>
|
||||
|
||||
#ifdef DISABLE_JAVA_NET
|
||||
|
||||
void
|
||||
java::net::PlainDatagramSocketImpl::create ()
|
||||
{
|
||||
JvThrow (new SocketException (JvNewStringLatin1 ("DatagramSocketImpl.create: unimplemented")));
|
||||
}
|
||||
|
||||
void
|
||||
java::net::PlainDatagramSocketImpl::bind (jint, java::net::InetAddress *)
|
||||
{
|
||||
JvThrow (new BindException (JvNewStringLatin1 ("DatagramSocketImpl.bind: unimplemented")));
|
||||
}
|
||||
|
||||
jint
|
||||
java::net::PlainDatagramSocketImpl::peek (java::net::InetAddress *)
|
||||
{
|
||||
JvThrow (new java::io::IOException (JvNewStringLatin1 ("DatagramSocketImpl.peek: unimplemented")));
|
||||
}
|
||||
|
||||
void
|
||||
java::net::PlainDatagramSocketImpl::send (java::net::DatagramPacket *)
|
||||
{
|
||||
JvThrow (new java::io::IOException (JvNewStringLatin1 ("DatagramSocketImpl.send: unimplemented")));
|
||||
}
|
||||
|
||||
void
|
||||
java::net::PlainDatagramSocketImpl::receive (java::net::DatagramPacket *)
|
||||
{
|
||||
JvThrow (new java::io::IOException (JvNewStringLatin1 ("DatagramSocketImpl.receive: unimplemented")));
|
||||
}
|
||||
|
||||
void
|
||||
java::net::PlainDatagramSocketImpl::setTimeToLive (jint)
|
||||
{
|
||||
JvThrow (new java::io::IOException (JvNewStringLatin1 ("DatagramSocketImpl.setTimeToLive: unimplemented")));
|
||||
}
|
||||
|
||||
jint
|
||||
java::net::PlainDatagramSocketImpl::getTimeToLive ()
|
||||
{
|
||||
JvThrow (new java::io::IOException (JvNewStringLatin1 ("DatagramSocketImpl.getTimeToLive: unimplemented")));
|
||||
}
|
||||
|
||||
void
|
||||
java::net::PlainDatagramSocketImpl::mcastGrp (java::net::InetAddress *,
|
||||
jboolean)
|
||||
{
|
||||
JvThrow (new java::io::IOException (JvNewStringLatin1 ("DatagramSocketImpl.mcastGrp: unimplemented")));
|
||||
}
|
||||
|
||||
void
|
||||
java::net::PlainDatagramSocketImpl::setOption (jint, java::lang::Object *)
|
||||
{
|
||||
JvThrow (new SocketException (JvNewStringLatin1 ("DatagramSocketImpl.setOption: unimplemented")));
|
||||
}
|
||||
|
||||
java::lang::Object *
|
||||
java::net::PlainDatagramSocketImpl::getOption (jint)
|
||||
{
|
||||
JvThrow (new SocketException (JvNewStringLatin1 ("DatagramSocketImpl.getOption: unimplemented")));
|
||||
}
|
||||
|
||||
#else /* DISABLE_JAVA_NET */
|
||||
|
||||
#ifndef HAVE_SOCKLEN_T
|
||||
typedef int socklen_t;
|
||||
#endif
|
||||
|
@ -296,7 +361,7 @@ java::net::PlainDatagramSocketImpl::setTimeToLive (jint ttl)
|
|||
|
||||
char msg[100];
|
||||
char* strerr = strerror (errno);
|
||||
sprintf (msg, "DatagramSocketImpl.setTimeToLime: %.*s", 80, strerr);
|
||||
sprintf (msg, "DatagramSocketImpl.setTimeToLive: %.*s", 80, strerr);
|
||||
JvThrow (new java::io::IOException (JvNewStringUTF (msg)));
|
||||
}
|
||||
|
||||
|
@ -311,7 +376,7 @@ java::net::PlainDatagramSocketImpl::getTimeToLive ()
|
|||
|
||||
char msg[100];
|
||||
char* strerr = strerror (errno);
|
||||
sprintf (msg, "DatagramSocketImpl.setTimeToLime: %.*s", 80, strerr);
|
||||
sprintf (msg, "DatagramSocketImpl.getTimeToLive: %.*s", 80, strerr);
|
||||
JvThrow (new java::io::IOException (JvNewStringUTF (msg)));
|
||||
}
|
||||
|
||||
|
@ -573,3 +638,5 @@ java::net::PlainDatagramSocketImpl::getOption (jint optID)
|
|||
sprintf (msg, "DatagramSocketImpl.getOption: %.*s", 80, strerr);
|
||||
JvThrow (new java::net::SocketException (JvNewStringUTF (msg)));
|
||||
}
|
||||
|
||||
#endif /* DISABLE_JAVA_NET */
|
||||
|
|
|
@ -41,6 +41,52 @@ details. */
|
|||
#include <java/lang/Class.h>
|
||||
#include <java/lang/Integer.h>
|
||||
|
||||
#ifdef DISABLE_JAVA_NET
|
||||
|
||||
void
|
||||
java::net::PlainSocketImpl::create (jboolean)
|
||||
{
|
||||
JvThrow (new java::io::IOException (JvNewStringLatin1 ("SocketImpl.create: unimplemented")));
|
||||
}
|
||||
|
||||
void
|
||||
java::net::PlainSocketImpl::bind (java::net::InetAddress *, jint)
|
||||
{
|
||||
JvThrow (new BindException (JvNewStringLatin1 ("SocketImpl.bind: unimplemented")));
|
||||
}
|
||||
|
||||
void
|
||||
java::net::PlainSocketImpl::connect (java::net::InetAddress *, jint)
|
||||
{
|
||||
JvThrow (new ConnectException (JvNewStringLatin1 ("SocketImpl.connect: unimplemented")));
|
||||
}
|
||||
|
||||
void
|
||||
java::net::PlainSocketImpl::listen (jint)
|
||||
{
|
||||
JvThrow (new java::io::IOException (JvNewStringLatin1 ("SocketImpl.listen: unimplemented")));
|
||||
}
|
||||
|
||||
void
|
||||
java::net::PlainSocketImpl::accept (java::net::PlainSocketImpl *)
|
||||
{
|
||||
JvThrow (new java::io::IOException (JvNewStringLatin1 ("SocketImpl.accept: unimplemented")));
|
||||
}
|
||||
|
||||
void
|
||||
java::net::PlainSocketImpl::setOption (jint, java::lang::Object *)
|
||||
{
|
||||
JvThrow (new SocketException (JvNewStringLatin1 ("SocketImpl.setOption: unimplemented")));
|
||||
}
|
||||
|
||||
java::lang::Object *
|
||||
java::net::PlainSocketImpl::getOption (jint)
|
||||
{
|
||||
JvThrow (new SocketException (JvNewStringLatin1 ("SocketImpl.create: unimplemented")));
|
||||
}
|
||||
|
||||
#else /* DISABLE_JAVA_NET */
|
||||
|
||||
#ifndef HAVE_SOCKLEN_T
|
||||
typedef int socklen_t;
|
||||
#endif
|
||||
|
@ -422,3 +468,5 @@ java::net::PlainSocketImpl::getOption (jint optID)
|
|||
sprintf (msg, "SocketImpl.getOption: %.*s", 80, strerr);
|
||||
JvThrow (new java::net::SocketException (JvNewStringUTF (msg)));
|
||||
}
|
||||
|
||||
#endif /* DISABLE_JAVA_NET */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue