]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Remove legacy support for Compaq TruCluster
authorOndřej Surý <ondrej@sury.org>
Tue, 21 Aug 2018 09:11:43 +0000 (11:11 +0200)
committerOndřej Surý <ondrej@sury.org>
Tue, 28 Aug 2018 08:31:47 +0000 (10:31 +0200)
acconfig.h
config.h.in
configure
configure.in
lib/isc/unix/ifiter_ioctl.c

index 9edd8e30c793ab2580eb378cb51f01336c6cc7eb..d0b557693ad1bff85ebbdbc774ea873a9b478cee 100644 (file)
@@ -17,9 +17,6 @@
  ***/
 @TOP@
 
-/** define on DEC OSF to enable 4.4BSD style sa_len support */
-#undef _SOCKADDR_LEN
-
 /** define if your system needs pthread_init() before using pthreads */
 #undef NEED_PTHREAD_INIT
 
index f23b16c1af92ab6a01df958caeb81b8b93c01f13..8823a42ddc060ff350b19a0242dd301eb55206f3 100644 (file)
@@ -17,9 +17,6 @@
  *** it does not get installed.
  ***/
 
-/** define on DEC OSF to enable 4.4BSD style sa_len support */
-#undef _SOCKADDR_LEN
-
 /** define if your system needs pthread_init() before using pthreads */
 #undef NEED_PTHREAD_INIT
 
 /* Define if Thread-Local Storage is available */
 #undef HAVE_TLS
 
-/* Define if running under Compaq TruCluster */
-#undef HAVE_TRUCLUSTER
-
 /* Define to 1 if the system has the type `uintptr_t'. */
 #undef HAVE_UINTPTR_T
 
index 381ff787910c18f5c27d2d3d3db73b427942b353..737fea7f4c2b01990c7cb5b391f20eeb19e97130 100755 (executable)
--- a/configure
+++ b/configure
 # OS dependent CC flags
 #
 case "$host" in
-       # OSF 5.0: recv/send are only available with -D_POSIX_PII_SOCKET or
-       # -D_XOPEN_SOURCE_EXTENDED.
-       *-dec-osf*)
-               STD_CDEFINES="$STD_CDEFINES -D_POSIX_PII_SOCKET"
-               CPPFLAGS="$CPPFLAGS -D_POSIX_PII_SOCKET"
-               ;;
        # Solaris: need -D_XPG4_2 and -D__EXTENSIONS__ for CMSG macros
        *-solaris*)
                STD_CDEFINES="$STD_CDEFINES -D_XPG4_2 -D__EXTENSIONS__"
@@ -17483,12 +17477,6 @@ $as_echo "no" >&6; }
        fi
 else
        case $host in
-       *-dec-osf*)
-               CC="$CC -std"
-               CCOPT="$CCOPT -std"
-               CCNOOPT="$CCNOOPT -std"
-               MKDEPCC="$CC"
-               ;;
        *-sgi-irix*)
                STD_CWARNINGS="-fullwarn -woff 1209"
                #
 
 
 
-#
-# Look for a 4.4BSD-style sa_len member in struct sockaddr.
-#
-case "$host" in
-       *-dec-osf*)
-               # Turn on 4.4BSD style sa_len support.
-               $as_echo "#define _SOCKADDR_LEN 1" >>confdefs.h
-
-               ;;
-esac
-
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sa_len in struct sockaddr" >&5
 $as_echo_n "checking for sa_len in struct sockaddr... " >&6; }
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 
-#
-# Compaq TruCluster requires more code for handling cluster IP aliases
-#
-case "$host" in
-       *-dec-osf*)
-               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clua_getaliasaddress in -lclua" >&5
-$as_echo_n "checking for clua_getaliasaddress in -lclua... " >&6; }
-if ${ac_cv_lib_clua_clua_getaliasaddress+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lclua  $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 clua_getaliasaddress ();
-int
-main ()
-{
-return clua_getaliasaddress ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_clua_clua_getaliasaddress=yes
-else
-  ac_cv_lib_clua_clua_getaliasaddress=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_clua_clua_getaliasaddress" >&5
-$as_echo "$ac_cv_lib_clua_clua_getaliasaddress" >&6; }
-if test "x$ac_cv_lib_clua_clua_getaliasaddress" = xyes; then :
-  LIBS="-lclua $LIBS"
-fi
-
-               ac_fn_c_check_func "$LINENO" "clua_getaliasaddress" "ac_cv_func_clua_getaliasaddress"
-if test "x$ac_cv_func_clua_getaliasaddress" = xyes; then :
-
-$as_echo "#define HAVE_TRUCLUSTER 1" >>confdefs.h
-
-fi
-
-               ;;
-       *)
-               ;;
-esac
-
 #
 # Some hosts need msg_namelen to match the size of the socket structure.
 # Some hosts don't set msg_namelen appropriately on return from recvmsg().
