X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Fgetloadavg.c;h=af003aae439f4dd535f2db7c3c34adb24c59530f;hb=975655e6b5b1526ee82b159b3eadf69888c42090;hp=39c45e60158eae12720f17fdd40bedaea6cba1c9;hpb=77dcef404dc78635f6ffa8f71a803d2bc7cc8921;p=chise%2Fxemacs-chise.git- diff --git a/src/getloadavg.c b/src/getloadavg.c index 39c45e6..af003aa 100644 --- a/src/getloadavg.c +++ b/src/getloadavg.c @@ -19,8 +19,6 @@ along with XEmacs; see the file COPYING. If not, write to 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. @@ -71,6 +69,9 @@ Boston, MA 02111-1307, USA. */ #include #endif +#ifndef WINDOWSNT +#ifndef __CYGWIN32__ + #include /* Both the Emacs and non-Emacs sections want this. Some @@ -93,10 +94,6 @@ Boston, MA 02111-1307, USA. */ #include -#ifndef errno -extern int errno; -#endif - #ifndef HAVE_GETLOADAVG /* The existing Emacs configuration files define a macro called @@ -535,7 +532,7 @@ getloadavg (double loadavg[], int nelem) privileges to use it. Initial implementation courtesy Zlatko Calusic . - Integrated to XEmacs by Hrvoje Niksic . + Integrated to XEmacs by Hrvoje Niksic . Additional cleanup by Hrvoje Niksic, based on code published by Casper Dik . */ kstat_ctl_t *kc; @@ -771,31 +768,6 @@ getloadavg (double loadavg[], int nelem) 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 @@ -1006,4 +978,4 @@ getloadavg (double loadavg[], int nelem) } #endif /*__GNUWIN32__*/ - +#endif /* WINDOWSNT */