1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-04-16 07:57:06 +00:00

Begin to remove ISC platform support. (#40)

We don't want to modify emulation code yet as ISC support included
a number of other things, including some i386 code that isn't used
on other platforms, but is still useful as a reference.
This commit is contained in:
Bruce Mitchener
2020-12-14 13:31:58 +07:00
committed by GitHub
parent 7119613aee
commit 2dba7492af
23 changed files with 11 additions and 1511 deletions

View File

@@ -12,11 +12,9 @@ _________ ________________________________________________________
BYTESWAP Used when compiling for a hardware architecture that has
byte-swapped words and word-swapped 32-bit cells, e.g. 80386.
SYSVSIGNALS True when compiling on a system that requires the use of
SYSV (rather than BSD) signal-handling code (just MIPS & ISC
for 486, now).
SYSV (rather than BSD) signal-handling code.
SYSVONLY True when compiling on a system that has little or no
BSD support (the ISC unix for 486, or MIPS). E.g. gettimofday
is missing.
BSD support. E.g. gettimeofday is missing.
I386 True if compiling for the Sun386i (not just any 80386);
used because the 386i's display controller is odd.
OS4 True if compiling for SunOS 4.x

View File

@@ -1,64 +0,0 @@
# Options for SunOS4, SPARC and X-Window
XFILES = $(OBJECTDIR)XClose.o \
$(OBJECTDIR)Cursor.o \
$(OBJECTDIR)XWindow.o \
$(OBJECTDIR)DoRing.o \
$(OBJECTDIR)DoScroll.o \
$(OBJECTDIR)XEvent.o \
$(OBJECTDIR)XGravity.o \
$(OBJECTDIR)XInit.o \
$(OBJECTDIR)InitXevent.o \
$(OBJECTDIR)XKbdMouse.o \
$(OBJECTDIR)LispWindow.o \
$(OBJECTDIR)LispXbitblt.o \
$(OBJECTDIR)XKeyboard.o \
$(OBJECTDIR)MakeXicon.o \
$(OBJECTDIR)OpenDisplay.o \
$(OBJECTDIR)ReadXoption.o \
$(OBJECTDIR)XReconfig.o \
$(OBJECTDIR)XScroll.o \
$(OBJECTDIR)Scrollbar.o \
$(OBJECTDIR)XCursor.o \
$(OBJECTDIR)XMouse.o \
$(OBJECTDIR)Subwindows.o \
$(OBJECTDIR)VideoColor.o \
$(OBJECTDIR)XWindowMgr.o
XVERSION = XV11R4
XFLAGS = -DXWINDOW -D$(XVERSION)
FPFLAGS =
DFLAGS = -DFSERROR -DAIX -DSYSVONLY -DSYSVSIGNALS -DNOASM -DLOGINT -DNOPIXRECT $(XFLAGS) -DBYTESWAP -DAIXPS2 -DFLTINT -DNOETHER -DFORKCOMM
LDFLAGS = -lX11 -lc -lm -lbsd
INLINE =
BITBLTFILE =
# for the files that need to be included in byte-swapped implementations:
BYTESWAPFILES = $(OBJECTDIR)byteswapfns$(OEXT)
# This is to make the %$#@! Apollo cc happy
OEXT = .o
OPTFLAGS = -O -fstrength-reduce -fcombine-regs
DISPOPTFLAGS = -O -fstrength-reduce -fcombine-regs -finline-functions
CC = /gcc/gcc
OBJECTDIR = ../$(RELEASENAME)/
default : ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldeether
$(OBJECTDIR)xc.o : $(SRCDIR)xc.c $(INCDIR)lispemul.h $(INCDIR)emulglobal.h \
$(INCDIR)address.h \
$(INCDIR)address68k.h $(INCDIR)stack.h $(INCDIR)lispglobal.h \
$(INCDIR)lisptypes.h $(INCDIR)lispmap.h $(INCDIR)cell.h \
$(INCDIR)initatoms.h $(INCDIR)gcdata.h \
$(INCDIR)arith.h $(INCDIR)stream.h $(INCDIR)dbprint.h\
$(INCDIR)tos1defs.h $(INCDIR)tosretmacro.h \
$(INCDIR)tosfuncall.h $(INCDIR)inlineC.h \
$(INCDIR)profile.h
$(CC) $(DISPRFLAGS) $(SRCDIR)xc.c $(INLINE) -o $(OBJECTDIR)xc.o

File diff suppressed because it is too large Load Diff

View File

@@ -247,23 +247,6 @@ typedef signed char s_char;
/********************************************************/
/* */
/********************************************************/
#ifdef ISC
typedef signed char s_char;
#undef UNALIGNED_FETCH_OK
#define MAXPATHLEN MAXNAMLEN
#define EWOULDBLOCK EAGAIN
/* we compile on a 386 with GCC, so can use optimizations. */
#define GCC386
#define RESWAPPEDCODESTREAM
#undef HAS_GETHOSTID
#define LOCK_X_UPDATES 1
#endif /* ISC */
/********************************************************/
/* */
/********************************************************/

View File

@@ -60,7 +60,7 @@ static char *id = "$Id: chardev.c,v 1.2 1999/01/03 02:06:50 sybalsky Exp $ Copyr
#include "commondefs.h"
#include "perrnodefs.h"
#if defined(ISC) || defined(FREEBSD)
#if defined(FREEBSD)
#include <dirent.h>
#endif

View File

@@ -33,13 +33,6 @@ static char *id = "$Id: dir.c,v 1.4 2001/12/26 22:17:01 sybalsky Exp $ Copyright
#include <string.h>
#endif /* LINUX */
#ifdef ISC
#include <dirent.h>
#include <unistd.h>
#include <sys/bsdtypes.h>
#define direct dirent
#endif /* ISC */
#else /* DOS, now */
#include <dos.h>
#include <string.h>

View File

@@ -61,14 +61,6 @@ static char *id = "$Id: dsk.c,v 1.4 2001/12/24 01:09:01 sybalsky Exp $ Copyright
#define L_SET SEEK_SET
#endif /* OS5 */
#ifdef ISC
#include <dirent.h>
#include <unistd.h>
#define direct dirent
#define d_namlen d_reclen
#define L_SET SEEK_SET
#endif /* ISC */
#if defined(SYSVONLY) || defined(MACOSX) || defined(FREEBSD) || defined(OS5)
#include <dirent.h>
#include <unistd.h>
@@ -2186,7 +2178,6 @@ LispPTR COM_truncatefile(register LispPTR *args)
return (ATOM_T);
}
if ((off_t)length != sbuf.st_size) {
#ifndef ISC /* ISC has no ftruncate; sigh */
#ifdef DOS
TIMEOUT(rval = chsize(fd, (off_t)length));
#else
@@ -2196,7 +2187,6 @@ LispPTR COM_truncatefile(register LispPTR *args)
*Lisp_errno = errno;
return (NIL);
}
#endif /* ISC */
/*
* TRUNCATEFILE FDEV method is invoked from FORCEOUTPUT Lisp function.
@@ -2414,10 +2404,7 @@ LispPTR COM_getfreeblock(register LispPTR *args)
*buf = sfsbuf.avail_clusters * sfsbuf.sectors_per_cluster * sfsbuf.bytes_per_sector;
}
#else
#if defined(ISC)
TIMEOUT(rval = statfs(dir, &sfsbuf, sizeof(struct statfs), 0));
if (rval != 0) {
#elif defined(LINUX)
#if defined(LINUX)
TIMEOUT(rval = statfs(dir, &sfsbuf));
if (rval != 0) {
#elif defined(MACOSX) || defined(FREEBSD)
@@ -2435,14 +2422,12 @@ LispPTR COM_getfreeblock(register LispPTR *args)
#endif /* AIXPS2 */
if (rval != 0) {
#endif /* ISC */
#endif
*Lisp_errno = errno;
return (NIL);
}
#if defined(RS6000)
*buf = (sfsbuf.f_bavail) * 4; /* AIX 3.1 returns no. of 4K blocks */
#elif defined(ISC)
*buf = (sfsbuf.f_bfree) / 2; /* ISC claims 1K blocks, but it's really 512b */
#elif defined(SYSVONLY) || defined(OS5)
*buf = sfsbuf.f_bfree;
#elif (!defined(AIXPS2))