index dcd4e5fc11efa0bfadb28188cd9155f809fcbfaa..35934d2b7ff7098e3e28f27aaf55d0b9ef69a745 100644 (file)
@@ -397,12 +397,6 @@ AC_PROG_CC_C99
 # OS dependent CC flags
 #
 case "$host" in
-       # OSF 5.0: recv/send are only available with -D_POSIX_PII_SOCKET or
-       # -D_XOPEN_SOURCE_EXTENDED.
-       *-dec-osf*)
-               STD_CDEFINES="$STD_CDEFINES -D_POSIX_PII_SOCKET"
-               CPPFLAGS="$CPPFLAGS -D_POSIX_PII_SOCKET"
-               ;;
        # Solaris: need -D_XPG4_2 and -D__EXTENSIONS__ for CMSG macros
        *-solaris*)
                STD_CDEFINES="$STD_CDEFINES -D_XPG4_2 -D__EXTENSIONS__"
@@ -1746,12 +1740,6 @@ if test "X$GCC" = "Xyes"; then
        fi
 else
        case $host in
-       *-dec-osf*)
-               CC="$CC -std"
-               CCOPT="$CCOPT -std"
-               CCNOOPT="$CCNOOPT -std"
-               MKDEPCC="$CC"
-               ;;
        *-sgi-irix*)
                STD_CWARNINGS="-fullwarn -woff 1209"
                #
@@ -2209,16 +2197,6 @@ AC_SUBST(ISC_PLATFORM_NEEDPTON)
 AC_SUBST(ISC_EXTRA_OBJS)
 AC_SUBST(ISC_EXTRA_SRCS)
 
-#
-# Look for a 4.4BSD-style sa_len member in struct sockaddr.
-#
-case "$host" in
-       *-dec-osf*)
-               # Turn on 4.4BSD style sa_len support.
-               AC_DEFINE(_SOCKADDR_LEN)
-               ;;
-esac
-
 AC_MSG_CHECKING(for sa_len in struct sockaddr)
 AC_TRY_COMPILE([
 #include <sys/types.h>
@@ -2617,20 +2595,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)
 
-#
-# Compaq TruCluster requires more code for handling cluster IP aliases
-#
-case "$host" in
-       *-dec-osf*)
-               AC_CHECK_LIB(clua, clua_getaliasaddress, LIBS="-lclua $LIBS")
-               AC_CHECK_FUNC(clua_getaliasaddress,
-                               AC_DEFINE(HAVE_TRUCLUSTER, 1,
-                                       [Define if running under Compaq TruCluster]))
-               ;;
-       *)
-               ;;
-esac
-
 #
 # Some hosts need msg_namelen to match the size of the socket structure.
 # Some hosts don't set msg_namelen appropriately on return from recvmsg().
