aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRoland McGrath1993-05-24 21:41:18 +0000
committerRoland McGrath1993-05-24 21:41:18 +0000
commit7ee260fe399f7b761f2b693884ef565abd7fa1b7 (patch)
tree988050c589f6c703f9b1e8c0396231f67f3d28c1 /src
parent0e2f4e59a54366563ae8a6824d0447297f0dcf7b (diff)
downloademacs-7ee260fe399f7b761f2b693884ef565abd7fa1b7.tar.gz
emacs-7ee260fe399f7b761f2b693884ef565abd7fa1b7.zip
*** empty log message ***
Diffstat (limited to 'src')
-rw-r--r--src/getloadavg.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/getloadavg.c b/src/getloadavg.c
index 7c1c31705d8..70035395787 100644
--- a/src/getloadavg.c
+++ b/src/getloadavg.c
@@ -355,6 +355,14 @@ getloadavg (loadavg, nelem)
355{ 355{
356 int elem = 0; /* Return value. */ 356 int elem = 0; /* Return value. */
357 357
358#ifdef NO_GET_LOAD_AVG
359#define LDAV_DONE
360 /* Set errno to zero to indicate that there was no particular error;
361 this function just can't work at all on this system. */
362 errno = 0;
363 elem = -1;
364#endif
365
358#if !defined (LDAV_DONE) && defined (LINUX) 366#if !defined (LDAV_DONE) && defined (LINUX)
359#define LDAV_DONE 367#define LDAV_DONE
360#undef LOAD_AVE_TYPE 368#undef LOAD_AVE_TYPE
@@ -540,13 +548,13 @@ getloadavg (loadavg, nelem)
540 548
541#if !defined (LDAV_DONE) && defined (OSF_MIPS) 549#if !defined (LDAV_DONE) && defined (OSF_MIPS)
542#define LDAV_DONE 550#define LDAV_DONE
543#define LDAV_PRIVILEGED
544 551
545 struct tbl_loadavg load_ave; 552 struct tbl_loadavg load_ave;
546 table (TBL_LOADAVG, 0, &load_ave, 1, sizeof (load_ave)); 553 table (TBL_LOADAVG, 0, &load_ave, 1, sizeof (load_ave));
547 loadavg[elem++] = (load_ave.tl_lscale == 0 554 loadavg[elem++]
548 ? load_ave.tl_avenrun.d[0] 555 = (load_ave.tl_lscale == 0
549 : (load_ave.tl_avenrun.l[0] / load_ave.tl_lscale)); 556 ? load_ave.tl_avenrun.d[0]
557 : (load_ave.tl_avenrun.l[0] / (double) load_ave.tl_lscale));
550#endif /* OSF_MIPS */ 558#endif /* OSF_MIPS */
551 559
552#if !defined (LDAV_DONE) && defined (VMS) 560#if !defined (LDAV_DONE) && defined (VMS)