Discontinue HPUX support

This commit is contained in:
Chase
2022-07-22 21:42:06 -05:00
committed by Jon Trulson
parent bd83b53d56
commit edf4319548
235 changed files with 198 additions and 6290 deletions

View File

@@ -84,12 +84,6 @@ typedef union
#include <memory.h>
#if defined (__hpux)
/*
* On HP MAXINT is defined in both <values.h> and <sys/param.h>
*/
#undef MAXINT
#endif
#if defined(CSRG_BASED)
#define MAXINT INT_MAX
#else

View File

@@ -214,15 +214,11 @@ main(int argc, char** argv, char **envp)
void install_signal_handler();
SVCXPRT *transp;
struct sockaddr_in saddr;
#if defined(HPUX)
int asize = sizeof(saddr);
#else
# if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
socklen_t asize = sizeof(saddr);
# else
size_t asize = sizeof(saddr);
# endif
#endif
int is_aix = 0;
int do_garbage_collect = 0;

View File

@@ -40,7 +40,7 @@
#include "db/tt_db_hostname_global_map_ref.h"
#include "db/tt_db_access_utils.h"
#include "db/tt_db_property_utils.h"
#if defined(OPT_BUG_HPUX) || defined(OPT_BUG_AIX)
#if defined(OPT_BUG_AIX)
# undef copy
#endif

View File

@@ -32,26 +32,16 @@
# define size_t unsigned long
# define pid_t int
# define uid_t unsigned long
#elif defined(hpV4)
# define size_t unsigned int
# define pid_t int
# define uid_t int
#else
# define size_t unsigned int
# define pid_t long
# define uid_t long
#endif
#if defined(hpV4)
# define xdrproc_t int (*)(...)
#else
# define xdrproc_t int (*)(void)
#endif
#if defined(_AIX)
# define va_list char*
#elif defined(hpV4)
# define va_list double*
#else
# define va_list void*
#endif
@@ -830,36 +820,6 @@ privateC++ _Tt_message_list::__vtbl
privateC++ _Tt_procid_list::__vtbl
#endif
#ifdef hpV4
/* If debugging is enabled the tt clients require these symbols on HP. */
privateC++ _Tt_arg::__vtbl
privateC++ _Tt_context::__vtbl
privateC++ _Tt_db_access::__vtbl
privateC++ _Tt_db_client::__vtbl
privateC++ _Tt_db_hostname_redirection_map::__vtbl
privateC++ _Tt_db_key::__vtbl
privateC++ _Tt_db_object::__vtbl
privateC++ _Tt_db_property::__vtbl
privateC++ _Tt_desktop_lock::__vtbl
privateC++ _Tt_file_system_entry::__vtbl
privateC++ _Tt_global::__vtbl
privateC++ _Tt_int_rec::__vtbl
privateC++ _Tt_message::__vtbl
privateC++ _Tt_mp::__vtbl
privateC++ _Tt_msg_context::__vtbl
privateC++ _Tt_object_list::__vtbl
privateC++ _Tt_object_table::__vtbl
privateC++ _Tt_pat_context::__vtbl
privateC++ _Tt_patlist::__vtbl
privateC++ _Tt_pattern::__vtbl
privateC++ _Tt_procid::__vtbl
privateC++ _Tt_session::__vtbl
privateC++ _Tt_session_prop::__vtbl
privateC++ _Tt_string_buf::__vtbl
privateC++ _Tt_string_buf_list::__vtbl
privateC++ _Tt_string_list::__vtbl
#endif
#ifdef OPT_BUG_SUNOS_5
/* This symbol was accidentally exported in libtt.so.1, so preserve */
/* it for backward compatibility. */

View File

