diff options
author | Jim Meyering <jim@meyering.net> | 2003-02-15 09:11:49 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2003-02-15 09:11:49 +0000 |
commit | c1604ca5a77e65264022ede42460917b9a87f4de (patch) | |
tree | 81acdd1bda9f708884b57f1f54f7a62a53c36253 /lib | |
parent | c911821af74ea4159f57ebddbbf2fdfc21554e18 (diff) | |
download | coreutils-c1604ca5a77e65264022ede42460917b9a87f4de.tar.xz |
Clean up change of a minute ago.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/physmem.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/lib/physmem.c b/lib/physmem.c index 31436c993..1706e6c39 100644 --- a/lib/physmem.c +++ b/lib/physmem.c @@ -31,15 +31,16 @@ # 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 |