From: Bruno Haible Date: Wed, 10 Sep 2025 21:13:29 +0000 (+0200) Subject: physmem: Remove support for IRIX. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=96201bf22ab7554512f05a52bf34989c8976bbb3;p=thirdparty%2Fgnulib.git physmem: Remove support for IRIX. * lib/physmem.c: Remove code for IRIX. * m4/physmem.m4 (gl_PHYSMEM): Don't test for and sysmp. --- diff --git a/ChangeLog b/ChangeLog index c8cc95c1f7..d0e7f12b5f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2025-09-10 Bruno Haible + physmem: Remove support for IRIX. + * lib/physmem.c: Remove code for IRIX. + * m4/physmem.m4 (gl_PHYSMEM): Don't test for and sysmp. + passfd: Remove support for IRIX. * lib/passfd.c (sendfd, recvfd): Remove code for IRIX. diff --git a/lib/physmem.c b/lib/physmem.c index d0b27bcc39..0216896cab 100644 --- a/lib/physmem.c +++ b/lib/physmem.c @@ -30,12 +30,8 @@ # include #endif -#if HAVE_SYS_SYSMP_H /* IRIX */ -# include -#endif - #if HAVE_SYS_SYSINFO_H -/* Linux, AIX, HP-UX, IRIX, Solaris, Cygwin, Android */ +/* Linux, AIX, HP-UX, Solaris, Cygwin, Android */ # include #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 #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; diff --git a/m4/physmem.m4 b/m4/physmem.m4 index 8f64cd0b8e..36a33f4e43 100644 --- a/m4/physmem.m4 +++ b/m4/physmem.m4 @@ -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 requires 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 ]]) AC_REQUIRE([gl_SYS__SYSTEM_CONFIGURATION]) ])