the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#ifndef __CYGWIN32__
-
/* Compile-time symbols that this file uses:
FIXUP_KERNEL_SYMBOL_ADDR() Adjust address in returned struct nlist.
__linux__ Linux: assumes /proc filesystem mounted.
Support from Michael K. Johnson.
__NetBSD__ NetBSD: assumes /kern filesystem mounted.
- __OpenBSD__ OpenBSD: dito.
+ __OpenBSD__ OpenBSD: ditto.
In addition, to avoid nesting many #ifdefs, we internally set
LDAV_DONE to indicate that the load average has been computed.
#include <config.h>
#endif
+#ifndef WINDOWSNT
+#ifndef __CYGWIN32__
+
#include <sys/types.h>
/* Both the Emacs and non-Emacs sections want this. Some
#include <errno.h>
-#ifndef errno
-extern int errno;
-#endif
-
#ifndef HAVE_GETLOADAVG
/* The existing Emacs configuration files define a macro called
privileges to use it.
Initial implementation courtesy Zlatko Calusic <zcalusic@carnet.hr>.
- Integrated to XEmacs by Hrvoje Niksic <hniksic@srce.hr>.
+ Integrated to XEmacs by Hrvoje Niksic <hniksic@xemacs.org>.
Additional cleanup by Hrvoje Niksic, based on code published by
Casper Dik <Casper.Dik@Holland.Sun.Com>. */
kstat_ctl_t *kc;
}
for (elem = 0; elem < nelem; elem++)
{
- kstat_named_t *kn = kstat_data_lookup (ksp, avestrings[elem]);
+ kstat_named_t *kn =
+ (kstat_named_t *) kstat_data_lookup (ksp, avestrings[elem]);
if (!kn)
{
kstat_close (kc);
loadavg[elem++] = load_info.fifteen_minute;
#endif /* DGUX */
-#if !defined (LDAV_DONE) && defined (apollo)
-#define LDAV_DONE
-/* Apollo code from lisch@mentorg.com (Ray Lischner).
-
- This system call is not documented. The load average is obtained as
- three long integers, for the load average over the past minute,
- five minutes, and fifteen minutes. Each value is a scaled integer,
- with 16 bits of integer part and 16 bits of fraction part.
-
- I'm not sure which operating system first supported this system call,
- but I know that SR10.2 supports it. */
-
- extern void proc1_$get_loadav ();
- unsigned long load_ave[3];
-
- proc1_$get_loadav (load_ave);
-
- if (nelem > 0)
- loadavg[elem++] = load_ave[0] / 65536.0;
- if (nelem > 1)
- loadavg[elem++] = load_ave[1] / 65536.0;
- if (nelem > 2)
- loadavg[elem++] = load_ave[2] / 65536.0;
-#endif /* apollo */
-
#if !defined (LDAV_DONE) && defined (OSF_MIPS)
#define LDAV_DONE
}
#endif /*__GNUWIN32__*/
-
+#endif /* WINDOWSNT */