Commit 9b7828a5 authored by Jim Blandy's avatar Jim Blandy

*** empty log message ***

parent b10a4379
......@@ -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,
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment