/* @(#)mach.h 4.6 (Berkeley) 12/27/82 */
static char *mach_h_sid
= "@(#)mach.h 1.11";
mach.h -- define machine-dependent things
*** Pre-processor Flags ***
This set of code is controlled by this set of conditional
TESTING if defined, do not generate tests, etc. which require
OLDTTY if defined, compile for old 1 character TTY names
CCTTY if defined, compile for CC tty name format
if neither is defined, use v7 ttyname format
PASSWDF compile in code to handle /etc/passwdf - split passwd files
V6 Assume the v6 features instead of the v7 ones.
FUID use the funny uid's present on CC V6
SENDMAIL Uses the sendmail program
HPASSWD The local machine has the hashed password stuff
OLDMAIL mail is in home-directory/.mail
USRMAIL mail is in /usr/mail/name
(mail is in /usr/spool/mail/name)
CC Machine is a Computer Center machine
NUID userid (as returned by getuid()) on this machine
UID1CHAR Uses vanila Version6 userid's (only 1 byte for uid)
NOEUID Does not have the geteuid() system call
NFREECMD doesn't allow any "network" free commands
NOFP floating point just doesn't work on this machine
NOREMACCT allows netlpr's on remote machines without an account
CSH use the /bin/csh shell (Paths.h sets BINSH to this path ).
DONTHOLDBIG large (size > MAXDAYFILE ) jobs wont be held until night for
SWAB this machine has byte-ordering reversed from the DEC VAX
and PDP-11 standard (the only current example is Onyx)
The conditonal flags are first defined
in "local.h" in this directory.
For "normal" version 6 machines, there is a dummy machine
definition for "VANILLA6" which indicates the v6 UNIX options.
For "normal" version 7 machines, there is a dummy machine
definition for "VANILLA7" which indicates the v7 UNIX options.
(VM/UNIX and Berkeley VM/VAX/UNIX can use this)
/* be sure to include <stdio.h> before these defns */
/* note NUID is only used in mmail.c */
/* definitions for Rand-Unix */
/* end of definitions for Rand */
/* definitions for Naval Ocean Systems Center NOSC */
/* end of definitions for NOSC */
/* all berkeley sites use sendmail..... (someday?) */
/* Ingres Group - ucbingres */
/* CS network hub - ucbvax */
/* EE-Signal Proccessing - ucbmedea */
/* EECS-Research - ucbesvax */
/* Newton CAD - ucbcad */
/* Fabry CSRG - ucbarpa */
/* Math/Stat Dept - MathStat */
/* CS Research - ucbernie */
/* Stat Dept - statvax */
/* EECS Dept Administrative - ucbear */
# define NUID ((1 << 8) | 104)
/* end of Berkeley definitions */
the CC V6 machines are all the same.
splitting their type into a separate group will
allow the binary patching program "patchd" to be
used to patch the binaries so the sources can be compiled
on one CC machine and the binaries shipped around
to the other CC machines.
# define MAGICCRN "3700" /* default CC crn */
# define MAGICCRN "3700" /* default CC crn */
/* default version 6 options */
/* default version 7 options */
# define getsize(S) ((S)->st_size)
# define gettime() (time(0))
#define SIG_DFL (int (*)())0
#define SIG_IGN (int (*)())1
# define ASSERT "Assertion failed: file %s, line %d\n", __FILE__, __LINE__);exit(1);}}
# define assert(ex) {if (!(ex)){fprintf(stderr,ASSERT
# define isprint(c) (040 <= c && c <= 0176)
# define longjmp(a,b) reset()
# define setjmp(a) setexit()
struct tms
{ /* see times - sect 2 */
int tms_utime
; /* user time */
int tms_stime
; /* system time */
long tms_cutime
; /* user time, children */
long tms_cstime
; /* system time, children */
struct passwd
{ /* see getpwent(3) */
/* /usr/include/varargs.h */
# define va_dcl int va_alist;
# define va_start(list) list = (char *) &va_alist
# define va_arg(list,mode) ((mode *)(list += sizeof(mode)))[-1]
long gettime(), getsize();
/* end of non-v7 defns */
# define uidmask(S) (S & 0377)
# define geteuid() ((getuid()>>8)&0377)
# define ttyname(S) myttyname(S)
/* this is the version 7 utmp structure. the getutmp() procedure
converts the v6 structure into this format
char ut_line
[8]; /* tty name */
char ut_name
[8]; /* user id */
long ut_time
; /* time on */
# define chfromf(S) (S ? 'T' : 'F')
char *hgethome(), *calloc(), *ctime(), *getenv();
char *getname(), *getun(), *getlogin();
char *SnFromUid(), *ttyname();
struct passwd
*getpwnam(), *getpwuid();