]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
physmem: Remove support for OSF/1.
authorBruno Haible <bruno@clisp.org>
Tue, 9 Sep 2025 10:44:36 +0000 (12:44 +0200)
committerBruno Haible <bruno@clisp.org>
Tue, 9 Sep 2025 10:44:36 +0000 (12:44 +0200)
* lib/physmem.c: Don't include <machine/hal_sysinfo.h>, <sys/table.h>.
(physmem_total, physmem_claimable): Remove code for OSF/1.

ChangeLog
lib/physmem.c

index 40988ca0bfad132bfc143f016a09b7d7bf78892d..9d1a4e59f1813aee501d28e1e1d1d01adc54eed9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2025-09-09  Bruno Haible  <bruno@clisp.org>
 
+       physmem: Remove support for OSF/1.
+       * lib/physmem.c: Don't include <machine/hal_sysinfo.h>, <sys/table.h>.
+       (physmem_total, physmem_claimable): Remove code for OSF/1.
+
        mountlist: Remove support for OSF/1.
        * m4/mountlist.m4 (gl_MOUNTLIST): Update description of
        MOUNTED_GETFSSTAT.
index f2e60effdaab51f1515336bd4135fd4128a4a09b..d0b27bcc399bd69db262f48125ed3322ff56b7ae 100644 (file)
 #endif
 
 #if HAVE_SYS_SYSINFO_H
-/* Linux, AIX, HP-UX, IRIX, OSF/1, Solaris, Cygwin, Android */
+/* Linux, AIX, HP-UX, IRIX, Solaris, Cygwin, Android */
 # include <sys/sysinfo.h>
 #endif
 
-#if HAVE_MACHINE_HAL_SYSINFO_H /* OSF/1 */
-# include <machine/hal_sysinfo.h>
-#endif
-
-#if HAVE_SYS_TABLE_H /* OSF/1 */
-# include <sys/table.h>
-#endif
-
 #include <sys/types.h>
 
 #if HAVE_SYS_PARAM_H
@@ -144,21 +136,6 @@ physmem_total (void)
   }
 #endif
 
-#if HAVE_GETSYSINFO && defined GSI_PHYSMEM
-  { /* This works on Tru64 UNIX V4/5.  */
-    int physmem;
-
-    if (getsysinfo (GSI_PHYSMEM, (caddr_t) &physmem, sizeof (physmem),
-                    NULL, NULL, NULL) == 1)
-      {
-        double kbytes = physmem;
-
-        if (0 <= kbytes)
-          return kbytes * 1024.0;
-      }
-  }
-#endif
-
 #if HAVE_SYSCTL && !(defined __GLIBC__ && defined __linux__) && defined HW_PHYSMEM
   { /* This works on *bsd, kfreebsd-gnu, and darwin.  */
     unsigned int physmem;
@@ -331,21 +308,6 @@ physmem_claimable (double aggressivity)
   }
 #endif
 
-#if HAVE_TABLE && defined TBL_VMSTATS
-  { /* This works on Tru64 UNIX V4/5.  */
-    struct tbl_vmstats vmstats;
-
-    if (table (TBL_VMSTATS, 0, &vmstats, 1, sizeof (vmstats)) == 1)
-      {
-        double pages = vmstats.free_count;
-        double pagesize = vmstats.pagesize;
-
-        if (0 <= pages && 0 <= pagesize)
-          return pages * pagesize;
-      }
-  }
-#endif
-
 #if HAVE_SYSCTL && !(defined __GLIBC__ && defined __linux__) && defined HW_USERMEM
   { /* This works on *bsd, kfreebsd-gnu, and darwin.  */
     unsigned int usermem;