index 38c121c181a0293c28cccc779c43b7692b59cbfc..08143ae25a391937d11685577ce08cc5cb60be2b 100644 (file)
@@ -68,11 +68,6 @@ struct isc_interfaceiter {
        isc_result_t            result6;        /* Last result code. */
        bool            first6;
 #endif
-#ifdef HAVE_TRUCLUSTER
-       int                     clua_context;   /* Cluster alias context */
-       bool            clua_done;
-       struct sockaddr         clua_sa;
-#endif
 #ifdef __linux
        FILE *                  proc;
        char                    entry[ISC_IF_INET6_SZ];
@@ -82,12 +77,6 @@ struct isc_interfaceiter {
        isc_result_t            result;         /* Last result code. */
 };
 
-#ifdef HAVE_TRUCLUSTER
-#include <clua/clua.h>
-#include <sys/socket.h>
-#endif
-
-
 /*%
  * Size of buffer for SIOCGLIFCONF, in bytes.  We assume no sane system
  * will have more than a megabyte of interface configuration data.
@@ -339,10 +328,6 @@ isc_interfaceiter_create(isc_mem_t *mctx, isc_interfaceiter_t **iterp) {
         * A newly created iterator has an undefined position
         * until isc_interfaceiter_first() is called.
         */
-#ifdef HAVE_TRUCLUSTER
-       iter->clua_context = -1;
-       iter->clua_done = true;
-#endif
 #ifdef __linux
        iter->proc = fopen("/proc/net/if_inet6", "r");
        iter->valid = ISC_R_FAILURE;
@@ -372,30 +357,6 @@ isc_interfaceiter_create(isc_mem_t *mctx, isc_interfaceiter_t **iterp) {
        return (result);
 }
 
-#ifdef HAVE_TRUCLUSTER
-static void
-get_inaddr(isc_netaddr_t *dst, struct in_addr *src) {
-       dst->family = AF_INET;
-       memmove(&dst->type.in, src, sizeof(struct in_addr));
-}
-
-static isc_result_t
-internal_current_clusteralias(isc_interfaceiter_t *iter) {
-       struct clua_info ci;
-       if (clua_getaliasinfo(&iter->clua_sa, &ci) != CLUA_SUCCESS)
-               return (ISC_R_IGNORE);
-       memset(&iter->current, 0, sizeof(iter->current));
-       iter->current.af = iter->clua_sa.sa_family;
-       memset(iter->current.name, 0, sizeof(iter->current.name));
-       snprintf(iter->current.name, sizeof(iter->current.name),
-                "clua%d", ci.aliasid);
-       iter->current.flags = INTERFACE_F_UP;
-       get_inaddr(&iter->current.address, &ci.addr);
-       get_inaddr(&iter->current.netmask, &ci.netmask);
-       return (ISC_R_SUCCESS);
-}
-#endif
-
 /*
  * Get information about the current interface to iter->current.
  * If successful, return ISC_R_SUCCESS.
@@ -772,10 +733,6 @@ internal_current(isc_interfaceiter_t *iter) {
                if (iter->result6 != ISC_R_NOMORE)
                        return (iter->result6);
        }
-#endif
-#ifdef HAVE_TRUCLUSTER
-       if (!iter->clua_done)
-               return(internal_current_clusteralias(iter));
 #endif
        return (internal_current4(iter));
 }
@@ -845,9 +802,6 @@ internal_next6(isc_interfaceiter_t *iter) {
 
 static isc_result_t
 internal_next(isc_interfaceiter_t *iter) {
-#ifdef HAVE_TRUCLUSTER
-       int clua_result;
-#endif
 #if defined(SIOCGLIFCONF) && defined(SIOCGLIFADDR)
        if (iter->mode == 6) {
                iter->result6 = internal_next6(iter);
@@ -858,15 +812,6 @@ internal_next(isc_interfaceiter_t *iter) {
                        return (ISC_R_SUCCESS);
                }
        }
-#endif
-#ifdef HAVE_TRUCLUSTER
-       if (!iter->clua_done) {
-               clua_result = clua_getaliasaddress(&iter->clua_sa,
-                                                  &iter->clua_context);
-               if (clua_result != CLUA_SUCCESS)
-                       iter->clua_done = true;
-               return (ISC_R_SUCCESS);
-       }
 #endif
        return (internal_next4(iter));
 }
@@ -889,9 +834,6 @@ internal_destroy(isc_interfaceiter_t *iter) {
 
 static
 void internal_first(isc_interfaceiter_t *iter) {
-#ifdef HAVE_TRUCLUSTER
-       int clua_result;
-#endif
        iter->pos = 0;
 #if defined(SIOCGLIFCONF) && defined(SIOCGLIFADDR)
        iter->pos6 = 0;
@@ -899,12 +841,6 @@ void internal_first(isc_interfaceiter_t *iter) {
                iter->result6 = ISC_R_SUCCESS;
        iter->first6 = true;
 #endif
-#ifdef HAVE_TRUCLUSTER
-       iter->clua_context = 0;
-       clua_result = clua_getaliasaddress(&iter->clua_sa,
-                                          &iter->clua_context);
-       iter->clua_done = (clua_result != CLUA_SUCCESS);
-#endif
 #ifdef __linux
        linux_if_inet6_first(iter);
 #endif