summaryrefslogtreecommitdiff
path: root/libjava
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2012-04-06 13:46:26 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2012-04-06 13:46:26 +0000
commit7824b07d328fd39ce7b3fbf74bc5b9c0a5dd953b (patch)
treef97e83403bc29c0d14e06fd06b0aba4fffe3b08d /libjava
parentddd664b45c4574b1cafb12664f33fefc41d84d47 (diff)
downloadgcc-7824b07d328fd39ce7b3fbf74bc5b9c0a5dd953b.tar.gz
2012-04-06 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 186185 using svnmerge 2011-04-06 Basile Starynkevitch <basile@starynkevitch.net> * melt/warmelt-outobj.melt (syntestgen_citerator): Emit a useless test for each body formal, to avoid warnings on the C code. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@186189 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava')
-rw-r--r--libjava/ChangeLog8
-rw-r--r--libjava/gnu/java/net/natPlainDatagramSocketImplPosix.cc2
-rw-r--r--libjava/gnu/java/net/natPlainDatagramSocketImplWin32.cc12
3 files changed, 17 insertions, 5 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index 1477f67d1aa..fa86b07b381 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -1,3 +1,11 @@
+2012-04-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ PR libgcj/52645
+ * gnu/java/net/natPlainDatagramSocketImplPosix.cc (setOption):
+ Restore HAVE_INET6 check.
+ * gnu/java/net/natPlainDatagramSocketImplWin32.cc (setOption):
+ Likewise.
+
2012-03-25 Gerald Pfeifer <gerald@pfeifer.com>
PR libgcj/52694
diff --git a/libjava/gnu/java/net/natPlainDatagramSocketImplPosix.cc b/libjava/gnu/java/net/natPlainDatagramSocketImplPosix.cc
index edec051ef67..6ec9f387793 100644
--- a/libjava/gnu/java/net/natPlainDatagramSocketImplPosix.cc
+++ b/libjava/gnu/java/net/natPlainDatagramSocketImplPosix.cc
@@ -655,6 +655,7 @@ gnu::java::net::PlainDatagramSocketImpl::setOption (jint optID,
len = sizeof (struct in_addr);
ptr = (const char *) &u.addr;
}
+#ifdef HAVE_INET6
else if (len == 16)
{
level = IPPROTO_IPV6;
@@ -663,6 +664,7 @@ gnu::java::net::PlainDatagramSocketImpl::setOption (jint optID,
len = sizeof (struct in6_addr);
ptr = (const char *) &u.addr6;
}
+#endif
else
throw
new ::java::net::SocketException (JvNewStringUTF ("invalid length"));
diff --git a/libjava/gnu/java/net/natPlainDatagramSocketImplWin32.cc b/libjava/gnu/java/net/natPlainDatagramSocketImplWin32.cc
index d659b0b07d1..eb1dd9682aa 100644
--- a/libjava/gnu/java/net/natPlainDatagramSocketImplWin32.cc
+++ b/libjava/gnu/java/net/natPlainDatagramSocketImplWin32.cc
@@ -540,6 +540,7 @@ gnu::java::net::PlainDatagramSocketImpl::setOption (jint optID,
len = sizeof (struct in_addr);
ptr = (const char *) &u.addr;
}
+#ifdef HAVE_INET6
else if (len == 16)
{
level = IPPROTO_IPV6;
@@ -548,6 +549,7 @@ gnu::java::net::PlainDatagramSocketImpl::setOption (jint optID,
len = sizeof (struct in6_addr);
ptr = (const char *) &u.addr6;
}
+#endif
else
throw
new ::java::net::SocketException (JvNewStringUTF ("invalid length"));
@@ -635,14 +637,14 @@ gnu::java::net::PlainDatagramSocketImpl::getOption (jint optID)
goto error;
if (u.address.sin_family == AF_INET)
{
- laddr = JvNewByteArray (4);
- memcpy (elements (laddr), &u.address.sin_addr, 4);
+ laddr = JvNewByteArray (4);
+ memcpy (elements (laddr), &u.address.sin_addr, 4);
}
#ifdef HAVE_INET6
- else if (u.address.sin_family == AF_INET6)
+ else if (u.address.sin_family == AF_INET6)
{
- laddr = JvNewByteArray (16);
- memcpy (elements (laddr), &u.address6.sin6_addr, 16);
+ laddr = JvNewByteArray (16);
+ memcpy (elements (laddr), &u.address6.sin6_addr, 16);
}
#endif
else