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
NEWPROT use the new protocol, instead of the default protocol
V6 Assume the v6 features insted of the v7 ones.
FUID use the funny uid's present on Cory and CC
ROPTION The local machine mail program has the magic -r option
ROPTION2 The local machine mail program has the magic -r option
HPASSWD The local machine has the hashed password stuff
SPACCT under certain circumstances, allow remote login without acct
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
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.
/* be sure to include <stdio.h> before these defns */
/* note NUID is only used in mmail.c */
/* correct vers. 7 = LOCAL, NUID */
/* correct vers. 7 = LOCAL, NUID */
# define NUID ((11 << 8) | 38)
/* correct vers. 7 = LOCAL, NUID */
# define NUID ((11 << 8) | 38)
/* correct vers. 7 = LOCAL, NUID */
/* correct vers. 7 = LOCAL, NUID */
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 NUID ((217 << 8) | 2)
/* correct vers. 7 = LOCAL, NUID, CC */
/* default version 6 options */
/* default version 7 options */
/* # include <signal.h> */
# 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)
char *hgethome(), *calloc(), *ctime(), *getenv();
char *getname(), *getun(), *getlogin();
struct passwd
*getpwnam(), *getpwuid();
long fixuplong(),atol(),time();