diff options
author | glewis <glewis@FreeBSD.org> | 2006-07-20 06:34:45 +0800 |
---|---|---|
committer | glewis <glewis@FreeBSD.org> | 2006-07-20 06:34:45 +0800 |
commit | a5569329981058a9ffbf05f9689eb9e21f85619f (patch) | |
tree | 2396e36c35dcc85901f432336397db8015e53a5f | |
parent | 39585cdb4d1df91c980864be841915b314f484e9 (diff) | |
download | freebsd-ports-gnome-a5569329981058a9ffbf05f9689eb9e21f85619f.tar.gz freebsd-ports-gnome-a5569329981058a9ffbf05f9689eb9e21f85619f.tar.zst freebsd-ports-gnome-a5569329981058a9ffbf05f9689eb9e21f85619f.zip |
. Take account of the MFC or the *_r functions to RELENG_6.
Submitted by: ume@
-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) |