diff options
author | Greg Lewis <glewis@FreeBSD.org> | 2006-07-19 22:34:45 +0000 |
---|---|---|
committer | Greg Lewis <glewis@FreeBSD.org> | 2006-07-19 22:34:45 +0000 |
commit | 8f6e64f785a6152df02532db53c4b0c6b28a269b (patch) | |
tree | f33561770b556ad3eb3a6d8ff16a1ecfb91c2916 /java/jdk13 | |
parent | Update to SRC680_m177 (diff) |
. Take account of the MFC or the *_r functions to RELENG_6.
Submitted by: ume@
Notes
Notes:
svn path=/head/; revision=168277
Diffstat (limited to 'java/jdk13')
-rw-r--r-- | java/jdk13/files/patch-InetAddressImpl.c | 50 |
1 files changed, 32 insertions, 18 deletions
diff --git a/java/jdk13/files/patch-InetAddressImpl.c b/java/jdk13/files/patch-InetAddressImpl.c index e54f3f3181c3..d4fb31a30eb1 100644 --- a/java/jdk13/files/patch-InetAddressImpl.c +++ b/java/jdk13/files/patch-InetAddressImpl.c @@ -1,15 +1,16 @@ $FreeBSD$ ---- ../src/solaris/native/java/net/InetAddressImpl.c.orig Tue Jun 6 14:38:22 2006 -+++ ../src/solaris/native/java/net/InetAddressImpl.c Tue Jun 6 15:13:29 2006 -@@ -26,9 +26,13 @@ +--- ../src/solaris/native/java/net/InetAddressImpl.c.orig Wed Jul 19 01:28:19 2006 ++++ ../src/solaris/native/java/net/InetAddressImpl.c Wed Jul 19 10:59:54 2006 +@@ -26,9 +26,14 @@ #include "java_net_InetAddressImpl.h" #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) +#include <sys/param.h> +#endif + -+#if (defined(__FreeBSD__) && __FreeBSD_version < 700016) || \ ++#if (defined(__FreeBSD__) && (__FreeBSD_version < 601103 || \ ++ (__FreeBSD_version >= 700000 && __FreeBSD_version < 700016))) || \ + defined(__NetBSD__) || defined(__OpenBSD__) /* reentrant BIND includes --billh */ @@ -17,66 +18,79 @@ $FreeBSD$ #include <port_before.h> #include <port_after.h> -@@ -100,7 +104,7 @@ Java_java_net_InetAddressImpl_getLocalHo +@@ -100,7 +105,9 @@ Java_java_net_InetAddressImpl_getLocalHo char buf2[HENT_BUF_SIZE]; int h_error=0; -#ifdef __GLIBC__ -+#if defined(__GLIBC__) || (defined(__FreeBSD__) && __FreeBSD_version >= 700016) ++#if defined(__GLIBC__) || \ ++ (defined(__FreeBSD__) && (__FreeBSD_version >= 700016 || \ ++ (__FreeBSD_version < 700000 && __FreeBSD_version >= 601103))) gethostbyname_r(hostname, &res, buf, sizeof(buf), &hp, &h_error); #elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) hp = __j_gethostbyname_r(hostname, &res, buf, sizeof(buf), &h_error); -@@ -108,7 +112,7 @@ Java_java_net_InetAddressImpl_getLocalHo +@@ -108,7 +115,9 @@ Java_java_net_InetAddressImpl_getLocalHo hp = gethostbyname_r(hostname, &res, buf, sizeof(buf), &h_error); #endif if (hp) { -#ifdef __GLIBC__ -+#if defined(__GLIBC__) || (defined(__FreeBSD__) && __FreeBSD_version >= 700016) ++#if defined(__GLIBC__) || \ ++ (defined(__FreeBSD__) && (__FreeBSD_version >= 700016 || \ ++ (__FreeBSD_version < 700000 && __FreeBSD_version >= 601103))) gethostbyaddr_r(hp->h_addr, hp->h_length, AF_INET, &res2, buf2, sizeof(buf2), &hp, &h_error); #elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) -@@ -195,7 +199,7 @@ Java_java_net_InetAddressImpl_lookupAllH +@@ -195,7 +204,9 @@ Java_java_net_InetAddressImpl_lookupAllH hostname = JNU_GetStringPlatformChars(env, host, JNI_FALSE); /* Try once, with our static buffer. */ -#ifdef __GLIBC__ -+#if defined(__GLIBC__) || (defined(__FreeBSD__) && __FreeBSD_version >= 700016) ++#if defined(__GLIBC__) || \ ++ (defined(__FreeBSD__) && (__FreeBSD_version >= 700016 || \ ++ (__FreeBSD_version < 700000 && __FreeBSD_version >= 601103))) gethostbyname_r(hostname, &res, buf, sizeof(buf), &hp, &h_error); #elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) hp = __j_gethostbyname_r(hostname, &res, buf, sizeof(buf), &h_error); -@@ -210,7 +214,7 @@ Java_java_net_InetAddressImpl_lookupAllH +@@ -210,7 +221,9 @@ Java_java_net_InetAddressImpl_lookupAllH */ if (hp == NULL && errno == ERANGE) { if ((tmp = (char*)malloc(BIG_HENT_BUF_SIZE))) { -#ifdef __GLIBC__ -+#if defined(__GLIBC__) || (defined(__FreeBSD__) && __FreeBSD_version >= 700016) ++#if defined(__GLIBC__) || \ ++ (defined(__FreeBSD__) && (__FreeBSD_version >= 700016 || \ ++ (__FreeBSD_version < 700000 && __FreeBSD_version >= 601103))) gethostbyname_r(hostname, &res, tmp, BIG_HENT_BUF_SIZE, &hp, &h_error); #elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) -@@ -293,7 +297,7 @@ Java_java_net_InetAddressImpl_getHostByA +@@ -293,7 +306,9 @@ Java_java_net_InetAddressImpl_getHostByA * */ addr = htonl(addr); -#ifdef __GLIBC__ -+#if defined(__GLIBC__) || (defined(__FreeBSD__) && __FreeBSD_version >= 700016) ++#if defined(__GLIBC__) || \ ++ (defined(__FreeBSD__) && (__FreeBSD_version >= 700016 || \ ++ (__FreeBSD_version < 700000 && __FreeBSD_version >= 601103))) gethostbyaddr_r((char *)&addr, sizeof(addr), AF_INET, &hent, buf, sizeof(buf), &hp, &h_error); #elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) -@@ -310,7 +314,7 @@ Java_java_net_InetAddressImpl_getHostByA +@@ -310,7 +325,9 @@ Java_java_net_InetAddressImpl_getHostByA */ if (hp == NULL && errno == ERANGE) { if ((tmp = (char*)malloc(BIG_HENT_BUF_SIZE))) { -#ifdef __GLIBC__ -+#if defined(__GLIBC__) || (defined(__FreeBSD__) && __FreeBSD_version >= 700016) ++#if defined(__GLIBC__) || \ ++ (defined(__FreeBSD__) && (__FreeBSD_version >= 700016 || \ ++ (__FreeBSD_version < 700000 && __FreeBSD_version >= 601103))) gethostbyaddr_r((char *)&addr, sizeof(addr), AF_INET, &hent, tmp, BIG_HENT_BUF_SIZE, &hp, &h_error); #elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) -@@ -338,7 +342,8 @@ Java_java_net_InetAddressImpl_getHostByA +@@ -338,7 +355,9 @@ Java_java_net_InetAddressImpl_getHostByA /* =============================== */ -#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) -+#if (defined(__FreeBSD__) && __FreeBSD_version < 700016) || \ ++#if (defined(__FreeBSD__) && (__FreeBSD_version < 601103 || \ ++ (__FreeBSD_version >= 700000 && __FreeBSD_version < 700016))) || \ + defined(__NetBSD__) || defined(__OpenBSD__) #if defined(LIBC_SCCS) && !defined(lint) |