1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[Feature #18491] Drop support for HP-UX

IA64 support was dropped in ticket #15894, so we can drop support for
HP-UX.
This commit is contained in:
Peter Zhu 2022-01-18 09:01:03 -05:00
parent 54568c949b
commit ffda21b7ba
Notes: git 2022-01-18 23:52:43 +09:00
12 changed files with 5 additions and 91 deletions

View file

@ -579,7 +579,6 @@ RUBY_WERROR_FLAG([
rpathflag='' rpathflag=''
AS_IF([test x"${RPATHFLAG}" = x], [ AS_IF([test x"${RPATHFLAG}" = x], [
AS_CASE(["$target_os"], AS_CASE(["$target_os"],
[hpux*], [AS_IF([test "$rb_cv_prog_gnu_ld" = no], [rpathflag='+b '])],
[aix*], [rpathflag='-blibpath:'], [aix*], [rpathflag='-blibpath:'],
[for rpathflag in -R "-rpath "; do [for rpathflag in -R "-rpath "; do
AS_CASE("$rpathflag", AS_CASE("$rpathflag",
@ -1068,8 +1067,6 @@ main()
]) ])
cleanlibs='$(TARGET_SO).dSYM' cleanlibs='$(TARGET_SO).dSYM'
], ],
[hpux*], [ LIBS="-lm $LIBS"
ac_cv_c_inline=no],
[solaris*], [ LIBS="-lm $LIBS" [solaris*], [ LIBS="-lm $LIBS"
ac_cv_func_vfork=no ac_cv_func_vfork=no
AC_MSG_CHECKING(whether _XOPEN_SOURCE is already given) AC_MSG_CHECKING(whether _XOPEN_SOURCE is already given)
@ -1241,7 +1238,6 @@ AS_IF([test -n "${rb_there_is_in_fact_no_gplusplus_but_autoconf_is_cheating_us}"
AC_CHECK_LIB(crypt, crypt) # glibc (GNU/Linux, GNU/Hurd, GNU/kFreeBSD) AC_CHECK_LIB(crypt, crypt) # glibc (GNU/Linux, GNU/Hurd, GNU/kFreeBSD)
AC_CHECK_LIB(dl, dlopen) # Dynamic linking for SunOS/Solaris and SYSV AC_CHECK_LIB(dl, dlopen) # Dynamic linking for SunOS/Solaris and SYSV
AC_CHECK_LIB(dld, shl_load) # Dynamic linking for HP-UX
AC_CHECK_LIB(socket, shutdown) # SunOS/Solaris AC_CHECK_LIB(socket, shutdown) # SunOS/Solaris
if pkg-config --exists capstone; then if pkg-config --exists capstone; then
@ -1939,7 +1935,6 @@ AC_DEFINE(HAVE_ISFINITE) # C99; backward compatibility
# for missing/setproctitle.c # for missing/setproctitle.c
AS_CASE(["$target_os"], AS_CASE(["$target_os"],
[aix* | k*bsd*-gnu | kopensolaris*-gnu | linux* | darwin*], [AC_DEFINE(SPT_TYPE,SPT_REUSEARGV)], [aix* | k*bsd*-gnu | kopensolaris*-gnu | linux* | darwin*], [AC_DEFINE(SPT_TYPE,SPT_REUSEARGV)],
[hpux*], [AC_DEFINE(SPT_TYPE,SPT_PSTAT) ],
[]) [])
AC_CHECK_HEADERS(sys/pstat.h) AC_CHECK_HEADERS(sys/pstat.h)
@ -2918,7 +2913,6 @@ STATIC=
RUBY_APPEND_OPTION(CCDLFLAGS, -fPIC)]) RUBY_APPEND_OPTION(CCDLFLAGS, -fPIC)])
], [ ], [
AS_CASE(["$target_os"], AS_CASE(["$target_os"],
[hpux*], [CCDLFLAGS="$CCDLFLAGS +Z"],
[solaris*|irix*], [CCDLFLAGS="$CCDLFLAGS -KPIC"], [solaris*|irix*], [CCDLFLAGS="$CCDLFLAGS -KPIC"],
[sunos*], [CCDLFLAGS="$CCDLFLAGS -PIC"], [sunos*], [CCDLFLAGS="$CCDLFLAGS -PIC"],
[esix*|uxpds*], [CCDLFLAGS="$CCDLFLAGS -KPIC"], [esix*|uxpds*], [CCDLFLAGS="$CCDLFLAGS -KPIC"],
@ -2933,11 +2927,6 @@ STATIC=
[enable_rpath=$enableval], [enable_rpath="$rb_cv_binary_elf"]) [enable_rpath=$enableval], [enable_rpath="$rb_cv_binary_elf"])
AS_CASE(["$target_os"], AS_CASE(["$target_os"],
[hpux*], [ DLDFLAGS="$DLDFLAGS -E"
: ${LDSHARED='$(LD) -b'}
XLDFLAGS="$XLDFLAGS -Wl,-E"
: ${LIBPATHENV=SHLIB_PATH}
rb_cv_dlopen=yes],
[solaris*], [ AS_IF([test "$GCC" = yes], [ [solaris*], [ AS_IF([test "$GCC" = yes], [
: ${LDSHARED='$(CC) -shared'} : ${LDSHARED='$(CC) -shared'}
AS_IF([test "$rb_cv_prog_gnu_ld" = yes], [ AS_IF([test "$rb_cv_prog_gnu_ld" = yes], [
@ -3185,8 +3174,6 @@ AS_IF([test x$with_valgrind != xno],
: "dlext & soext" && { : "dlext & soext" && {
AS_CASE(["$target_os"], AS_CASE(["$target_os"],
[hpux*], [
DLEXT=sl],
[darwin*], [ [darwin*], [
SOEXT=dylib SOEXT=dylib
DLEXT=bundle], DLEXT=bundle],
@ -3494,10 +3481,6 @@ AS_CASE("$enable_shared", [yes], [
LIBRUBY_RPATHFLAGS='-R${libdir}' LIBRUBY_RPATHFLAGS='-R${libdir}'
]) ])
], ],
[hpux*], [
XLDFLAGS="$XLDFLAGS "'-Wl,+s,+b,$(libdir)'
LIBRUBY_ALIASES='$(LIBRUBY_SONAME) lib$(RUBY_SO_NAME).$(SOEXT)'
],
[aix*], [ [aix*], [
RUBY_APPEND_OPTIONS(LIBRUBY_DLDFLAGS, ["${linker_flag}-bnoentry" "$XLDFLAGS" "$LDFLAGS_OPTDIR"]) RUBY_APPEND_OPTIONS(LIBRUBY_DLDFLAGS, ["${linker_flag}-bnoentry" "$XLDFLAGS" "$LDFLAGS_OPTDIR"])
LIBRUBYARG_SHARED='-L${libdir} -l${RUBY_SO_NAME}' LIBRUBYARG_SHARED='-L${libdir} -l${RUBY_SO_NAME}'
@ -3803,12 +3786,6 @@ AS_CASE(["$target_os"],
LIBRUBY='lib$(RUBY_SO_NAME).a' LIBRUBY='lib$(RUBY_SO_NAME).a'
LIBRUBYARG='-l$(RUBY_SO_NAME)' LIBRUBYARG='-l$(RUBY_SO_NAME)'
]) ])
],
[hpux*], [
AS_CASE(["$YACC"],[*yacc*], [
XCFLAGS="$XCFLAGS -DYYMAXDEPTH=300"
YACC="$YACC -Nl40000 -Nm40000"
])
]) ])
MINIOBJS="$MINIDLNOBJ" MINIOBJS="$MINIDLNOBJ"

31
dln.c
View file

@ -139,11 +139,6 @@ static const char funcname_prefix[sizeof(FUNCNAME_PREFIX) - 1] = FUNCNAME_PREFIX
# include <dlfcn.h> # include <dlfcn.h>
#endif #endif
#ifdef __hpux
#include <errno.h>
#include "dl.h"
#endif
#if defined(_AIX) #if defined(_AIX)
#include <ctype.h> /* for isdigit() */ #include <ctype.h> /* for isdigit() */
#include <errno.h> /* for global errno */ #include <errno.h> /* for global errno */
@ -393,32 +388,6 @@ dln_load(const char *file)
} }
#endif /* USE_DLN_DLOPEN */ #endif /* USE_DLN_DLOPEN */
#ifdef __hpux
#define DLN_DEFINED
{
shl_t lib = NULL;
int flags;
void (*init_fct)(void);
flags = BIND_DEFERRED;
lib = shl_load(file, flags, 0);
if (lib == NULL) {
extern int errno;
dln_loaderror("%s - %s", strerror(errno), file);
}
shl_findsym(&lib, buf, TYPE_PROCEDURE, (void*)&init_fct);
if (init_fct == NULL) {
shl_findsym(&lib, buf, TYPE_UNDEFINED, (void*)&init_fct);
if (init_fct == NULL) {
errno = ENOSYM;
dln_loaderror("%s - %s", strerror(ENOSYM), file);
}
}
(*init_fct)();
return (void*)lib;
}
#endif /* hpux */
#if defined(_AIX) #if defined(_AIX)
#define DLN_DEFINED #define DLN_DEFINED
{ {

View file

@ -28,7 +28,7 @@ typedef struct statvfs statfs_t;
# if defined HAVE_STRUCT_STATVFS_F_TYPE # if defined HAVE_STRUCT_STATVFS_F_TYPE
# define HAVE_STRUCT_STATFS_T_F_TYPE 1 # define HAVE_STRUCT_STATFS_T_F_TYPE 1
# endif # endif
#elif defined(HAVE_STRUCT_STATVFS_F_BASETYPE) /* AIX, HP-UX, Solaris */ #elif defined(HAVE_STRUCT_STATVFS_F_BASETYPE) /* AIX, Solaris */
typedef struct statvfs statfs_t; typedef struct statvfs statfs_t;
# define STATFS(f, s) statvfs((f), (s)) # define STATFS(f, s) statvfs((f), (s))
# define HAVE_STRUCT_STATFS_T_F_FSTYPENAME 1 # define HAVE_STRUCT_STATFS_T_F_FSTYPENAME 1

View file

@ -128,7 +128,7 @@ typedef u_int64_t sha2_word64; /* Exactly 8 bytes */
#define SHA512_SHORT_BLOCK_LENGTH (SHA512_BLOCK_LENGTH - 16) #define SHA512_SHORT_BLOCK_LENGTH (SHA512_BLOCK_LENGTH - 16)
#if (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) || defined(__GNUC__) || defined(_HPUX_SOURCE) || defined(__IBMC__) #if (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) || defined(__GNUC__) || defined(__IBMC__)
#define ULL(number) number##ULL #define ULL(number) number##ULL
#else #else
#define ULL(number) (uint64_t)(number) #define ULL(number) (uint64_t)(number)

View file

@ -389,14 +389,7 @@ get_device_once(int *master, int *slave, char SlaveName[DEVICELEN], int nomesg,
c"0",c"1",c"2",c"3",c"4",c"5",c"6",c"7", \ c"0",c"1",c"2",c"3",c"4",c"5",c"6",c"7", \
c"8",c"9",c"a",c"b",c"c",c"d",c"e",c"f" c"8",c"9",c"a",c"b",c"c",c"d",c"e",c"f"
#if defined(__hpux) #if defined(_IBMESA) /* AIX/ESA */
static const char MasterDevice[] = "/dev/ptym/pty%s";
static const char SlaveDevice[] = "/dev/pty/tty%s";
static const char deviceNo[][3] = {
HEX1("p"), HEX1("q"), HEX1("r"), HEX1("s"),
HEX1("t"), HEX1("u"), HEX1("v"), HEX1("w"),
};
#elif defined(_IBMESA) /* AIX/ESA */
static const char MasterDevice[] = "/dev/ptyp%s"; static const char MasterDevice[] = "/dev/ptyp%s";
static const char SlaveDevice[] = "/dev/ttyp%s"; static const char SlaveDevice[] = "/dev/ttyp%s";
static const char deviceNo[][3] = { static const char deviceNo[][3] = {

View file

@ -1529,7 +1529,7 @@ rsock_sockaddr_obj(struct sockaddr *addr, socklen_t len)
#endif #endif
#if defined(HAVE_GETIFADDRS) || (defined(SIOCGLIFCONF) && defined(SIOCGLIFNUM) && !defined(__hpux)) || defined(SIOCGIFCONF) || defined(_WIN32) #if defined(HAVE_GETIFADDRS) || (defined(SIOCGLIFCONF) && defined(SIOCGLIFNUM)) || defined(SIOCGIFCONF) || defined(_WIN32)
/* /*
* call-seq: * call-seq:
* Socket.ip_address_list => array * Socket.ip_address_list => array
@ -1590,9 +1590,8 @@ socket_s_ip_address_list(VALUE self)
freeifaddrs(ifp); freeifaddrs(ifp);
return list; return list;
#elif defined(SIOCGLIFCONF) && defined(SIOCGLIFNUM) && !defined(__hpux) #elif defined(SIOCGLIFCONF) && defined(SIOCGLIFNUM)
/* Solaris if_tcp(7P) */ /* Solaris if_tcp(7P) */
/* HP-UX has SIOCGLIFCONF too. But it uses different struct */
int fd = -1; int fd = -1;
int ret; int ret;
struct lifnum ln; struct lifnum ln;

View file

@ -35,9 +35,6 @@
* `select(2)` documents how to allocate fd_set dynamically. * `select(2)` documents how to allocate fd_set dynamically.
* http://www.openbsd.org/cgi-bin/man.cgi?query=select&manpath=OpenBSD+4.4 * http://www.openbsd.org/cgi-bin/man.cgi?query=select&manpath=OpenBSD+4.4
* *
* - HP-UX documents how to allocate fd_set dynamically.
* http://docs.hp.com/en/B2355-60105/select.2.html
*
* - Solaris 8 has `select_large_fdset` * - Solaris 8 has `select_large_fdset`
* *
* - Mac OS X 10.7 (Lion) * - Mac OS X 10.7 (Lion)

View file

@ -6806,7 +6806,6 @@ proc_setgid(VALUE obj, VALUE id)
* Darwin (Mac OS X) 16 * Darwin (Mac OS X) 16
* Sun Solaris 7,8,9,10 16 * Sun Solaris 7,8,9,10 16
* Sun Solaris 11 / OpenSolaris 1024 * Sun Solaris 11 / OpenSolaris 1024
* HP-UX 20
* Windows 1015 * Windows 1015
*/ */
static int _maxgroups = -1; static int _maxgroups = -1;

4
ruby.c
View file

@ -22,10 +22,6 @@
# include <sys/cygwin.h> # include <sys/cygwin.h>
#endif #endif
#ifdef __hpux
# include <sys/pstat.h>
#endif
#if defined(LOAD_RELATIVE) && defined(HAVE_DLADDR) #if defined(LOAD_RELATIVE) && defined(HAVE_DLADDR)
# include <dlfcn.h> # include <dlfcn.h>
#endif #endif

View file

@ -392,7 +392,6 @@ all-incs: probes.h
# * with gperf v.s. without gperf # * with gperf v.s. without gperf
# * committers may have various versions of gperf # * committers may have various versions of gperf
# * ./configure v.s. ../ruby/configure # * ./configure v.s. ../ruby/configure
# * GNU make v.s. HP-UX make # HP-UX make invokes the action if lex.c and keywords has same mtime.
# * svn checkout generate a file with mtime as current time # * svn checkout generate a file with mtime as current time
# * ext4 and XFS has a mtime with fractional part # * ext4 and XFS has a mtime with fractional part
lex.c: defs/keywords lex.c: defs/keywords

View file

@ -3945,8 +3945,6 @@ rb_thread_priority_set(VALUE thread, VALUE prio)
* - OpenBSD 2.0 (src/sys/kern/sys_generic.c:1.4) * - OpenBSD 2.0 (src/sys/kern/sys_generic.c:1.4)
* select(2) documents how to allocate fd_set dynamically. * select(2) documents how to allocate fd_set dynamically.
* http://www.openbsd.org/cgi-bin/man.cgi?query=select&manpath=OpenBSD+4.4 * http://www.openbsd.org/cgi-bin/man.cgi?query=select&manpath=OpenBSD+4.4
* - HP-UX documents how to allocate fd_set dynamically.
* http://docs.hp.com/en/B2355-60105/select.2.html
* - Solaris 8 has select_large_fdset * - Solaris 8 has select_large_fdset
* - Mac OS X 10.7 (Lion) * - Mac OS X 10.7 (Lion)
* select(2) returns EINVAL if nfds is greater than FD_SET_SIZE and * select(2) returns EINVAL if nfds is greater than FD_SET_SIZE and

View file

@ -101,23 +101,12 @@
# endif # endif
#endif #endif
#if defined(__hpux) && !defined(__GNUC__) && !defined(__STDC__)
#define const
#endif
#if defined(sgi) #if defined(sgi)
#undef __const #undef __const
#define __const #define __const
#endif /* People who don't like const sys_error */ #endif /* People who don't like const sys_error */
#include <stddef.h> #include <stddef.h>
#if defined(__hpux) && !defined(__GNUC__) || defined(__DECC)
#include <string.h>
#endif
#if !defined(__CYGWIN32__) && defined(__hpux) && !defined(__GNUC__)
#include <stdlib.h>
#endif
#ifndef NULL #ifndef NULL
#define NULL 0 #define NULL 0
@ -251,9 +240,7 @@ BSD__sfvwrite(register FILE *fp, register struct __suio *uio)
if ((len = uio->uio_resid) == 0) if ((len = uio->uio_resid) == 0)
return (0); return (0);
#ifndef __hpux
#define MIN(a, b) ((a) < (b) ? (a) : (b)) #define MIN(a, b) ((a) < (b) ? (a) : (b))
#endif
#define COPY(n) (void)memcpy((void *)fp->_p, (void *)p, (size_t)(n)) #define COPY(n) (void)memcpy((void *)fp->_p, (void *)p, (size_t)(n))
iov = uio->uio_iov; iov = uio->uio_iov;