home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!comp-sources-3b1
- From: dave@galaxia.network23.com (David H. Brierley)
- Newsgroups: comp.sources.3b1
- Subject: v02i021: Still more include files for the 3b1, Part02/02
- Date: 21 Jul 1992 22:27:06 -0400
- Organization: UUNET Communications
- Lines: 1549
- Sender: dhb@ftp.UU.NET
- Approved: dave@galaxia.network23.com
- Message-ID: <14ih1qINNd5k@ftp.UU.NET>
- NNTP-Posting-Host: ftp.uu.net
- X-Checksum-Snefru: 92babd3a 70411203 cf48d805 2d7a755f
-
- Submitted-by: dave@galaxia.network23.com (David H. Brierley)
- Posting-number: Volume 2, Issue 21
- Archive-name: bsd-incl/part02
-
- [ Part 1 was originally posted as "1 of 1", but now here is "2 of 2" ]
-
- The include files included in this archive are those include files which
- have either been changed or added on my system since the initial installation
- of the development set. Not included in this posting are those include
- files which I already posted: statfs.h, uipc/*, and gcc-include/*.
-
- No installation script or makefile is provided. Examine each file in this
- set and determine if you want it installed on your system. The README file
- contains a brief description of each file included.
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then unpack
- # it by saving it into a file and typing "sh file". To overwrite existing
- # files, type "sh file -c". You can also feed this as standard input via
- # unshar, or by typing "sh <file", e.g.. If this archive is complete, you
- # will see the following message at the end:
- # "End of archive 1 (of 1)."
- # Contents: ADDS ADDS/limits.h ADDS/netdb.h ADDS/netinet/in.h
- # ADDS/stdlib.h ADDS/strings.h ADDS/sys ADDS/sys/resource.h
- # ADDS/sys/syslog.h ADDS/sys/time.h ADDS/sys/uio.h ADDS/sysexits.h
- # ADDS/syslog.h CHANGES CHANGES/grp.h CHANGES/pwd.h CHANGES/stdio.h
- # CHANGES/sys CHANGES/sys/proc.h CHANGES/sys/signal.h
- # CHANGES/sys/types.h MANIFEST README
- # Wrapped by dave@galaxia on Tue Jul 21 09:28:24 1992
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test ! -d 'ADDS' ; then
- echo shar: Creating directory \"'ADDS'\"
- mkdir 'ADDS'
- fi
- if test -f 'ADDS/limits.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ADDS/limits.h'\"
- else
- echo shar: Extracting \"'ADDS/limits.h'\" \(1772 characters\)
- sed "s/^X//" >'ADDS/limits.h' <<'END_OF_FILE'
- X#ifndef LIMITS_DOT_H
- X#define LIMITS_DOT_H
- X/* ANSI C compatible limits.h file for the 3b1. If your C compiler doesn't
- X understand the U suffix for unsigned constants, define NOT_ANSI_C at
- X the front of this file (or before you include it).
- X*/
- X#define NOT_ANSI_C /* Stock 3b1 CC can't handle U. GCC should be able to. */
- X
- X/* Bits in a char. */
- X#define CHAR_BIT 8
- X
- X/* Maximum value of a char. (3b1 uses signed chars.) */
- X#define CHAR_MAX SCHAR_MAX
- X
- X/* Minimum value of a char. */
- X#define CHAR_MIN SCHAR_MIN
- X
- X/* Maximum value of an int. */
- X#define INT_MAX 2147483647
- X
- X/* Minimum value of an int. */
- X#define INT_MIN (-2147483648)
- X
- X/* Maximum value of a long. */
- X#define LONG_MAX 2147483647L
- X
- X/* Minimum value of a long. */
- X#define LONG_MIN (-2147483648L)
- X
- X/* Maximum value of a signed char. */
- X#define SCHAR_MAX 127
- X
- X/* Minimum value of a signed char. */
- X#define SCHAR_MIN (-128)
- X
- X/* Maximum value of a short. */
- X#define SHRT_MAX 32767
- X
- X/* Minimum value of a short. */
- X#define SHRT_MIN (-32768)
- X
- X#ifdef NOT_ANSI_C
- X
- X/* Maximum value of an unsigned char. */
- X#define UCHAR_MAX ((unsigned int) 255)
- X
- X/* Maximum value of an unsigned int. */
- X#define UINT_MAX ((unsigned int) 4294967295)
- X
- X/* Maximum value of an unsigned long. */
- X#define ULONG_MAX ((unsigned long) 4294967295L)
- X
- X/* Maximum value of an unsigned short. */
- X#define USHRT_MAX ((unsigned int) 65535)
- X
- X#else
- X
- X/* Maximum value of an unsigned char. */
- X#define UCHAR_MAX 255U
- X
- X/* Maximum value of an unsigned int. */
- X#define UINT_MAX 4294967295U
- X
- X/* Maximum value of an unsigned long. */
- X#define ULONG_MAX 4294967295UL
- X
- X/* Maximum value of an unsigned short. */
- X#define USHRT_MAX 65535U
- X
- X#endif
- X#endif /* LIMITS_DOT_H */
- END_OF_FILE
- if test 1772 -ne `wc -c <'ADDS/limits.h'`; then
- echo shar: \"'ADDS/limits.h'\" unpacked with wrong size!
- fi
- # end of 'ADDS/limits.h'
- fi
- if test -f 'ADDS/netdb.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ADDS/netdb.h'\"
- else
- echo shar: Extracting \"'ADDS/netdb.h'\" \(1717 characters\)
- sed "s/^X//" >'ADDS/netdb.h' <<'END_OF_FILE'
- X
- X/*
- X * Structures returned by network
- X * data base library. All addresses
- X * are supplied in host order, and
- X * returned in network order (suitable
- X * for use in system calls).
- X */
- Xstruct hostent {
- X char *h_name; /* official name of host */
- X char **h_aliases; /* alias list */
- X int h_addrtype; /* host address type */
- X int h_length; /* length of address */
- X char **h_addr_list; /* list of addresses from name server */
- X#define h_addr h_addr_list[0] /* address, for backward compatiblity */
- X};
- X
- X/*
- X * Assumption here is that a network number
- X * fits in 32 bits -- probably a poor one.
- X */
- Xstruct netent {
- X char *n_name; /* official name of net */
- X char **n_aliases; /* alias list */
- X int n_addrtype; /* net address type */
- X unsigned long n_net; /* network # */
- X};
- X
- Xstruct servent {
- X char *s_name; /* official service name */
- X char **s_aliases; /* alias list */
- X int s_port; /* port # */
- X char *s_proto; /* protocol to use */
- X};
- X
- Xstruct protoent {
- X char *p_name; /* official protocol name */
- X char **p_aliases; /* alias list */
- X int p_proto; /* protocol # */
- X};
- X
- Xstruct hostent *gethostbyname(), *gethostbyaddr(), *gethostent();
- Xstruct netent *getnetbyname(), *getnetbyaddr(), *getnetent();
- Xstruct servent *getservbyname(), *getservbyport(), *getservent();
- Xstruct protoent *getprotobyname(), *getprotobynumber(), *getprotoent();
- X
- X/*
- X * Error return codes from gethostbyname() and gethostbyaddr()
- X */
- X
- Xextern int h_errno;
- X
- X#define HOST_NOT_FOUND 1 /* Authoritive Answer Host not found */
- X#define TRY_AGAIN 2 /* Non-Authoritive Host not found, or SERVERFAIL */
- X#define NO_RECOVERY 3 /* Non recoverable errors, FORMERR, REFUSED, NOTIMP */
- X#define NO_ADDRESS 4 /* Valid host name, no address, look for MX record */
- END_OF_FILE
- if test 1717 -ne `wc -c <'ADDS/netdb.h'`; then
- echo shar: \"'ADDS/netdb.h'\" unpacked with wrong size!
- fi
- # end of 'ADDS/netdb.h'
- fi
- if test -f 'ADDS/netinet/in.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ADDS/netinet/in.h'\"
- else
- echo shar: Extracting \"'ADDS/netinet/in.h'\" \(3806 characters\)
- sed "s/^X//" >'ADDS/netinet/in.h' <<'END_OF_FILE'
- X/* @(#)in.h 3.6 89/03/14 mt Xinu
- X *
- X * Copyright (c) 1982, 1986 Regents of the University of California.
- X * All rights reserved.
- X *
- X * Redistribution and use in source and binary forms are permitted
- X * provided that the above copyright notice and this paragraph are
- X * duplicated in all such forms and that any documentation,
- X * advertising materials, and other materials related to such
- X * distribution and use acknowledge that the software was developed
- X * by the University of California, Berkeley. The name of the
- X * University may not be used to endorse or promote products derived
- X * from this software without specific prior written permission.
- X * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- X * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- X * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- X *
- X * @(#)in.h 7.6 (Berkeley) 6/29/88
- X */
- X
- X#ifndef __IN_H__
- X#define __IN_H__
- X
- X/*
- X * Constants and structures defined by the internet system,
- X * Per RFC 790, September 1981.
- X */
- X
- X/*
- X * Protocols
- X */
- X#define IPPROTO_IP 0 /* dummy for IP */
- X#define IPPROTO_ICMP 1 /* control message protocol */
- X#define IPPROTO_GGP 3 /* gateway^2 (deprecated) */
- X#define IPPROTO_TCP 6 /* tcp */
- X#define IPPROTO_EGP 8 /* exterior gateway protocol */
- X#define IPPROTO_PUP 12 /* pup */
- X#define IPPROTO_UDP 17 /* user datagram protocol */
- X#define IPPROTO_IDP 22 /* xns idp */
- X
- X#define IPPROTO_RAW 255 /* raw IP packet */
- X#define IPPROTO_MAX 256
- X
- X
- X/*
- X * Ports < IPPORT_RESERVED are reserved for
- X * privileged processes (e.g. root).
- X * Ports > IPPORT_USERRESERVED are reserved
- X * for servers, not necessarily privileged.
- X */
- X#define IPPORT_RESERVED 1024
- X#define IPPORT_USERRESERVED 5000
- X
- X/*
- X * Link numbers
- X */
- X#define IMPLINK_IP 155
- X#define IMPLINK_LOWEXPER 156
- X#define IMPLINK_HIGHEXPER 158
- X
- X/*
- X * Internet address (a structure for historical reasons)
- X */
- Xstruct in_addr {
- X u_long s_addr;
- X};
- X
- X/*
- X * Definitions of bits in internet address integers.
- X * On subnets, the decomposition of addresses to host and net parts
- X * is done according to subnet mask, not the masks here.
- X */
- X#define IN_CLASSA(i) (((long)(i) & 0x80000000) == 0)
- X#define IN_CLASSA_NET 0xff000000
- X#define IN_CLASSA_NSHIFT 24
- X#define IN_CLASSA_HOST 0x00ffffff
- X#define IN_CLASSA_MAX 128
- X
- X#define IN_CLASSB(i) (((long)(i) & 0xc0000000) == 0x80000000)
- X#define IN_CLASSB_NET 0xffff0000
- X#define IN_CLASSB_NSHIFT 16
- X#define IN_CLASSB_HOST 0x0000ffff
- X#define IN_CLASSB_MAX 65536
- X
- X#define IN_CLASSC(i) (((long)(i) & 0xe0000000) == 0xc0000000)
- X#define IN_CLASSC_NET 0xffffff00
- X#define IN_CLASSC_NSHIFT 8
- X#define IN_CLASSC_HOST 0x000000ff
- X
- X#define IN_CLASSD(i) (((long)(i) & 0xf0000000) == 0xe0000000)
- X#define IN_MULTICAST(i) IN_CLASSD(i)
- X
- X#define IN_EXPERIMENTAL(i) (((long)(i) & 0xe0000000) == 0xe0000000)
- X#define IN_BADCLASS(i) (((long)(i) & 0xf0000000) == 0xf0000000)
- X
- X#define INADDR_ANY (u_long)0x00000000
- X#define INADDR_BROADCAST (u_long)0xffffffff /* must be masked */
- X#ifndef KERNEL
- X#define INADDR_NONE 0xffffffff /* -1 return */
- X#endif
- X
- X#define IN_LOOPBACKNET 127 /* official! */
- X#define INADDR_LOOPBACK (u_long)0x7f000001 /* 127.0.0.1 */
- X
- X/*
- X * Socket address, internet style.
- X */
- Xstruct sockaddr_in {
- X short sin_family;
- X u_short sin_port;
- X struct in_addr sin_addr;
- X char sin_zero[8];
- X};
- X
- X/*
- X * Options for use with [gs]etsockopt at the IP level.
- X */
- X#define IP_OPTIONS 1 /* set/get IP per-packet options */
- X#define IP_HDRINCL 2 /* set/get RAW packet header option */
- X
- X/*
- X * Macros for number representation conversion.
- X */
- X#define ntohl(x) (x)
- X#define ntohs(x) (x)
- X#define htonl(x) (x)
- X#define htons(x) (x)
- X
- X
- X#ifdef KERNEL
- Xextern struct domain inetdomain;
- Xextern struct protosw inetsw[];
- Xstruct in_addr in_makeaddr();
- Xu_long in_netof(), in_lnaof();
- X#endif
- X
- X#endif
- END_OF_FILE
- if test 3806 -ne `wc -c <'ADDS/netinet/in.h'`; then
- echo shar: \"'ADDS/netinet/in.h'\" unpacked with wrong size!
- fi
- # end of 'ADDS/netinet/in.h'
- fi
- if test -f 'ADDS/stdlib.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ADDS/stdlib.h'\"
- else
- echo shar: Extracting \"'ADDS/stdlib.h'\" \(47 characters\)
- sed "s/^X//" >'ADDS/stdlib.h' <<'END_OF_FILE'
- X#include "/usr/local/lib/gcc-include/stdlib.h"
- END_OF_FILE
- if test 47 -ne `wc -c <'ADDS/stdlib.h'`; then
- echo shar: \"'ADDS/stdlib.h'\" unpacked with wrong size!
- fi
- # end of 'ADDS/stdlib.h'
- fi
- if test -f 'ADDS/strings.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ADDS/strings.h'\"
- else
- echo shar: Extracting \"'ADDS/strings.h'\" \(247 characters\)
- sed "s/^X//" >'ADDS/strings.h' <<'END_OF_FILE'
- X#include <string.h>
- X
- X/*
- X * map BSD style memory routines into SYSV equivalents
- X */
- X#define bcopy(b1,b2,n) memcpy(b2,b1,n)
- X#define bzero(b1,n) memset(b1,0,n)
- X#define bcmp(s1,s2,n) memcmp(s1,s2,n)
- X
- X#define index strchr
- X#define rindex strrchr
- END_OF_FILE
- if test 247 -ne `wc -c <'ADDS/strings.h'`; then
- echo shar: \"'ADDS/strings.h'\" unpacked with wrong size!
- fi
- # end of 'ADDS/strings.h'
- fi
- if test ! -d 'ADDS/sys' ; then
- echo shar: Creating directory \"'ADDS/sys'\"
- mkdir 'ADDS/sys'
- fi
- if test -f 'ADDS/sys/resource.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ADDS/sys/resource.h'\"
- else
- echo shar: Extracting \"'ADDS/sys/resource.h'\" \(3942 characters\)
- sed "s/^X//" >'ADDS/sys/resource.h' <<'END_OF_FILE'
- X/*
- X * Copyright (c) 1982, 1986 The Regents of the University of California.
- X * All rights reserved.
- X *
- X * Redistribution and use in source and binary forms, with or without
- X * modification, are permitted provided that the following conditions
- X * are met:
- X * 1. Redistributions of source code must retain the above copyright
- X * notice, this list of conditions and the following disclaimer.
- X * 2. Redistributions in binary form must reproduce the above copyright
- X * notice, this list of conditions and the following disclaimer in the
- X * documentation and/or other materials provided with the distribution.
- X * 3. All advertising materials mentioning features or use of this software
- X * must display the following acknowledgement:
- X * This product includes software developed by the University of
- X * California, Berkeley and its contributors.
- X * 4. Neither the name of the University nor the names of its contributors
- X * may be used to endorse or promote products derived from this software
- X * without specific prior written permission.
- X *
- X * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- X * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- X * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- X * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- X * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- X * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- X * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- X * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- X * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- X * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- X * SUCH DAMAGE.
- X *
- X * @(#)resource.h 7.5 (Berkeley) 3/17/91
- X */
- X
- X#ifndef _RESOURCE_H_
- X#define _RESOURCE_H_
- X
- X/*
- X * Process priority specifications to get/setpriority.
- X */
- X#define PRIO_MIN -20
- X#define PRIO_MAX 20
- X
- X#define PRIO_PROCESS 0
- X#define PRIO_PGRP 1
- X#define PRIO_USER 2
- X
- X/*
- X * Resource utilization information.
- X */
- X
- X#define RUSAGE_SELF 0
- X#define RUSAGE_CHILDREN -1
- X
- Xstruct rusage {
- X struct timeval ru_utime; /* user time used */
- X struct timeval ru_stime; /* system time used */
- X long ru_maxrss; /* max resident set size */
- X#define ru_first ru_ixrss
- X long ru_ixrss; /* integral shared memory size */
- X long ru_idrss; /* integral unshared data " */
- X long ru_isrss; /* integral unshared stack " */
- X long ru_minflt; /* page reclaims */
- X long ru_majflt; /* page faults */
- X long ru_nswap; /* swaps */
- X long ru_inblock; /* block input operations */
- X long ru_oublock; /* block output operations */
- X long ru_msgsnd; /* messages sent */
- X long ru_msgrcv; /* messages received */
- X long ru_nsignals; /* signals received */
- X long ru_nvcsw; /* voluntary context switches */
- X long ru_nivcsw; /* involuntary " */
- X#define ru_last ru_nivcsw
- X};
- X
- X/*
- X * Resource limits
- X */
- X#define RLIMIT_CPU 0 /* cpu time in milliseconds */
- X#define RLIMIT_FSIZE 1 /* maximum file size */
- X#define RLIMIT_DATA 2 /* data size */
- X#define RLIMIT_STACK 3 /* stack size */
- X#define RLIMIT_CORE 4 /* core file size */
- X#define RLIMIT_RSS 5 /* resident set size */
- X#define RLIMIT_MEMLOCK 6 /* locked-in-memory address space */
- X#define RLIMIT_NPROC 7 /* number of processes */
- X#define RLIMIT_OFILE 8 /* number of open files */
- X
- X#define RLIM_NLIMITS 9 /* number of resource limits */
- X
- X#define RLIM_INFINITY 0x7fffffff
- X
- Xstruct rlimit {
- X long rlim_cur; /* current (soft) limit */
- X long rlim_max; /* maximum value for rlim_cur */
- X};
- X
- X#ifndef KERNEL
- X#include <sys/cdefs.h>
- X
- X__BEGIN_DECLS
- Xint getpriority __P((int, int));
- Xint getrlimit __P((int, struct rlimit *));
- Xint getrusage __P((int, struct rusage *));
- Xint setpriority __P((int, int, int));
- Xint setrlimit __P((int, const struct rlimit *));
- X__END_DECLS
- X
- X#endif /* !KERNEL */
- X#endif /* !_RESOURCE_H_ */
- END_OF_FILE
- if test 3942 -ne `wc -c <'ADDS/sys/resource.h'`; then
- echo shar: \"'ADDS/sys/resource.h'\" unpacked with wrong size!
- fi
- # end of 'ADDS/sys/resource.h'
- fi
- if test -f 'ADDS/sys/syslog.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ADDS/sys/syslog.h'\"
- else
- echo shar: Extracting \"'ADDS/sys/syslog.h'\" \(3702 characters\)
- sed "s/^X//" >'ADDS/sys/syslog.h' <<'END_OF_FILE'
- X/*
- X * Copyright (c) 1982, 1986, 1988 Regents of the University of California.
- X * All rights reserved.
- X *
- X * Redistribution and use in source and binary forms are permitted
- X * provided that the above copyright notice and this paragraph are
- X * duplicated in all such forms and that any documentation,
- X * advertising materials, and other materials related to such
- X * distribution and use acknowledge that the software was developed
- X * by the University of California, Berkeley. The name of the
- X * University may not be used to endorse or promote products derived
- X * from this software without specific prior written permission.
- X * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- X * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- X * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- X *
- X * @(#)syslog.h 7.14 (Berkeley) 8/22/89
- X */
- X
- X/*
- X * Facility codes
- X */
- X
- X#define LOG_KERN (0<<3) /* kernel messages */
- X#define LOG_USER (1<<3) /* random user-level messages */
- X#define LOG_MAIL (2<<3) /* mail system */
- X#define LOG_DAEMON (3<<3) /* system daemons */
- X#define LOG_AUTH (4<<3) /* security/authorization messages */
- X#define LOG_SYSLOG (5<<3) /* messages generated internally by syslogd */
- X#define LOG_LPR (6<<3) /* line printer subsystem */
- X#define LOG_NEWS (7<<3) /* network news subsystem */
- X#define LOG_UUCP (8<<3) /* UUCP subsystem */
- X#define LOG_CRON (9<<3) /* clock daemon */
- X /* other codes through 15 reserved for system use */
- X#define LOG_LOCAL0 (16<<3) /* reserved for local use */
- X#define LOG_LOCAL1 (17<<3) /* reserved for local use */
- X#define LOG_LOCAL2 (18<<3) /* reserved for local use */
- X#define LOG_LOCAL3 (19<<3) /* reserved for local use */
- X#define LOG_LOCAL4 (20<<3) /* reserved for local use */
- X#define LOG_LOCAL5 (21<<3) /* reserved for local use */
- X#define LOG_LOCAL6 (22<<3) /* reserved for local use */
- X#define LOG_LOCAL7 (23<<3) /* reserved for local use */
- X
- X#define LOG_NFACILITIES 24 /* maximum number of facilities */
- X#define LOG_FACMASK 0x03f8 /* mask to extract facility part */
- X
- X#define LOG_FAC(p) (((p) & LOG_FACMASK) >> 3) /* facility of pri */
- X
- X/*
- X * Priorities (these are ordered)
- X */
- X
- X#define LOG_EMERG 0 /* system is unusable */
- X#define LOG_ALERT 1 /* action must be taken immediately */
- X#define LOG_SALERT 1 /* action must be taken immediately */
- X#define LOG_CRIT 2 /* critical conditions */
- X#define LOG_ERR 3 /* error conditions */
- X#define LOG_ERROR 3 /* error conditions */
- X#define LOG_WARNING 4 /* warning conditions */
- X#define LOG_NOTICE 5 /* normal but significant condition */
- X#define LOG_INFO 6 /* informational */
- X#define LOG_DEBUG 7 /* debug-level messages */
- X
- X#define LOG_PRIMASK 0x0007 /* mask to extract priority part (internal) */
- X#define LOG_PRI(p) ((p) & LOG_PRIMASK) /* extract priority */
- X
- X#define LOG_MAKEPRI(fac, pri) (((fac) << 3) | (pri))
- X
- X#ifdef KERNEL
- X#define LOG_PRINTF -1 /* pseudo-priority to indicate use of printf */
- X#endif
- X
- X/*
- X * arguments to setlogmask.
- X */
- X#define LOG_MASK(pri) (1 << (pri)) /* mask for one priority */
- X#define LOG_UPTO(pri) ((1 << ((pri)+1)) - 1) /* all priorities through pri */
- X
- X/*
- X * Option flags for openlog.
- X *
- X * LOG_ODELAY no longer does anything; LOG_NDELAY is the
- X * inverse of what it used to be.
- X */
- X#define LOG_PID 0x01 /* log the pid with each message */
- X#define LOG_CONS 0x02 /* log on the console if errors in sending */
- X#define LOG_ODELAY 0x04 /* delay open until first syslog() (default) */
- X#define LOG_NDELAY 0x08 /* don't delay open */
- X#define LOG_NOWAIT 0x10 /* don't wait for console forks: DEPRECATED */
- X#define LOG_PERROR 0x20 /* log to stderr as well */
- X
- X
- X/*
- X * Where to log...
- X */
- X#define LOG_HOST "localhost" /* name of host to log on */
- X
- END_OF_FILE
- if test 3702 -ne `wc -c <'ADDS/sys/syslog.h'`; then
- echo shar: \"'ADDS/sys/syslog.h'\" unpacked with wrong size!
- fi
- # end of 'ADDS/sys/syslog.h'
- fi
- if test -f 'ADDS/sys/time.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ADDS/sys/time.h'\"
- else
- echo shar: Extracting \"'ADDS/sys/time.h'\" \(487 characters\)
- sed "s/^X//" >'ADDS/sys/time.h' <<'END_OF_FILE'
- X#include <time.h>
- X
- Xstruct timeval {
- X long tv_sec; /* seconds */
- X long tv_usec; /* and microseconds */
- X};
- X
- Xstruct timezone {
- X int tz_minuteswest; /* minutes west of Greenwich */
- X int tz_dsttime; /* type of dst correction */
- X};
- X
- X#define DST_NONE 0 /* not on dst */
- X#define DST_USA 1 /* USA style dst */
- X#define DST_AUST 2 /* Australian style dst */
- X#define DST_WET 3 /* Western European dst */
- X#define DST_MET 4 /* Middle European dst */
- X#define DST_EET 5 /* Eastern European dst */
- X
- END_OF_FILE
- if test 487 -ne `wc -c <'ADDS/sys/time.h'`; then
- echo shar: \"'ADDS/sys/time.h'\" unpacked with wrong size!
- fi
- # end of 'ADDS/sys/time.h'
- fi
- if test -f 'ADDS/sys/uio.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ADDS/sys/uio.h'\"
- else
- echo shar: Extracting \"'ADDS/sys/uio.h'\" \(2665 characters\)
- sed "s/^X//" >'ADDS/sys/uio.h' <<'END_OF_FILE'
- X/*
- X * Copyright (c) 1982, 1986 The Regents of the University of California.
- X * All rights reserved.
- X *
- X * Redistribution and use in source and binary forms, with or without
- X * modification, are permitted provided that the following conditions
- X * are met:
- X * 1. Redistributions of source code must retain the above copyright
- X * notice, this list of conditions and the following disclaimer.
- X * 2. Redistributions in binary form must reproduce the above copyright
- X * notice, this list of conditions and the following disclaimer in the
- X * documentation and/or other materials provided with the distribution.
- X * 3. All advertising materials mentioning features or use of this software
- X * must display the following acknowledgement:
- X * This product includes software developed by the University of
- X * California, Berkeley and its contributors.
- X * 4. Neither the name of the University nor the names of its contributors
- X * may be used to endorse or promote products derived from this software
- X * without specific prior written permission.
- X *
- X * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- X * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- X * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- X * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- X * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- X * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- X * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- X * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- X * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- X * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- X * SUCH DAMAGE.
- X *
- X * @(#)uio.h 7.8 (Berkeley) 4/15/91
- X */
- X
- X#ifndef _UIO_H_
- X#define _UIO_H_
- X
- Xstruct iovec {
- X caddr_t iov_base;
- X int iov_len;
- X};
- X
- Xenum uio_rw { UIO_READ, UIO_WRITE };
- X
- X/*
- X * Segment flag values.
- X */
- Xenum uio_seg {
- X UIO_USERSPACE, /* from user data space */
- X UIO_SYSSPACE, /* from system space */
- X UIO_USERISPACE /* from user I space */
- X};
- X
- Xstruct uio {
- X struct iovec *uio_iov;
- X int uio_iovcnt;
- X off_t uio_offset;
- X int uio_resid;
- X enum uio_seg uio_segflg;
- X enum uio_rw uio_rw;
- X struct proc *uio_procp;
- X};
- X
- X /*
- X * Limits
- X */
- X#define UIO_MAXIOV 1024 /* max 1K of iov's */
- X#define UIO_SMALLIOV 8 /* 8 on stack, else malloc */
- X
- X#ifndef KERNEL
- X
- X#include <sys/cdefs.h>
- X
- X__BEGIN_DECLS
- Xint readv __P((int, const struct iovec *, int));
- Xint writev __P((int, const struct iovec *, int));
- X__END_DECLS
- X
- X#endif /* !KERNEL */
- X
- X#endif /* !_UIO_H_ */
- END_OF_FILE
- if test 2665 -ne `wc -c <'ADDS/sys/uio.h'`; then
- echo shar: \"'ADDS/sys/uio.h'\" unpacked with wrong size!
- fi
- # end of 'ADDS/sys/uio.h'
- fi
- if test -f 'ADDS/sysexits.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ADDS/sysexits.h'\"
- else
- echo shar: Extracting \"'ADDS/sysexits.h'\" \(4568 characters\)
- sed "s/^X//" >'ADDS/sysexits.h' <<'END_OF_FILE'
- X/*
- X * Copyright (c) 1987 Regents of the University of California.
- X * All rights reserved.
- X *
- X * Redistribution and use in source and binary forms are permitted
- X * provided that the above copyright notice and this paragraph are
- X * duplicated in all such forms and that any documentation,
- X * advertising materials, and other materials related to such
- X * distribution and use acknowledge that the software was developed
- X * by the University of California, Berkeley. The name of the
- X * University may not be used to endorse or promote products derived
- X * from this software without specific prior written permission.
- X * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- X * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- X * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- X *
- X * @(#)sysexits.h 4.5 (Berkeley) 7/6/88
- X */
- X
- X/*
- X** SYSEXITS.H -- Exit status codes for system programs.
- X**
- X** This include file attempts to categorize possible error
- X** exit statuses for system programs, notably delivermail
- X** and the Berkeley network.
- X**
- X** Error numbers begin at EX__BASE to reduce the possibility of
- X** clashing with other exit statuses that random programs may
- X** already return. The meaning of the codes is approximately
- X** as follows:
- X**
- X** EX_USAGE -- The command was used incorrectly, e.g., with
- X** the wrong number of arguments, a bad flag, a bad
- X** syntax in a parameter, or whatever.
- X** EX_DATAERR -- The input data was incorrect in some way.
- X** This should only be used for user's data & not
- X** system files.
- X** EX_NOINPUT -- An input file (not a system file) did not
- X** exist or was not readable. This could also include
- X** errors like "No message" to a mailer (if it cared
- X** to catch it).
- X** EX_NOUSER -- The user specified did not exist. This might
- X** be used for mail addresses or remote logins.
- X** EX_NOHOST -- The host specified did not exist. This is used
- X** in mail addresses or network requests.
- X** EX_UNAVAILABLE -- A service is unavailable. This can occur
- X** if a support program or file does not exist. This
- X** can also be used as a catchall message when something
- X** you wanted to do doesn't work, but you don't know
- X** why.
- X** EX_SOFTWARE -- An internal software error has been detected.
- X** This should be limited to non-operating system related
- X** errors as possible.
- X** EX_OSERR -- An operating system error has been detected.
- X** This is intended to be used for such things as "cannot
- X** fork", "cannot create pipe", or the like. It includes
- X** things like getuid returning a user that does not
- X** exist in the passwd file.
- X** EX_OSFILE -- Some system file (e.g., /etc/passwd, /etc/utmp,
- X** etc.) does not exist, cannot be opened, or has some
- X** sort of error (e.g., syntax error).
- X** EX_CANTCREAT -- A (user specified) output file cannot be
- X** created.
- X** EX_IOERR -- An error occurred while doing I/O on some file.
- X** EX_TEMPFAIL -- temporary failure, indicating something that
- X** is not really an error. In sendmail, this means
- X** that a mailer (e.g.) could not create a connection,
- X** and the request should be reattempted later.
- X** EX_PROTOCOL -- the remote system returned something that
- X** was "not possible" during a protocol exchange.
- X** EX_NOPERM -- You did not have sufficient permission to
- X** perform the operation. This is not intended for
- X** file system problems, which should use NOINPUT or
- X** CANTCREAT, but rather for higher level permissions.
- X** For example, kre uses this to restrict who students
- X** can send mail to.
- X**
- X** Maintained by Eric Allman (eric@berkeley, ucbvax!eric) --
- X** please mail changes to me.
- X**
- X** @(#)sysexits.h 4.5 7/6/88
- X*/
- X
- X# define EX_OK 0 /* successful termination */
- X
- X# define EX__BASE 64 /* base value for error messages */
- X
- X# define EX_USAGE 64 /* command line usage error */
- X# define EX_DATAERR 65 /* data format error */
- X# define EX_NOINPUT 66 /* cannot open input */
- X# define EX_NOUSER 67 /* addressee unknown */
- X# define EX_NOHOST 68 /* host name unknown */
- X# define EX_UNAVAILABLE 69 /* service unavailable */
- X# define EX_SOFTWARE 70 /* internal software error */
- X# define EX_OSERR 71 /* system error (e.g., can't fork) */
- X# define EX_OSFILE 72 /* critical OS file missing */
- X# define EX_CANTCREAT 73 /* can't create (user) output file */
- X# define EX_IOERR 74 /* input/output error */
- X# define EX_TEMPFAIL 75 /* temp failure; user is invited to retry */
- X# define EX_PROTOCOL 76 /* remote error in protocol */
- X# define EX_NOPERM 77 /* permission denied */
- X# define EX_CONFIG 78 /* configuration error */
- END_OF_FILE
- if test 4568 -ne `wc -c <'ADDS/sysexits.h'`; then
- echo shar: \"'ADDS/sysexits.h'\" unpacked with wrong size!
- fi
- # end of 'ADDS/sysexits.h'
- fi
- if test -f 'ADDS/syslog.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ADDS/syslog.h'\"
- else
- echo shar: Extracting \"'ADDS/syslog.h'\" \(2932 characters\)
- sed "s/^X//" >'ADDS/syslog.h' <<'END_OF_FILE'
- X/* @(#)syslog.h 1.2 83/08/22 SMI; from UCB 4.1 83/05/27 */
- X
- X/*
- X * SYSLOG.H -- declarations for system logging program
- X *
- X * These are used as the first parameter to logmsg().
- X * Their meanings are approximately as follows:
- X *
- X * LOG_ALERT -- this priority should essentially never
- X * be used. It applies only to messages that
- X * are so important that every user should be
- X * aware of them, e.g., a serious hardware failure.
- X * LOG_SALERT -- messages of this priority should be
- X * issued only when immediate attention is needed
- X * by a qualified system person, e.g., when some
- X * valuable system resource dissappears. They get
- X * sent to a list of system people.
- X * LOG_EMERG -- Emergency messages are not sent to users,
- X * but represent major conditions. An example
- X * might be hard disk failures. These could be
- X * logged in a separate file so that critical
- X * conditions could be easily scanned.
- X * LOG_ERR -- these represent error conditions, such as soft
- X * disk failures, etc.
- X * LOG_CRIT -- such messages contain critical information,
- X * but which can not be classed as errors, for example,
- X * 'su' attempts.
- X * LOG_WARNING -- issued when an abnormal condition has been
- X * detected, but recovery can take place.
- X * LOG_NOTICE -- something that falls in the class of
- X * "important information"; this class is informational
- X * but important enough that you don't want to throw
- X * it away casually.
- X * LOG_INFO -- information level messages. These messages
- X * could be thrown away without problems, but should
- X * be included if you want to keep a close watch on
- X * your system.
- X * LOG_DEBUG -- it may be useful to log certain debugging
- X * information. Normally this will be thrown away.
- X */
- X
- X/* some configuration parameters..... */
- X#define LOG_IPC /* set if using 4.2 IPC, else mpx */
- X#define LOG_HOST "loghost" /* name of host to log on */
- X
- X/* defines for priorities */
- X#define LOG_ALERT 1 /* alert -- send to all users */
- X#define LOG_SALERT 2 /* subalert -- send to special users */
- X#define LOG_EMERG 3 /* emergency conditions */
- X#define LOG_ERROR 4 /* error */
- X#define LOG_ERR 4 /* synonym of LOG_ERROR */
- X#define LOG_CRIT 5 /* critical information */
- X#define LOG_WARNING 6 /* warning */
- X#define LOG_NOTICE 7 /* important information */
- X#define LOG_INFO 8 /* informational message */
- X#define LOG_DEBUG 9 /* debug level info */
- X
- X/*
- X * Mode parameters to initlog.
- X */
- X#define LOG_NULL 0 /* don't touch log */
- X#define LOG_SOUT 1 /* log standard & diag output */
- X#define LOG_DIAG 2 /* log diagnostic output */
- X#define LOG_INDEP 3 /* log independently */
- X#define LOG_CLOSE 4 /* close the log */
- X
- X/*
- X * Status parameters to initlog.
- X */
- X#define LOG_PID 0001 /* log the pid with each message */
- X#define LOG_TIME 0002 /* log the time with each message */
- X#define LOG_COOLIT 0004 /* suppress priority stuff */
- X#define LOG_DGRAM 0010 /* running over a datagram socket */
- X
- X#define IPPORT_SYSLOG 514
- END_OF_FILE
- if test 2932 -ne `wc -c <'ADDS/syslog.h'`; then
- echo shar: \"'ADDS/syslog.h'\" unpacked with wrong size!
- fi
- # end of 'ADDS/syslog.h'
- fi
- if test ! -d 'CHANGES' ; then
- echo shar: Creating directory \"'CHANGES'\"
- mkdir 'CHANGES'
- fi
- if test -f 'CHANGES/grp.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'CHANGES/grp.h'\"
- else
- echo shar: Extracting \"'CHANGES/grp.h'\" \(240 characters\)
- sed "s/^X//" >'CHANGES/grp.h' <<'END_OF_FILE'
- X#sccs "@(#)inchead:grp.h 1.1"
- X
- X/* Convergent Technologies - System V - May 1983 */
- X
- Xstruct group { /* see getgrent(3) */
- X char *gr_name;
- X char *gr_passwd;
- X int gr_gid;
- X char **gr_mem;
- X};
- X
- Xstruct group *getgrent(), *getgrgid(), *getgrnam();
- END_OF_FILE
- if test 240 -ne `wc -c <'CHANGES/grp.h'`; then
- echo shar: \"'CHANGES/grp.h'\" unpacked with wrong size!
- fi
- # end of 'CHANGES/grp.h'
- fi
- if test -f 'CHANGES/pwd.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'CHANGES/pwd.h'\"
- else
- echo shar: Extracting \"'CHANGES/pwd.h'\" \(380 characters\)
- sed "s/^X//" >'CHANGES/pwd.h' <<'END_OF_FILE'
- X#sccs "@(#)inchead:pwd.h 1.1"
- X
- X/* Convergent Technologies - System V - May 1983 */
- X
- Xstruct passwd {
- X char *pw_name;
- X char *pw_passwd;
- X int pw_uid;
- X int pw_gid;
- X char *pw_age;
- X char *pw_comment;
- X char *pw_gecos;
- X char *pw_dir;
- X char *pw_shell;
- X};
- X
- Xstruct comment {
- X char *c_dept;
- X char *c_name;
- X char *c_acct;
- X char *c_bin;
- X};
- X
- Xstruct passwd *getpwent(), *getpwuid(), *getpwnam();
- END_OF_FILE
- if test 380 -ne `wc -c <'CHANGES/pwd.h'`; then
- echo shar: \"'CHANGES/pwd.h'\" unpacked with wrong size!
- fi
- # end of 'CHANGES/pwd.h'
- fi
- if test -f 'CHANGES/stdio.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'CHANGES/stdio.h'\"
- else
- echo shar: Extracting \"'CHANGES/stdio.h'\" \(2311 characters\)
- sed "s/^X//" >'CHANGES/stdio.h' <<'END_OF_FILE'
- X#sccs "@(#)inchead:stdio.h 1.3"
- X
- X/* Convergent Technologies - System V - May 1983 */
- X
- X#ifndef _NFILE
- X#define _NFILE 80
- X
- X#if u370
- X#define BUFSIZ 4096
- X#endif
- X#if vax || u3b
- X#define BUFSIZ 1024
- X#endif
- X#if pdp11
- X#define BUFSIZ 512
- X#endif
- X#if mc68k
- X#define BUFSIZ 1024
- X#endif
- X
- X/* buffer size for multi-character output to unbuffered files */
- X#define _SBFSIZ 8
- X
- Xtypedef struct {
- X#if vax || u3b || mc68k
- X int _cnt;
- X unsigned char *_ptr;
- X#else
- X unsigned char *_ptr;
- X int _cnt;
- X#endif
- X unsigned char *_base;
- X char _flag;
- X char _file;
- X} FILE;
- X
- X/*
- X * _IOLBF means a file is a terminal; this means, in particular,
- X * that output will be buffered line by line
- X */
- X#define _IOFBF 0000
- X#define _IOREAD 0001
- X#define _IOWRT 0002
- X#define _IONBF 0004
- X#define _IOMYBUF 0010
- X#define _IOEOF 0020
- X#define _IOERR 0040
- X#define _IOLBF 0100
- X#define _IORW 0200
- X
- X#ifndef NULL
- X#define NULL 0
- X#endif
- X#ifndef EOF
- X#define EOF (-1)
- X#endif
- X
- X#define stdin (&_iob[0])
- X#define stdout (&_iob[1])
- X#define stderr (&_iob[2])
- X
- X#define _bufend(p) (((p)->_file < 20) ? _bufendtab[(p)->_file] : _buf2endtab[(p)->_file-20])
- X#define _bufsiz(p) (_bufend(p) - (p)->_base)
- X
- X#ifndef lint
- X#define getc(p) (--(p)->_cnt >= 0 ? (int) *(p)->_ptr++ : _filbuf(p))
- X#define putc(x, p) (--(p)->_cnt >= 0 ? \
- X ((int) (*(p)->_ptr++ = (unsigned char) (x))) : \
- X _flsbuf((unsigned char) (x), (p)))
- X#define getchar() getc(stdin)
- X#define putchar(x) putc((x), stdout)
- X#define clearerr(p) ((void) ((p)->_flag &= ~(_IOERR | _IOEOF)))
- X#define feof(p) ((p)->_flag & _IOEOF)
- X#define ferror(p) ((p)->_flag & _IOERR)
- X#define fileno(p) (p)->_file
- X#endif
- X
- Xextern FILE _iob[20];
- Xextern FILE _iob2[_NFILE-20];
- Xextern FILE *fopen(), *fdopen(), *freopen(), *popen(), *tmpfile();
- Xextern long ftell();
- Xextern void rewind(), setbuf();
- Xextern char *ctermid(), *cuserid(), *fgets(), *gets(), *tempnam(), *tmpnam();
- Xextern unsigned char *_bufendtab[];
- Xextern unsigned char *_buf2endtab[];
- X
- X#define L_ctermid 9
- X#define L_cuserid 9
- X#define P_tmpdir "/usr/tmp/"
- X#define L_tmpnam (sizeof(P_tmpdir) + 15)
- X
- X/*
- X * Special defines for using the iexec library without making extensive
- X * changes to existing code
- X */
- X#ifdef LIB_IEXEC
- X# define execl iexecl
- X# define execv iexecv
- X# define execle iexecle
- X# define execve iexecve
- X# define execlp iexeclp
- X# define execvp iexecvp
- X#endif
- X
- X#endif
- END_OF_FILE
- if test 2311 -ne `wc -c <'CHANGES/stdio.h'`; then
- echo shar: \"'CHANGES/stdio.h'\" unpacked with wrong size!
- fi
- # end of 'CHANGES/stdio.h'
- fi
- if test ! -d 'CHANGES/sys' ; then
- echo shar: Creating directory \"'CHANGES/sys'\"
- mkdir 'CHANGES/sys'
- fi
- if test -f 'CHANGES/sys/proc.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'CHANGES/sys/proc.h'\"
- else
- echo shar: Extracting \"'CHANGES/sys/proc.h'\" \(5713 characters\)
- sed "s/^X//" >'CHANGES/sys/proc.h' <<'END_OF_FILE'
- X#sccs "@(#)uts/kern/sys:proc.h 1.2"
- X
- X/* Convergent Technologies - System V - May 1983 */
- X
- X#ifndef proc_h
- X#define proc_h
- X
- X#include <sys/types.h>
- X#include <sys/text.h>
- X#ifdef VTIMES
- X#include <sys/vtimes.h>
- X#endif
- X#include <sys/param.h>
- X#include <sys/shm.h>
- X
- X/* fork types - parameter to newproc */
- X#define KFORK 0 /* original kernel call of newproc */
- X#define OFORK 1 /* original sys1 call of newproc */
- X/* #define VFORK 2 ** vfork call of newproc */
- X
- X/*
- X * One structure allocated per active process. It contains all data needed
- X * about the process while the process may be swapped out.
- X * Other per process data (user.h) is swapped with the process.
- X */
- X
- Xstruct proc {
- X struct proc *p_link; /* linked list of running processes */
- X int p_flag;
- X char p_stat;
- X char p_pri; /* priority, negative is high */
- X char p_time; /* resident time for scheduling */
- X char p_cpu; /* cpu usage for scheduling */
- X char p_nice; /* nice for cpu usage */
- X char p_szpt; /* 0 - 1 page user tbl, 1 - 2 page user tbl */
- X char p_usrpri; /* user-priority based on p_cpu and p_nice */
- X char p_slptime; /* time since last block */
- X ushort p_uid; /* real user id */
- X ushort p_suid; /* set (effective) user id */
- X short p_pgrp; /* name of process group leader */
- X short p_pid; /* unique process id */
- X short p_ppid; /* process id of parent */
- X ushort p_addr[2]; /* physical page no of u-area */
- X struct proc *p_pptr; /* pointer to process structure of parent */
- X swblk_t p_swaddr; /* disk address of u area when swapped */
- X size_t p_tsize; /* size of text (clicks)(used by exec/swapin) */
- X size_t p_ssize; /* size of stack(clicks)(used by exec/swapin) */
- X size_t p_dsize; /* size of data space (clicks) */
- X size_t p_lsize; /* size of shared lib data (clicks) */
- X size_t p_tpage; /* no of pages(rounded to segment) of text */
- X size_t p_dpage; /* no of pages(rounded to segment) of data */
- X size_t p_spage; /* no of pages(rounded to segment) of stack */
- X size_t p_rssize; /* current resident set size in clicks */
- X size_t p_maxrss; /* copy of u.u_limit[MAXRSS] */
- X size_t p_swrss; /* resident set size before last swap */
- X long p_sig; /* signals pending to this process */
- X union {
- X caddr_t p_cad; /* event process is awaiting */
- X int p_int;
- X } p_unw;
- X#define p_wchan p_unw.p_cad
- X#define p_arg p_unw.p_int
- X struct text *p_textp; /* pointer to text structure */
- X struct proc *p_xlink; /* linked list of procs sharing same text */
- X int p_clktim; /* time to alarm clock signal */
- X struct shmpt_ds *p_smbeg; /* beginning pte entry for shared memory */
- X int p_smend; /* ending pte entry for shared memory */
- X short p_ndx; /* proc index for memall (because of vfork) */
- X ushort p_xino; /* disk inode no for the text file - extension
- X from cmap structure. */
- X short p_poip; /* count of page outs in progress */
- X};
- X#ifdef KERNEL
- Xextern struct proc *proc; /* the proc table itself */
- X#endif
- X
- X/* stat codes */
- X#define SSLEEP 1 /* awaiting an event */
- X#define SWAIT 2 /* (abandoned state) */
- X#define SRUN 3 /* running */
- X#define SIDL 4 /* intermediate state in process creation */
- X#define SZOMB 5 /* intermediate state in process termination */
- X#define SSTOP 6 /* process being traced */
- X#define SXBRK 7 /* process being xswapped */
- X#define SXSTK 8 /* process being xswapped */
- X#define SXTXT 9 /* process being xswapped */
- X
- X/* flag codes */
- X#define SLOAD 0x000001 /* in core */
- X#define SSYS 0x000002 /* swapper or pager process */
- X#define SLOCK 0x000004 /* process being swapped out */
- X#define SSWAP 0x000008 /* save area flag */
- X#define STRC 0x000010 /* process is being traced */
- X#define SWTED 0x000020 /* another tracing flag */
- X#ifdef SWAP
- X#define STEXT 0100 /* text pointer valid */
- X#define SSPART 0200 /* process is partially swapped out */
- X#else
- X#define SULOCK 0x000040 /* prevent a user process to be swapped out */
- X#define SPAGE 0x000080 /* process in page wait state */
- X#define SKEEP 0x000100 /* another flag to prevent swap out */
- X/* #define SDLYU 0x000200 ** delayed unlock of pages */
- X#define SWEXIT 0x000400 /* working on exiting */
- X#define SPHYSIO 0x000800 /* doing physical i/o (bio.c) */
- X#ifdef VFORK
- X#define SVFORK 0x001000 /* process resulted from vfork() */
- X#define SVFDONE 0x002000 /* another vfork flag */
- X#define SNOVM 0x004000 /* no vm, parent in a vfork() */
- X#endif VFORK
- X#define SPAGI 0x008000 /* init data space on demand, from inode */
- X#define SSEQL 0x010000 /* user warned of sequential vm behavior */
- X#define SUANOM 0x020000 /* user warned of random vm behavior */
- X#define STIMO 0x040000 /* timing out during sleep */
- X#define SDETACH 0x080000 /* detached inherited by init */
- X#define SOWEUPC 0x200000 /* owe process an addupc() call at next ast */
- X#endif
- X#define SPOLL 0x1000000 /* SPOLL flag for Starlan */
- X
- X/*
- X * parallel proc structure
- X * to replace part with times
- X * to be passed to parent process
- X * in ZOMBIE state.
- X */
- X#ifndef NPROC
- Xstruct xproc {
- X struct proc *xp_link; /* linked list of running processes */
- X int xp_flag;
- X char xp_stat;
- X char xp_pri; /* priority, negative is high */
- X char xp_time; /* resident time for scheduling */
- X char xp_cpu; /* cpu usage for scheduling */
- X char xp_nice; /* nice for cpu usage */
- X char xp_szpt;
- X char xp_usrpri;
- X char xp_slptime;
- X ushort xp_uid; /* real user id */
- X ushort xp_suid; /* set (effective) user id */
- X short xp_pgrp; /* name of process group leader */
- X short xp_pid; /* unique process id */
- X short xp_ppid; /* process id of parent */
- X ushort xp_addr[2];
- X struct proc *xp_pptr; /* pointer to process structure of parent */
- X short xp_xstat; /* Exit status for wait */
- X time_t xp_utime; /* user time, this proc */
- X time_t xp_stime; /* system time, this proc */
- X#ifdef VTIMES
- X struct vtimes xp_vm;
- X#endif VTIMES
- X};
- X#endif
- X#endif
- END_OF_FILE
- if test 5713 -ne `wc -c <'CHANGES/sys/proc.h'`; then
- echo shar: \"'CHANGES/sys/proc.h'\" unpacked with wrong size!
- fi
- # end of 'CHANGES/sys/proc.h'
- fi
- if test -f 'CHANGES/sys/signal.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'CHANGES/sys/signal.h'\"
- else
- echo shar: Extracting \"'CHANGES/sys/signal.h'\" \(1339 characters\)
- sed "s/^X//" >'CHANGES/sys/signal.h' <<'END_OF_FILE'
- X#sccs "@(#)uts/kern/sys:signal.h 1.1"
- X
- X/* Convergent Technologies - System V - May 1983 */
- X
- X#ifndef signal_h
- X#define signal_h
- X
- X#define SIGHUP 1 /* hangup */
- X#define SIGINT 2 /* interrupt (rubout) */
- X#define SIGQUIT 3 /* quit (ASCII FS) */
- X#define SIGILL 4 /* illegal instruction (not reset when caught)*/
- X#define SIGTRAP 5 /* trace trap (not reset when caught) */
- X#define SIGIOT 6 /* IOT instruction */
- X#define SIGEMT 7 /* EMT instruction */
- X#define SIGFPE 8 /* floating point exception */
- X#define SIGKILL 9 /* kill (cannot be caught or ignored) */
- X#define SIGBUS 10 /* bus error */
- X#define SIGSEGV 11 /* segmentation violation */
- X#define SIGSYS 12 /* bad argument to system call */
- X#define SIGPIPE 13 /* write on a pipe with no one to read it */
- X#define SIGALRM 14 /* alarm clock */
- X#define SIGTERM 15 /* software termination signal from kill */
- X#define SIGUSR1 16 /* user defined signal 1 */
- X#define SIGUSR2 17 /* user defined signal 2 */
- X#define SIGCLD 18 /* death of a child */
- X#define SIGPWR 19 /* power-fail restart */
- X#define SIGWIND 20 /* window change */
- X#define SIGPHONE 21 /* handset, line status change */
- X
- X/*
- X * Signals added by UIPC package
- X */
- X#define SIGURG 22
- X#define SIGIO 23
- X
- X
- X#define NSIG 32
- X
- X#define SIG_DFL (int (*)())0
- X#if lint
- X#define SIG_IGN (int (*)())0
- X#else
- X#define SIG_IGN (int (*)())1
- X#endif
- X
- X#endif signal_h
- END_OF_FILE
- if test 1339 -ne `wc -c <'CHANGES/sys/signal.h'`; then
- echo shar: \"'CHANGES/sys/signal.h'\" unpacked with wrong size!
- fi
- # end of 'CHANGES/sys/signal.h'
- fi
- if test -f 'CHANGES/sys/types.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'CHANGES/sys/types.h'\"
- else
- echo shar: Extracting \"'CHANGES/sys/types.h'\" \(1963 characters\)
- sed "s/^X//" >'CHANGES/sys/types.h' <<'END_OF_FILE'
- X#sccs "@(#)uts/kern/sys:types.h 1.1"
- X
- X/* Convergent Technologies - System V - May 1983 */
- X
- X#ifndef types_h
- X#define types_h
- X
- Xtypedef struct { int r[1]; } * physadr;
- Xtypedef long daddr_t;
- Xtypedef char * caddr_t;
- Xtypedef unsigned int uint;
- Xtypedef unsigned short ushort;
- Xtypedef ushort ino_t;
- Xtypedef short cnt_t;
- Xtypedef long time_t;
- Xtypedef int label_t[13]; /* regs d2-d7, a2-a7, pc */
- Xtypedef short dev_t;
- Xtypedef long off_t;
- Xtypedef long paddr_t;
- Xtypedef long key_t;
- Xtypedef int swblk_t;
- Xtypedef int size_t;
- Xtypedef unsigned char port_t; /* local TP/CP port numbers */
- Xtypedef unsigned char mdev_t; /* minor device type */
- X
- X/*
- X * BSD compatibility stuff
- X */
- X
- Xtypedef unsigned char u_char;
- Xtypedef unsigned int u_int;
- Xtypedef unsigned short u_short;
- Xtypedef unsigned long u_long;
- X
- X#ifndef MAXPATHLEN
- X#define MAXPATHLEN 512
- X#endif
- X
- X/*
- X * Select uses bit masks of file descriptors in longs.
- X * These macros manipulate such bit fields (the filesystem macros use chars).
- X * FD_SETSIZE may be defined by the user, but the default here
- X * should be >= NOFILE (param.h).
- X */
- X#ifndef FD_SETSIZE
- X#define FD_SETSIZE 256
- X#endif
- X
- X#ifdef NBBY
- X#define BITS_PER_BYTE NBBY
- X#else
- X#define BITS_PER_BYTE 8
- X#endif
- X
- Xtypedef long fd_mask;
- X#define NFDBITS (sizeof(fd_mask) * BITS_PER_BYTE) /* bits per mask */
- X#ifndef howmany
- X#define howmany(x, y) (((x)+((y)-1))/(y))
- X#endif
- X
- Xtypedef struct fd_set {
- X fd_mask fds_bits[howmany(FD_SETSIZE, NFDBITS)];
- X} fd_set;
- X
- X#define FD_SET(n, p) ((p)->fds_bits[(n)/NFDBITS] |= (1 << ((n) % NFDBITS)))
- X#define FD_CLR(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1 << ((n) % NFDBITS)))
- X#define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS)))
- X#define FD_ZERO(p) bzero((char *)(p), sizeof(*(p)))
- X#define FD_OP(to, f1, f2, op) { \
- X register int FDOP_i; \
- X for(FDOP_i = 0; FDOP_i < howmany(FD_SETSIZE, NFDBITS); FDOP_i++) \
- X (to)->fds_bits[FDOP_i] = (f1)->fds_bits[FDOP_i] \
- X op (f2)->fds_bits[FDOP_i]; \
- X}
- X
- X#endif types_h
- END_OF_FILE
- if test 1963 -ne `wc -c <'CHANGES/sys/types.h'`; then
- echo shar: \"'CHANGES/sys/types.h'\" unpacked with wrong size!
- fi
- # end of 'CHANGES/sys/types.h'
- fi
- if test -f 'MANIFEST' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'MANIFEST'\"
- else
- echo shar: Extracting \"'MANIFEST'\" \(809 characters\)
- sed "s/^X//" >'MANIFEST' <<'END_OF_FILE'
- X File Name Archive # Description
- X-----------------------------------------------------------
- X ADDS 1
- X ADDS/limits.h 1
- X ADDS/netdb.h 1
- X ADDS/netinet/in.h 1
- X ADDS/stdlib.h 1
- X ADDS/strings.h 1
- X ADDS/sys 1
- X ADDS/sys/resource.h 1
- X ADDS/sys/syslog.h 1
- X ADDS/sys/time.h 1
- X ADDS/sys/uio.h 1
- X ADDS/sysexits.h 1
- X ADDS/syslog.h 1
- X CHANGES 1
- X CHANGES/grp.h 1
- X CHANGES/pwd.h 1
- X CHANGES/stdio.h 1
- X CHANGES/sys 1
- X CHANGES/sys/proc.h 1
- X CHANGES/sys/signal.h 1
- X CHANGES/sys/types.h 1
- X MANIFEST 1
- X README 1
- END_OF_FILE
- if test 809 -ne `wc -c <'MANIFEST'`; then
- echo shar: \"'MANIFEST'\" unpacked with wrong size!
- fi
- # end of 'MANIFEST'
- fi
- if test -f 'README' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'README'\"
- else
- echo shar: Extracting \"'README'\" \(2389 characters\)
- sed "s/^X//" >'README' <<'END_OF_FILE'
- XThe include files included in this archive are those include files which
- Xhave either been changed or added on my system since the initial installation
- Xof the development set. Not included in this posting are those include
- Xfiles which I already posted: statfs.h, uipc/*, and gcc-include/*.
- X
- XNo installation script or makefile is provided. Examine each file in this
- Xset and determine if you want it installed on your system. The following
- Xis a brief description of each file included.
- X
- XCHANGES/grp.h
- X Added definitions for the various group related procedures.
- X
- XCHANGES/pwd.h
- X Added definitions for the various routines used to access the passwd file.
- X
- XCHANGES/stdio.h
- X Added conditionally included (-DLIB_IEXEC) defines for easy access to the
- X iexec library. This is really handy if you are compiling one of the
- X shells that are available in source form because it allows you to make
- X use of the "#!" stuff on the first line of a shell script.
- X
- XCHANGES/sys/proc.h
- X Fixed up a couple of comments that gcc didn't like.
- X
- XCHANGES/sys/signal.h
- X Added two new signals for the UIPC package.
- X
- XCHANGES/sys/types.h
- X Added some typedef statements and some #define statements for BSD
- X compatability.
- X
- XADDS/limits.h
- X ANSI limits.h
- X
- XADDS/netdb.h
- X BSD networking
- X
- XADDS/netinet/in.h
- X BSD networking
- X
- XADDS/stdlib.h
- X A one-liner that includes stdlib.h from the gcc-include directory.
- X
- XADDS/strings.h
- X Many BSD programs include strings.h so I created this file that includes
- X string.h and then sets up some #defines for index/rindex/bcopy...
- X
- XADDS/sys/cdefs.h
- X BSD - included by many of the newer BSD include files. Provides compile
- X time support for ANSI vs K&R compilers.
- X
- XADDS/sys/resource.h
- X BSD - not really applicable for the 3b1 but included here because many BSD
- X programs include this file and it makes for easier porting.
- X
- XADDS/sys/syslog.h
- X Used if you have a port of the syslog facility. A system V version was posted
- X to one of the sources groups and I have one available as well. I will consider
- X posting mine sometime this fall.
- X
- XADDS/sys/time.h
- X Defines the struct timeval used by the select() routine. Useful only if you
- X have the UIPC code installed.
- X
- XADDS/sys/uio.h
- X BSD - defines the "uio" structure. Required to compile the writev() routine
- X from the recently posted libbsd package.
- X
- XADDS/sysexits.h
- X BSD - primarily used by sendmail but useful for any mail processing program.
- END_OF_FILE
- if test 2389 -ne `wc -c <'README'`; then
- echo shar: \"'README'\" unpacked with wrong size!
- fi
- # end of 'README'
- fi
- echo shar: End of archive 1 \(of 1\).
- cp /dev/null ark1isdone
- MISSING=""
- for I in 1 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have the archive.
- rm -f ark[1-9]isdone
- else
- echo You still need to unpack the following archives:
- echo " " ${MISSING}
- fi
- ## End of shell archive.
- exit 0
- --
- David H. Brierley
- Home: dave@galaxia.network23.com; Work: dhb@quahog.ssd.ray.com
- Send comp.sources.3b1 submissions to comp-sources-3b1@galaxia.network23.com
- %% Can I be excused, my brain is full. **
-