2002-02-24 Adam Megacz <adam@xwt.org>
authormegacz <megacz@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 25 Feb 2002 04:10:53 +0000 (04:10 +0000)
committermegacz <megacz@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 25 Feb 2002 04:10:53 +0000 (04:10 +0000)
* java/net/natPlainDatagramSocketImpl.cc: Updated #includes
for Win32, changed #ifdefs to check WIN32 instead of the
(now-obsolete) USE_WINSOCK, and removed support for socket
timeouts on Win32 pending further discussion.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@50017 138bc75d-0d04-0410-961f-82ee72b054a4

libjava/ChangeLog
libjava/java/net/natPlainDatagramSocketImpl.cc

index c20386a..9e7044b 100644 (file)
@@ -1,5 +1,12 @@
 2002-02-24  Adam Megacz  <adam@xwt.org>
 
+       * java/net/natPlainDatagramSocketImpl.cc: Updated #includes
+       for Win32, changed #ifdefs to check WIN32 instead of the
+       (now-obsolete) USE_WINSOCK, and removed support for socket
+       timeouts on Win32 pending further discussion.
+
+2002-02-24  Adam Megacz  <adam@xwt.org>
+
        * win32-threads.cc (_Jv_ThreadInitData): _Jv_Malloc instead of new
        * win32-threads.cc (_Jv_ThreadDestroyData): _Jv_Free instead of
        delete
index aedd48b..d582a53 100644 (file)
@@ -8,16 +8,15 @@ details.  */
 
 #include <config.h>
 
-#ifdef USE_WINSOCK
-#include <windows.h>
-#include <winsock.h>
+#include<platform.h>
+
+make #ifdef WIN32
 #include <errno.h>
 #include <string.h>
 #ifndef ENOPROTOOPT
 #define ENOPROTOOPT 109
 #endif
-#else /* USE_WINSOCK */
-#include "posix.h"
+#else /* WIN32 */
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
 #endif
@@ -29,7 +28,7 @@ details.  */
 #endif
 #include <errno.h>
 #include <string.h>
-#endif /* USE_WINSOCK */
+#endif /* WIN32 */
 
 #if HAVE_BSTRING_H
 // Needed for bzero, implicitly used by FD_ZERO on IRIX 5.2 
@@ -328,6 +327,8 @@ java::net::PlainDatagramSocketImpl::receive (java::net::DatagramPacket *p)
   jbyte *dbytes = elements (p->getData());
   ssize_t retlen = 0;
 
+// FIXME: implement timeout support for Win32
+#ifndef WIN32
   // Do timeouts via select since SO_RCVTIMEO is not always available.
   if (timeout > 0)
     {
@@ -343,6 +344,7 @@ java::net::PlainDatagramSocketImpl::receive (java::net::DatagramPacket *p)
       else if (retval == 0)
        throw new java::io::InterruptedIOException ();
     }
+#endif /* WIN32 */
 
   retlen =
     ::recvfrom (fnum, (char *) dbytes, p->getLength(), 0, (sockaddr*) &u,