This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Patch: FYI: java.net fix
- From: Tom Tromey <tromey at redhat dot com>
- To: Java Patch List <java-patches at gcc dot gnu dot org>
- Date: 29 Mar 2002 10:06:19 -0700
- Subject: Patch: FYI: java.net fix
- Reply-to: tromey at redhat dot com
I'm checking this in on the trunk and branch. This should fix the
build problem on mingw32.
Adam, thanks for setting up that script. During this release I've
noticed a lot of platforms we ordinarily don't look at are getting
lots of work. It would be easier on me (or whoever works on getting
the release into shape) if this didn't happen. Maybe if we could get
something like Geoff's regression tester running for libgcj on a lot
of platforms, we wouldn't run into this.
I'd eventually like to see some of the #include/#define stuff in
java.net be put into platform.h. If someone is motivated we can do
this on the trunk so it will be in place moving forward.
Tom
from Tom Tromey <tromey@redhat.com>
* java/net/natPlainDatagramSocketImpl.cc (close): New function.
* java/net/natPlainSocketImpl.cc (close): Indentation fix.
Index: java/net/natPlainDatagramSocketImpl.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/net/natPlainDatagramSocketImpl.cc,v
retrieving revision 1.33.2.2
diff -u -r1.33.2.2 natPlainDatagramSocketImpl.cc
--- java/net/natPlainDatagramSocketImpl.cc 2002/03/28 02:36:51 1.33.2.2
+++ java/net/natPlainDatagramSocketImpl.cc 2002/03/29 17:02:13
@@ -8,7 +8,7 @@
#include <config.h>
-#include<platform.h>
+#include <platform.h>
#ifdef WIN32
#include <errno.h>
@@ -16,6 +16,13 @@
#ifndef ENOPROTOOPT
#define ENOPROTOOPT 109
#endif
+
+static inline int
+close(int s)
+{
+ return closesocket(s);
+}
+
#else /* WIN32 */
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
Index: java/net/natPlainSocketImpl.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/net/natPlainSocketImpl.cc,v
retrieving revision 1.30.2.8
diff -u -r1.30.2.8 natPlainSocketImpl.cc
--- java/net/natPlainSocketImpl.cc 2002/03/28 02:36:51 1.30.2.8
+++ java/net/natPlainSocketImpl.cc 2002/03/29 17:02:14
@@ -22,7 +22,8 @@
// These functions make the Win32 socket API look more POSIXy
static inline int
-close(int s) {
+close(int s)
+{
return closesocket(s);
}