View File

@@ -191,7 +191,7 @@ newframe:
ph = 0;
goto foundit;
}
#endif /* ISC */
#endif
#else
if (GETWORD((NAMETABLE *)pindex++) == (DLword)name) {

View File

@@ -18,10 +18,6 @@ static char *id = "$Id: inet.c,v 1.3 2001/12/24 01:09:03 sybalsky Exp $ Copyrigh
#include <sys/file.h>
#include <signal.h>
#include <sys/select.h> /* for FD_ fns */
#ifdef ISC
#include <sys/fcntl.h>
#include <sys/bsdtypes.h>
#endif /* ISC */
#ifdef OS5
#include <sys/fcntl.h>
@@ -51,11 +47,6 @@ static char *id = "$Id: inet.c,v 1.3 2001/12/24 01:09:03 sybalsky Exp $ Copyrigh
#include "commondefs.h"
#include "mkcelldefs.h"
#ifdef ISC
#define FASYNC O_NONBLOCK
#define SIGIO SIGPOLL
#endif /* ISC */
#ifdef GCC386
#include "inlnPS2.h"
#endif
@@ -132,10 +123,7 @@ LispPTR subr_TCP_ops(int op, LispPTR nameConn, LispPTR proto, LispPTR length, Li
fcntl(result, F_SETOWN, getpid());
#else
fcntl(result, F_SETFL, fcntl(result, F_GETFL, 0) | FNDELAY | FASYNC);
#ifndef ISC
fcntl(result, F_SETOWN, getpid());
#endif /* ISC */
#endif /* RS6000 */
return (GetSmallp(result));
@@ -166,10 +154,7 @@ LispPTR subr_TCP_ops(int op, LispPTR nameConn, LispPTR proto, LispPTR length, Li
fcntl(result, F_SETOWN, getpid());
#else
fcntl(result, F_SETFL, fcntl(result, F_GETFL, 0) | FNDELAY);
#ifndef ISC
fcntl(result, F_SETOWN, getpid());
#endif /* ISC */
#endif /* RS6000 */
return (GetSmallp(result));
@@ -247,10 +232,7 @@ LispPTR subr_TCP_ops(int op, LispPTR nameConn, LispPTR proto, LispPTR length, Li
fcntl(result, F_SETOWN, getpid());
#else
fcntl(result, F_SETFL, fcntl(result, F_GETFL, 0) | FNDELAY | FASYNC);
#ifndef ISC
fcntl(result, F_SETOWN, getpid());
#endif /* ISC */
#endif /* RS6000 */
if (listen(result, 5) == -1) {
@@ -288,10 +270,7 @@ LispPTR subr_TCP_ops(int op, LispPTR nameConn, LispPTR proto, LispPTR length, Li
fcntl(result, F_SETOWN, getpid());
#else
fcntl(result, F_SETFL, fcntl(result, F_GETFL, 0) | FNDELAY);
#ifndef ISC
fcntl(result, F_SETOWN, getpid());
#endif /* ISC */
#endif /* RS6000 */
return (GetSmallp(result));
@@ -334,10 +313,7 @@ LispPTR subr_TCP_ops(int op, LispPTR nameConn, LispPTR proto, LispPTR length, Li
fcntl(result, F_SETOWN, getpid());
#else
fcntl(result, F_SETFL, fcntl(result, F_GETFL, 0) | FNDELAY | FASYNC);
#ifndef ISC
fcntl(result, F_SETOWN, getpid());
#endif /* ISC */
#endif /* RS6000 */
FD_SET(result, &LispIOFds); /* so we get interrupts */

View File

@@ -76,10 +76,6 @@ static char *id = "$Id: initdsp.c,v 1.2 1999/01/03 02:07:08 sybalsky Exp $ Copyr
#include "xcursordefs.h"
#endif
#ifdef ISC
#define getpagesize() 512
#endif /* ISC */
#ifdef DOS
#define getpagesize() 512
#endif /* DOS */

View File

@@ -92,10 +92,6 @@ extern int KBDEventFlg;
#include "xdefs.h"
#endif /* XWINDOW */
#ifdef ISC
#include <sys/bsdtypes.h>
#endif /* ISC */
#include "lispemul.h"
#include "lispmap.h"
#include "lspglob.h"

View File

@@ -48,12 +48,6 @@ void Mouse_hndlr(void); /* Fields mouse events from driver */
#include <sundev/kbio.h>
#endif /* DOS */
#ifdef ISC
#include <sys/bsdtypes.h>
#include <signal.h>
#define SIGIO SIGPOLL
#endif /* ISC */
#include "lispemul.h"
#include "lspglob.h"
#include "adr68k.h"
@@ -81,27 +75,6 @@ extern DspInterface currentdsp, colordsp;
extern IOPAGE *IOPage68K;
#endif /* DOS */
#ifdef ISC
/*****************************************************/
/* ISC Unix uses POLL, rather than SELECT, because */
/* SELECT causes intermittent wild jumps. This is */
/* the pollfd structure to drive it. */
/*****************************************************/
#include <poll.h>
struct pollfd pollfds[33] = {
{0, POLLIN | POLLOUT, 0}, {0, POLLIN | POLLOUT, 0}, {0, POLLIN | POLLOUT, 0},
{0, POLLIN | POLLOUT, 0}, {0, POLLIN | POLLOUT, 0}, {0, POLLIN | POLLOUT, 0},
{0, POLLIN | POLLOUT, 0}, {0, POLLIN | POLLOUT, 0}, {0, POLLIN | POLLOUT, 0},
{0, POLLIN | POLLOUT, 0}, {0, POLLIN | POLLOUT, 0}, {0, POLLIN | POLLOUT, 0},
{0, POLLIN | POLLOUT, 0}, {0, POLLIN | POLLOUT, 0}, {0, POLLIN | POLLOUT, 0},
{0, POLLIN | POLLOUT, 0}, {0, POLLIN | POLLOUT, 0}, {0, POLLIN | POLLOUT, 0},
{0, POLLIN | POLLOUT, 0}, {0, POLLIN | POLLOUT, 0}, {0, POLLIN | POLLOUT, 0},
{0, POLLIN | POLLOUT, 0}, {0, POLLIN | POLLOUT, 0}, {0, POLLIN | POLLOUT, 0},
{0, POLLIN | POLLOUT, 0}, {0, POLLIN | POLLOUT, 0}, {0, POLLIN | POLLOUT, 0},
{0, POLLIN | POLLOUT, 0}, {0, POLLIN | POLLOUT, 0}, {0, POLLIN | POLLOUT, 0},
{0, POLLIN | POLLOUT, 0}, {0, POLLIN | POLLOUT, 0}, {0, POLLIN | POLLOUT, 0}};
#endif /* ISC */
/* for contextsw */
#define AS_OPCODE 1
#define AS_CPROG 0
@@ -315,11 +288,6 @@ void getsignaldata(int sig, int code, void *scp)
fd_set rfds, efds;
u_int iflags;
int i;
#ifdef ISC
int fdcount = 0;
int bit;
int res;
#endif
#ifdef XWINDOW
#if defined(sun)
@@ -341,13 +309,7 @@ void getsignaldata(int sig, int code, void *scp)
/* label and ifs not needed if only keyboard on SIGIO */
getmore:
#ifdef ISC
for (res = 0, bit = 1; res < 32; res++, bit <<= 1)
if (FD_ISSET(bit, &LispReadFds)) { pollfds[fdcount++].fd = res; }
if ((res = poll(pollfds, fdcount, 0)) > 0)
#else
if (select(32, &rfds, NULL, &efds, &SelectTimeout) >= 0)
#endif
{
/* need to print out fd sets...
DBPRINT(("SIGIO: fd mask(r/e) = 0x%x/0x%x.\n", rfds, efds));

View File

@@ -16,10 +16,6 @@ static char *id = "$Id: lineblt8.c,v 1.3 1999/05/31 23:35:37 sybalsky Exp $ Copy
#include "lineblt8defs.h"
#include "commondefs.h"
#ifdef ISC
#include <sys/bsdtypes.h>
#endif /* ISC */
#define COLOR8ARRAYSIZE 16
#define BITSPERNIBBLE 4
#define BITSPERDLWORD 16

View File

@@ -63,11 +63,6 @@ static char *id = "$Id: main.c,v 1.4 2001/12/26 22:17:03 sybalsky Exp $ Copyrigh
#include <pwd.h>
#endif /* DOS */
#ifdef ISC
#include <unistd.h>
#include <sys/dirent.h>
#endif
#if defined(MACOSX) || defined(FREEBSD)
#include <string.h>
#include <unistd.h>
@@ -624,7 +619,7 @@ int main(int argc, char *argv[])
tzset();
#endif /* RS6000 */
#if defined(ISC) || defined(DOS)
#ifdef DOS
tzset();
#endif

View File

@@ -2819,9 +2819,7 @@ InitDsp(LispArgs args) /* arg[0] = LispPTR to MedleyScreen */
FD_to_dspif[Xfd] = dspif;
LispReadFds |= (1 << Xfd);
MNWReadFds |= (1 << Xfd);
#ifndef ISC
fcntl(Xfd, F_SETOWN, getpid());
#endif /* ISC */
dspif->screen = args[0]; /* So we know which SCREEN this display is */
dspif->root = RootWindowOfScreen(screen); /* And the root window for the screen */

View File

@@ -26,9 +26,6 @@ static char *id = "$Id: osmsg.c,v 1.2 1999/01/03 02:07:29 sybalsky Exp $ Copyrig
#include <sys/types.h>
#include <sys/select.h>
#include <unistd.h>
#ifdef ISC
#include <sys/bsdtypes.h>
#endif /* ISC */
#include <sys/file.h>
#include <sys/stat.h>
#ifndef AIX

View File

@@ -49,18 +49,9 @@ unsigned long tick_count = 0; /* approx 18 ticks per sec */
#include <unistd.h>
#include <fcntl.h>
#ifdef ISC
#include <sys/bsdtypes.h>
#include <stropts.h>
#include <sys/ioctl.h>
#include <sys/times.h>
#define SIGIO SIGPOLL
#define USETIMEFN
#else
#ifndef DOS
#include <sys/resource.h>
#endif /* DOS */
#endif /* ISC */
#ifdef OS5
#include <sys/times.h>
@@ -150,7 +141,7 @@ void update_miscstats() {
MiscStats->totaltime = (time(0) * 1000) + (10 * dtm.hsecond);
MiscStats->swapwaittime = 0;
MiscStats->pagefaults = 0; /* can't tell this on ISC */
MiscStats->pagefaults = 0;
MiscStats->swapwrites = 0;
MiscStats->diskiotime = 0; /* ?? not available ?? */
MiscStats->diskops = 0;
@@ -510,9 +501,7 @@ static int int_timer_service(int sig, int code, void *scp)
#endif
#ifdef SYSVSIGNALS
#ifndef ISC
/* sigset(SIGVTALRM, int_timer_service); */
#endif /* ISC */
#endif /* SYSVSIGNALS */
}
@@ -638,14 +627,6 @@ static void int_io_init() {
DBPRINT(("I/O interrupts enabled\n"));
#endif /* KBINT */
#else /* SYSVSIGNALS in effect... */
#ifdef ISC
{
int res = sigset(SIGIO, getsignaldata);
if (res == SIG_ERR) perror("sigset for I/O polling");
if (ioctl(ConnectionNumber(currentdsp->display_id), I_SETSIG, S_INPUT) < 0)
perror("ioctl on X fd - SETSIG");
}
#else
#ifndef DOS
SIGERRCHK(sigset(SIGIO, getsignaldata), "sigset io");
#ifdef XWINDOW
@@ -670,7 +651,6 @@ static void int_io_init() {
#endif /* USE_DLPI */
#endif /* DOS */
#endif /* ISC */
#endif /* SYSVSIGNALS */
}
@@ -760,10 +740,7 @@ void int_timer_off() { int_block(); }
void int_timer_off() {
#ifdef SYSVSIGNALS
#ifndef ISC
sigignore(SIGVTALRM);
#endif /* ISC */
#else
struct sigvec tmpv, timeroffv;
@@ -813,12 +790,10 @@ void int_fp_service(int sig, int code, struct sigcontext *scp)
case FPM_OVERFLOW:
case FPM_PRECISION:
#else
#ifndef ISC
case FPE_FLTDIV_TRAP:
case FPE_FLTUND_TRAP:
case FPE_FLTOVF_TRAP:
case FPE_FLTOPERR_TRAP:
#endif /* ISC */
#endif /* AIXPS2 */
FP_error = code;
@@ -839,7 +814,6 @@ void int_fp_service(int sig, int code, struct sigcontext *scp)
}
void int_fp_init() { /* first set up the signal handler */
#ifndef ISC
#ifdef AIXPS2
if (sigset(SIGFPE, int_fp_service))
#elif OS5
@@ -848,9 +822,8 @@ void int_fp_init() { /* first set up the signal handler */
if (ieee_handler("set", "all", int_fp_service))
#endif /* AIXPS2 */
perror("Sigvec for FPE failed");
perror("Sigvec for FPE failed");
DBPRINT(("FP interrupts enabled\n"));
#endif /* ISC */
}
#endif /* FLTINT */
@@ -908,11 +881,7 @@ static void int_file_init() {
sigvec(SIGALRM, &timerv, 0);
#else
#ifdef SIGALRM
#ifdef ISC
sigset(SIGALRM, timeout_error);
#else
sigset(SIGALRM, timeout_error);
#endif /* ISC */
#endif /* SIGALRM */
#endif /* SYSVSIGNALS */
@@ -1024,21 +993,7 @@ and do a 'v' before trying anything else.";
/************************************************************************/
static void int_panic_init() {
#ifdef SYSVSIGNALS
#ifdef ISC
sigset(SIGHUP, panicuraid);
sigset(SIGQUIT, panicuraid);
sigset(SIGILL, panicuraid);
#ifdef SIGEMT
sigset(SIGEMT, panicuraid);
#endif
sigset(SIGBUS, panicuraid);
sigset(SIGSEGV, panicuraid);
#ifdef SIGSYS
sigset(SIGSYS, panicuraid);
#endif
sigset(SIGTERM, panicuraid);
#elif DOS
#else
#ifndef DOS
sigset(SIGHUP, panicuraid);
sigset(SIGQUIT, panicuraid);
sigset(SIGILL, panicuraid);

View File

@@ -51,14 +51,8 @@ Unix Interface Communications
#include <sys/wait.h>
#include <errno.h>
#include <sys/socket.h>
#ifdef ISC
#include <sys/fcntl.h>
/* Needed for window size setting ops: */
#include <sys/sioctl.h>
#else
#include <fcntl.h>
#include <sys/un.h>
#endif /* ISC */
#if defined(SYSVONLY) || defined(FREEBSD) || defined(OS5) || defined(MACOSX)
#include <unistd.h>
@@ -208,7 +202,6 @@ void wait_for_comm_processes(void) {
/* Returns a string which is the pathname associated with a */
/* socket descriptor. Has ONE string buffer. */
/************************************************************************/
#ifndef ISC
char *build_socket_pathname(int desc) {
static char PathName[50];
@@ -216,25 +209,6 @@ char *build_socket_pathname(int desc) {
return (PathName);
}
#else
char *build_upward_socket_pathname(int desc)
{
static char UpPathName[50];
sprintf(UpPathName, "/tmp/LPU%ld-%d", StartTime, desc);
return (UpPathName);
}
char *build_downward_socket_pathname(int desc)
{
static char DownPathName[50];
sprintf(DownPathName, "/tmp/LPD%ld-%d", StartTime, desc);
return (DownPathName);
}
#endif /* ISC */
/************************************************************************/
/* */
/* c l o s e _ u n i x _ d e s c r i p t o r s */
@@ -379,11 +353,7 @@ int FindAvailablePty(char *Master, char *Slave) {
if (res != -1) {
flags = fcntl(res, F_GETFL, 0);
#ifdef ISC
flags |= O_NONBLOCK;
#else
flags |= FNDELAY;
#endif /* ISC */
flags = fcntl(res, F_SETFL, flags);
return (res);
@@ -452,7 +422,6 @@ LispPTR Unix_handlecomm(LispPTR *args) {
char *UpPipeName, *DownPipeName, *PipeName;
int res, slot, PipeFD, sockFD;
#ifndef ISC
/* First create the socket */
struct sockaddr_un sock;
sockFD = socket(AF_UNIX, SOCK_STREAM, 0);
@@ -476,58 +445,6 @@ LispPTR Unix_handlecomm(LispPTR *args) {
DBPRINT(("Socket %d bound to name %s.\n", sockFD, PipeName));
if (listen(sockFD, 1) < 0) perror("Listen");
#else
sockFD = open("/tmp/dummyforlisp", O_CREAT);
UpPipeName = build_upward_socket_pathname(sockFD);
DownPipeName = build_downward_socket_pathname(sockFD);
DBPRINT(("Downward FIFO: %s\n", DownPipeName));
DBPRINT(("Upward FIFO: %s\n", UpPipeName));
#ifdef sun
if ((mknod(UpPipeName, 0777 | S_IFIFO, 0) < 0) && (errno != EEXIST)) {
perror("Making Upward FIFO");
printf("(named %s).\n", UpPipeName);
fflush(stdout);
}
if ((mknod(DownPipeName, 0777 | S_IFIFO, 0) < 0) && (errno != EEXIST)) {
perror("Making Downward FIFO");
printf("(named %s).\n", DownPipeName);
fflush(stdout);
}
#else
if (mkfifo(UpPipeName, 0777) < 0) {
perror("Making Upward FIFO");
printf("(named %s).\n", UpPipeName);
fflush(stdout);
}
if (mkfifo(DownPipeName, 0777) < 0) {
perror("Making Downward FIFO");
printf("(named %s).\n", DownPipeName);
fflush(stdout);
}
#endif /* SUNs */
PipeFD = open(DownPipeName, O_WRONLY | O_NDELAY);
if (PipeFD < 0) {
perror("Opening Down pipe from lisp");
printf("(Name is %s.)\n", DownPipeName);
fflush(stdout);
close(sockFD);
return (NIL);
}
dup2(PipeFD, sockFD);
unlink("/tmp/dummyforlisp");
PipeFD = open(UpPipeName, O_RDONLY | O_NDELAY);
if (PipeFD < 0) {
perror("Opening Up pipe from lisp");
printf("(Name is %s.)\n", UpPipeName);
fflush(stdout);
close(sockFD);
return (NIL);
}
#endif /* ISC */
d[0] = 'F';
d[3] = sockFD;
@@ -541,7 +458,6 @@ LispPTR Unix_handlecomm(LispPTR *args) {
/* If it worked, return job # */
if (d[3] == 1) {
#ifndef ISC
case0_lp:
TIMEOUT(PipeFD = accept(sockFD, NULL, NULL));
if (PipeFD < 0) {
@@ -551,50 +467,24 @@ LispPTR Unix_handlecomm(LispPTR *args) {
if (unlink(PipeName) < 0) perror("Unlink");
return (NIL);
}
#endif /* oldPIPEway */
res = fcntl(PipeFD, F_GETFL, 0);
#ifdef ISC
res |= O_NONBLOCK;
#else
res |= FNDELAY;
#endif /* ISC */
res = fcntl(PipeFD, F_SETFL, res);
if (res < 0) {
perror("setting up fifo to nodelay");
return (NIL);
}
#ifdef ISC
UJ[sockFD].type = UJPROCESS;
UJ[sockFD].status = -1;
UJ[sockFD].PID = (d[1] << 8) | d[2];
UJ[sockFD].readsock = PipeFD;
#else
UJ[PipeFD].type = UJPROCESS;
UJ[PipeFD].status = -1;
UJ[PipeFD].PID = (d[1] << 8) | d[2];
UJ[PipeFD].readsock = 0;
close(sockFD);
unlink(PipeName);
#endif /* ISC */
/* unlink(UpPipeName); */
/* unlink(DownPipeName); */
#ifdef ISC
return (GetSmallp(sockFD));
#else
return (GetSmallp(PipeFD));
#endif /* ISC */
} else {
DBPRINT(("Fork request failed."));
#ifdef ISC
close(sockFD);
close(PipeFD);
unlink(UpPipeName);
unlink(DownPipeName);
#else
close(sockFD);
unlink(PipeName);
#endif /* ISC */
return (NIL);
}
break;
@@ -779,11 +669,7 @@ LispPTR Unix_handlecomm(LispPTR *args) {
if (d[3] == 1) {
/* Set up the IO not to block */
res = fcntl(Master, F_GETFL, 0);
#ifdef ISC
res |= O_NONBLOCK;
#else
res |= FNDELAY;
#endif /* ISC */
res = fcntl(Master, F_SETFL, res);
UJ[slot].type = UJSHELL; /* so we can find them */
@@ -904,22 +790,12 @@ LispPTR Unix_handlecomm(LispPTR *args) {
/* Something's amiss; update process status */
DBPRINT(("Problem: Got status %d from read, errno %d.\n", dest, errno));
#ifndef ISC
wait_for_comm_processes(); /* make sure we're up to date */
if (((dest == 0) || (errno == EINTR) || (errno == 0) || (errno == EAGAIN) ||
(errno == EWOULDBLOCK)) &&
(UJ[slot].status == -1))
/* No available chars, but other guy still running */
return (ATOM_T);
#else
if (dest == 0)
wait_for_comm_processes(); /* make sure we're up to date, because dest==0 means no
process is writing there. */
if (((errno == EINTR) || (errno == 0) || (errno == EAGAIN) || (errno == EWOULDBLOCK)) &&
(dest == -1) && (UJ[slot].status == -1))
/* No available chars, but other guy still running */
return (ATOM_T);
#endif /* ISC */
/* At this point, we either got an I/O error, or there */
/* were no chars available and the other end has terminated. */
@@ -971,7 +847,6 @@ LispPTR Unix_handlecomm(LispPTR *args) {
return (NIL);
}
#ifndef ISC
case 12: /* create Unix socket */
{
@@ -1005,11 +880,7 @@ LispPTR Unix_handlecomm(LispPTR *args) {
if (listen(sockFD, 1) < 0) perror("Listen");
/* Set up the IO not to block */
res = fcntl(sockFD, F_GETFL, 0);
#ifdef ISC
res |= O_NONBLOCK;
#else
res |= FNDELAY;
#endif /* ISC */
res = fcntl(sockFD, F_SETFL, res);
/* things seem sane, fill out the rest of the UJ slot and return */
@@ -1019,9 +890,6 @@ LispPTR Unix_handlecomm(LispPTR *args) {
return (GetSmallp(sockFD));
} break;
#else
error("Socket creation not supported on ISC");
#endif /* ISC */
case 13: /* try to accept */
{

View File

@@ -427,7 +427,6 @@ int fork_Unix() {
if (pid == 0) {
int i;
int status, sock;
#ifndef ISC
struct sockaddr_un addr;
char PipeName[40];
sock = socket(AF_UNIX, SOCK_STREAM, 0);
@@ -436,7 +435,7 @@ int fork_Unix() {
exit(0);
}
sprintf(PipeName, "/tmp/LPU%ld-%d", StartTime, slot);
memset(&addr, 0, sizeof(struct sockaddr_un));
memset(&addr, 0, sizeof(struct sockaddr_un));
addr.sun_family = AF_UNIX;
strcpy(addr.sun_path, PipeName);
status =
@@ -454,32 +453,6 @@ int fork_Unix() {
dup2(sock, 0);
dup2(sock, 1);
dup2(sock, 2);
#else
/* New, FIFO-based communication regime */
int down, up; /* fifo fds */
char DownFIFO[48], UpFIFO[48];
sprintf(DownFIFO, "/tmp/LPD%d-%d", StartTime, slot);
sprintf(UpFIFO, "/tmp/LPU%d-%d", StartTime, slot);
if ((down = open(DownFIFO, O_RDONLY | O_NDELAY)) < 0) {
perror("slave opening down fifo");
exit(0);
}
if ((up = open(UpFIFO, O_WRONLY | O_NDELAY)) < 0) {
perror("slave opening up fifo");
exit(0);
}
/* Copy the fifos onto stdin, stdout, and stderr */
dup2(down, 0);
dup2(up, 1);
dup2(up, 2);
/* unlink(DownFIFO);
unlink(UpFIFO); */
#endif /* oldPIPEway */
#ifdef SYSVONLY
/* Make sure everything else is closed POSIX has no getdtab... */

View File

@@ -24,11 +24,6 @@ static char *id = "@(#) uraid.c 1.52 4/23/92 (Venue & Fuji Xerox)";
#include <stdlib.h>
#include <unistd.h>
#ifdef ISC
#include <sys/bsdtypes.h>
#define vfork fork
#endif /* ISC */
#include <sys/types.h>
#ifndef DOS
#include <sys/file.h>

View File

@@ -237,8 +237,6 @@ LispPTR unix_getparm(LispPTR *args) {
envvalue = "i386";
#elif defined(RS6000)
envvalue = "rs/6000";
#elif defined(ISC)
envvalue = "i386";
#elif defined(DOS)
envvalue = "386";
#elif defined(MACOSX)
@@ -254,8 +252,6 @@ LispPTR unix_getparm(LispPTR *args) {
envvalue = "sun386";
#elif defined(RS6000)
envvalue = "rs/6000";
#elif defined(ISC)
envvalue = "i386";
#elif defined(DOS)
envvalue = "dos";
#elif defined(MACOSX)

View File

@@ -45,11 +45,6 @@ static char *id = "$Id: xinit.c,v 1.5 2001/12/26 22:17:06 sybalsky Exp $ Copyrig
#endif /* MACOSX */
#endif /* LINUX */
#ifdef ISC
#define FASYNC O_NONBLOCK
#define SIGIO SIGPOLL
#endif /* ISC */
#define FALSE 0
#define TRUE !FALSE
#define PERCENT_OF_SCREEN 95
@@ -195,9 +190,7 @@ void Xevent_after_raid(DspInterface dsp)
void Open_Display(DspInterface dsp)
{
FD_SET(ConnectionNumber(dsp->display_id), &LispReadFds);
#ifndef ISC
fcntl(ConnectionNumber(dsp->display_id), F_SETOWN, getpid());
#endif /* ISC */
/****************************************************/
/* If debugging, set the X connection so that */

View File

@@ -17,10 +17,6 @@ static char *id = "$Id: xwinman.c,v 1.3 2001/12/26 22:17:07 sybalsky Exp $ Copyr
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#ifdef ISC
#include <sys/bsdtypes.h>
#endif /* ISC */
#include "lispemul.h"
#include "devif.h"
#include "xdefs.h"