summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwtc%netscape.com <devnull@localhost>2003-02-26 06:09:20 +0000
committerwtc%netscape.com <devnull@localhost>2003-02-26 06:09:20 +0000
commit87a04b0afc81327006738e987185dc430eef54ed (patch)
tree05f8ca8c690e179a980e2fa1cdde1627e629fbda
parent72fe4ca490323cb7e60fdc3b581f770a6667cfa7 (diff)
downloadnspr-hg-87a04b0afc81327006738e987185dc430eef54ed.tar.gz
Bug 193380: added IPv6 support on HP-UX 11i or later. Cleaned up the
detection of HP-UX B.11.* in configure.in. Modified Files: configure.in configure _hpux.h Tag: NSPRPUB_PRE_4_2_CLIENT_BRANCH
-rwxr-xr-xconfigure59
-rw-r--r--configure.in15
-rw-r--r--pr/include/md/_hpux.h7
3 files changed, 53 insertions, 28 deletions
diff --git a/configure b/configure
index e3bf6f70..a45f300a 100755
--- a/configure
+++ b/configure
@@ -3400,13 +3400,22 @@ EOF
fi
- if echo "$OS_RELEASE" | egrep '^(B.10.30|B.11.00|B.11.11|B.11.20)' >/dev/null; then
+ 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
+
+ case "$OS_RELEASE" in
+ [C-Z]*|B.[2-9]*|B.1[2-9]*|B.11.[2-9]*|B.11.1[1-9]*)
+ USE_IPV6=1
+ ;;
+ esac
+
+
if test "$OS_RELEASE" = "B.10.01"; then
cat >> confdefs.h <<\EOF
#define HPUX10 1
@@ -3459,7 +3468,7 @@ EOF
DEFAULT_IMPL_STRATEGY=_PTH
fi
- if echo "$OS_RELEASE" | egrep '^(B.11.00|B.11.11|B.11.20)' >/dev/null; then
+ if echo "$OS_RELEASE" | grep ^B.11 >/dev/null; then
cat >> confdefs.h <<\EOF
#define HPUX10 1
EOF
@@ -3590,7 +3599,7 @@ EOF
if test "$USE_MDUPDATE"; then
CFLAGS="$CFLAGS -MDupdate \$(DEPENDENCIES)"
fi
- case "$target}" in
+ case "${target}" in
*-irix6.*)
CFLAGS="$CFLAGS -multigot"
DSO_LDOPTS="-no_unresolved"
@@ -4183,17 +4192,17 @@ EOF
_OPTIMIZE_FLAGS="$_OPTIMIZE_FLAGS -Olimit 4000"
ac_safe=`echo "machine/builtins.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for machine/builtins.h""... $ac_c" 1>&6
-echo "configure:4187: checking for machine/builtins.h" >&5
+echo "configure:4196: checking for machine/builtins.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4192 "configure"
+#line 4201 "configure"
#include "confdefs.h"
#include <machine/builtins.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4197: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4206: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -4701,12 +4710,12 @@ esac
if test -z "$SKIP_LIBRARY_CHECKS"; then
echo $ac_n "checking for dlopen""... $ac_c" 1>&6
-echo "configure:4705: checking for dlopen" >&5
+echo "configure:4714: checking for dlopen" >&5
if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4710 "configure"
+#line 4719 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char dlopen(); below. */
@@ -4729,7 +4738,7 @@ dlopen();
; return 0; }
EOF
-if { (eval echo configure:4733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_dlopen=yes"
else
@@ -4748,7 +4757,7 @@ else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:4752: checking for dlopen in -ldl" >&5
+echo "configure:4761: checking for dlopen in -ldl" >&5
ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4756,7 +4765,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4760 "configure"
+#line 4769 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -4767,7 +4776,7 @@ int main() {
dlopen()
; return 0; }
EOF
-if { (eval echo configure:4771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -4795,13 +4804,13 @@ fi
if test $ac_cv_prog_gcc = yes; then
echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
-echo "configure:4799: checking whether ${CC-cc} needs -traditional" >&5
+echo "configure:4808: checking whether ${CC-cc} needs -traditional" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_pattern="Autoconf.*'x'"
cat > conftest.$ac_ext <<EOF
-#line 4805 "configure"
+#line 4814 "configure"
#include "confdefs.h"
#include <sgtty.h>
Autoconf TIOCGETP
@@ -4819,7 +4828,7 @@ rm -f conftest*
if test $ac_cv_prog_gcc_traditional = no; then
cat > conftest.$ac_ext <<EOF
-#line 4823 "configure"
+#line 4832 "configure"
#include "confdefs.h"
#include <termio.h>
Autoconf TCGETA
@@ -4843,12 +4852,12 @@ fi
for ac_func in lchown strerror
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4847: checking for $ac_func" >&5
+echo "configure:4856: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4852 "configure"
+#line 4861 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -4871,7 +4880,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:4875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -4910,7 +4919,7 @@ hpux*)
if test -z "$GNU_CC"; then
echo $ac_n "checking for +Olit support""... $ac_c" 1>&6
-echo "configure:4914: checking for +Olit support" >&5
+echo "configure:4923: checking for +Olit support" >&5
if eval "test \"`echo '$''{'ac_cv_hpux_usable_olit_option'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4944,7 +4953,7 @@ esac
echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
-echo "configure:4948: checking for pthread_create in -lpthreads" >&5
+echo "configure:4957: checking for pthread_create in -lpthreads" >&5
echo "
#include <pthread.h>
void *foo(void *v) { return v; }
@@ -4966,7 +4975,7 @@ echo "
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
-echo "configure:4970: checking for pthread_create in -lpthread" >&5
+echo "configure:4979: checking for pthread_create in -lpthread" >&5
echo "
#include <pthread.h>
void *foo(void *v) { return v; }
@@ -4988,7 +4997,7 @@ echo "
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
-echo "configure:4992: checking for pthread_create in -lc_r" >&5
+echo "configure:5001: checking for pthread_create in -lc_r" >&5
echo "
#include <pthread.h>
void *foo(void *v) { return v; }
@@ -5010,7 +5019,7 @@ echo "
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6
-echo "configure:5014: checking for pthread_create in -lc" >&5
+echo "configure:5023: checking for pthread_create in -lc" >&5
echo "
#include <pthread.h>
void *foo(void *v) { return v; }
@@ -5162,7 +5171,7 @@ if test -n "$USE_PTHREADS"; then
rm -f conftest*
ac_cv_have_dash_pthread=no
echo $ac_n "checking whether ${CC-cc} accepts -pthread""... $ac_c" 1>&6
-echo "configure:5166: checking whether ${CC-cc} accepts -pthread" >&5
+echo "configure:5175: checking whether ${CC-cc} accepts -pthread" >&5
echo 'int main() { return 0; }' | cat > conftest.c
${CC-cc} -pthread -o conftest conftest.c > conftest.out 2>&1
if test $? -eq 0; then
@@ -5185,7 +5194,7 @@ echo "configure:5166: checking whether ${CC-cc} accepts -pthread" >&5
ac_cv_have_dash_pthreads=no
if test "$ac_cv_have_dash_pthread" = "no"; then
echo $ac_n "checking whether ${CC-cc} accepts -pthreads""... $ac_c" 1>&6
-echo "configure:5189: checking whether ${CC-cc} accepts -pthreads" >&5
+echo "configure:5198: checking whether ${CC-cc} accepts -pthreads" >&5
echo 'int main() { return 0; }' | cat > conftest.c
${CC-cc} -pthreads -o conftest conftest.c > conftest.out 2>&1
if test $? -eq 0; then
diff --git a/configure.in b/configure.in
index 603d59dd..6d70a277 100644
--- a/configure.in
+++ b/configure.in
@@ -987,10 +987,19 @@ case "$target" in
AC_DEFINE(HAVE_INT_LOCALTIME_R)
fi
- if echo "$OS_RELEASE" | egrep '^(B.10.30|B.11.00|B.11.11|B.11.20)' >/dev/null; then
+ 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
+ changequote(<<,>>)
+ case "$OS_RELEASE" in
+ [C-Z]*|B.[2-9]*|B.1[2-9]*|B.11.[2-9]*|B.11.1[1-9]*)
+ USE_IPV6=1
+ ;;
+ esac
+ changequote([,])
+
if test "$OS_RELEASE" = "B.10.01"; then
AC_DEFINE(HPUX10)
DEFAULT_IMPL_STRATEGY=_EMU
@@ -1022,7 +1031,7 @@ case "$target" in
DEFAULT_IMPL_STRATEGY=_PTH
fi
- if echo "$OS_RELEASE" | egrep '^(B.11.00|B.11.11|B.11.20)' >/dev/null; then
+ if echo "$OS_RELEASE" | grep ^B.11 >/dev/null; then
AC_DEFINE(HPUX10)
AC_DEFINE(HPUX11)
AC_DEFINE(_LARGEFILE64_SOURCE)
@@ -1124,7 +1133,7 @@ case "$target" in
if test "$USE_MDUPDATE"; then
CFLAGS="$CFLAGS -MDupdate \$(DEPENDENCIES)"
fi
- case "$target}" in
+ case "${target}" in
*-irix6.*)
CFLAGS="$CFLAGS -multigot"
DSO_LDOPTS="-no_unresolved"
diff --git a/pr/include/md/_hpux.h b/pr/include/md/_hpux.h
index 625ed6eb..2341d973 100644
--- a/pr/include/md/_hpux.h
+++ b/pr/include/md/_hpux.h
@@ -79,6 +79,13 @@
#undef _PR_HAVE_ATOMIC_OPS
+#ifdef _PR_INET6
+#define _PR_HAVE_INET_NTOP
+#define _PR_HAVE_GETIPNODEBYNAME
+#define _PR_HAVE_GETIPNODEBYADDR
+#define _PR_INET6_PROBE
+#endif
+
#if !defined(_PR_PTHREADS)
#include <syscall.h>