]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Remove legacy support for HP-UX
authorOndřej Surý <ondrej@sury.org>
Tue, 21 Aug 2018 09:09:34 +0000 (11:09 +0200)
committerOndřej Surý <ondrej@sury.org>
Tue, 28 Aug 2018 08:31:47 +0000 (10:31 +0200)
bin/tests/system/ifconfig.sh
config.h.in
configure
configure.in
lib/isc/unix/ifiter_ioctl.c
lib/isc/unix/os.c
lib/isc/unix/resource.c
lib/isc/unix/socket.c
util/mksymtbl.pl

index ec9993fd3468210a5c916e8e2fef71154e32193c..478ab56c61c9508baa17d3d6b5ca562efe564cd5 100755 (executable)
@@ -38,15 +38,7 @@ EOF
        exit 1
 fi
 
-# If running on hp-ux, don't even try to run config.guess.
-# It will try to create a temporary file in the current directory,
-# which fails when running as root with the current directory
-# on a NFS mounted disk.
-
-case `uname -a` in
-       *HP-UX*) sys=hpux ;;
-       *) sys=`sh $config_guess` ;;
-esac
+sys=`sh $config_guess`
 
 use_ip=
 case "$sys" in
index c4c801f1ac6f0448bb97e2efa2164caa69dc439e..f23b16c1af92ab6a01df958caeb81b8b93c01f13 100644 (file)
 /* Define to 1 if you have the <sys/devpoll.h> header file. */
 #undef HAVE_SYS_DEVPOLL_H
 
-/* Define to 1 if you have the <sys/dyntune.h> header file. */
-#undef HAVE_SYS_DYNTUNE_H
-
 /* Define to 1 if you have the <sys/mman.h> header file. */
 #undef HAVE_SYS_MMAN_H
 
index efd70310fc524272b76ae1de2d044bfb17368cda..381ff787910c18f5c27d2d3d3db73b427942b353 100755 (executable)
--- a/configure
+++ b/configure
@@ -13374,12 +13374,6 @@ case "$host" in
                STD_CDEFINES="$STD_CDEFINES -D_POSIX_PII_SOCKET"
                CPPFLAGS="$CPPFLAGS -D_POSIX_PII_SOCKET"
                ;;
-       #HP-UX: need -D_XOPEN_SOURCE_EXTENDED and -lxnet for CMSG macros
-       *-hp-hpux*)
-               STD_CDEFINES="$STD_CDEFINES -D_XOPEN_SOURCE_EXTENDED"
-               CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
-               LIBS="-lxnet $LIBS"
-               ;;
        # Solaris: need -D_XPG4_2 and -D__EXTENSIONS__ for CMSG macros
        *-solaris*)
                STD_CDEFINES="$STD_CDEFINES -D_XPG4_2 -D__EXTENSIONS__"
@@ -17481,12 +17475,6 @@ $as_echo "yes" >&6; }
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
        fi
-       case "$host" in
-       *-hp-hpux*)
-               CFLAGS="$CFLAGS -Wl,+vnocompatwarnings"
-               BACKTRACECFLAGS="$BACKTRACECFLAGS -Wl,+vnocompatwarnings"
-               ;;
-       esac
        if test "X$enable_warn_shadow" = Xyes; then
                STD_CWARNINGS="$STD_CWARNINGS -Wshadow"
        fi
@@ -17501,27 +17489,6 @@ else
                CCNOOPT="$CCNOOPT -std"
                MKDEPCC="$CC"
                ;;
