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

Remove AIX RS/6000 platform support. (#46)

AIX on PS/2 will be removed separately.
This commit is contained in:
Bruce Mitchener
2020-12-15 03:13:38 +07:00
committed by GitHub
parent 605499bfc2
commit fd0e12e855
11 changed files with 6 additions and 290 deletions

View File

@@ -83,10 +83,6 @@ LispPTR CHAR_openfile(LispPTR *args)
struct stat statbuf;
char pathname[MAXPATHLEN];
#if defined(RS6000)
static int one = 1; /* Used in ioctl, etc. */
#endif
Lisp_errno = (int *)(Addr68k_from_LADDR(args[2]));
LispStringToCString(args[0], pathname, MAXPATHLEN);
@@ -107,16 +103,11 @@ LispPTR CHAR_openfile(LispPTR *args)
*Lisp_errno = errno;
return (NIL);
}
/* Prevent I/O requests from blocking -- make them error */
/* if no char is available, or there's no room in pipe. */
#ifdef RS6000
ioctl(fd, FIONBIO, &one);
fcntl(fd, F_SETOWN, getpid());
#else
/* Prevent I/O requests from blocking -- make them error */
/* if no char is available, or there's no room in pipe. */
rval = fcntl(fd, F_GETFL, 0);
rval |= FNDELAY;
rval = fcntl(fd, F_SETFL, rval);
#endif /* RS6000 */
return (GetSmallp(fd));
#endif /* DOS */

View File

@@ -2399,15 +2399,13 @@ LispPTR COM_getfreeblock(register LispPTR *args)
*Lisp_errno = errno;
return (NIL);
}
#if defined(RS6000)
*buf = (sfsbuf.f_bavail) * 4; /* AIX 3.1 returns no. of 4K blocks */
#elif defined(SYSVONLY) || defined(OS5)
#if defined(SYSVONLY) || defined(OS5)
*buf = sfsbuf.f_bfree;
#elif (!defined(AIXPS2))
*buf = sfsbuf.f_bavail;
#else
*buf = 200000; /* FAKE - pretend we have 200,000 blocks free! */
#endif /* RS6000 */
#endif
#endif /* DOS */
return (ATOM_T);
}

View File

