more irix-inspired fixes
This commit is contained in:
parent
21b830b1ac
commit
230e492a8a
24
Make.irix
Normal file
24
Make.irix
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
# Unix
|
||||||
|
PTHREAD= # for Mac
|
||||||
|
#PTHREAD=-pthread
|
||||||
|
AR=ar
|
||||||
|
AS=as
|
||||||
|
ASFLAGS=-c -mips3
|
||||||
|
RANLIB=true
|
||||||
|
X11=/usr/X11R6
|
||||||
|
#CC=gcc
|
||||||
|
#CFLAGS=-Wall -Wno-missing-braces -ggdb -I$(ROOT) -I$(ROOT)/include -I$(ROOT)/kern -c -I$(X11)/include -D_THREAD_SAFE $(PTHREAD) -O2
|
||||||
|
CC=cc
|
||||||
|
CFLAGS=-g -O2 -I$(ROOT) -I$(ROOT)/include -I$(ROOT)/kern -c -I$(X11)/include -DIRIX
|
||||||
|
O=o
|
||||||
|
OS=posix
|
||||||
|
GUI=x11
|
||||||
|
LDADD=-L$(X11)/lib -lX11 -g -lpthread
|
||||||
|
LDFLAGS=$(PTHREAD)
|
||||||
|
TARG=drawterm
|
||||||
|
MAKE=gmake
|
||||||
|
|
||||||
|
all: default
|
||||||
|
|
||||||
|
libmachdep.a:
|
||||||
|
(cd posix-mips && $(MAKE))
|
22
Makefile
22
Makefile
@ -38,34 +38,34 @@ clean:
|
|||||||
rm -f *.o */*.o */*.a *.a drawterm drawterm.exe
|
rm -f *.o */*.o */*.a *.a drawterm drawterm.exe
|
||||||
|
|
||||||
kern/libkern.a:
|
kern/libkern.a:
|
||||||
(cd kern; make)
|
(cd kern; $(MAKE))
|
||||||
|
|
||||||
exportfs/libexportfs.a:
|
exportfs/libexportfs.a:
|
||||||
(cd exportfs; make)
|
(cd exportfs; $(MAKE))
|
||||||
|
|
||||||
libauth/libauth.a:
|
libauth/libauth.a:
|
||||||
(cd libauth; make)
|
(cd libauth; $(MAKE))
|
||||||
|
|
||||||
libauthsrv/libauthsrv.a:
|
libauthsrv/libauthsrv.a:
|
||||||
(cd libauthsrv; make)
|
(cd libauthsrv; $(MAKE))
|
||||||
|
|
||||||
libmp/libmp.a:
|
libmp/libmp.a:
|
||||||
(cd libmp; make)
|
(cd libmp; $(MAKE))
|
||||||
|
|
||||||
libsec/libsec.a:
|
libsec/libsec.a:
|
||||||
(cd libsec; make)
|
(cd libsec; $(MAKE))
|
||||||
|
|
||||||
libmemdraw/libmemdraw.a:
|
libmemdraw/libmemdraw.a:
|
||||||
(cd libmemdraw; make)
|
(cd libmemdraw; $(MAKE))
|
||||||
|
|
||||||
libmemlayer/libmemlayer.a:
|
libmemlayer/libmemlayer.a:
|
||||||
(cd libmemlayer; make)
|
(cd libmemlayer; $(MAKE))
|
||||||
|
|
||||||
libdraw/libdraw.a:
|
libdraw/libdraw.a:
|
||||||
(cd libdraw; make)
|
(cd libdraw; $(MAKE))
|
||||||
|
|
||||||
libc/libc.a:
|
libc/libc.a:
|
||||||
(cd libc; make)
|
(cd libc; $(MAKE))
|
||||||
|
|
||||||
gui-$(GUI)/libgui.a:
|
gui-$(GUI)/libgui.a:
|
||||||
(cd gui-$(GUI); make)
|
(cd gui-$(GUI); $(MAKE))
|
||||||
|
8
cpu.c
8
cpu.c
@ -28,7 +28,7 @@ static AuthInfo *p9any(int);
|
|||||||
#define system csystem
|
#define system csystem
|
||||||
static char *system;
|
static char *system;
|
||||||
static int cflag;
|
static int cflag;
|
||||||
int dbg;
|
extern int dbg;
|
||||||
|
|
||||||
static char *srvname = "ncpu";
|
static char *srvname = "ncpu";
|
||||||
static char *ealgs = "rc4_256 sha1";
|
static char *ealgs = "rc4_256 sha1";
|
||||||
@ -548,7 +548,7 @@ p9any(int fd)
|
|||||||
char tbuf[TICKETLEN+TICKETLEN+AUTHENTLEN], trbuf[TICKREQLEN];
|
char tbuf[TICKETLEN+TICKETLEN+AUTHENTLEN], trbuf[TICKREQLEN];
|
||||||
char authkey[DESKEYLEN];
|
char authkey[DESKEYLEN];
|
||||||
Authenticator auth;
|
Authenticator auth;
|
||||||
int afd, i, v2, n;
|
int afd, i, v2;
|
||||||
Ticketreq tr;
|
Ticketreq tr;
|
||||||
Ticket t;
|
Ticket t;
|
||||||
AuthInfo *ai;
|
AuthInfo *ai;
|
||||||
@ -556,7 +556,7 @@ p9any(int fd)
|
|||||||
if((afd = open("/mnt/factotum/ctl", ORDWR)) >= 0)
|
if((afd = open("/mnt/factotum/ctl", ORDWR)) >= 0)
|
||||||
return p9anyfactotum(fd, afd);
|
return p9anyfactotum(fd, afd);
|
||||||
|
|
||||||
if((n = readstr(fd, buf, sizeof buf)) < 0)
|
if(readstr(fd, buf, sizeof buf) < 0)
|
||||||
fatal(1, "cannot read p9any negotiation");
|
fatal(1, "cannot read p9any negotiation");
|
||||||
bbuf = buf;
|
bbuf = buf;
|
||||||
v2 = 0;
|
v2 = 0;
|
||||||
@ -577,7 +577,7 @@ p9any(int fd)
|
|||||||
if(write(fd, buf2, strlen(buf2)+1) != strlen(buf2)+1)
|
if(write(fd, buf2, strlen(buf2)+1) != strlen(buf2)+1)
|
||||||
fatal(1, "cannot write user/domain choice in p9any");
|
fatal(1, "cannot write user/domain choice in p9any");
|
||||||
if(v2){
|
if(v2){
|
||||||
if((n = readstr(fd, buf, sizeof buf)) != 3)
|
if(readstr(fd, buf, sizeof buf) != 3)
|
||||||
fatal(1, "cannot read OK in p9any");
|
fatal(1, "cannot read OK in p9any");
|
||||||
if(memcmp(buf, "OK\0", 3) != 0)
|
if(memcmp(buf, "OK\0", 3) != 0)
|
||||||
fatal(1, "did not get OK in p9any");
|
fatal(1, "did not get OK in p9any");
|
||||||
|
@ -9,3 +9,7 @@
|
|||||||
#else
|
#else
|
||||||
# error "Define an OS"
|
# error "Define an OS"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef IRIX
|
||||||
|
typedef int socklen_t;
|
||||||
|
#endif
|
||||||
|
@ -45,8 +45,8 @@ typedef p9_u32int mpdigit;
|
|||||||
#define uvlong p9_uvlong
|
#define uvlong p9_uvlong
|
||||||
|
|
||||||
#define nelem(x) (sizeof(x)/sizeof((x)[0]))
|
#define nelem(x) (sizeof(x)/sizeof((x)[0]))
|
||||||
|
#define SET(x) ((x)=0)
|
||||||
#define USED(x) if(x);else
|
#define USED(x) if(x);else
|
||||||
#define SET(x)
|
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
|
@ -44,7 +44,7 @@ void cnameclose(Cname*);
|
|||||||
void confinit(void);
|
void confinit(void);
|
||||||
void confinit1(int);
|
void confinit1(int);
|
||||||
int consactive(void);
|
int consactive(void);
|
||||||
void (*consdebug)(void);
|
extern void (*consdebug)(void);
|
||||||
void copen(Chan*);
|
void copen(Chan*);
|
||||||
Block* concatblock(Block*);
|
Block* concatblock(Block*);
|
||||||
Block* copyblock(Block*, int);
|
Block* copyblock(Block*, int);
|
||||||
@ -146,7 +146,7 @@ void kickpager(void);
|
|||||||
void killbig(void);
|
void killbig(void);
|
||||||
int kproc(char*, void(*)(void*), void*);
|
int kproc(char*, void(*)(void*), void*);
|
||||||
void kprocchild(Proc*, void (*)(void*), void*);
|
void kprocchild(Proc*, void (*)(void*), void*);
|
||||||
void (*kproftimer)(ulong);
|
extern void (*kproftimer)(ulong);
|
||||||
void ksetenv(char*, char*, int);
|
void ksetenv(char*, char*, int);
|
||||||
void kstrcpy(char*, char*, int);
|
void kstrcpy(char*, char*, int);
|
||||||
void kstrdup(char**, char*);
|
void kstrdup(char**, char*);
|
||||||
@ -294,11 +294,11 @@ long rtctime(void);
|
|||||||
void runlock(RWlock*);
|
void runlock(RWlock*);
|
||||||
Proc* runproc(void);
|
Proc* runproc(void);
|
||||||
void savefpregs(FPsave*);
|
void savefpregs(FPsave*);
|
||||||
void (*saveintrts)(void);
|
extern void (*saveintrts)(void);
|
||||||
void sched(void);
|
void sched(void);
|
||||||
void scheddump(void);
|
void scheddump(void);
|
||||||
void schedinit(void);
|
void schedinit(void);
|
||||||
void (*screenputs)(char*, int);
|
extern void (*screenputs)(char*, int);
|
||||||
long seconds(void);
|
long seconds(void);
|
||||||
ulong segattach(Proc*, ulong, char *, ulong, ulong);
|
ulong segattach(Proc*, ulong, char *, ulong, ulong);
|
||||||
void segclock(ulong);
|
void segclock(ulong);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user