mirror of
https://github.com/0intro/conterm
synced 2024-11-23 06:11:18 +03:00
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
|
||||
|
||||
kern/libkern.a:
|
||||
(cd kern; make)
|
||||
(cd kern; $(MAKE))
|
||||
|
||||
exportfs/libexportfs.a:
|
||||
(cd exportfs; make)
|
||||
(cd exportfs; $(MAKE))
|
||||
|
||||
libauth/libauth.a:
|
||||
(cd libauth; make)
|
||||
(cd libauth; $(MAKE))
|
||||
|
||||
libauthsrv/libauthsrv.a:
|
||||
(cd libauthsrv; make)
|
||||
(cd libauthsrv; $(MAKE))
|
||||
|
||||
libmp/libmp.a:
|
||||
(cd libmp; make)
|
||||
(cd libmp; $(MAKE))
|
||||
|
||||
libsec/libsec.a:
|
||||
(cd libsec; make)
|
||||
(cd libsec; $(MAKE))
|
||||
|
||||
libmemdraw/libmemdraw.a:
|
||||
(cd libmemdraw; make)
|
||||
(cd libmemdraw; $(MAKE))
|
||||
|
||||
libmemlayer/libmemlayer.a:
|
||||
(cd libmemlayer; make)
|
||||
(cd libmemlayer; $(MAKE))
|
||||
|
||||
libdraw/libdraw.a:
|
||||
(cd libdraw; make)
|
||||
(cd libdraw; $(MAKE))
|
||||
|
||||
libc/libc.a:
|
||||
(cd libc; make)
|
||||
(cd libc; $(MAKE))
|
||||
|
||||
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
|
||||
static char *system;
|
||||
static int cflag;
|
||||
int dbg;
|
||||
extern int dbg;
|
||||
|
||||
static char *srvname = "ncpu";
|
||||
static char *ealgs = "rc4_256 sha1";
|
||||
@ -548,7 +548,7 @@ p9any(int fd)
|
||||
char tbuf[TICKETLEN+TICKETLEN+AUTHENTLEN], trbuf[TICKREQLEN];
|
||||
char authkey[DESKEYLEN];
|
||||
Authenticator auth;
|
||||
int afd, i, v2, n;
|
||||
int afd, i, v2;
|
||||
Ticketreq tr;
|
||||
Ticket t;
|
||||
AuthInfo *ai;
|
||||
@ -556,7 +556,7 @@ p9any(int fd)
|
||||
if((afd = open("/mnt/factotum/ctl", ORDWR)) >= 0)
|
||||
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");
|
||||
bbuf = buf;
|
||||
v2 = 0;
|
||||
@ -577,7 +577,7 @@ p9any(int fd)
|
||||
if(write(fd, buf2, strlen(buf2)+1) != strlen(buf2)+1)
|
||||
fatal(1, "cannot write user/domain choice in p9any");
|
||||
if(v2){
|
||||
if((n = readstr(fd, buf, sizeof buf)) != 3)
|
||||
if(readstr(fd, buf, sizeof buf) != 3)
|
||||
fatal(1, "cannot read OK in p9any");
|
||||
if(memcmp(buf, "OK\0", 3) != 0)
|
||||
fatal(1, "did not get OK in p9any");
|
||||
|
@ -9,3 +9,7 @@
|
||||
#else
|
||||
# error "Define an OS"
|
||||
#endif
|
||||
|
||||
#ifdef IRIX
|
||||
typedef int socklen_t;
|
||||
#endif
|
||||
|
@ -45,8 +45,8 @@ typedef p9_u32int mpdigit;
|
||||
#define uvlong p9_uvlong
|
||||
|
||||
#define nelem(x) (sizeof(x)/sizeof((x)[0]))
|
||||
#define SET(x) ((x)=0)
|
||||
#define USED(x) if(x);else
|
||||
#define SET(x)
|
||||
|
||||
enum
|
||||
{
|
||||
|
@ -44,7 +44,7 @@ void cnameclose(Cname*);
|
||||
void confinit(void);
|
||||
void confinit1(int);
|
||||
int consactive(void);
|
||||
void (*consdebug)(void);
|
||||
extern void (*consdebug)(void);
|
||||
void copen(Chan*);
|
||||
Block* concatblock(Block*);
|
||||
Block* copyblock(Block*, int);
|
||||
@ -146,7 +146,7 @@ void kickpager(void);
|
||||
void killbig(void);
|
||||
int kproc(char*, void(*)(void*), void*);
|
||||
void kprocchild(Proc*, void (*)(void*), void*);
|
||||
void (*kproftimer)(ulong);
|
||||
extern void (*kproftimer)(ulong);
|
||||
void ksetenv(char*, char*, int);
|
||||
void kstrcpy(char*, char*, int);
|
||||
void kstrdup(char**, char*);
|
||||
@ -294,11 +294,11 @@ long rtctime(void);
|
||||
void runlock(RWlock*);
|
||||
Proc* runproc(void);
|
||||
void savefpregs(FPsave*);
|
||||
void (*saveintrts)(void);
|
||||
extern void (*saveintrts)(void);
|
||||
void sched(void);
|
||||
void scheddump(void);
|
||||
void schedinit(void);
|
||||
void (*screenputs)(char*, int);
|
||||
extern void (*screenputs)(char*, int);
|
||||
long seconds(void);
|
||||
ulong segattach(Proc*, ulong, char *, ulong, ulong);
|
||||
void segclock(ulong);
|
||||
|
Loading…
Reference in New Issue
Block a user