aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJim Blandy <[email protected]>1991-07-24 23:47:06 +0000
committerJim Blandy <[email protected]>1991-07-24 23:47:06 +0000
commit9b7828a5ad16b476e9359bfbe020e0bbc6cf3831 (patch)
treedbee7356669b9f9dc41b8bd06ecaf40d51c768ca /src
parentb10a43799500bb04ab70cca9e780262fda5812fe (diff)
*** empty log message ***
Diffstat (limited to 'src')
-rw-r--r--src/fileio.c12
-rw-r--r--src/fns.c24
2 files changed, 29 insertions, 7 deletions
diff --git a/src/fileio.c b/src/fileio.c
index 7727448feb..b6035656d0 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -63,8 +63,10 @@ extern int sys_nerr;
#ifdef HPUX
#include <netio.h>
+#ifndef HPUX8
#include <errnet.h>
#endif
+#endif
#ifndef O_WRONLY
#define O_WRONLY 1
@@ -2014,13 +2016,9 @@ before the error is signaled.")
signal_after_change (point, 0, inserted);
- {
- Lisp_Object result = Fcons (filename,
- Fcons (make_number (inserted),
- Qnil));
- UNGCPRO;
- return result;
- }
+ RETURN_UNGCPRO (Fcons (filename,
+ Fcons (make_number (inserted),
+ Qnil)));
}
DEFUN ("write-region", Fwrite_region, Swrite_region, 3, 5,
diff --git a/src/fns.c b/src/fns.c
index 649bddd714..3be50027b1 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -51,6 +51,10 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#endif /* not VMS */
#endif /* LOAD_AVE_TYPE */
+#ifdef DGUX
+#include <sys/dg_sys_info.h> /* for load average info - DJB */
+#endif
+
/* Note on some machines this defines `vector' as a typedef,
so make sure we don't use that name in this file. */
#undef vector
@@ -1181,6 +1185,11 @@ and can rub it out if not confirmed.")
}
/* Avoid static vars inside a function since in HPUX they dump as pure. */
+#ifdef DGUX
+static struct dg_sys_info_load_info load_info; /* what-a-mouthful! */
+
+#else /* Not DGUX */
+
static int ldav_initialized;
static int ldav_channel;
#ifdef LOAD_AVE_TYPE
@@ -1192,6 +1201,7 @@ static struct nlist ldav_nl[2];
#define channel ldav_channel
#define initialized ldav_initialized
#define nl ldav_nl
+#endif /* Not DGUX */
DEFUN ("load-average", Fload_average, Sload_average, 0, 0, 0,
"Return list of 1 minute, 5 minute and 15 minute load averages.\n\
@@ -1199,6 +1209,19 @@ Each of the three load averages is multiplied by 100,\n\
then converted to integer.")
()
{
+#ifdef DGUX
+ /* perhaps there should be a "sys_load_avg" call in sysdep.c?! - DJB */
+ load_info.one_minute = 0.0; /* just in case there is an error */
+ load_info.five_minute = 0.0;
+ load_info.fifteen_minute = 0.0;
+ dg_sys_info (&load_info, DG_SYS_INFO_LOAD_INFO_TYPE,
+ DG_SYS_INFO_LOAD_VERSION_0);
+
+ return Fcons (make_number ((int)(load_info.one_minute * 100.0)),
+ Fcons (make_number ((int)(load_info.five_minute * 100.0)),
+ Fcons (make_number ((int)(load_info.fifteen_minute * 100.0)),
+ Qnil)));
+#else /* not DGUX */
#ifndef LOAD_AVE_TYPE
error ("load-average not implemented for this operating system");
@@ -1320,6 +1343,7 @@ then converted to integer.")
Fcons (make_number (LOAD_AVE_CVT (load_ave[2])),
Qnil)));
#endif /* LOAD_AVE_TYPE */
+#endif /* not DGUX */
}
#undef channel