@@ -92,9 +92,6 @@ LispPTR subr_TCP_ops(int op, LispPTR nameConn, LispPTR proto, LispPTR length, Li
int addr_class, protocol;
DLword *buffer;
int result;
#ifdef RS6000
static int one = 1; /* Used in ioctl */
#endif
switch (op & 0xFFFF) {
case TCPhostlookup:
@@ -116,13 +113,8 @@ LispPTR subr_TCP_ops(int op, LispPTR nameConn, LispPTR proto, LispPTR length, Li
addr_class = LispNumToCInt(nameConn);
protocol = LispNumToCInt(proto);
result = socket(addr_class, protocol, 0);
#ifdef RS6000
ioctl(result, FIONBIO, &one);
fcntl(result, F_SETOWN, getpid());
#else
fcntl(result, F_SETFL, fcntl(result, F_GETFL, 0) | FNDELAY | FASYNC);
fcntl(result, F_SETOWN, getpid());
#endif /* RS6000 */
return (GetSmallp(result));
break;
@@ -145,15 +137,8 @@ LispPTR subr_TCP_ops(int op, LispPTR nameConn, LispPTR proto, LispPTR length, Li
perror("TCP connect");
return (NIL);
}
#ifdef RS6000
/* FNDELAY alone isn't enough on aix */
/* (don't know if FIONBIO alone is enough) */
ioctl(result, FIONBIO, &one);
fcntl(result, F_SETOWN, getpid());
#else
fcntl(result, F_SETFL, fcntl(result, F_GETFL, 0) | FNDELAY);
fcntl(result, F_SETOWN, getpid());
#endif /* RS6000 */
return (GetSmallp(result));
break;
@@ -225,13 +210,8 @@ LispPTR subr_TCP_ops(int op, LispPTR nameConn, LispPTR proto, LispPTR length, Li
int oldmask = sigblock(sigmask(SIGIO));
#endif /* SYSVSIGNALS */
#ifdef RS6000
ioctl(result, FIONBIO, &one);
fcntl(result, F_SETOWN, getpid());
#else
fcntl(result, F_SETFL, fcntl(result, F_GETFL, 0) | FNDELAY | FASYNC);
fcntl(result, F_SETOWN, getpid());
#endif /* RS6000 */
if (listen(result, 5) == -1) {
perror("TCP Listen");
@@ -263,13 +243,8 @@ LispPTR subr_TCP_ops(int op, LispPTR nameConn, LispPTR proto, LispPTR length, Li
if (errno != EWOULDBLOCK) perror("TCP Accept");
return (NIL);
}
#ifdef RS6000
ioctl(result, FIONBIO, &one);
fcntl(result, F_SETOWN, getpid());
#else
fcntl(result, F_SETFL, fcntl(result, F_GETFL, 0) | FNDELAY);
fcntl(result, F_SETOWN, getpid());
#endif /* RS6000 */
return (GetSmallp(result));
break;
@@ -306,13 +281,8 @@ LispPTR subr_TCP_ops(int op, LispPTR nameConn, LispPTR proto, LispPTR length, Li
close(result);
return (NIL);
}
#ifdef RS6000
ioctl(result, FIONBIO, &one);
fcntl(result, F_SETOWN, getpid());
#else
fcntl(result, F_SETFL, fcntl(result, F_GETFL, 0) | FNDELAY | FASYNC);
fcntl(result, F_SETOWN, getpid());
#endif /* RS6000 */
FD_SET(result, &LispIOFds); /* so we get interrupts */
FD_SET(result, &LispReadFds);

View File

@@ -227,27 +227,6 @@ u_char SUNLispKeyMap_jle[128] = {
/* [116] 255 -> 103 Henkan */
/* [117] 255 -> 109 Nihongo On-Off */
/* For IBM Risc System 6000 */
u_char SUNLispKeyMap_RS6000[128] = {
/* 7 */ 255, 255, 45, 32, 17, 16, 1, 0,
/* 15 */ 2, 4, 53, 22, 8, 10, 59, 255,
/* 23 */ 15, 34, 19, 18, 3, 48, 49, 51,
/* 31 */ 6, 23, 25, 11, 58, 29, 105, 56,
/* 39 */ 21, 20, 5, 35, 50, 52, 38, 9,
/* 47 */ 26, 43, 28, 255, 44, 41, 255, 40,
/* 55 */ 24, 37, 7, 39, 54, 55, 27, 42,
/* 63 */ 12, 255, 60, 36, 255, 31, 57, 93,
/* 71 */ 255, 47, 255, 255, 255, 255, 255, 255,
/* 79 */ 255, 255, 255, 255, 89, 46, 255, 255,
/* 87 */ 129, 62, 90, 255, 130, 131, 63, 91,
/* 95 */ 255, 255, 132, 73, 81, 84, 94, 255,
/* 103 */ 65, 82, 85, 69, 98, 95, 83, 87,
/* 111 */ 70, 13, 96, 102, 255, 128, 255, 33,
/* 119 */ 255, 97, 99, 100, 67, 68, 101, 66,
/* 127 */ 104, 80, 106, 107, 92, 76, 14, 61
};
u_char *XGenericKeyMap; /* filled in with malloc if needed */
/* For the IBM-101 kbd FF marks exceptions */
@@ -409,7 +388,7 @@ char *getenv(); /* ---- external entry points --------*/
#define MIN_KEYTYPE 3
#define KB_AS3000J (7 + MIN_KEYTYPE)
#define KB_RS6000 (8 + MIN_KEYTYPE)
#define KB_RS6000 (8 + MIN_KEYTYPE) /* TODO: Can we remove this? */
#define KB_DEC3100 (9 + MIN_KEYTYPE) /* TODO: Can we remove this? */
#define KB_HP9000 (10 + MIN_KEYTYPE) /* TODO: Can we remove this? */
#define KB_X (11 + MIN_KEYTYPE)
@@ -570,9 +549,7 @@ void keyboardtype(int fd)
/* Get keytype from LDEKBDTYPE */
if ((key = getenv("LDEKBDTYPE")) == 0) {
#ifdef RS6000
type = KB_RS6000;
#elif XWINDOW
#ifdef XWINDOW
type = KB_X;
#elif DOS
type = KB_DOS;
@@ -592,8 +569,6 @@ void keyboardtype(int fd)
type = KB_SUN2;
else if (strcmp("jle", key) == 0)
type = KB_JLE;
else if (strcmp("rs6000", key) == 0)
type = KB_RS6000;
else if (strcmp("X", key) == 0)
type = KB_X;
else if (strcmp("x", key) == 0)
@@ -627,11 +602,6 @@ void keyboardtype(int fd)
SUNLispKeyMap = SUNLispKeyMap_for4;
InterfacePage->devconfig |= type - MIN_KEYTYPE; /* 7 */
break;
case KB_RS6000:
SUNLispKeyMap = SUNLispKeyMap_RS6000;
InterfacePage->devconfig |= KB_SUN3 - MIN_KEYTYPE; /* 8 */
break;
break;
#ifdef XWINDOW
case KB_X:
XGenericKeyMap = (u_char *)make_X_keymap();

View File

@@ -95,11 +95,7 @@ int read_hex(char *s1, long unsigned int *array) {
if ((strspn(ptr, hexdigits)) != strlen(ptr)) return FAILURE3;
/* convert key to numeric format*/
#if defined(RS6000)
*(array + i) = strtoul(ptr, NULL, 16); /* On RS/6000, must convert to unsigned */
#else
*(array + i) = strtol(ptr, NULL, 16); /* On suns, this works OK */
#endif
printf("0x%x ", *(array + i));
fflush(stdout);
/* continue search the next one */

View File

@@ -584,15 +584,6 @@ int main(int argc, char *argv[])
_getrealerror();
#endif /* I386 */
#ifdef RS6000
/****************************************************/
/* For the IBM RS/6000, we have to initialize its */
/* notion of the time zone, so gettimeofday works */
/****************************************************/
tzset();
#endif /* RS6000 */
#ifdef DOS
tzset();
#endif

View File

@@ -232,8 +232,6 @@ LispPTR unix_getparm(LispPTR *args) {
envvalue = "sparc";
#elif defined(I386)
envvalue = "i386";
#elif defined(RS6000)
envvalue = "rs/6000";
#elif defined(DOS)
envvalue = "386";
#elif defined(MACOSX)
@@ -247,8 +245,6 @@ LispPTR unix_getparm(LispPTR *args) {
envvalue = "sun4";
#elif defined(I386)
envvalue = "sun386";
#elif defined(RS6000)
envvalue = "rs/6000";
#elif defined(DOS)
envvalue = "dos";
#elif defined(MACOSX)