Remove HP-UX port.
authorThomas Munro <tmunro@postgresql.org>
Thu, 7 Jul 2022 23:17:47 +0000 (11:17 +1200)
committerThomas Munro <tmunro@postgresql.org>
Fri, 8 Jul 2022 02:05:05 +0000 (14:05 +1200)
HP-UX hardware is no longer produced, build farm coverage recently
ended, and there are no known active maintainers targeting this OS.
Since there is a major rewrite of the build system in the pipeline for
PostgreSQL 16, and that requires development, testing and maintainance
for each OS and tool chain, it seems like a good time to drop support
for:

 * HP-UX, the operating system.
 * HP aCC, the HP-UX native compiler.

Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Reviewed-by: Andres Freund <andres@anarazel.de>
Reviewed-by: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Discussion: https://postgr.es/m/1415825.1656893299%40sss.pgh.pa.us

28 files changed:
configure
configure.ac
doc/src/sgml/dfunc.sgml
doc/src/sgml/installation.sgml
doc/src/sgml/regress.sgml
doc/src/sgml/runtime.sgml
src/Makefile.shlib
src/backend/libpq/ifaddr.c
src/backend/port/hpux/tas.c.template [deleted file]
src/backend/port/tas/hpux_hppa.s [deleted file]
src/backend/tcop/postgres.c
src/backend/utils/misc/ps_status.c
src/include/pg_config.h.in
src/include/port/atomics.h
src/include/port/atomics/arch-ia64.h
src/include/port/atomics/fallback.h
src/include/port/atomics/generic-acc.h [deleted file]
src/include/port/hpux.h [deleted file]
src/include/storage/s_lock.h
src/makefiles/Makefile.hpux [deleted file]
src/pl/plperl/ppport.h
src/port/dlopen.c
src/port/getrusage.c
src/template/hpux [deleted file]
src/test/regress/resultmap
src/tools/msvc/Solution.pm
src/tools/pginclude/cpluspluscheck
src/tools/pginclude/headerscheck

index da177403ef2c6f17fe2c1289c58c2c6f59ae108b..a90be0382105b171c9668b289b884da6e9dcc82a 100755 (executable)
--- a/configure
+++ b/configure
@@ -2994,7 +2994,6 @@ case $host_os in
   darwin*) template=darwin ;;
 dragonfly*) template=netbsd ;;
  freebsd*) template=freebsd ;;
-    hpux*) template=hpux ;;
  linux*|gnu*|k*bsd*-gnu)
            template=linux ;;
    mingw*) template=win32 ;;
@@ -6856,100 +6855,6 @@ if test x"$pgac_cv_prog_CXX_cxxflags__qlonglong" = x"yes"; then
 fi
 
 
-elif test "$PORTNAME" = "hpux"; then
-  # On some versions of HP-UX, libm functions do not set errno by default.
-  # Fix that by using +Olibmerrno if the compiler recognizes it.
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports +Olibmerrno, for CFLAGS" >&5
-$as_echo_n "checking whether ${CC} supports +Olibmerrno, for CFLAGS... " >&6; }
-if ${pgac_cv_prog_CC_cflags_pOlibmerrno+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  pgac_save_CFLAGS=$CFLAGS
-pgac_save_CC=$CC
-CC=${CC}
-CFLAGS="${CFLAGS} +Olibmerrno"
-ac_save_c_werror_flag=$ac_c_werror_flag
-ac_c_werror_flag=yes
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  pgac_cv_prog_CC_cflags_pOlibmerrno=yes
-else
-  pgac_cv_prog_CC_cflags_pOlibmerrno=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_c_werror_flag=$ac_save_c_werror_flag
-CFLAGS="$pgac_save_CFLAGS"
-CC="$pgac_save_CC"
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags_pOlibmerrno" >&5
-$as_echo "$pgac_cv_prog_CC_cflags_pOlibmerrno" >&6; }
-if test x"$pgac_cv_prog_CC_cflags_pOlibmerrno" = x"yes"; then
-  CFLAGS="${CFLAGS} +Olibmerrno"
-fi
-
-
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports +Olibmerrno, for CXXFLAGS" >&5
-$as_echo_n "checking whether ${CXX} supports +Olibmerrno, for CXXFLAGS... " >&6; }
-if ${pgac_cv_prog_CXX_cxxflags_pOlibmerrno+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  pgac_save_CXXFLAGS=$CXXFLAGS
-pgac_save_CXX=$CXX
-CXX=${CXX}
-CXXFLAGS="${CXXFLAGS} +Olibmerrno"
-ac_save_cxx_werror_flag=$ac_cxx_werror_flag
-ac_cxx_werror_flag=yes
-ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
-  pgac_cv_prog_CXX_cxxflags_pOlibmerrno=yes
-else
-  pgac_cv_prog_CXX_cxxflags_pOlibmerrno=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-ac_cxx_werror_flag=$ac_save_cxx_werror_flag
-CXXFLAGS="$pgac_save_CXXFLAGS"
-CXX="$pgac_save_CXX"
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags_pOlibmerrno" >&5
-$as_echo "$pgac_cv_prog_CXX_cxxflags_pOlibmerrno" >&6; }
-if test x"$pgac_cv_prog_CXX_cxxflags_pOlibmerrno" = x"yes"; then
-  CXXFLAGS="${CXXFLAGS} +Olibmerrno"
-fi
-
-
 fi
 
 
@@ -13818,7 +13723,7 @@ $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
 fi
 
 
-for ac_header in atomic.h copyfile.h execinfo.h getopt.h ifaddrs.h langinfo.h mbarrier.h poll.h sys/epoll.h sys/event.h sys/ipc.h sys/personality.h sys/prctl.h sys/procctl.h sys/pstat.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/signalfd.h sys/sockio.h sys/tas.h sys/uio.h sys/un.h termios.h ucred.h wctype.h
+for ac_header in atomic.h copyfile.h execinfo.h getopt.h ifaddrs.h langinfo.h mbarrier.h poll.h sys/epoll.h sys/event.h sys/ipc.h sys/personality.h sys/prctl.h sys/procctl.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/signalfd.h sys/sockio.h sys/tas.h sys/uio.h sys/un.h termios.h ucred.h wctype.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -15982,7 +15887,7 @@ fi
 LIBS_including_readline="$LIBS"
 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
 
-for ac_func in backtrace_symbols clock_gettime copyfile fdatasync getifaddrs getpeerucred getrlimit inet_pton kqueue mbstowcs_l memset_s poll posix_fallocate ppoll pstat pthread_is_threaded_np readlink readv setproctitle setproctitle_fast setsid shm_open strchrnul strsignal symlink syncfs sync_file_range uselocale wcstombs_l writev
+for ac_func in backtrace_symbols clock_gettime copyfile fdatasync getifaddrs getpeerucred getrlimit inet_pton kqueue mbstowcs_l memset_s poll posix_fallocate ppoll pthread_is_threaded_np readlink readv setproctitle setproctitle_fast setsid shm_open strchrnul strsignal symlink syncfs sync_file_range uselocale wcstombs_l writev
 do :
   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
index 6c6f997ee3dbf1ba4e18c764f0e49a6efa5f9817..7fbfb6795fe6c26142da74a11304dae1a2681a79 100644 (file)
@@ -67,7 +67,6 @@ case $host_os in
   darwin*) template=darwin ;;
 dragonfly*) template=netbsd ;;
  freebsd*) template=freebsd ;;
-    hpux*) template=hpux ;;
  linux*|gnu*|k*bsd*-gnu)
            template=linux ;;
    mingw*) template=win32 ;;
@@ -570,11 +569,6 @@ elif test "$PORTNAME" = "aix"; then
   PGAC_PROG_CXX_CFLAGS_OPT([-qnoansialias])
   PGAC_PROG_CC_CFLAGS_OPT([-qlonglong])
   PGAC_PROG_CXX_CFLAGS_OPT([-qlonglong])
-elif test "$PORTNAME" = "hpux"; then
-  # On some versions of HP-UX, libm functions do not set errno by default.
-  # Fix that by using +Olibmerrno if the compiler recognizes it.
-  PGAC_PROG_CC_CFLAGS_OPT([+Olibmerrno])
-  PGAC_PROG_CXX_CFLAGS_OPT([+Olibmerrno])
 fi
 
 AC_SUBST(CFLAGS_UNROLL_LOOPS)
@@ -1452,7 +1446,6 @@ AC_CHECK_HEADERS(m4_normalize([
    sys/personality.h
    sys/prctl.h
    sys/procctl.h
-   sys/pstat.h
    sys/resource.h
    sys/select.h
    sys/sem.h
@@ -1801,7 +1794,6 @@ AC_CHECK_FUNCS(m4_normalize([
    poll
    posix_fallocate
    ppoll
-   pstat
    pthread_is_threaded_np
    readlink
    readv
index a6357676217168dac05bbe74784a6797a9cde902..7bdf7f607025da44e03aa96b4e372fb44ee5bb41 100644 (file)
@@ -75,35 +75,6 @@ gcc -shared -o foo.so foo.o
     </listitem>
    </varlistentry>
 
-   <varlistentry>
-    <term>
-     <systemitem class="osname">HP-UX</systemitem>
-     <indexterm><primary>HP-UX</primary><secondary>shared library</secondary></indexterm>
-    </term>
-    <listitem>
-     <para>
-      The compiler flag of the system compiler to create
-      <acronym>PIC</acronym> is <option>+z</option>.  When using
-      <application>GCC</application> it's <option>-fPIC</option>. The
-      linker flag for shared libraries is <option>-b</option>.  So:
-<programlisting>
-cc +z -c foo.c
-</programlisting>
-      or:
-<programlisting>
-gcc -fPIC -c foo.c
-</programlisting>
-      and then:
-<programlisting>
-ld -b -o foo.sl foo.o
-</programlisting>
-      <systemitem class="osname">HP-UX</systemitem> uses the extension
-      <filename>.sl</filename> for shared libraries, unlike most other
-      systems.
-     </para>
-    </listitem>
-   </varlistentry>
-
    <varlistentry>
     <term>
      <systemitem class="osname">Linux</systemitem>
index c12de7896c5c91a36ca3bf10e4e89705c8d89aa2..aed4bd0680abe301691efd1489a7399023c5a328 100644 (file)
@@ -1974,7 +1974,6 @@ build-postgresql:
     shared libraries.  The systems on which this is
     <emphasis>not</emphasis> necessary include
     <systemitem class="osname">FreeBSD</systemitem>,
-    <systemitem class="osname">HP-UX</systemitem>,
     <systemitem class="osname">Linux</systemitem>,
     <systemitem class="osname">NetBSD</systemitem>, <systemitem
     class="osname">OpenBSD</systemitem>, and
@@ -2137,7 +2136,7 @@ export MANPATH
   <para>
    <productname>PostgreSQL</productname> can be expected to work on these operating
    systems: Linux (all recent distributions), Windows (10 and later),
-   FreeBSD, OpenBSD, NetBSD, macOS, AIX, HP/UX, and Solaris.
+   FreeBSD, OpenBSD, NetBSD, macOS, AIX, and Solaris.
    Other Unix-like systems may also work but are not currently
    being tested.  In most cases, all CPU architectures supported by
    a given operating system will work.  Look in
index 952139fc60a4cbefc3f03cbe326e046ec2a93180..8f032c4e7ab56ec9765dd583d2aa92a17426ff20 100644 (file)
@@ -689,13 +689,13 @@ testname:output:platformpattern=comparisonfilename
     Therefore, we provide a variant comparison file,
     <filename>float4-misrounded-input.out</filename>, which includes
     the results to be expected on these systems.  To silence the bogus
-    <quote>failure</quote> message on <systemitem>HP-UX 10</systemitem>
+    <quote>failure</quote> message on <systemitem>Cygwin</systemitem>
     platforms, <filename>resultmap</filename> includes:
 <programlisting>
-float4:out:hppa.*-hp-hpux10.*=float4-misrounded-input.out
+float4:out:.*-.*-cygwin.*=float4-misrounded-input.out
 </programlisting>
     which will trigger on any machine where the output of
-    <command>config.guess</command> matches <literal>hppa.*-hp-hpux10.*</literal>.
+    <command>config.guess</command> matches <literal>.*-.*-cygwin.*</literal>.
     Other lines in <filename>resultmap</filename> select the variant comparison
     file for other platforms where it's appropriate.
    </para>
index 2352389ab6ae0ce01e39bf286b464175f3be6cbc..92a1ea87d83894f138af90cde67781bab3919943 100644 (file)
@@ -1018,25 +1018,6 @@ psql: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: No such
       </listitem>
      </varlistentry>
 
-     <varlistentry>
-      <term><systemitem class="osname">HP-UX</systemitem>
-      <indexterm><primary>HP-UX</primary><secondary>IPC configuration</secondary></indexterm>
-      </term>
-      <listitem>
-       <para>
-        The default settings tend to suffice for normal installations.
-       </para>
-       <para>
-        <acronym>IPC</acronym> parameters can be set in the <application>System
-        Administration Manager</application> (<acronym>SAM</acronym>) under
-        <menuchoice><guimenu>Kernel
-        Configuration</guimenu><guimenuitem>Configurable Parameters</guimenuitem></menuchoice>. Choose
-        <guibutton>Create A New Kernel</guibutton> when you're done.
-       </para>
-      </listitem>
-     </varlistentry>
-
-
      <varlistentry>
       <term><systemitem class="osname">Linux</systemitem>
       <indexterm><primary>Linux</primary><secondary>IPC configuration</secondary></indexterm>
index 82b336fff3e54b7bd8c991d7877fb14b213ae0c2..6df96c634b6b229db43569aa62ba4e5b3bc289b9 100644 (file)
@@ -175,39 +175,6 @@ ifeq ($(PORTNAME), netbsd)
   endif
 endif
 
-ifeq ($(PORTNAME), hpux)
-  ifdef SO_MAJOR_VERSION
-    shlib          = lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)
-  endif
-  ifeq ($(with_gnu_ld), yes)
-    LINK.shared        = $(CC) -shared -Wl,-Bsymbolic
-    ifdef soname
-      LINK.shared  += -Wl,-h -Wl,$(soname)
-    endif
-  else
-    LINK.shared        = $(LD) -b -Bsymbolic
-    ifdef soname
-      LINK.shared  += +h $(soname)
-    endif
-    # can't use the CC-syntax rpath pattern here, so instead:
-    rpath =
-    ifeq ($(enable_rpath), yes)
-      LINK.shared  += +s +b '$(rpathdir)'
-    endif
-    # On HPUX platforms, gcc is usually configured to search for libraries
-    # in /usr/local/lib, but ld won't do so.  Add an explicit -L switch so
-    # ld can find the same libraries gcc does.  Make sure it goes after any
-    # -L switches provided explicitly.
-    ifeq ($(GCC), yes)
-      SHLIB_LINK   += -L/usr/local/lib
-    endif
-  endif
-  # And we need to link with libgcc, too
-  ifeq ($(GCC), yes)
-    SHLIB_LINK     += `$(CC) $(LDFLAGS) -print-libgcc-file-name`
-  endif
-endif
-
 ifeq ($(PORTNAME), linux)
   LINK.shared      = $(COMPILER) -shared
   ifdef soname
index a41808aff0a5bed3937ba51b4db34ef96880ea01..5494c9b3032e4ac995cc3e77f1d5665f8225591c 100644 (file)
@@ -333,17 +333,11 @@ pg_foreach_ifaddr(PgIfAddrCallback callback, void *cb_data)
 #endif
 
 /*
- * SIOCGIFCONF does not return IPv6 addresses on Solaris
- * and HP/UX. So we prefer SIOCGLIFCONF if it's available.
- *
- * On HP/UX, however, it *only* returns IPv6 addresses,
- * and the structs are named slightly differently too.
- * We'd have to do another call with SIOCGIFCONF to get the
- * IPv4 addresses as well. We don't currently bother, just
- * fall back to SIOCGIFCONF on HP/UX.
+ * SIOCGIFCONF does not return IPv6 addresses on Solaris.
+ * So we prefer SIOCGLIFCONF if it's available.
  */
 
-#if defined(SIOCGLIFCONF) && !defined(__hpux)
+#if defined(SIOCGLIFCONF)
 
 /*
  * Enumerate the system's network interface addresses and call the callback
diff --git a/src/backend/port/hpux/tas.c.template b/src/backend/port/hpux/tas.c.template
deleted file mode 100644 (file)
index 5ccbbcd..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * tas() for HPPA.
- *
- * To generate tas.s using this template:
- * 1. cc +O2 -S -c tas.c
- * 2. edit tas.s:
- *     - replace the LDW with LDCWX
- * 3. install as src/backend/port/tas/hpux_hppa.s.
- *
- * For details about the LDCWX instruction, see the "Precision
- * Architecture and Instruction Reference Manual" (09740-90014 of June
- * 1987), p. 5-38.
- */
-
-int
-tas(lock)
-    int *lock; /* LDCWX is a word instruction */
-{
-    /*
-     * LDCWX requires that we align the "semaphore" to a 16-byte
-     * boundary.  The actual datum is a single word (4 bytes).
-     */
-    lock = ((uintptr_t) lock + 15) & ~15;
-
-    /*
-     * The LDCWX instruction atomically clears the target word and
-     * returns the previous value.  Hence, if the instruction returns
-     * 0, someone else has already acquired the lock before we tested
-     * it (i.e., we have failed).
-     *
-     * Notice that this means that we actually clear the word to set
-     * the lock and set the word to clear the lock.  This is the
-     * opposite behavior from the SPARC LDSTUB instruction.  For some
-     * reason everything that H-P does is rather baroque...
-     */
-    if (*lock) {   /* this generates the LDW */
-   return(0);  /* success */
-    }
-    return(1);     /* failure */
-}
diff --git a/src/backend/port/tas/hpux_hppa.s b/src/backend/port/tas/hpux_hppa.s
deleted file mode 100644 (file)
index d978a7c..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-
-        .SPACE  $TEXT$,SORT=8
-        .SUBSPA $CODE$,QUAD=0,ALIGN=4,ACCESS=44,CODE_ONLY,SORT=24
-tas
-        .PROC
-        .CALLINFO CALLER,FRAME=0,ENTRY_SR=3
-        .ENTRY
-        LDO     15(%r26),%r31   ;offset 0x0
-        DEPI    0,31,4,%r31     ;offset 0x4
-        LDCWX   0(0,%r31),%r23  ;offset 0x8
-        COMICLR,=       0,%r23,%r0      ;offset 0xc
-        DEP,TR  %r0,31,32,%r28  ;offset 0x10
-$00000001
-        LDI     1,%r28  ;offset 0x14
-$L0
-        .EXIT
-        BV,N    %r0(%r2)        ;offset 0x18
-        .PROCEND ;in=26;out=28;
-
-
-        .SPACE  $TEXT$
-        .SUBSPA $CODE$
-        .SPACE  $PRIVATE$,SORT=16
-        .SUBSPA $DATA$,QUAD=1,ALIGN=8,ACCESS=31,SORT=16
-        .SPACE  $TEXT$
-        .SUBSPA $CODE$
-        .EXPORT tas,ENTRY,PRIV_LEV=3,ARGW0=GR,RTNVAL=GR
-        .END
index 5ab91c2c581bd5e0fb2a257401ac3a47439d2c96..cbb0ec606f9e0df90a80e84ae6c9378a3dd95e65 100644 (file)
@@ -3396,7 +3396,7 @@ ProcessInterrupts(void)
 /*
  * IA64-specific code to fetch the AR.BSP register for stack depth checks.
  *
- * We currently support gcc, icc, and HP-UX's native compiler here.
+ * We currently support gcc and icc here.
  *
  * Note: while icc accepts gcc asm blocks on x86[_64], this is not true on
  * ia64 (at least not in icc versions before 12.x).  So we have to carry a
@@ -3404,11 +3404,7 @@ ProcessInterrupts(void)
  */
 #if defined(__ia64__) || defined(__ia64)
 
-#if defined(__hpux) && !defined(__GNUC__) && !defined(__INTEL_COMPILER)
-/* Assume it's HP-UX native compiler */
-#include <ia64/sys/inline.h>
-#define ia64_get_bsp() ((char *) (_Asm_mov_from_ar(_AREG_BSP, _NO_FENCE)))
-#elif defined(__INTEL_COMPILER)
+#if defined(__INTEL_COMPILER)
 /* icc */
 #include <asm/ia64regs.h>
 #define ia64_get_bsp() ((char *) __getReg(_IA64_REG_AR_BSP))
index ec314c03f54608a2004544c8a23ba3fb835ae3be..8520ce76bbd3400bef35938c70f27fdefe296039 100644 (file)
@@ -15,9 +15,6 @@
 #include "postgres.h"
 
 #include <unistd.h>
-#ifdef HAVE_SYS_PSTAT_H
-#include <sys/pstat.h>         /* for HP-UX */
-#endif
 #ifdef HAVE_PS_STRINGS
 #include <machine/vmparam.h>   /* for old BSD */
 #include <sys/exec.h>
@@ -45,9 +42,6 @@ bool      update_process_title = true;
  * PS_USE_SETPROCTITLE
  *    use the function setproctitle(const char *, ...)
  *    (newer BSD systems)
- * PS_USE_PSTAT
- *    use the pstat(PSTAT_SETCMD, )
- *    (HPUX)
  * PS_USE_PS_STRINGS
  *    assign PS_STRINGS->ps_argvstr = "string"
  *    (some BSD systems)
@@ -67,8 +61,6 @@ bool      update_process_title = true;
 #define PS_USE_SETPROCTITLE_FAST
 #elif defined(HAVE_SETPROCTITLE)
 #define PS_USE_SETPROCTITLE
-#elif defined(HAVE_PSTAT) && defined(PSTAT_SETCMD)
-#define PS_USE_PSTAT
 #elif defined(HAVE_PS_STRINGS)
 #define PS_USE_PS_STRINGS
 #elif (defined(BSD) || defined(__hurd__)) && !defined(__darwin__)
@@ -376,15 +368,6 @@ set_ps_display(const char *activity)
    setproctitle_fast("%s", ps_buffer);
 #endif
 
-#ifdef PS_USE_PSTAT
-   {
-       union pstun pst;
-
-       pst.pst_command = ps_buffer;
-       pstat(PSTAT_SETCMD, pst, ps_buffer_cur_len, 0, 0);
-   }
-#endif                         /* PS_USE_PSTAT */
-
 #ifdef PS_USE_PS_STRINGS
    PS_STRINGS->ps_nargvstr = 1;
    PS_STRINGS->ps_argvstr = ps_buffer;
index cdd742cb55bf84718754dcc94c8d42008403013a..7133c3dc66b1b07eb97af91257cecdf169491939 100644 (file)
 /* Define to 1 if you have the `pread' function. */
 #undef HAVE_PREAD
 
-/* Define to 1 if you have the `pstat' function. */
-#undef HAVE_PSTAT
-
 /* Define to 1 if the PS_STRINGS thing exists. */
 #undef HAVE_PS_STRINGS
 
 /* Define to 1 if you have the <sys/procctl.h> header file. */
 #undef HAVE_SYS_PROCCTL_H
 
-/* Define to 1 if you have the <sys/pstat.h> header file. */
-#undef HAVE_SYS_PSTAT_H
-
 /* Define to 1 if you have the <sys/resource.h> header file. */
 #undef HAVE_SYS_RESOURCE_H
 
index 9550e04aaa5db01f1924d9ea48ec3556bfc81bbf..33b7fd6042c2b3d260a3c33390c3857e5a843db2 100644 (file)
@@ -95,8 +95,6 @@
 #include "port/atomics/generic-gcc.h"
 #elif defined(_MSC_VER)
 #include "port/atomics/generic-msvc.h"
-#elif defined(__hpux) && defined(__ia64) && !defined(__GNUC__)
-#include "port/atomics/generic-acc.h"
 #elif defined(__SUNPRO_C) && !defined(__GNUC__)
 #include "port/atomics/generic-sunpro.h"
 #else
index 771bac1f3eef3103bdd922b312298a4c920c3f80..264d2316b978765ee36a956344cd6fd03086d5ac 100644 (file)
@@ -21,8 +21,6 @@
 #  define pg_memory_barrier_impl()     __mf()
 #elif defined(__GNUC__)
 #  define pg_memory_barrier_impl()     __asm__ __volatile__ ("mf" : : : "memory")
-#elif defined(__hpux)
-#  define pg_memory_barrier_impl()     _Asm_mf()
 #endif
 
 /* per architecture manual doubleword accesses have single copy atomicity */
index 1cdef5f2f6fcaf09a69d7ab5fc38b24f5faa583c..91a9be48288eafdcccae7bf8d9127f55e07f0c79 100644 (file)
@@ -93,7 +93,7 @@ typedef struct pg_atomic_flag
 typedef struct pg_atomic_uint32
 {
    /* Check pg_atomic_flag's definition above for an explanation */
-#if defined(__hppa) || defined(__hppa__)   /* HP PA-RISC, GCC and HP compilers */
+#if defined(__hppa) || defined(__hppa__)   /* HP PA-RISC */
    int         sema[4];
 #else
    int         sema;
@@ -111,7 +111,7 @@ typedef struct pg_atomic_uint32
 typedef struct pg_atomic_uint64
 {
    /* Check pg_atomic_flag's definition above for an explanation */
-#if defined(__hppa) || defined(__hppa__)   /* HP PA-RISC, GCC and HP compilers */
+#if defined(__hppa) || defined(__hppa__)   /* HP PA-RISC */
    int         sema[4];
 #else
    int         sema;
diff --git a/src/include/port/atomics/generic-acc.h b/src/include/port/atomics/generic-acc.h
deleted file mode 100644 (file)
index 842b2de..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * generic-acc.h
- *   Atomic operations support when using HPs acc on HPUX
- *
- * Portions Copyright (c) 1996-2022, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * NOTES:
- *
- * Documentation:
- * * inline assembly for Itanium-based HP-UX:
- *   http://h21007.www2.hp.com/portal/download/files/unprot/Itanium/inline_assem_ERS.pdf
- * * Implementing Spinlocks on the Intel (R) Itanium (R) Architecture and PA-RISC
- *   http://h21007.www2.hp.com/portal/download/files/unprot/itanium/spinlocks.pdf
- *
- * Itanium only supports a small set of numbers (6, -8, -4, -1, 1, 4, 8, 16)
- * for atomic add/sub, so we just implement everything but compare_exchange
- * via the compare_exchange fallbacks in atomics/generic.h.
- *
- * src/include/port/atomics/generic-acc.h
- *
- * -------------------------------------------------------------------------
- */
-
-#include <machine/sys/inline.h>
-
-#define pg_compiler_barrier_impl() _Asm_sched_fence()
-
-#if defined(HAVE_ATOMICS)
-
-/* IA64 always has 32/64 bit atomics */
-
-#define PG_HAVE_ATOMIC_U32_SUPPORT
-typedef struct pg_atomic_uint32
-{
-   volatile uint32 value;
-} pg_atomic_uint32;
-
-#define PG_HAVE_ATOMIC_U64_SUPPORT
-typedef struct pg_atomic_uint64
-{
-   /*
-    * Alignment is guaranteed to be 64bit. Search for "Well-behaved
-    * application restrictions" => "Data alignment and data sharing" on HP's
-    * website. Unfortunately the URL doesn't seem to stable enough to
-    * include.
-    */
-   volatile uint64 value;
-} pg_atomic_uint64;
-
-
-#define MINOR_FENCE (_Asm_fence) (_UP_CALL_FENCE | _UP_SYS_FENCE | \
-                                _DOWN_CALL_FENCE | _DOWN_SYS_FENCE )
-
-#define PG_HAVE_ATOMIC_COMPARE_EXCHANGE_U32
-static inline bool
-pg_atomic_compare_exchange_u32_impl(volatile pg_atomic_uint32 *ptr,
-                                   uint32 *expected, uint32 newval)
-{
-   bool    ret;
-   uint32  current;
-
-   _Asm_mov_to_ar(_AREG_CCV, *expected, MINOR_FENCE);
-   /*
-    * We want a barrier, not just release/acquire semantics.
-    */
-   _Asm_mf();
-   /*
-    * Notes:
-    * _DOWN_MEM_FENCE | _UP_MEM_FENCE prevents reordering by the compiler
-    */
-   current =  _Asm_cmpxchg(_SZ_W, /* word */
-                           _SEM_REL,
-                           &ptr->value,
-                           newval, _LDHINT_NONE,
-                           _DOWN_MEM_FENCE | _UP_MEM_FENCE);
-   ret = current == *expected;
-   *expected = current;
-   return ret;
-}
-
-
-#define PG_HAVE_ATOMIC_COMPARE_EXCHANGE_U64
-static inline bool
-pg_atomic_compare_exchange_u64_impl(volatile pg_atomic_uint64 *ptr,
-                                   uint64 *expected, uint64 newval)
-{
-   bool    ret;
-   uint64  current;
-
-   _Asm_mov_to_ar(_AREG_CCV, *expected, MINOR_FENCE);
-   _Asm_mf();
-   current =  _Asm_cmpxchg(_SZ_D, /* doubleword */
-                           _SEM_REL,
-                           &ptr->value,
-                           newval, _LDHINT_NONE,
-                           _DOWN_MEM_FENCE | _UP_MEM_FENCE);
-   ret = current == *expected;
-   *expected = current;
-   return ret;
-}
-
-#undef MINOR_FENCE
-
-#endif /* defined(HAVE_ATOMICS) */
diff --git a/src/include/port/hpux.h b/src/include/port/hpux.h
deleted file mode 100644 (file)
index 4d1dcea..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-/* src/include/port/hpux.h */
-
-/* nothing needed */
index 98b4d718d294852e9416e21aec19a9139826abcc..1e1eb324b438f2e321ffb4ea2b944695982aa54b 100644 (file)
@@ -765,44 +765,14 @@ tas(volatile slock_t *lock)
 typedef unsigned char slock_t;
 #endif
 
-/*
- * Default implementation of S_UNLOCK() for gcc/icc.
- *
- * Note that this implementation is unsafe for any platform that can reorder
- * a memory access (either load or store) after a following store.  That
- * happens not to be possible on x86 and most legacy architectures (some are
- * single-processor!), but many modern systems have weaker memory ordering.
- * Those that do must define their own version of S_UNLOCK() rather than
- * relying on this one.
- */
-#if !defined(S_UNLOCK)
-#define S_UNLOCK(lock) \
-   do { __asm__ __volatile__("" : : : "memory");  *(lock) = 0; } while (0)
-#endif
-
-#endif /* defined(__GNUC__) || defined(__INTEL_COMPILER) */
-
-
 
-/*
- * ---------------------------------------------------------------------
- * Platforms that use non-gcc inline assembly:
- * ---------------------------------------------------------------------
- */
-
-#if !defined(HAS_TEST_AND_SET) /* We didn't trigger above, let's try here */
-
-
-#if defined(__hppa) || defined(__hppa__)   /* HP PA-RISC, GCC and HP compilers */
+#if defined(__hppa) || defined(__hppa__)   /* HP PA-RISC */
 /*
  * HP's PA-RISC
  *
- * See src/backend/port/hpux/tas.c.template for details about LDCWX.  Because
- * LDCWX requires a 16-byte-aligned address, we declare slock_t as a 16-byte
- * struct.  The active word in the struct is whichever has the aligned address;
- * the other three words just sit at -1.
- *
- * When using gcc, we can inline the required assembly code.
+ * Because LDCWX requires a 16-byte-aligned address, we declare slock_t as a
+ * 16-byte struct.  The active word in the struct is whichever has the aligned
+ * address; the other three words just sit at -1.
  */
 #define HAS_TEST_AND_SET
 
@@ -813,14 +783,27 @@ typedef struct
 
 #define TAS_ACTIVE_WORD(lock)  ((volatile int *) (((uintptr_t) (lock) + 15) & ~15))
 
-#if defined(__GNUC__)
-
 static __inline__ int
 tas(volatile slock_t *lock)
 {
    volatile int *lockword = TAS_ACTIVE_WORD(lock);
    register int lockval;
 
+   /*
+    * The LDCWX instruction atomically clears the target word and
+    * returns the previous value.  Hence, if the instruction returns
+    * 0, someone else has already acquired the lock before we tested
+    * it (i.e., we have failed).
+    *
+    * Notice that this means that we actually clear the word to set
+    * the lock and set the word to clear the lock.  This is the
+    * opposite behavior from the SPARC LDSTUB instruction.  For some
+    * reason everything that H-P does is rather baroque...
+    *
+    * For details about the LDCWX instruction, see the "Precision
+    * Architecture and Instruction Reference Manual" (09740-90014 of June
+    * 1987), p. 5-38.
+    */
    __asm__ __volatile__(
        "   ldcwx   0(0,%2),%0  \n"
 :      "=r"(lockval), "+m"(*lockword)
@@ -829,23 +812,12 @@ tas(volatile slock_t *lock)
    return (lockval == 0);
 }
 
-/*
- * The hppa implementation doesn't follow the rules of this files and provides
- * a gcc specific implementation outside of the above defined(__GNUC__). It
- * does so to avoid duplication between the HP compiler and gcc. So undefine
- * the generic fallback S_UNLOCK from above.
- */
-#ifdef S_UNLOCK
-#undef S_UNLOCK
-#endif
 #define S_UNLOCK(lock) \
    do { \
        __asm__ __volatile__("" : : : "memory"); \
        *TAS_ACTIVE_WORD(lock) = -1; \
    } while (0)
 
-#endif /* __GNUC__ */
-
 #define S_INIT_LOCK(lock) \
    do { \
        volatile slock_t *lock_ = (lock); \
@@ -860,32 +832,31 @@ tas(volatile slock_t *lock)
 #endif  /* __hppa || __hppa__ */
 
 
-#if defined(__hpux) && defined(__ia64) && !defined(__GNUC__)
 /*
- * HP-UX on Itanium, non-gcc/icc compiler
- *
- * We assume that the compiler enforces strict ordering of loads/stores on
- * volatile data (see comments on the gcc-version earlier in this file).
- * Note that this assumption does *not* hold if you use the
- * +Ovolatile=__unordered option on the HP-UX compiler, so don't do that.
+ * Default implementation of S_UNLOCK() for gcc/icc.
  *
- * See also Implementing Spinlocks on the Intel Itanium Architecture and
- * PA-RISC, by Tor Ekqvist and David Graves, for more information.  As of
- * this writing, version 1.0 of the manual is available at:
- * http://h21007.www2.hp.com/portal/download/files/unprot/itanium/spinlocks.pdf
+ * Note that this implementation is unsafe for any platform that can reorder
+ * a memory access (either load or store) after a following store.  That
+ * happens not to be possible on x86 and most legacy architectures (some are
+ * single-processor!), but many modern systems have weaker memory ordering.
+ * Those that do must define their own version of S_UNLOCK() rather than
+ * relying on this one.
  */
-#define HAS_TEST_AND_SET
+#if !defined(S_UNLOCK)
+#define S_UNLOCK(lock) \
+   do { __asm__ __volatile__("" : : : "memory");  *(lock) = 0; } while (0)
+#endif
 
-typedef unsigned int slock_t;
+#endif /* defined(__GNUC__) || defined(__INTEL_COMPILER) */
 
-#include <ia64/sys/inline.h>
-#define TAS(lock) _Asm_xchg(_SZ_W, lock, 1, _LDHINT_NONE)
-/* On IA64, it's a win to use a non-locking test before the xchg proper */
-#define TAS_SPIN(lock) (*(lock) ? 1 : TAS(lock))
-#define S_UNLOCK(lock) \
-   do { _Asm_mf(); (*(lock)) = 0; } while (0)
 
-#endif /* HPUX on IA64, non gcc/icc */
+/*
+ * ---------------------------------------------------------------------
+ * Platforms that use non-gcc inline assembly:
+ * ---------------------------------------------------------------------
+ */
+
+#if !defined(HAS_TEST_AND_SET) /* We didn't trigger above, let's try here */
 
 #if defined(_AIX)  /* AIX */
 /*
diff --git a/src/makefiles/Makefile.hpux b/src/makefiles/Makefile.hpux
deleted file mode 100644 (file)
index 25e036b..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-# Using X/Open Networking Interfaces requires to link with libxnet.
-# Without specifying this, bind(), getpeername() and so on don't work
-# correctly in the LP64 data model.
-LIBS := -lxnet $(LIBS)
-
-# Set up rpath so that the executables don't need SHLIB_PATH to be set.
-# (Note: --disable-rpath is a really bad idea on this platform...)
-ifeq ($(with_gnu_ld), yes)
-   rpath = -Wl,-rpath -Wl,'$(rpathdir)'
-else
-   rpath = -Wl,+b -Wl,'$(rpathdir)'
-endif
-
-# catch null pointer dereferences
-ifeq ($(with_gnu_ld), yes)
-# XXX what to put here?
-else
-   LDFLAGS_EX += -Wl,-z
-endif
-
-# set up appropriate options for shared library builds
-export_dynamic = -Wl,-E
-
-INSTALL_SHLIB_OPTS = -m 555
-
-AROPT = crs
-
-# env var name to use in place of LD_LIBRARY_PATH
-ld_library_path_var = SHLIB_PATH
-
-# Rule for building a shared library from a single .o file
-%$(DLSUFFIX): %.o
-ifeq ($(GCC), yes)
-  ifeq ($(with_gnu_ld), yes)
-   $(CC) $(CFLAGS) $< $(LDFLAGS) $(LDFLAGS_SL) -shared -o $@ `$(CC) $(LDFLAGS) -print-libgcc-file-name`
-  else
-   $(LD) -b -o $@ $< `$(CC) $(LDFLAGS) -print-libgcc-file-name`
-  endif
-else
-  ifeq ($(with_gnu_ld), yes)
-   $(CC) $(CFLAGS) $< $(LDFLAGS) $(LDFLAGS_SL) -shared -o $@
-  else
-   $(LD) -b -o $@ $<
-  endif
-endif
-
-sqlmansect = 5
index 1f6cf465df687868d1454abcb9e844f5ce78d504..762dd362b3566badf12803f30ac0a546017b8dca 100644 (file)
@@ -12160,7 +12160,7 @@ DPPP_(my_newCONSTSUB)(HV *stash, const char *name, SV *sv)
         STMT_START {                                                        \
             ASSUME(!"UNREACHABLE"); __builtin_unreachable();                \
         } STMT_END
-#  elif ! defined(__GNUC__) && (defined(__sun) || defined(__hpux))
+#  elif ! defined(__GNUC__) && defined(__sun)
 #    define NOT_REACHED
 #  else
 #    define NOT_REACHED  ASSUME(!"UNREACHABLE")
index d441dc8196ad7b0d15e4712e7e0d847d41dfa671..6ff9f4bf64f859b7e755ca971396bbedd68d4e03 100644 (file)
 
 #include "c.h"
 
-#if defined(__hpux)
-
-/* System includes */
-#include <a.out.h>
-#include <dl.h>
-
-void *
-dlopen(const char *file, int mode)
-{
-   int         flags = 0;
-
-   if (mode & RTLD_NOW)
-       flags |= BIND_IMMEDIATE;
-#ifdef NOT_USED
-   if (mode & RTLD_LAZY)
-       flags |= BIND_DEFERRED;
-#endif
-
-   return shl_load(file, flags | BIND_VERBOSE, 0L);
-}
-
-void *
-dlsym(void *handle, const char *symbol)
-{
-   void       *value;
-
-   if (shl_findsym((shl_t *) & handle, symbol, TYPE_PROCEDURE, &value) == -1)
-       return NULL;
-   return value;
-}
-
-int
-dlclose(void *handle)
-{
-   return shl_unload((shl_t) handle);
-}
-
-char *
-dlerror(void)
-{
-   static char errmsg[] = "shl_load failed";
-
-   if (errno)
-       return strerror(errno);
-
-   return errmsg;
-}
-
-#elif defined(WIN32)
+#if defined(WIN32)
 
 static char last_dyn_error[512];
 
index 8369fd2793890ff5b0004ff2e097ece00b666712..02665f4032d5696050caeec1ca0186a3225296a2 100644 (file)
@@ -20,7 +20,6 @@
 /* This code works on:
  *     solaris_i386
  *     solaris_sparc
- *     hpux 9.*
  *     win32
  * which currently is all the supported platforms that don't have a
  * native version of getrusage().  So, if configure decides to compile
diff --git a/src/template/hpux b/src/template/hpux
deleted file mode 100644 (file)
index 5105a74..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-# src/template/hpux
-
-# Need this for access to many modern library features
-CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
-
-# HP's compiler likes the spelling +O2 not -O2, so adjust default CFLAGS
-if test "$GCC" != yes ; then
-  CFLAGS="+O2"
-fi
-
-# Extra CFLAGS for code that will go into a shared library
-if test "$GCC" = yes ; then
-  CFLAGS_SL="-fPIC"
-else
-  CFLAGS_SL="+Z"
-fi
-
-# Pick right test-and-set (TAS) code.  We need out-of-line assembler
-# when not using gcc.
-case $host in
-  hppa*-*-hpux*)
-   if test "$GCC" != yes ; then
-       need_tas=yes
-       tas_file=hpux_hppa.s
-   fi
-    ;;
-esac
-
-case $host_cpu in
-  ia64)
-    DLSUFFIX=".so";;
-  *)
-    DLSUFFIX=".sl";;
-esac
index c766d03df23dfcca19e6abfc5f3c5d9b54dcc0f6..8a3ed50585e1579537e97834e3c1ad1d31b0c67e 100644 (file)
@@ -1,3 +1,2 @@
 float4:out:.*-.*-cygwin.*=float4-misrounded-input.out
 float4:out:.*-.*-mingw.*=float4-misrounded-input.out
-float4:out:hppa.*-hp-hpux10.*=float4-misrounded-input.out
index d30e8fcb117be3167d3ce55c85d2218b8d973cb3..52ff56ba8356519fffe581beea8b08e757921f23 100644 (file)
@@ -337,7 +337,6 @@ sub GenerateFiles
        HAVE_PPC_LWARX_MUTEX_HINT   => undef,
        HAVE_PPOLL                  => undef,
        HAVE_PREAD                  => undef,
-       HAVE_PSTAT                  => undef,
        HAVE_PS_STRINGS             => undef,
        HAVE_PTHREAD                => undef,
        HAVE_PTHREAD_BARRIER_WAIT   => undef,
@@ -401,7 +400,6 @@ sub GenerateFiles
        HAVE_SYS_PERSONALITY_H                   => undef,
        HAVE_SYS_PRCTL_H                         => undef,
        HAVE_SYS_PROCCTL_H                       => undef,
-       HAVE_SYS_PSTAT_H                         => undef,
        HAVE_SYS_RESOURCE_H                      => undef,
        HAVE_SYS_SELECT_H                        => undef,
        HAVE_SYS_SEM_H                           => undef,
index 42688fff53a43a44a368e0f9c663992ce82997ab..7b547261751a620d0ffb9f36583425dbf56635ff 100755 (executable)
@@ -63,7 +63,6 @@ do
    test "$f" = src/include/port/cygwin.h && continue
    test "$f" = src/include/port/darwin.h && continue
    test "$f" = src/include/port/freebsd.h && continue
-   test "$f" = src/include/port/hpux.h && continue
    test "$f" = src/include/port/linux.h && continue
    test "$f" = src/include/port/netbsd.h && continue
    test "$f" = src/include/port/openbsd.h && continue
index f8b0674a661803ee95ddfe7f6d04e620aa60e7e5..225224a9bc8768c624b9f4c5696e81994594dded 100755 (executable)
@@ -59,7 +59,6 @@ do
    test "$f" = src/include/port/cygwin.h && continue
    test "$f" = src/include/port/darwin.h && continue
    test "$f" = src/include/port/freebsd.h && continue
-   test "$f" = src/include/port/hpux.h && continue
    test "$f" = src/include/port/linux.h && continue
    test "$f" = src/include/port/netbsd.h && continue
    test "$f" = src/include/port/openbsd.h && continue