Commit 02e349c0 authored by Ondřej Surý's avatar Ondřej Surý

Remove legacy support for HP-UX

parent b02de1ec
......@@ -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
......
......@@ -429,9 +429,6 @@
/* 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
......
......@@ -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"
#
......@@ -19205,29 +19172,6 @@ fi
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"
;;
......
......@@ -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"
;;
......
......@@ -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__,
......
......@@ -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)
......
......@@ -28,10 +28,6 @@
#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) {
......
......@@ -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;
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment