]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
physmem: Remove support for IRIX.
authorBruno Haible <bruno@clisp.org>
Wed, 10 Sep 2025 21:13:29 +0000 (23:13 +0200)
committerBruno Haible <bruno@clisp.org>
Wed, 10 Sep 2025 21:13:29 +0000 (23:13 +0200)
* lib/physmem.c: Remove code for IRIX.
* m4/physmem.m4 (gl_PHYSMEM): Don't test for <sys/sysmp.h> and sysmp.

ChangeLog
lib/physmem.c
m4/physmem.m4

index c8cc95c1f7af9c0f1b296f1131d401b91d25fad0..d0e7f12b5f8f31d8b4026921313f1ce40075d1d2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2025-09-10  Bruno Haible  <bruno@clisp.org>
 
+       physmem: Remove support for IRIX.
+       * lib/physmem.c: Remove code for IRIX.
+       * m4/physmem.m4 (gl_PHYSMEM): Don't test for <sys/sysmp.h> and sysmp.
+
        passfd: Remove support for IRIX.
        * lib/passfd.c (sendfd, recvfd): Remove code for IRIX.
 
index d0b27bcc399bd69db262f48125ed3322ff56b7ae..0216896cab07992d32c158c9c8efedc7c768a9aa 100644 (file)
 # include <sys/pstat.h>
 #endif
 
-#if HAVE_SYS_SYSMP_H /* IRIX */
-# include <sys/sysmp.h>
-#endif
-
 #if HAVE_SYS_SYSINFO_H
-/* Linux, AIX, HP-UX, IRIX, Solaris, Cygwin, Android */
+/* Linux, AIX, HP-UX, Solaris, Cygwin, Android */
 # include <sys/sysinfo.h>
 #endif
 
@@ -46,7 +42,7 @@
 #endif
 
 #if HAVE_SYS_SYSCTL_H && !(defined __GLIBC__ && defined __linux__)
-/* Linux/musl, macOS, *BSD, IRIX, Minix */
+/* Linux/musl, macOS, *BSD, Minix */
 # include <sys/sysctl.h>
 #endif
 
@@ -123,19 +119,6 @@ physmem_total (void)
   }
 #endif
 
-#if HAVE_SYSMP && defined MP_SAGET && defined MPSA_RMINFO && defined _SC_PAGESIZE
-  { /* This works on irix6. */
-    struct rminfo realmem;
-    if (sysmp (MP_SAGET, MPSA_RMINFO, &realmem, sizeof realmem) == 0)
-      {
-        double pagesize = sysconf (_SC_PAGESIZE);
-        double pages = realmem.physmem;
-        if (0 <= pages && 0 <= pagesize)
-          return pages * pagesize;
-      }
-  }
-#endif
-
 #if HAVE_SYSCTL && !(defined __GLIBC__ && defined __linux__) && defined HW_PHYSMEM
   { /* This works on *bsd, kfreebsd-gnu, and darwin.  */
     unsigned int physmem;
@@ -295,19 +278,6 @@ physmem_claimable (double aggressivity)
   }
 #endif
 
-#if HAVE_SYSMP && defined MP_SAGET && defined MPSA_RMINFO && defined _SC_PAGESIZE
-  { /* This works on irix6. */
-    struct rminfo realmem;
-    if (sysmp (MP_SAGET, MPSA_RMINFO, &realmem, sizeof realmem) == 0)
-      {
-        double pagesize = sysconf (_SC_PAGESIZE);
-        double pages = realmem.availrmem;
-        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;
index 8f64cd0b8eced43d7eb908cd3a823251f4f3fced..36a33f4e43af00c55faa56fc21a23070d258ab31 100644 (file)
@@ -1,5 +1,5 @@
 # physmem.m4
-# serial 12
+# serial 13
 dnl Copyright (C) 2002-2003, 2005-2006, 2008-2025 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
@@ -31,7 +31,7 @@ AC_DEFUN([gl_SYS__SYSTEM_CONFIGURATION],
 AC_DEFUN([gl_PHYSMEM],
 [
   # Prerequisites of lib/physmem.c.
-  AC_CHECK_HEADERS([sys/pstat.h sys/sysmp.h sys/sysinfo.h \
+  AC_CHECK_HEADERS([sys/pstat.h sys/sysinfo.h \
     machine/hal_sysinfo.h sys/table.h sys/param.h sys/systemcfg.h],,,
     [AC_INCLUDES_DEFAULT])
   dnl <sys/sysctl.h> requires <sys/param.h> on OpenBSD 4.0.
@@ -42,7 +42,7 @@ AC_DEFUN([gl_PHYSMEM],
      #endif
     ])
 
-  AC_CHECK_FUNCS([pstat_getstatic pstat_getdynamic sysmp getsysinfo sysctl table sysinfo])
+  AC_CHECK_FUNCS([pstat_getstatic pstat_getdynamic getsysinfo sysctl table sysinfo])
   AC_CHECK_MEMBERS([struct sysinfo.mem_unit],,, [[#include <sys/sysinfo.h>]])
   AC_REQUIRE([gl_SYS__SYSTEM_CONFIGURATION])
 ])