-       *-hp-hpux*)
-               CC="$CC -Ae -z"
-               # The version of the C compiler that constantly warns about
-               # 'const' as well as alignment issues is unfortunately not
-               # able to be discerned via the version of the operating
-               # system, nor does cc have a version flag.
-               case "`$CC +W 123 2>&1`" in
-               *Unknown?option*)
-                       STD_CWARNINGS="+w1"
-                       ;;
-               *)
-                       # Turn off the pointlessly noisy warnings.
-                       STD_CWARNINGS="+w1 +W 474,530,2193,2236"
-                       ;;
-               esac
-               CCOPT="$CCOPT -Ae -z"
-               CCNOOPT="$CCNOOPT -Ae -z"
-               CFLAGS="$CFLAGS -Wl,+vnocompatwarnings"
-               BACKTRACECFLAGS="$BACKTRACECFLAGS -Wl,+vnocompatwarnings"
-               MKDEPPROG='cc -Ae -E -Wp,-M >/dev/null 2>>$TMP'
-               ;;
        *-sgi-irix*)
                STD_CWARNINGS="-fullwarn -woff 1209"
                #
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 
-#
-# Older HP-UX doesn't have gettune
-#
-case "$host" in
-       *-hp-hpux*)
-               for ac_header in sys/dyntune.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "sys/dyntune.h" "ac_cv_header_sys_dyntune_h" "$ac_includes_default"
-if test "x$ac_cv_header_sys_dyntune_h" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_SYS_DYNTUNE_H 1
-_ACEOF
-
-fi
-
-done
-
-               ;;
-       *)
-               ;;
-esac
-
-
 #
 # Compaq TruCluster requires more code for handling cluster IP aliases
 #
@@ -19373,54 +19317,6 @@ else
   ac_cv_have_if_nametoindex=no
 fi
 
-case $ac_cv_have_if_nametoindex in
-no)
-       case "$host" in
-       *-hp-hpux*)
-               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for if_nametoindex in -lipv6" >&5
-$as_echo_n "checking for if_nametoindex in -lipv6... " >&6; }
-if ${ac_cv_lib_ipv6_if_nametoindex+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lipv6  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char if_nametoindex ();
-int
-main ()
-{
-return if_nametoindex ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_ipv6_if_nametoindex=yes
-else
-  ac_cv_lib_ipv6_if_nametoindex=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipv6_if_nametoindex" >&5
-$as_echo "$ac_cv_lib_ipv6_if_nametoindex" >&6; }
-if test "x$ac_cv_lib_ipv6_if_nametoindex" = xyes; then :
-  ac_cv_have_if_nametoindex=yes
-                               LIBS="-lipv6 $LIBS"
-fi
-
-       ;;
-       esac
-esac
 case $ac_cv_have_if_nametoindex in
 yes)
        ISC_PLATFORM_HAVEIFNAMETOINDEX="#define ISC_PLATFORM_HAVEIFNAMETOINDEX 1"
@@ -22215,12 +22111,6 @@ if test "yes" = "$dlopen"; then
                        SO_LDFLAGS="-G -z text"
                        SO_LD="ld"
                        ;;
-               *-hp-hpux*)
-                       SO=sl
-                       SO_CFLAGS="+z"
-                       SO_LDFLAGS="-b +vnocompatwarnings"
-                       SO_LD="ld"
-                       ;;
                *)
                        SO_CFLAGS="-fPIC"
                        ;;
index 8da194049346059942e3882cbd214d12ca123304..dcd4e5fc11efa0bfadb28188cd9155f809fcbfaa 100644 (file)
@@ -403,12 +403,6 @@ case "$host" in
                STD_CDEFINES="$STD_CDEFINES -D_POSIX_PII_SOCKET"
                CPPFLAGS="$CPPFLAGS -D_POSIX_PII_SOCKET"
                ;;
-       #HP-UX: need -D_XOPEN_SOURCE_EXTENDED and -lxnet for CMSG macros
-       *-hp-hpux*)
-               STD_CDEFINES="$STD_CDEFINES -D_XOPEN_SOURCE_EXTENDED"
-               CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
-               LIBS="-lxnet $LIBS"
-               ;;
        # Solaris: need -D_XPG4_2 and -D__EXTENSIONS__ for CMSG macros
        *-solaris*)
                STD_CDEFINES="$STD_CDEFINES -D_XPG4_2 -D__EXTENSIONS__"
@@ -1744,12 +1738,6 @@ if test "X$GCC" = "Xyes"; then
        else
                AC_MSG_RESULT(no)
        fi
-       case "$host" in
-       *-hp-hpux*)
-               CFLAGS="$CFLAGS -Wl,+vnocompatwarnings"
-               BACKTRACECFLAGS="$BACKTRACECFLAGS -Wl,+vnocompatwarnings"
-               ;;
-       esac
        if test "X$enable_warn_shadow" = Xyes; then
                STD_CWARNINGS="$STD_CWARNINGS -Wshadow"
        fi
