loadavg.h

来自「wu-ftpd类unix下的ftp服务器,可用于嵌入式系统」· C头文件 代码 · 共 897 行 · 第 1/2 页

H
897
字号
#ifdef ISC_UNIX#include <net/errno.h>#include <sys/stream.h>		/* needed for IP_SRCROUTE */#include <sys/bsdtypes.h>#define SYSTEM5        1	/* include all the System V defines */#define LA_TYPE        LA_SHORT#define _PATH_UNIX             "/unix"#endif/*   **  Altos System V (5.3.1)   **      Contributed by Tim Rice <tim@trr.metro.net>. */#ifdef ALTOS_SYSTEM_V#include <sys/stream.h>#include <limits.h>#define SYSTEM5        1	/* include all the System V defines */#define LA_TYPE        LA_SHORT#endif/*   **  ConvexOS 11.0 and later   **   **      "Todd C. Miller" <millert@mroe.cs.colorado.edu> claims this   **      works on 9.1 as well.   **   **  ConvexOS 11.5 and later, should work on 11.0 as defined.   **  For pre-ConvexOOS 11.0, define NEEDGETOPT, undef IDENTPROTO   **   **      Eric Schnoebelen (eric@cirr.com) For CONVEX Computer Corp.   **              (now the CONVEX Technologies Center of Hewlett Packard) */#ifdef _CONVEX_SOURCE#define LA_TYPE        LA_FLOAT#endif/*   **  RISC/os 4.52   **   **      Gives a ton of warning messages, but otherwise compiles. */#ifdef RISCOS#define LA_TYPE        LA_INT#define LA_AVENRUN     "avenrun"#define _PATH_UNIX     "/unix"#endif/*   **  Linux 0.99pl10 and above...   **   **  Thanks to, in reverse order of contact:   **   **      John Kennedy <warlock@csuchico.edu>   **      Andrew Pam <avatar@aus.xanadu.com>   **      Florian La Roche <rzsfl@rz.uni-sb.de>   **      Karl London <karl@borg.demon.co.uk>   **   **  Last compiled against:      [06/10/96 @ 09:21:40 PM (Monday)]   **      sendmail 8.8-a4         named bind-4.9.4-T4B    db-1.85   **      gcc 2.7.2               libc-5.3.12             linux 2.0.0   **   **  NOTE: Override HASFLOCK as you will but, as of 1.99.6, mixed-style   **      file locking is no longer allowed.  In particular, make sure   **      your DBM library and sendmail are both using either flock(2)   **      *or* fcntl(2) file locking, but not both. */#ifdef __linux__#define BSD            1	/* include BSD defines */#ifndef LA_TYPE#define LA_TYPE       LA_PROCSTR#endif#include <sys/sysmacros.h>#endif/*   **  DELL SVR4 Issue 2.2, and others   **      From Kimmo Suominen <kim@grendel.lut.fi>   **   **      It's on #ifdef DELL_SVR4 because Solaris also gets __svr4__   **      defined, and the definitions conflict.   **   **      Peter Wemm <peter@perth.DIALix.oz.au> claims that the setreuid   **      trick works on DELL 2.2 (SVR4.0/386 version 4.0) and ESIX 4.0.3A   **      (SVR4.0/386 version 3.0). */#ifdef DELL_SVR4				/* no changes necessary */				/* see general __svr4__ defines below */#endif/*   **  Apple A/UX 3.0 */#ifdef _AUX_SOURCE#include <sys/sysmacros.h>#define BSD			/* has BSD routines */#ifndef LA_TYPE#define LA_TYPE       LA_INT#define FSHIFT        16#endif#define LA_AVENRUN     "avenrun"#ifndef _PATH_UNIX#define _PATH_UNIX            "/unix"	/* should be in <paths.h> */#endif#endif/*   **  Encore UMAX V   **   **      Not extensively tested. */#ifdef UMAXV#endif/*   **  Stardent Titan 3000 running TitanOS 4.2.   **   **      Must be compiled in "cc -43" mode.   **   **      From Kate Hedstrom <kate@ahab.rutgers.edu>.   **   **      Note the tweaking below after the BSD defines are set. */#ifdef titan#endif/*   **  Sequent DYNIX 3.2.0   **   **      From Jim Davis <jdavis@cs.arizona.edu>. */#ifdef sequent#define BSD            1#define LA_TYPE        LA_FLOAT#ifndef _PATH_UNIX#define _PATH_UNIX            "/dynix"#endif#endif/*   **  Sequent DYNIX/ptx v2.0 (and higher)   **   **      For DYNIX/ptx v1.x, undefine HASSETREUID.   **   **      From Tim Wright <timw@sequent.com>.   **      Update from Jack Woolley <jwoolley@sctcorp.com>, 26 Dec 1995,   **              for DYNIX/ptx 4.0.2. */#ifdef _SEQUENT_#include <sys/stream.h>#define SYSTEM5        1	/* include all the System V defines */#define LA_TYPE        LA_INT#endif/*   **  Cray Unicos   **   **      Ported by David L. Kensiski, Sterling Sofware <kensiski@nas.nasa.gov> */#ifdef UNICOS#define SYSTEM5        1	/* include all the System V defines */#define LA_TYPE        LA_ZERO#endif/*   **  Apollo DomainOS   **   **  From Todd Martin <tmartint@tus.ssi1.com> & Don Lewis <gdonl@gv.ssi1.com>   **   **  15 Jan 1994; updated 2 Aug 1995   ** */#ifdef apollo#define LA_TYPE        LA_SUBR	/* use getloadavg.c */#endif/*   **  UnixWare 2.x */#ifdef UNIXWARE2#define UNIXWARE       1#endif/*   **  UnixWare 1.1.2.   **   **      Updated by Petr Lampa <lampa@fee.vutbr.cz>.   **      From Evan Champion <evanc@spatial.synapse.org>. */#ifdef UNIXWARE#include <sys/mkdev.h>#define SYSTEM5                1#define LA_TYPE                LA_ZERO#define _PATH_UNIX             "/unix"#endif/*   **  Intergraph CLIX 3.1   **   **      From Paul Southworth <pauls@locust.cic.net> */#ifdef CLIX#define SYSTEM5        1	/* looks like System V */#endif/*   **  NCR MP-RAS 2.x (SysVr4) with Wollongong TCP/IP   **   **      From Kevin Darcy <kevin@tech.mis.cfc.com>. */#ifdef NCR_MP_RAS2#include <sys/sockio.h>#define __svr4__#endif/*   **  NCR MP-RAS 3.x (SysVr4) with STREAMware TCP/IP   **   **      From Tom Moore <Tom.Moore@DaytonOH.NCR.COM> */#ifdef NCR_MP_RAS3#define __svr4__#endif/*   **  Tandem NonStop-UX SVR4   **   **      From Rick McCarty <mccarty@mpd.tandem.com>. */#ifdef NonStop_UX_BXX#define __svr4__#endif/*   **  Hitachi 3050R & 3050RX Workstations running HI-UX/WE2.   **   **      Tested for 1.04 and 1.03   **      From Akihiro Hashimoto ("Hash") <hash@dominic.ipc.chiba-u.ac.jp>. */#ifdef __H3050R#define SYSTEM5        1	/* include all the System V defines */#define LA_TYPE        LA_FLOAT#ifndef _PATH_UNIX#define _PATH_UNIX            "/HI-UX"#endif#endif/*   **  Amdahl UTS System V 2.1.5 (SVr3-based)   **   **    From: Janet Jackson <janet@dialix.oz.au>. */#ifdef _UTS#include <sys/sysmacros.h>#define LA_TYPE        LA_ZERO	/* doesn't have load average */#define _PATH_UNIX             "/unix"#endif/*   **  Cray Computer Corporation's CSOS   **   **      From Scott Bolte <scott@craycos.com>. */#ifdef _CRAYCOM#define SYSTEM5        1	/* include all the System V defines */#define LA_TYPE        LA_ZERO#endif/*   **  Sony NEWS-OS 4.2.1R and 6.0.3   **   **      From Motonori NAKAMURA <motonori@cs.ritsumei.ac.jp>. */#ifdef sony_news#ifndef __svr4#ifndef BSD#define BSD			/* has BSD routines */#endif#define LA_TYPE       LA_INT#else#ifndef __svr4__#define __svr4__		/* use all System V Releae 4 defines below */#endif#define LA_TYPE       LA_READKSYM	/* use MIOC_READKSYM ioctl */#define _PATH_UNIX            "/stand/unix"#endif#endif/*   **  Omron LUNA/UNIOS-B 3.0, LUNA2/Mach and LUNA88K Mach   **   **      From Motonori NAKAMURA <motonori@cs.ritsumei.ac.jp>. */#ifdef luna#ifdef uniosb#define LA_TYPE       LA_INT#endif#ifdef luna2#define LA_TYPE       LA_SUBR#endif#ifdef luna88k#define LA_TYPE       LA_INT#endif#endif/*   **  NEC EWS-UX/V 4.2 (with /usr/ucb/cc)   **   **      From Motonori NAKAMURA <motonori@cs.ritsumei.ac.jp>. */#if defined(nec_ews_svr4) || defined(_nec_ews_svr4)#ifndef __svr4__#define __svr4__		/* use all System V Releae 4 defines below */#endif#define LA_TYPE        LA_READKSYM	/* use MIOC_READSYM ioctl */#endif/*   **  Fujitsu/ICL UXP/DS (For the DS/90 Series)   **   **      From Diego R. Lopez <drlopez@cica.es>.   **      Additional changes from Fumio Moriya and Toshiaki Nomura of the   **              Fujitsu Fresoftware gruop <dsfrsoft@oai6.yk.fujitsu.co.jp>. */#ifdef __uxp__#include <arpa/nameser.h>#include <sys/sysmacros.h>#include <sys/mkdev.h>#define __svr4__#define _PATH_UNIX             "/stand/unix"#endif/*   **  Pyramid DC/OSx   **   **      From Earle Ake <akee@wpdiss1.wpafb.af.mil>. */#ifdef DCOSx#endif/*   **  Concurrent Computer Corporation Maxion   **   **      From Donald R. Laster Jr. <laster@access.digex.net>. */#ifdef __MAXION__#include <sys/stream.h>#define __svr4__               1	/* SVR4.2MP */#endif/*   **  Harris Nighthawk PowerUX (nh6000 box)   **   **  Contributed by Bob Miorelli, Pratt & Whitney <miorelli@pweh.com> */#ifdef _PowerUX#ifndef __svr4__#define __svr4__#endif#define LA_TYPE                LA_ZERO#endif/*   **  Siemens Nixdorf Informationssysteme AG SINIX   **   **      Contributed by Gerald Rinske <Gerald.Rinske@mch.sni.de>   **      of Siemens Business Services VAS. */#ifdef sinix#endif/*   **  CRAY T3E   **   **      Contributed by Manu Mahonen <mailadm@csc.fi>   **      of Center for Scientific Computing. */#ifdef _CRAY#endif/************************************************************************  End of Per-Operating System defines**********************************************************************//************************************************************************  More general defines**********************************************************************/#ifdef BSD#endif#ifdef __svr4__#define SYSTEM5        1#ifndef _PATH_UNIX#define _PATH_UNIX            "/unix"#endif#endif#ifdef SYSTEM5#include <sys/sysmacros.h>#ifndef LA_TYPE#ifdef MIOC_READKSYM#define LA_TYPE      LA_READKSYM	/* use MIOC_READKSYM ioctl */#else#define LA_TYPE      LA_INT	/* assume integer load average */#endif#endif#endif/* general POSIX defines */#ifdef _POSIX_VERSION#endif/*   **  Tweaking for systems that (for example) claim to be BSD or POSIX   **  but don't have all the standard BSD or POSIX routines (boo hiss). */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?