@@ -149,7 +149,7 @@ c_open_unix_socket(char *socket_name)
memset(&server_addr, 0, sizeof(server_addr));
server_addr.sun_family = AF_UNIX;
strcpy(server_addr.sun_path, socket_name);
#if defined(_AIX) || defined(hpux)
#if defined(_AIX)
int servlen = strlen(server_addr.sun_path) + sizeof(server_addr.sun_fam\
ily);
if (connect(sock, (sockaddr *)&server_addr, servlen) < 0) {

View File

@@ -57,7 +57,7 @@ char *finalpath;
strcpy(curpath, pathname);
if (*pathname != '/') {
#if defined(__STDC__) && defined(hpux)
#if defined(__STDC__)
if (!getcwd(workpath)) {
#else
if (!getwd(workpath)) {

View File

@@ -71,15 +71,9 @@
* OPT_BUG_SUNOS_5 -- used to flag special hacks only needed because
* of bugs or quirks in SunOS 5.x.
*
* OPT_BUG_HPUX -- used to flag special hacks only needed because
* of bugs or quirks in HP-UX.
*
* OPT_BUG_RPCINTR -- used to flag that RPC_INTR is not defined
* in enum clnt_stat.
*
* OPT_BUG_SGI -- used to flag special hacks only needed because of
* bugs or quirks in SGI IRIX.
*
* OPT_XDR_LONG_TYPE -- used for (64-bit) architectures where
* <rcp/xdr.h> defines x_putlong and x_getlong to not take "long*".
*
@@ -337,58 +331,6 @@
# undef OPT_GARBAGE_THREADS
# endif
#elif defined(sgi)
/* these are probably way obsolete now that irix is svr4 based */
# define OPT_UNIX_SOCKET_RPC
# undef OPT_TLI
# undef OPT_DLOPEN_X11
# undef OPT_DLOPEN_CE
# undef OPT_ADDMSG_DIRECT
# undef OPT_SECURE_RPC
# undef OPT_CLASSING_ENGINE
# define OPT_TAR_HAS_EXCLUDE_OPTION
#elif defined(__hpux) || defined(hpux)
# undef OPT_UNIX_SOCKET_RPC
# undef OPT_TLI
# undef OPT_DLOPEN_X11
# undef OPT_DLOPEN_CE
# undef OPT_ADDMSG_DIRECT
# define OPT_BUG_HPUX
# undef OPT_SECURE_RPC
# undef OPT_CLASSING_ENGINE
# undef OPT_BSD_SIGNAL
# define OPT_POSIX_SIGNAL
# undef OPT_BSD_WAIT
# undef OPT_DGETTEXT
# define OPT_CATGETS
# undef OPT_GETDTABLESIZE
# undef OPT_SYSINFO
# define OPT_HAS_REALPATH
# define OPT_AUTOMOUNT_PATH_FIX
/*
* re-define these. HP-UX does not seem to want to wake up a swapped
* process. The timeouts have to be increased so that HP-UX has time
* to swap in ttsession (if it is out).
*/
# undef OPT_PING_TRIES
# define OPT_PING_TRIES 10
# undef OPT_PING_SLEEP
# define OPT_PING_SLEEP 2
# if OSMAJORVERSION < 10
# define OPT_CPP_PATH "/lib/cpp"
# else
# define OPT_CPP_PATH "/opt/langtools/lbin/cpp"
# endif
# define OPT_CPP_OPTIONS ""
# undef OPT_SVR4_GETMNTENT
# undef OPT_LOCKF_MNTENT
# define OPT_LOCAL_MOUNT_TYPE MNTTYPE_HFS
# define OPT_DEFINE_SIG_PF
# undef OPT_TAR_HAS_EXCLUDE_OPTION
# define OPT_BUG_RPCINTR
#elif defined(__linux__)
# undef OPT_UNIX_SOCKET_RPC

View File

@@ -1765,8 +1765,7 @@ _ttdt_posix_cb(
tt_message_arg_val_set( msg, 4, names.machine );
// The last 3 are from sysinfo which seems to be SVR4 only.
// For platforms without the sysinfo call, we just leave
// the values unset for now, except for the serial
// number which is available from utsname onHPUX.
// the values unset for now
#if defined(OPT_SYSINFO)
if (sysinfo( SI_ARCHITECTURE, buf, SYS_NMLN ) >= 0) {
tt_message_arg_val_set( msg, 5, buf );
@@ -1777,8 +1776,6 @@ _ttdt_posix_cb(
if (sysinfo( SI_HW_SERIAL, buf, SYS_NMLN ) >= 0) {
tt_message_arg_val_set( msg, 7, buf );
}
#elif defined(__hpux) || defined(hpux)
tt_message_arg_val_set( msg, 7, names.idnumber);
#endif
tt_message_reply( msg );
tttk_message_destroy( msg );

View File

@@ -37,7 +37,7 @@
#include <rpc/rpc.h>
#include <util/tt_ptr.h>
#include <util/tt_object.h>
#if defined(OPT_BUG_HPUX) || defined(OPT_BUG_AIX)
#if defined(OPT_BUG_AIX)
# undef remove
#endif

View File

@@ -45,12 +45,6 @@
#include <stdlib.h>
#include <stdarg.h>
#include <syslog.h>
#if defined(OPT_BUG_HPUX) && !defined(hpV4)
extern "C" {
int syslog(int priority, const char *message, ...);
int openlog(const char *ident, int logopt, int facility);
}
#endif
#if defined(sun)
#include <sys/utsname.h>
#endif
@@ -200,15 +194,11 @@ _tt_gethostid(void)
sscanf(serial_num, "%12lx", &_hostid);
}
}
#elif defined(hpux) || defined(_AIX)
#elif defined(_AIX)
struct utsname uts_name;
uname(&uts_name);
# if defined(_AIX)
_hostid = atol(uts_name.machine);
# else
_hostid = atol(uts_name.idnumber);
# endif
_hostid = atol(uts_name.machine);
#else
_hostid = gethostid();
#endif
@@ -365,7 +355,7 @@ _tt_vsyslog(
return;
}
#if defined(OPT_BUG_AIX) || defined(OPT_BUG_HPUX)
#if defined(OPT_BUG_AIX)
char buf[5000];
vsprintf( buf, _format, args );
syslog( priority, buf );

View File

@@ -44,11 +44,7 @@
#endif
#include <limits.h>
#if defined(OPT_BUG_HPUX)
extern "C" {
#include <wchar.h>
};
#elif defined(OPT_BUG_SUNOS_5)
#if defined(OPT_BUG_SUNOS_5)
#include <widec.h>
#include <wctype.h>
#elif defined(OPT_BUG_AIX)

View File

@@ -42,12 +42,6 @@
#include "util/tt_assert.h"
#include <string.h>
#if defined (__hpux)
/*
* On HP MAXINT is defined in both <values.h> and <sys/param.h>
*/
#undef MAXINT
#endif
#if defined(CSRG_BASED)
#define MAXINT INT_MAX
#else

View File

@@ -41,7 +41,7 @@
#include "util/tt_trace_parser.h"
#include "util/tt_entry_pt_names.h"
#if defined (_AIX) || defined(hpux) || defined(__linux__) || defined(CSRG_BASED)
#if defined (_AIX) || defined(__linux__) || defined(CSRG_BASED)
#include <fcntl.h>
#endif

View File

@@ -113,7 +113,7 @@ _tt_xdr_sizeof(xdrproc_t f, void *data)
_Tt_xdr_size_stream::
_Tt_xdr_size_stream() {
memset (&ops, 0, sizeof ops);
#if defined(OPT_BUG_SUNOS_4) || defined(OPT_BUG_HPUX)
#if defined(OPT_BUG_SUNOS_4)
ops.x_putlong = (int (*)(...))tt_x_putlong;
ops.x_putbytes = (int (*)(...))tt_x_putbytes;
ops.x_inline = (long *(*)(...))tt_x_inline;

View File

@@ -115,7 +115,7 @@ s_open_unix_socket(char *socket_name)
server_addr.sun_family = AF_UNIX;
(void)unlink(socket_name);
strcpy(server_addr.sun_path, socket_name);
#if defined(_AIX) || defined(hpux)
#if defined(_AIX)
int servlen = strlen(server_addr.sun_path) + sizeof(server_addr.sun_fam\
ily);
if (bind(sock, (struct sockaddr *)&server_addr,servlen) < 0) {