natServerSocketChannelImpl.cc: Removed.
authorMichael Koch <konqueror@gmx.de>
Fri, 14 Feb 2003 12:07:31 +0000 (12:07 +0000)
committerMichael Koch <mkoch@gcc.gnu.org>
Fri, 14 Feb 2003 12:07:31 +0000 (12:07 +0000)
2003-02-14  Michael Koch  <konqueror@gmx.de>

* gnu/java/nio/natServerSocketChannelImpl.cc: Removed.
* gnu/java/nio/ServerSocketChannelImpl.java
(SocketAccept): Removed.
(accept): Commented out use of SocketAccept.

From-SVN: r62898

libjava/ChangeLog
libjava/gnu/java/nio/ServerSocketChannelImpl.java
libjava/gnu/java/nio/natServerSocketChannelImpl.cc [deleted file]

index e53a2e7ff122b816566675f301ab2111090a626e..484b5fccd5eb35083acfc4013af552ce83f99bc8 100644 (file)
@@ -1,3 +1,10 @@
+2003-02-14  Michael Koch  <konqueror@gmx.de>
+
+       * gnu/java/nio/natServerSocketChannelImpl.cc: Removed.
+       * gnu/java/nio/ServerSocketChannelImpl.java
+       (SocketAccept): Removed.
+       (accept): Commented out use of SocketAccept.
+
 2003-02-13  Tom Tromey  <tromey@redhat.com>
 
        * verify.cc (state::seen_subrs): New field.
index d68109326842d34c288a90241cefdeba15e9a025..039b50308d60b5d74491ee0c074b055588fb17c4 100644 (file)
@@ -54,9 +54,6 @@ class ServerSocketChannelImpl extends ServerSocketChannel
   boolean connected = false;
 //   InetSocketAddress sa;
 
-  private static native int SocketAccept (ServerSocketChannelImpl server,
-                                          SocketChannelImpl s);
-
   protected ServerSocketChannelImpl (SelectorProvider provider)
     throws IOException
   {
@@ -103,7 +100,7 @@ class ServerSocketChannelImpl extends ServerSocketChannel
   {
     SocketChannelImpl result = new SocketChannelImpl (provider ());
     result.sa = new InetSocketAddress (0);
-    int res = SocketAccept (this,result);
+    //int res = SocketAccept (this,result);
     return result;
   }
 
diff --git a/libjava/gnu/java/nio/natServerSocketChannelImpl.cc b/libjava/gnu/java/nio/natServerSocketChannelImpl.cc
deleted file mode 100644 (file)
index 1f7d7fc..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-// natSelectorImpl.cc
-
-/* Copyright (C) 2002  Free Software Foundation
-
-   This file is part of libgcj.
-
-This software is copyrighted work licensed under the terms of the
-Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
-details.  */
-
-#include <config.h>
-#include <platform.h>
-
-#include <errno.h>
-#include <netinet/in.h>
-
-#include <gcj/cni.h>
-#include <gnu/java/nio/ServerSocketChannelImpl.h>
-#include <gnu/java/nio/SocketChannelImpl.h>
-#include <java/io/IOException.h>
-#include <java/net/InetSocketAddress.h>
-#include <java/net/SocketException.h>
-
-union SockAddr
-{
-  struct sockaddr_in address;
-#ifdef HAVE_INET6
-  struct sockaddr_in6 address6;
-#endif
-};
-
-jint
-gnu::java::nio::ServerSocketChannelImpl::SocketAccept (
-                                           ServerSocketChannelImpl* socket,
-                                           SocketChannelImpl* s)
-{
-  union SockAddr u;
-  struct sockaddr *ptr = (struct sockaddr *) &u.address;
-  socklen_t addrlen = sizeof(struct sockaddr);
-/*
-  jbyteArray haddress = socket->sa->getAddress ()->addr;
-  jbyte *bytes = elements (haddress);
-  int len = haddress->length;
-
-  if (len == 4)
-    {
-      u.address.sin_family = AF_INET;
-      memcpy (&u.address.sin_addr, bytes, len);
-      len = sizeof (struct sockaddr_in);
-      u.address.sin_port = htons ( socket->sa->getPort ());
-    }
-#ifdef HAVE_INET6
-  else if (len == 16)
-    {
-      u.address6.sin6_family = AF_INET6;
-      memcpy (&u.address6.sin6_addr, bytes, len);
-      len = sizeof (struct sockaddr_in6);
-      u.address6.sin6_port = htons (socket->sa->getPort ());
-    }
-#endif
-  else
-    throw new ::java::net::SocketException (JvNewStringUTF ("invalid length"));
-*/
-
-  int sock = _Jv_accept (socket->fd, ptr, &addrlen);
-
-  // FIXME: write address/port in ptr into java variables
-
-  if (sock < 0)
-    {
-      char* strerr = strerror (errno);
-      throw new ::java::io::IOException (JvNewStringUTF (strerr));
-    }
-
-  s->fd = sock;
-  return sock;
-}