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
DELIVERM Uses the delivermail 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 remote printing without an account
The conditonal flags are first defined
in "/usr/include/whoami.h" on the local machine.
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 */
/* definitions for Berkeley */
/* correct vers. 7 = LOCAL, NUID */
# define NUID ((84 << 8) | 84)
/* correct vers. 7 = LOCAL, NUID */
# define NUID ((11 << 8) | 38)
/* correct vers. 7 = LOCAL, NUID */
/* correct vers. 7 = LOCAL, NUID */
/* correct vers. 7 = LOCAL, NUID */
# define NUID ((1 << 8) | 104)
/* correct vers. 7 = LOCAL, NUID */
/* 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.
/* correct vers. 7 = LOCAL, NUID, CC */
/* default version 6 options */
/* default version 7 options */
# define getsize(S) ((S)->st_size)
# define gettime() (time(0))
# 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) */
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();