ruby-changes:70958
From: Peter <ko1@a...>
Date: Tue, 18 Jan 2022 23:52:34 +0900 (JST)
Subject: [ruby-changes:70958] ffda21b7ba (master): [Feature #18491] Drop support for HP-UX
https://git.ruby-lang.org/ruby.git/commit/?id=ffda21b7ba From ffda21b7ba451b8fd874e9c8c2162c55053caa1e Mon Sep 17 00:00:00 2001 From: Peter Zhu <peter@p...> Date: Tue, 18 Jan 2022 09:01:03 -0500 Subject: [Feature #18491] Drop support for HP-UX IA64 support was dropped in ticket #15894, so we can drop support for HP-UX. --- configure.ac | 23 ------------------ dln.c | 31 ------------------------- ext/-test-/file/fs.c | 2 +- ext/digest/sha2/sha2.c | 2 +- ext/pty/pty.c | 9 +------ ext/socket/socket.c | 5 ++-- include/ruby/internal/intern/select/largesize.h | 3 --- process.c | 1 - ruby.c | 4 ---- template/Makefile.in | 1 - thread.c | 2 -- vsnprintf.c | 13 ----------- 12 files changed, 5 insertions(+), 91 deletions(-) diff --git a/configure.ac b/configure.ac index b870896b5d3..7b8552e4f02 100644 --- a/configure.ac +++ b/configure.ac @@ -579,7 +579,6 @@ RUBY_WERROR_FLAG([ https://github.com/ruby/ruby/blob/trunk/configure.ac#L579 rpathflag='' AS_IF([test x"${RPATHFLAG}" = x], [ AS_CASE(["$target_os"], - [hpux*], [AS_IF([test "$rb_cv_prog_gnu_ld" = no], [rpathflag='+b '])], [aix*], [rpathflag='-blibpath:'], [for rpathflag in -R "-rpath "; do AS_CASE("$rpathflag", @@ -1068,8 +1067,6 @@ main() https://github.com/ruby/ruby/blob/trunk/configure.ac#L1067 ]) cleanlibs='$(TARGET_SO).dSYM' ], -[hpux*], [ LIBS="-lm $LIBS" - ac_cv_c_inline=no], [solaris*], [ LIBS="-lm $LIBS" ac_cv_func_vfork=no 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}" https://github.com/ruby/ruby/blob/trunk/configure.ac#L1238 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(dld, shl_load) # Dynamic linking for HP-UX AC_CHECK_LIB(socket, shutdown) # SunOS/Solaris if pkg-config --exists capstone; then @@ -1939,7 +1935,6 @@ AC_DEFINE(HAVE_ISFINITE) # C99; backward compatibility https://github.com/ruby/ruby/blob/trunk/configure.ac#L1935 # for missing/setproctitle.c AS_CASE(["$target_os"], [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) @@ -2918,7 +2913,6 @@ STATIC= https://github.com/ruby/ruby/blob/trunk/configure.ac#L2913 RUBY_APPEND_OPTION(CCDLFLAGS, -fPIC)]) ], [ AS_CASE(["$target_os"], - [hpux*], [CCDLFLAGS="$CCDLFLAGS +Z"], [solaris*|irix*], [CCDLFLAGS="$CCDLFLAGS -KPIC"], [sunos*], [CCDLFLAGS="$CCDLFLAGS -PIC"], [esix*|uxpds*], [CCDLFLAGS="$CCDLFLAGS -KPIC"], @@ -2933,11 +2927,6 @@ STATIC= https://github.com/ruby/ruby/blob/trunk/configure.ac#L2927 [enable_rpath=$enableval], [enable_rpath="$rb_cv_binary_elf"]) 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], [ : ${LDSHARED='$(CC) -shared'} AS_IF([test "$rb_cv_prog_gnu_ld" = yes], [ @@ -3185,8 +3174,6 @@ AS_IF([test x$with_valgrind != xno], https://github.com/ruby/ruby/blob/trunk/configure.ac#L3174 : "dlext & soext" && { AS_CASE(["$target_os"], - [hpux*], [ - DLEXT=sl], [darwin*], [ SOEXT=dylib DLEXT=bundle], @@ -3494,10 +3481,6 @@ AS_CASE("$enable_shared", [yes], [ https://github.com/ruby/ruby/blob/trunk/configure.ac#L3481 LIBRUBY_RPATHFLAGS='-R${libdir}' ]) ], - [hpux*], [ - XLDFLAGS="$XLDFLAGS "'-Wl,+s,+b,$(libdir)' - LIBRUBY_ALIASES='$(LIBRUBY_SONAME) lib$(RUBY_SO_NAME).$(SOEXT)' - ], [aix*], [ RUBY_APPEND_OPTIONS(LIBRUBY_DLDFLAGS, ["${linker_flag}-bnoentry" "$XLDFLAGS" "$LDFLAGS_OPTDIR"]) LIBRUBYARG_SHARED='-L${libdir} -l${RUBY_SO_NAME}' @@ -3803,12 +3786,6 @@ AS_CASE(["$target_os"], https://github.com/ruby/ruby/blob/trunk/configure.ac#L3786 LIBRUBY='lib$(RUBY_SO_NAME).a' LIBRUBYARG='-l$(RUBY_SO_NAME)' ]) - ], - [hpux*], [ - AS_CASE(["$YACC"],[*yacc*], [ - XCFLAGS="$XCFLAGS -DYYMAXDEPTH=300" - YACC="$YACC -Nl40000 -Nm40000" - ]) ]) MINIOBJS="$MINIDLNOBJ" diff --git a/dln.c b/dln.c index e40c3740c87..d3d5e38c3a3 100644 --- a/dln.c +++ b/dln.c @@ -139,11 +139,6 @@ static const char funcname_prefix[sizeof(FUNCNAME_PREFIX) - 1] = FUNCNAME_PREFIX https://github.com/ruby/ruby/blob/trunk/dln.c#L139 # include <dlfcn.h> #endif -#ifdef __hpux -#include <errno.h> -#include "dl.h" -#endif - #if defined(_AIX) #include <ctype.h> /* for isdigit() */ #include <errno.h> /* for global errno */ @@ -393,32 +388,6 @@ dln_load(const char *file) https://github.com/ruby/ruby/blob/trunk/dln.c#L388 } #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) #define DLN_DEFINED { diff --git a/ext/-test-/file/fs.c b/ext/-test-/file/fs.c index 63d2356d762..1a6c3d06dc1 100644 --- a/ext/-test-/file/fs.c +++ b/ext/-test-/file/fs.c @@ -28,7 +28,7 @@ typedef struct statvfs statfs_t; https://github.com/ruby/ruby/blob/trunk/ext/-test-/file/fs.c#L28 # if defined HAVE_STRUCT_STATVFS_F_TYPE # define HAVE_STRUCT_STATFS_T_F_TYPE 1 # 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; # define STATFS(f, s) statvfs((f), (s)) # define HAVE_STRUCT_STATFS_T_F_FSTYPENAME 1 diff --git a/ext/digest/sha2/sha2.c b/ext/digest/sha2/sha2.c index e7d7b15c5b3..21d5acbe964 100644 --- a/ext/digest/sha2/sha2.c +++ b/ext/digest/sha2/sha2.c @@ -128,7 +128,7 @@ typedef u_int64_t sha2_word64; /* Exactly 8 bytes */ https://github.com/ruby/ruby/blob/trunk/ext/digest/sha2/sha2.c#L128 #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 #else #define ULL(number) (uint64_t)(number) diff --git a/ext/pty/pty.c b/ext/pty/pty.c index 72074f74210..cb663ab2de2 100644 --- a/ext/pty/pty.c +++ b/ext/pty/pty.c @@ -389,14 +389,7 @@ get_device_once(int *master, int *slave, char SlaveName[DEVICELEN], int nomesg, https://github.com/ruby/ruby/blob/trunk/ext/pty/pty.c#L389 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" -#if defined(__hpux) - 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 */ +#if defined(_IBMESA) /* AIX/ESA */ static const char MasterDevice[] = "/dev/ptyp%s"; static const char SlaveDevice[] = "/dev/ttyp%s"; static const char deviceNo[][3] = { diff --git a/ext/socket/socket.c b/ext/socket/socket.c index ccf990d11fb..4ba1c6cd61e 100644 --- a/ext/socket/socket.c +++ b/ext/socket/socket.c @@ -1529,7 +1529,7 @@ rsock_sockaddr_obj(struct sockaddr *addr, socklen_t len) https://github.com/ruby/ruby/blob/trunk/ext/socket/socket.c#L1529 #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: * Socket.ip_address_list => array @@ -1590,9 +1590,8 @@ socket_s_ip_address_list(VALUE self) https://github.com/ruby/ruby/blob/trunk/ext/socket/socket.c#L1590 freeifaddrs(ifp); return list; -#elif defined(SIOCGLIFCONF) && defined(SIOCGLIFNUM) && !defined(__hpux) +#elif defined(SIOCGLIFCONF) && defined(SIOCGLIFNUM) /* Solaris if_tcp(7P) */ - /* HP-UX has SIOCGLIFCONF too. But it uses different struct */ int fd = -1; int ret; struct lifnum ln; diff --git a/include/ruby/internal/intern/select/largesize.h b/include/ruby/internal/intern/select/largesize.h index d156f62034b..d65f088c061 100644 --- a/include/ruby/internal/intern/select/largesize.h +++ b/include/ruby/internal/intern/select/largesize.h @@ -35,9 +35,6 @@ https://github.com/ruby/ruby/blob/trunk/include/ruby/internal/intern/select/largesize.h#L35 * `select(2)` documents how to allocate fd_set dynamically. * 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` * * - Mac OS X 10.7 (Lion) diff --git a/process.c b/process.c index 11031d2c7d2..672c2df9a9b 100644 --- a/process.c +++ b/process.c @@ -6806,7 +6806,6 @@ proc_setgid(VALUE obj, VALUE id) https://github.com/ruby/ruby/blob/trunk/process.c#L6806 * Darwin (Mac OS X) (... truncated) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/