@@ -1764,27 +1752,6 @@ else
                CCNOOPT="$CCNOOPT -std"
                MKDEPCC="$CC"
                ;;
-       *-hp-hpux*)
-               CC="$CC -Ae -z"
-               # The version of the C compiler that constantly warns about
-               # 'const' as well as alignment issues is unfortunately not
-               # able to be discerned via the version of the operating
-               # system, nor does cc have a version flag.
-               case "`$CC +W 123 2>&1`" in
-               *Unknown?option*)
-                       STD_CWARNINGS="+w1"
-                       ;;
-               *)
-                       # Turn off the pointlessly noisy warnings.
-                       STD_CWARNINGS="+w1 +W 474,530,2193,2236"
-                       ;;
-               esac
-               CCOPT="$CCOPT -Ae -z"
-               CCNOOPT="$CCNOOPT -Ae -z"
-               CFLAGS="$CFLAGS -Wl,+vnocompatwarnings"
-               BACKTRACECFLAGS="$BACKTRACECFLAGS -Wl,+vnocompatwarnings"
-               MKDEPPROG='cc -Ae -E -Wp,-M >/dev/null 2>>$TMP'
-               ;;
        *-sgi-irix*)
                STD_CWARNINGS="-fullwarn -woff 1209"
                #
@@ -2650,18 +2617,6 @@ AC_TRY_COMPILE([#include <sys/fcntl.h>],[struct stat s; return(s.st_mtim.tv_nsec
        ISC_PLATFORM_HAVESTATNSEC="#undef ISC_PLATFORM_HAVESTATNSEC"])
 AC_SUBST(ISC_PLATFORM_HAVESTATNSEC)
 
-#
-# Older HP-UX doesn't have gettune
-#
-case "$host" in
-       *-hp-hpux*)
-               AC_CHECK_HEADERS(sys/dyntune.h)
-               ;;
-       *)
-               ;;
-esac
-
-
 #
 # Compaq TruCluster requires more code for handling cluster IP aliases
 #
@@ -2734,16 +2689,6 @@ AC_SUBST(ISC_PLATFORM_HAVESTRINGSH)
 AC_CHECK_FUNC(if_nametoindex, ac_cv_have_if_nametoindex=yes,
                ac_cv_have_if_nametoindex=no)
 case $ac_cv_have_if_nametoindex in
-no)
-       case "$host" in
-       *-hp-hpux*)
-               AC_CHECK_LIB(ipv6, if_nametoindex,
-                               ac_cv_have_if_nametoindex=yes
-                               LIBS="-lipv6 $LIBS",)
-       ;;
-       esac
-esac
-case $ac_cv_have_if_nametoindex in
 yes)
        ISC_PLATFORM_HAVEIFNAMETOINDEX="#define ISC_PLATFORM_HAVEIFNAMETOINDEX 1"
        AC_DEFINE(HAVE_IF_NAMETOINDEX, 1,
@@ -3749,12 +3694,6 @@ if test "yes" = "$dlopen"; then
                        SO_LDFLAGS="-G -z text"
                        SO_LD="ld"
                        ;;
-               *-hp-hpux*)
-                       SO=sl
-                       SO_CFLAGS="+z"
-                       SO_LDFLAGS="-b +vnocompatwarnings"
-                       SO_LD="ld"
-                       ;;
                *)
                        SO_CFLAGS="-fPIC"
                        ;;
