Bug 329807: set USE_IPV6=1 (define _PR_INET6) on HP-UX B.11.23 or later, NSPR_4_6_BRANCH
authorwtchang%redhat.com
Thu, 18 Jan 2007 23:44:32 +0000
branchNSPR_4_6_BRANCH
changeset 3798 c75d544cbc16e88d93e9ca51986edbe5595b7d4b
parent 3797 a8655893246fb5fa43fc25d5a627d2ed532545a8
child 3801 9570c448073b2b19bd895e5c0495c5e8a4568fbe
push idunknown
push userunknown
push dateunknown
bugs329807
Bug 329807: set USE_IPV6=1 (define _PR_INET6) on HP-UX B.11.23 or later, based on information from HP. r=nelsonb,darin Modified files: configure configure.in _hpux.h Tag: NSPR_4_6_BRANCH
configure
configure.in
pr/include/md/_hpux.h
--- a/configure
+++ b/configure
@@ -3576,20 +3576,20 @@ EOF
 
     if echo "$OS_RELEASE" | egrep '^(B.10.30|B.11)' >/dev/null; then
         cat >> confdefs.h <<\EOF
 #define HAVE_POINTER_LOCALTIME_R 1
 EOF
 
     fi
 
-    # HP-UX 11i (B.11.11) or higher
+    # HP-UX 11i v2 (B.11.23) or higher
     
     case "$OS_RELEASE" in
-    [C-Z]*|B.[2-9]*|B.1[2-9]*|B.11.[2-9]*|B.11.1[1-9]*)
+    [C-Z]*|B.[2-9]*|B.1[2-9]*|B.11.[3-9]*|B.11.2[3-9]*)
         USE_IPV6=1
         ;;
     esac
     
 
     if test "$OS_RELEASE" = "B.10.01"; then
         cat >> confdefs.h <<\EOF
 #define HPUX10 1
--- a/configure.in
+++ b/configure.in
@@ -1195,20 +1195,20 @@ tools are selected during the Xcode/Deve
     if echo "$OS_RELEASE" | egrep '^(B.10.10|B.10.20)' >/dev/null; then
         AC_DEFINE(HAVE_INT_LOCALTIME_R)
     fi
 
     if echo "$OS_RELEASE" | egrep '^(B.10.30|B.11)' >/dev/null; then
         AC_DEFINE(HAVE_POINTER_LOCALTIME_R)
     fi
 
-    # HP-UX 11i (B.11.11) or higher
+    # HP-UX 11i v2 (B.11.23) or higher
     changequote(<<,>>)
     case "$OS_RELEASE" in
-    [C-Z]*|B.[2-9]*|B.1[2-9]*|B.11.[2-9]*|B.11.1[1-9]*)
+    [C-Z]*|B.[2-9]*|B.1[2-9]*|B.11.[3-9]*|B.11.2[3-9]*)
         USE_IPV6=1
         ;;
     esac
     changequote([,])
 
     if test "$OS_RELEASE" = "B.10.01"; then
         AC_DEFINE(HPUX10)
         DEFAULT_IMPL_STRATEGY=_EMU
--- a/pr/include/md/_hpux.h
+++ b/pr/include/md/_hpux.h
@@ -98,22 +98,41 @@ extern PRInt32 _PR_ia64_AtomicIncrement(
 extern PRInt32 _PR_ia64_AtomicDecrement(PRInt32 *val);
 #define _MD_ATOMIC_DECREMENT          _PR_ia64_AtomicDecrement
 extern PRInt32 _PR_ia64_AtomicAdd(PRInt32 *ptr, PRInt32 val);
 #define _MD_ATOMIC_ADD                _PR_ia64_AtomicAdd
 extern PRInt32 _PR_ia64_AtomicSet(PRInt32 *val, PRInt32 newval);
 #define _MD_ATOMIC_SET                _PR_ia64_AtomicSet
 #endif
 
-#ifdef _PR_INET6
-#define _PR_HAVE_INET_NTOP
 #define _PR_HAVE_GETIPNODEBYNAME
 #define _PR_HAVE_GETIPNODEBYADDR
 #define _PR_HAVE_GETADDRINFO
+#ifdef _PR_INET6
+#define _PR_HAVE_INET_NTOP
+#else
 #define _PR_INET6_PROBE
+#define _PR_HAVE_MD_SOCKADDR_IN6
+/* isomorphic to struct in6_addr on HP-UX B.11.23 */
+struct _md_in6_addr {
+    union {
+        PRUint8   _S6_u8[16];
+        PRUint16  _S6_u16[8];
+        PRUint32  _S6_u32[4];
+        PRUint32  __S6_align;
+    } _s6_un;
+};
+/* isomorphic to struct sockaddr_in6 on HP-UX B.11.23 */
+struct _md_sockaddr_in6 {
+    PRUint16 sin6_family;
+    PRUint16 sin6_port;
+    PRUint32 sin6_flowinfo;
+    struct _md_in6_addr sin6_addr;
+    PRUint32 sin6_scope_id;
+};
 #endif
 
 #if !defined(_PR_PTHREADS)
 
 #include <syscall.h>
 #include <setjmp.h>
 
 #define USE_SETJMP