From 452b85997d01da780c350ae102222807a77ec989 Mon Sep 17 00:00:00 2001
From: Michele Calgaro <michele.calgaro@yahoo.it>
Date: Fri, 16 Jan 2026 15:03:26 +0900
Subject: Remove support for HPUX, which is discontinued and does not provide a
 c++17 complaint compiler.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
---
 kdat/TapeDrive.cpp                    |  2 +-
 knetworkconf/backends/guess_system.sh | 44 +----------------------------------
 knetworkconf/config.h.in              |  6 +----
 kuser/README                          |  1 -
 kuser/THANKS                          |  2 +-
 5 files changed, 4 insertions(+), 51 deletions(-)

diff --git a/kdat/TapeDrive.cpp b/kdat/TapeDrive.cpp
index c52c75a..82913e2 100644
--- a/kdat/TapeDrive.cpp
+++ b/kdat/TapeDrive.cpp
@@ -635,7 +635,7 @@ bool TapeDrive::setBlockSize( int blockSize )
 
     return ret >= 0;
 #else
-    // some systems (e.g. HP-UX) encode block size into device file names
+    // some systems encode block size into device file names
     // so setting the block size by software does not make sense
     return true;
 #endif
diff --git a/knetworkconf/backends/guess_system.sh b/knetworkconf/backends/guess_system.sh
index 48d4e2b..0cd2c46 100755
--- a/knetworkconf/backends/guess_system.sh
+++ b/knetworkconf/backends/guess_system.sh
@@ -352,48 +352,6 @@ EOF
     hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
 	echo m68k-hp-bsd4.4
 	exit 0 ;;
-    9000/[34678]??:HP-UX:*:*)
-	case "${UNAME_MACHINE}" in
-	    9000/31? )            HP_ARCH=m68000 ;;
-	    9000/[34]?? )         HP_ARCH=m68k ;;
-	    9000/[678][0-9][0-9])
-              sed 's/^              //' << EOF >$dummy.c
-              #include <stdlib.h>
-              #include <unistd.h>
-
-              int main ()
-              {
-              #if defined(_SC_KERNEL_BITS)
-                  long bits = sysconf(_SC_KERNEL_BITS);
-              #endif
-                  long cpu  = sysconf (_SC_CPU_VERSION);
-
-                  switch (cpu)
-              	{
-              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
-              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
-              	case CPU_PA_RISC2_0:
-              #if defined(_SC_KERNEL_BITS)
-              	    switch (bits)
-              		{
-              		case 64: puts ("hppa2.0w"); break;
-              		case 32: puts ("hppa2.0n"); break;
-              		default: puts ("hppa2.0"); break;
-              		} break;
-              #else  /* !defined(_SC_KERNEL_BITS) */
-              	    puts ("hppa2.0"); break;
-              #endif
-              	default: puts ("hppa1.0"); break;
-              	}
-                  exit (0);
-              }
-EOF
-	(CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
-	rm -f $dummy.c $dummy
-	esac
-	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
-	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
-	exit 0 ;;
     3050*:HI-UX:*:*)
 	sed 's/^	//' << EOF >$dummy.c
 	#include <unistd.h>
@@ -909,7 +867,7 @@ main ()
   printf ("arm-acorn-riscix"); exit (0);
 #endif
 
-#if defined (hp300) && !defined (hpux)
+#if defined (hp300)
   printf ("m68k-hp-bsd\n"); exit (0);
 #endif
 
diff --git a/knetworkconf/config.h.in b/knetworkconf/config.h.in
index 3e565ad..322206c 100644
--- a/knetworkconf/config.h.in
+++ b/knetworkconf/config.h.in
@@ -169,11 +169,7 @@ unsigned long strlcpy(char*, const char*, unsigned long);
 
 
 
-/*
- * On HP-UX, the declaration of vsnprintf() is needed every time !
- */
-
-#if !defined(HAVE_VSNPRINTF) || defined(hpux)
+#if !defined(HAVE_VSNPRINTF)
 #if __STDC__
 #include <stdarg.h>
 #include <stdlib.h>
diff --git a/kuser/README b/kuser/README
index d187140..0505669 100644
--- a/kuser/README
+++ b/kuser/README
@@ -9,7 +9,6 @@ Solaris
 Linux
 Irix
 FreeBSD
-HPUX
 
 ATTENTION: BACKUP ALL OF YOUR DATA. THIS PROGRAM MAY DESTROY
 IT. BE CAREFUL.
diff --git a/kuser/THANKS b/kuser/THANKS
index 12a1af7..e8559c5 100644
--- a/kuser/THANKS
+++ b/kuser/THANKS
@@ -9,7 +9,7 @@ Michael Rodionov <marod@solo.iis.nsk.su> (for his icons)
 Chia-liang Kao <clkao@tc.neto.net> (for some typo corrections)
 Uwe Thiem <uwe@uwix.alt.na> (for some Aplha notes)
 Bernd Johannes Wuebben <wuebben@math.cornell.edu> (for some defines corrections)
-Christophe Prudhomme <Christophe.Prudhomme@asci.fr> (for HP-UX notes and usefull suggestions)
+Christophe Prudhomme <Christophe.Prudhomme@asci.fr> (for HP-UX notes and useful suggestions)
 Joerg Bornschein <theodor@disorder.ruhr.de> (for transparent pixmaps)
 Clemens Drews <clemens.drews@hamburg.snafu.de> (for small password fix)
 Kevin Street <street@iname.com> (for big FreeBSD patch)
-- 
cgit v1.2.3