index 9702faea1a18d291a99bfd797f1475d025378ded..38c121c181a0293c28cccc779c43b7692b59cbfc 100644 (file)
@@ -206,26 +206,6 @@ getbuf6(isc_interfaceiter_t *iter) {
                 */
                if (ioctl(iter->socket6, SIOCGLIFCONF, (char *)&iter->lifc)
                    == -1) {
-#ifdef __hpux
-                       /*
-                        * IPv6 interface scanning is not available on all
-                        * kernels w/ IPv6 sockets.
-                        */
-                       if (errno == ENOENT) {
-                               isc__strerror(errno, strbuf, sizeof(strbuf));
-                               isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL,
-                                             ISC_LOGMODULE_INTERFACE,
-                                             ISC_LOG_DEBUG(1),
-                                             isc_msgcat_get(isc_msgcat,
-                                                       ISC_MSGSET_IFITERIOCTL,
-                                                       ISC_MSG_GETIFCONFIG,
-                                                       "get interface "
-                                                       "configuration: %s"),
-                                              strbuf);
-                               result = ISC_R_FAILURE;
-                               goto cleanup;
-                       }
-#endif
                        if (errno != EINVAL) {
                                isc__strerror(errno, strbuf, sizeof(strbuf));
                                UNEXPECTED_ERROR(__FILE__, __LINE__,
index 8cff6b66eb53d5ab35560600ec462092f6593015..79409cffbceb7ebd9264b0888a854eed28a5c9fb 100644 (file)
@@ -19,7 +19,6 @@
 
 #include <unistd.h>
 
-#ifndef __hpux
 static inline long
 sysconf_ncpus(void) {
 #if defined(_SC_NPROCESSORS_ONLN)
@@ -30,25 +29,8 @@ sysconf_ncpus(void) {
        return (0);
 #endif
 }
-#endif
 #endif /* HAVE_SYSCONF */
 
-
-#ifdef __hpux
-
-#include <sys/pstat.h>
-
-static inline int
-hpux_ncpus(void) {
-       struct pst_dynamic psd;
-       if (pstat_getdynamic(&psd, sizeof(psd), 1, 0) != -1)
-               return (psd.psd_proc_cnt);
-       else
-               return (0);
-}
-
-#endif /* __hpux */
-
 #if defined(HAVE_SYS_SYSCTL_H) && defined(HAVE_SYSCTLBYNAME)
 #include <sys/types.h>  /* for FreeBSD */
 #include <sys/param.h>  /* for NetBSD */
@@ -71,9 +53,7 @@ unsigned int
 isc_os_ncpus(void) {
        long ncpus = 0;
 
-#ifdef __hpux
-       ncpus = hpux_ncpus();
-#elif defined(HAVE_SYSCONF)
+#if defined(HAVE_SYSCONF)
        ncpus = sysconf_ncpus();
 #endif
 #if defined(HAVE_SYS_SYSCTL_H) && defined(HAVE_SYSCTLBYNAME)
index a212386bc30e4b7c3fe22b45508938d57422e8ca..99eab54184870fc25f3de8018c8cead571144219 100644 (file)
 #include <linux/fs.h>  /* To get the large NR_OPEN. */
 #endif
 
-#if defined(__hpux) && defined(HAVE_SYS_DYNTUNE_H)
-#include <sys/dyntune.h>
-#endif
-
 #include "errno2result.h"
 
 static isc_result_t
@@ -170,16 +166,6 @@ isc_resource_setlimit(isc_resource_t resource, isc_resourcevalue_t value) {
                if (unixresult == 0)
                        return (ISC_R_SUCCESS);
        }
-#elif defined(__hpux) && defined(HAVE_SYS_DYNTUNE_H)
-       if (resource == isc_resource_openfiles && rlim_value == RLIM_INFINITY) {
-               uint64_t maxfiles;
-               if (gettune("maxfiles_lim", &maxfiles) == 0) {
-                       rl.rlim_cur = rl.rlim_max = maxfiles;
-                       unixresult = setrlimit(unixresource, &rl);
-                       if (unixresult == 0)
-                               return (ISC_R_SUCCESS);
-               }
-       }
 #endif
        if (resource == isc_resource_openfiles && rlim_value == RLIM_INFINITY) {
                if (getrlimit(unixresource, &rl) == 0) {
index b28b8ef1cc7249f07fbee78bb3d7cde9bac151b8..734b3f43862c13660152e0612fc637d50d860adf 100644 (file)
@@ -1856,19 +1856,10 @@ doio_recv(isc__socket_t *sock, isc_socketevent_t *dev) {
                SOFT_OR_HARD(ENETUNREACH, ISC_R_NETUNREACH);
                SOFT_OR_HARD(EHOSTUNREACH, ISC_R_HOSTUNREACH);
                SOFT_OR_HARD(EHOSTDOWN, ISC_R_HOSTDOWN);
-               /* HPUX 11.11 can return EADDRNOTAVAIL. */
-               SOFT_OR_HARD(EADDRNOTAVAIL, ISC_R_ADDRNOTAVAIL);
                SOFT_OR_HARD(ENOBUFS, ISC_R_NORESOURCES);
                /* Should never get this one but it was seen. */
 #ifdef ENOPROTOOPT
                SOFT_OR_HARD(ENOPROTOOPT, ISC_R_HOSTUNREACH);
-#endif
-               /*
-                * HPUX returns EPROTO and EINVAL on receiving some ICMP/ICMPv6
-                * errors.
-                */
-#ifdef EPROTO
-               SOFT_OR_HARD(EPROTO, ISC_R_HOSTUNREACH);
 #endif
                SOFT_OR_HARD(EINVAL, ISC_R_HOSTUNREACH);
 
@@ -5686,10 +5677,14 @@ isc__socket_connect(isc_socket_t *sock0, const isc_sockaddr_t *addr,
        cc = connect(sock->fd, &addr->type.sa, addr->length);
        if (cc < 0) {
                /*
-                * HP-UX "fails" to connect a UDP socket and sets errno to
-                * EINPROGRESS if it's non-blocking.  We'd rather regard this as
-                * a success and let the user detect it if it's really an error
-                * at the time of sending a packet on the socket.
+                * The socket is nonblocking and the connection cannot be
+                * completed immediately.  It is possible to select(2) or
+                * poll(2) for completion by selecting the socket for writing.
+                * After select(2) indicates writability, use getsockopt(2) to
+                * read the SO_ERROR option at level SOL_SOCKET to determine
+                * whether connect() completed successfully (SO_ERROR is zero)
+                * or unsuccessfully (SO_ERROR is one of the usual error codes
+                * listed here, explaining the reason for the failure).
                 */
                if (sock->type == isc_sockettype_udp && errno == EINPROGRESS) {
                        cc = 0;
index a302fe27adbb6b03daf8907e7d37f960753bb68c..f94fb72e89440f7831b94b4e5972c7162b00d3fd 100755 (executable)
@@ -37,9 +37,6 @@ if ($options{'o'}) {
 $nm_prog = "nm";
 $ostype = `uname -s`;
 chop($ostype);
-if ($ostype eq "HP-UX") {
-       $nm_prog = "/usr/ccs/bin/nm -x"
-}
 
 if ($options{'i'}) {
        open(SYMBOLS, $options{'i'}) || die "failed to open $options{'i'}";
@@ -52,28 +49,15 @@ open(TBLFILE, ">$outputfile") || die "failed to open output file: $outputfile";
 $nsyms = 0;
 while (<SYMBOLS>) {
        my ($addr, $symbol) = (0, "");
-       if ($ostype eq "HP-UX") {
-               if (/(\S*)\s*\|0x([0-9a-f]*)\|([^|]*\|entry|extern\|code)/) {
-                       $addr = $2;
-                       $symbol = $1;
-                       # this filter catches a massive number of awkward
-                       # symbols such as "$START$".  we are not interested in
-                       # those and ignore them.
-                       next if ($symbol =~ /\$/);
-               }
-       } else {
-               # *BSDs, Linux, etc.
-               if (/([0-9a-f]*)\s[tT]\s(.*)/) {
-                       ($addr, $symbol) = ($1, $2);
-                       # heuristics: some compilers add a "_" to all program
-                       # defined symbols.  Detect and fix it for a well known
-                       # symbol of "main".
-                       $need_uscorefix = 1 if ($symbol eq "_main");
-               }
+       # *BSDs, Linux, etc.
+       if (/([0-9a-f]*)\s[tT]\s(.*)/) {
+               ($addr, $symbol) = ($1, $2);
+               # heuristics: some compilers add a "_" to all program
+               # defined symbols.  Detect and fix it for a well known
+               # symbol of "main".
+               $need_uscorefix = 1 if ($symbol eq "_main");
        }
        if ($symbol ne "") {
-               # XXX: HP-UX's nm can produce a duplicate entry for the same
-               # address.  Ignore duplicate entries except the first one.
                next if ($symmap{$addr});
 
                $symmap{$addr} = $symbol;