[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freebsd-java
Subject:    Re: problem and workaround for java/tomcat on -current
From:       Brent Verner <brent () rcfile ! org>
Date:       2003-02-08 4:17:00
[Download RAW message or body]

[2003-02-07 22:39] Brent Verner said:

| I've simply renamed the gethostby...._r to l_gethostby...._r, and am 
| rebuilding now to verify this theory.  I'll let yall know what the 
| outcome is.

Indeed, applying the attached patch works around the problem.

cheers.
  brent

-- 
"Develop your talent, man, and leave the world something. Records are 
really gifts from people. To think that an artist would love you enough
to share his music with anyone is a beautiful thing."  -- Duane Allman

["InetAddressImpl.c.diff-p7" (text/plain)]

--- j2sdk1.3.1/src/solaris/native/java/net/InetAddressImpl.c.p7	Fri Feb  7 22:17:46 2003
+++ j2sdk1.3.1/src/solaris/native/java/net/InetAddressImpl.c	Fri Feb  7 21:34:23 2003
@@ -34,11 +34,11 @@
 /* forward declarations --billh */
 
 HOST_R_RETURN
-gethostbyname_r(const char *name,  struct hostent *hptr,
+l_gethostbyname_r(const char *name,  struct hostent *hptr,
 		HOST_R_ARGS);
 
 HOST_R_RETURN
-gethostbyaddr_r(const char *addr, int len, int type,
+l_gethostbyaddr_r(const char *addr, int len, int type,
 		struct hostent *hptr,
 		HOST_R_ARGS);
 
@@ -100,14 +100,14 @@
 #ifdef __GLIBC__
 	gethostbyname_r(hostname, &res, buf, sizeof(buf), &hp, &h_error);
 #else
-	hp = gethostbyname_r(hostname, &res, buf, sizeof(buf), &h_error);
+	hp = l_gethostbyname_r(hostname, &res, buf, sizeof(buf), &h_error);
 #endif
 	if (hp) {
 #ifdef __GLIBC__
 	    gethostbyaddr_r(hp->h_addr, hp->h_length, AF_INET,
 			    &res2, buf2, sizeof(buf2), &hp, &h_error);
 #else
-	    hp = gethostbyaddr_r(hp->h_addr, hp->h_length, AF_INET,
+	    hp = l_gethostbyaddr_r(hp->h_addr, hp->h_length, AF_INET,
 				 &res2, buf2, sizeof(buf2), &h_error);
 #endif
 	    if (hp) {
@@ -190,7 +190,7 @@
 #ifdef __GLIBC__
     gethostbyname_r(hostname, &res, buf, sizeof(buf), &hp, &h_error);
 #else    
-    hp = gethostbyname_r(hostname, &res, buf, sizeof(buf), &h_error);
+    hp = l_gethostbyname_r(hostname, &res, buf, sizeof(buf), &h_error);
 #endif
 
     /* With the re-entrant system calls, it's possible that the buffer
@@ -204,7 +204,7 @@
 	    gethostbyname_r(hostname, &res, tmp, BIG_HENT_BUF_SIZE,
 			    &hp, &h_error);
 #else
-	    hp = gethostbyname_r(hostname, &res, tmp, BIG_HENT_BUF_SIZE,
+	    hp = l_gethostbyname_r(hostname, &res, tmp, BIG_HENT_BUF_SIZE,
 				 &h_error);
 #endif
 	}
@@ -284,7 +284,7 @@
     gethostbyaddr_r((char *)&addr, sizeof(addr), AF_INET, &hent,
 		    buf, sizeof(buf), &hp, &h_error);
 #else
-    hp = gethostbyaddr_r((char *)&addr, sizeof(addr), AF_INET, &hent,
+    hp = l_gethostbyaddr_r((char *)&addr, sizeof(addr), AF_INET, &hent,
 			 buf, sizeof(buf), &h_error);
 #endif
     /* With the re-entrant system calls, it's possible that the buffer
@@ -298,7 +298,7 @@
 	    gethostbyaddr_r((char *)&addr, sizeof(addr), AF_INET,
 			    &hent, tmp, BIG_HENT_BUF_SIZE, &hp, &h_error);
 #else
-	    hp = gethostbyaddr_r((char *)&addr, sizeof(addr), AF_INET,
+	    hp = l_gethostbyaddr_r((char *)&addr, sizeof(addr), AF_INET,
 				 &hent, tmp, BIG_HENT_BUF_SIZE, &h_error);
 #endif
 	} else {
@@ -336,7 +336,7 @@
 copy_hostent(struct hostent *, struct hostent *, HOST_R_COPY_ARGS);
 
 HOST_R_RETURN
-gethostbyname_r(const char *name,  struct hostent *hptr, HOST_R_ARGS) {
+l_gethostbyname_r(const char *name,  struct hostent *hptr, HOST_R_ARGS) {
 	struct hostent *he = gethostbyname(name);
 
 	HOST_R_ERRNO;
@@ -348,7 +348,7 @@
 }
 
 HOST_R_RETURN
-gethostbyaddr_r(const char *addr, int len, int type,
+l_gethostbyaddr_r(const char *addr, int len, int type,
 		struct hostent *hptr, HOST_R_ARGS) {
 	struct hostent *he = gethostbyaddr(addr, len, type);
 

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic