#ifdef HPUX
#include <netio.h>
+#ifndef HPUX8
#include <errnet.h>
#endif
+#endif
#ifndef O_WRONLY
#define O_WRONLY 1
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,
#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
}
\f
/* 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
#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\
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");
Fcons (make_number (LOAD_AVE_CVT (load_ave[2])),
Qnil)));
#endif /* LOAD_AVE_TYPE */
+#endif /* not DGUX */
}
#undef channel