natInetAddressWin32.cc, [...]: Readded code enclosed in DISABLE_JAVA_NET defines in preparation for MinGW...

* java/net/natInetAddressWin32.cc,
	java/net/natNetworkInterfaceWin32.cc,
	java/net/natPlainDatagramSocketImplWin32.cc,
	java/net/natPlainSocketImplWin32.cc:
	Readded code enclosed in DISABLE_JAVA_NET defines
	in preparation for MinGW cleanup / networking
	patch

From-SVN: r70902
This commit is contained in:
Mohan Embar 2003-08-29 04:13:04 +00:00 committed by Mohan Embar
parent 0b3f3d2213
commit a1d6cdc2d7
5 changed files with 281 additions and 0 deletions

View File

@ -1,3 +1,13 @@
2003-08-28 Mohan Embar <gnustuff@thisiscool.com>
* java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplWin32.cc:
Readded code enclosed in DISABLE_JAVA_NET defines
in preparation for MinGW cleanup / networking
patch
2003-08-28 Mohan Embar <gnustuff@thisiscool.com>
* Makefile.am: Fixed problems with parallel makes.

View File

@ -57,6 +57,34 @@ details. */
extern "C" int gethostname (char *name, int namelen);
#endif
#ifdef DISABLE_JAVA_NET
jbyteArray
java::net::InetAddress::aton (jstring)
{
return NULL;
}
jint
java::net::InetAddress::getFamily (jbyteArray bytes)
{
return 0;
}
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)
{
@ -323,3 +351,5 @@ java::net::InetAddress::getLocalHostname ()
// anyway, thanks to the InetAddress.localhost cache.
return JvNewStringUTF (chars);
}
#endif /* DISABLE_JAVA_NET */

View File

@ -52,6 +52,17 @@ details. */
#include <java/net/SocketException.h>
#include <java/util/Vector.h>
#ifdef DISABLE_JAVA_NET
::java::util::Vector*
java::net::NetworkInterface::getRealNetworkInterfaces ()
{
::java::util::Vector* ht = new ::java::util::Vector();
return ht;
}
#else /* DISABLE_JAVA_NET */
::java::util::Vector*
java::net::NetworkInterface::getRealNetworkInterfaces ()
{
@ -127,3 +138,5 @@ java::net::NetworkInterface::getRealNetworkInterfaces ()
return ht;
#endif /* WIN32 */
}
#endif // DISABLE_JAVA_NET //

View File

@ -47,6 +47,111 @@ details. */
#include <java/lang/Boolean.h>
#include <java/lang/Integer.h>
#ifdef DISABLE_JAVA_NET
void
java::net::PlainDatagramSocketImpl::create ()
{
throw new SocketException (
JvNewStringLatin1 ("DatagramSocketImpl.create: unimplemented"));
}
void
java::net::PlainDatagramSocketImpl::bind (jint, java::net::InetAddress *)
{
throw new BindException (
JvNewStringLatin1 ("DatagramSocketImpl.bind: unimplemented"));
}
void
java::net::PlainDatagramSocketImpl::connect (java::net::InetAddress *, jint)
{
throw new SocketException (
JvNewStringLatin1 ("DatagramSocketImpl.connect: unimplemented"));
}
void
java::net::PlainDatagramSocketImpl::disconnect ()
{
throw new SocketException (
JvNewStringLatin1 ("DatagramSocketImpl.disconnect: unimplemented"));
}
jint
java::net::PlainDatagramSocketImpl::peek (java::net::InetAddress *)
{
throw new java::io::IOException (
JvNewStringLatin1 ("DatagramSocketImpl.peek: unimplemented"));
}
jint
java::net::PlainDatagramSocketImpl::peekData(java::net::DatagramPacket *)
{
throw new java::io::IOException (
JvNewStringLatin1 ("DatagramSocketImpl.peekData: unimplemented"));
}
void
java::net::PlainDatagramSocketImpl::close ()
{
throw new java::io::IOException (
JvNewStringLatin1 ("DatagramSocketImpl.close: unimplemented"));
}
void
java::net::PlainDatagramSocketImpl::send (java::net::DatagramPacket *)
{
throw new java::io::IOException (
JvNewStringLatin1 ("DatagramSocketImpl.send: unimplemented"));
}
void
java::net::PlainDatagramSocketImpl::receive (java::net::DatagramPacket *)
{
throw new java::io::IOException (
JvNewStringLatin1 ("DatagramSocketImpl.receive: unimplemented"));
}
void
java::net::PlainDatagramSocketImpl::setTimeToLive (jint)
{
throw new java::io::IOException (
JvNewStringLatin1 ("DatagramSocketImpl.setTimeToLive: unimplemented"));
}
jint
java::net::PlainDatagramSocketImpl::getTimeToLive ()
{
throw new java::io::IOException (
JvNewStringLatin1 ("DatagramSocketImpl.getTimeToLive: unimplemented"));
}
void
java::net::PlainDatagramSocketImpl::mcastGrp (java::net::InetAddress *,
java::net::NetworkInterface *,
jboolean)
{
throw new java::io::IOException (
JvNewStringLatin1 ("DatagramSocketImpl.mcastGrp: unimplemented"));
}
void
java::net::PlainDatagramSocketImpl::setOption (jint, java::lang::Object *)
{
throw new SocketException (
JvNewStringLatin1 ("DatagramSocketImpl.setOption: unimplemented"));
}
java::lang::Object *
java::net::PlainDatagramSocketImpl::getOption (jint)
{
throw new SocketException (
JvNewStringLatin1 ("DatagramSocketImpl.getOption: unimplemented"));
}
#else /* DISABLE_JAVA_NET */
union SockAddr
{
struct sockaddr_in address;
@ -763,3 +868,5 @@ java::net::PlainDatagramSocketImpl::getOption (jint optID)
char* strerr = strerror (errno);
throw new java::net::SocketException (JvNewStringUTF (strerr));
}
#endif /* DISABLE_JAVA_NET */

View File

@ -9,6 +9,8 @@ details. */
#include <config.h>
#include <platform.h>
#ifndef DISABLE_JAVA_NET
#ifdef WIN32
#include <windows.h>
@ -52,6 +54,7 @@ read(int s, void *buf, int len)
#include <string.h>
#endif /* WIN32 */
#endif /* DISABLE_JAVA_NET */
#if HAVE_BSTRING_H
// Needed for bzero, implicitly used by FD_ZERO on IRIX 5.2
@ -80,6 +83,122 @@ read(int s, void *buf, int len)
#include <java/lang/ArrayIndexOutOfBoundsException.h>
#include <java/lang/IllegalArgumentException.h>
#ifdef DISABLE_JAVA_NET
void
java::net::PlainSocketImpl::create (jboolean)
{
throw new java::io::IOException (
JvNewStringLatin1 ("SocketImpl.create: unimplemented"));
}
void
java::net::PlainSocketImpl::bind (java::net::InetAddress *, jint)
{
throw new BindException (
JvNewStringLatin1 ("SocketImpl.bind: unimplemented"));
}
void
java::net::PlainSocketImpl::connect (java::net::SocketAddress *, jint)
{
throw new ConnectException (
JvNewStringLatin1 ("SocketImpl.connect: unimplemented"));
}
void
java::net::PlainSocketImpl::listen (jint)
{
throw new java::io::IOException (
JvNewStringLatin1 ("SocketImpl.listen: unimplemented"));
}
void
java::net::PlainSocketImpl::accept (java::net::PlainSocketImpl *)
{
throw new java::io::IOException (
JvNewStringLatin1 ("SocketImpl.accept: unimplemented"));
}
void
java::net::PlainSocketImpl::setOption (jint, java::lang::Object *)
{
throw new SocketException (
JvNewStringLatin1 ("SocketImpl.setOption: unimplemented"));
}
java::lang::Object *
java::net::PlainSocketImpl::getOption (jint)
{
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"));
}
void
java::net::PlainSocketImpl::sendUrgentData(jint data)
{
throw new SocketException (
JvNewStringLatin1 ("SocketImpl.sendUrgentData: 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"));
}
void
java::net::PlainSocketImpl::shutdownInput (void)
{
throw new SocketException (
JvNewStringLatin1 ("SocketImpl.shutdownInput: unimplemented"));
}
void
java::net::PlainSocketImpl::shutdownOutput (void)
{
throw new SocketException (
JvNewStringLatin1 ("SocketImpl.shutdownOutput: unimplemented"));
}
#else /* DISABLE_JAVA_NET */
union SockAddr
{
struct sockaddr_in address;
@ -896,3 +1015,5 @@ java::net::PlainSocketImpl::shutdownOutput (void)
if (::shutdown (fnum, 1))
throw new SocketException (JvNewStringUTF (strerror (errno)));
}
#endif /* DISABLE_JAVA_NET */