This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[PATCH] [MinGW] 3.4: Remove Conditional Compilation from Socket Classes (Updated)
- From: Mohan Embar <gnustuff at thisiscool dot com>
- To: Michael Koch <konqueror at gmx dot de>, Ranjit Mathew <rmathew at hotmail dot com>
- Cc: java-patches at gcc dot gnu dot org
- Date: Mon, 08 Mar 2004 22:25:40 -0600
- Subject: [PATCH] [MinGW] 3.4: Remove Conditional Compilation from Socket Classes (Updated)
- Reply-to: gnustuff at thisiscool dot com
Hi All,
I don't have the time to write an IPv6 test now, so here is an updated
patch which leaves this disabled. Again, this fixes the mcastGrp
problem mentioned off-list and should be less controversial.
-- Mohan
http://www.thisiscool.com/
http://www.animalsong.org/
ChangeLog
2004-03-08 Mohan Embar <gnustuff@thisiscool.com>
* gnu/java/net/natPlainDatagramSocketImplWin32.cc (several):
Removed IPv4-related conditional compilation.
(mcastGrp): Added missing declarations.
Index: gnu/java/net/natPlainDatagramSocketImplWin32.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/gnu/java/net/natPlainDatagramSocketImplWin32.cc,v
retrieving revision 1.7
diff -u -2 -r1.7 natPlainDatagramSocketImplWin32.cc
--- gnu/java/net/natPlainDatagramSocketImplWin32.cc 16 Dec 2003 22:57:06 -0000 1.7
+++ gnu/java/net/natPlainDatagramSocketImplWin32.cc 9 Mar 2004 04:20:45 -0000
@@ -11,9 +11,4 @@
#include <string.h>
-#if HAVE_BSTRING_H
-// Needed for bzero, implicitly used by FD_ZERO on IRIX 5.2
-#include <bstring.h>
-#endif
-
#include <gnu/java/net/PlainDatagramSocketImpl.h>
#include <java/io/IOException.h>
@@ -40,7 +35,5 @@
union McastReq
{
-#if HAVE_STRUCT_IP_MREQ
struct ip_mreq mreq;
-#endif
#if HAVE_STRUCT_IPV6_MREQ
struct ipv6_mreq mreq6;
@@ -407,12 +400,11 @@
{
// FIXME: implement use of NetworkInterface
+ union McastReq u;
jbyteArray haddress = inetaddr->addr;
+ jbyte *bytes = elements (haddress);
int len = haddress->length;
int level, opname;
const char *ptr;
- if (0)
- ;
-#if HAVE_STRUCT_IP_MREQ
- else if (len == 4)
+ if (len == 4)
{
level = IPPROTO_IP;
@@ -425,5 +417,4 @@
ptr = (const char *) &u.mreq;
}
-#endif
#if HAVE_STRUCT_IPV6_MREQ
else if (len == 16)