changeset 3037:3c7a86dba45b

*** empty log message ***
author Roland McGrath <roland@gnu.org>
date Mon, 24 May 1993 21:41:18 +0000
parents 98f500ca5593
children 4bdac10d920a
files src/getloadavg.c
diffstat 1 files changed, 12 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/getloadavg.c	Mon May 24 21:19:42 1993 +0000
+++ b/src/getloadavg.c	Mon May 24 21:41:18 1993 +0000
@@ -355,6 +355,14 @@
 {
   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 @@
 
 #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)