]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Clean up change of a minute ago.
authorJim Meyering <jim@meyering.net>
Sat, 15 Feb 2003 09:11:49 +0000 (09:11 +0000)
committerJim Meyering <jim@meyering.net>
Sat, 15 Feb 2003 09:11:49 +0000 (09:11 +0000)
lib/physmem.c

index 31436c993debce4ef68fe63243999feae1798b34..1706e6c390f0f4af08588976f6e1ae7fd3db1a0d 100644 (file)
 # include <sys/pstat.h>
 #endif
 
-#if HAVE_SYSGET && HAVE_SYS_SYSGET_H && HAVE_SYS_SYSINFO_H && SGT_COOKIE_INIT
+#if HAVE_SYSGET && HAVE_SYS_SYSGET_H && HAVE_SYS_SYSINFO_H
 # include <sys/types.h>
 # include <sys/sysget.h>
 # include <sys/sysinfo.h>
 
-# define IRIX_SYSGET_TOTAL \
-    do { double tot; if (irix_sysget (&tot, NULL) == 0) return tot; } while (0)
-# define IRIX_SYSGET_AVAILABLE \
-    do { double fr; if (irix_sysget (NULL, &fr) == 0) return fr; } while (0)
+# if defined SGT_COOKIE_INIT && defined SGT_NODE_INFO && defined SGT_READ
+#  define IRIX_SYSGET_TOTAL \
+    do { double t; if (irix_sysget (&t, NULL) == 0) return t; } while (0)
+#  define IRIX_SYSGET_AVAILABLE \
+    do { double f; if (irix_sysget (NULL, &f) == 0) return f; } while (0)
 
 /* If TOTAL is non-NULL, set *TOTAL to the number of bytes of physical memory.
    If AVAIL is non-NULL, set *AVAIL to the number of bytes of available memory.
@@ -62,7 +63,10 @@ irix_sysget (double *total, double *avail)
     *avail = buf.freemem;
   return 0;
 }
-#else
+# endif
+#endif
+
+#ifndef IRIX_SYSGET_TOTAL
 # define IRIX_SYSGET_TOTAL
 # define IRIX_SYSGET_AVAILABLE
 #endif