summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>1993-05-24 21:41:18 +0000
committerRoland McGrath <roland@redhat.com>1993-05-24 21:41:18 +0000
commitf846c07d439b0b082f17f5b6f8568d0dc3067c46 (patch)
tree6d515be31c4c074821746f67d2adba8795cdabc3
parentdfc8da6e0efeb942d23a3340edb3227c605a37b0 (diff)
downloadgunmake-f846c07d439b0b082f17f5b6f8568d0dc3067c46.tar.gz
*** empty log message ***
-rw-r--r--getloadavg.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/getloadavg.c b/getloadavg.c
index 7c1c317..7003539 100644
--- a/getloadavg.c
+++ b/getloadavg.c
@@ -355,6 +355,14 @@ getloadavg (loadavg, nelem)
{
int elem = 0; /* Return value. */
+#ifdef NO_GET_LOAD_AVG
+#define LDAV_DONE
+ /* Set errno to zero to indicate that there was no particular error;
+ this function just can't work at all on this system. */
+ errno = 0;
+ elem = -1;
+#endif
+
#if !defined (LDAV_DONE) && defined (LINUX)
#define LDAV_DONE
#undef LOAD_AVE_TYPE
@@ -540,13 +548,13 @@ getloadavg (loadavg, nelem)
#if !defined (LDAV_DONE) && defined (OSF_MIPS)
#define LDAV_DONE
-#define LDAV_PRIVILEGED
struct tbl_loadavg load_ave;
table (TBL_LOADAVG, 0, &load_ave, 1, sizeof (load_ave));
- loadavg[elem++] = (load_ave.tl_lscale == 0
- ? load_ave.tl_avenrun.d[0]
- : (load_ave.tl_avenrun.l[0] / load_ave.tl_lscale));
+ loadavg[elem++]
+ = (load_ave.tl_lscale == 0
+ ? load_ave.tl_avenrun.d[0]
+ : (load_ave.tl_avenrun.l[0] / (double) load_ave.tl_lscale));
#endif /* OSF_MIPS */
#if !defined (LDAV_DONE) && defined (VMS)