mirror of
https://github.com/Interlisp/maiko.git
synced 2026-01-18 00:52:33 +00:00
Changes necessary to compile for OS5 (Solaris 10/11) when -DSYSVONLY is removed from the compilation flags.
modified: src/dsk.c modified: src/ldeether.c modified: src/main.c modified: src/timer.c modified: src/ufs.c modified: src/unixfork.c modified: src/vmemsave.c modified: src/xrdopt.c
This commit is contained in:
parent
55e39453f5
commit
9fc2752790
16
src/dsk.c
16
src/dsk.c
@ -15,7 +15,7 @@ static char *id = "$Id: dsk.c,v 1.4 2001/12/24 01:09:01 sybalsky Exp $ Copyright
|
||||
|
||||
#include "version.h"
|
||||
|
||||
#if defined(MACOSX) || defined(FREEBSD) || defined(LINUX)
|
||||
#if defined(MACOSX) || defined(FREEBSD) || defined(LINUX) || defined(OS5)
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
@ -29,7 +29,9 @@ static char *id = "$Id: dsk.c,v 1.4 2001/12/24 01:09:01 sybalsky Exp $ Copyright
|
||||
#ifndef SYSVONLY
|
||||
#ifndef MACOSX
|
||||
#ifndef FREEBSD
|
||||
#ifndef OS5
|
||||
#include <sys/dir.h>
|
||||
#endif /* OS5 */
|
||||
#endif /* FREEBSD */
|
||||
#endif /* MACOSX */
|
||||
#endif /* SYSVONLY */
|
||||
@ -82,11 +84,12 @@ static char *id = "$Id: dsk.c,v 1.4 2001/12/24 01:09:01 sybalsky Exp $ Copyright
|
||||
#define L_SET SEEK_SET
|
||||
#endif /* ISC */
|
||||
|
||||
#if defined(SYSVONLY) || defined(MACOSX) || defined(FREEBSD)
|
||||
#if defined(SYSVONLY) || defined(MACOSX) || defined(FREEBSD) || defined(OS5)
|
||||
#include <dirent.h>
|
||||
#include <unistd.h>
|
||||
#define direct dirent
|
||||
#define d_namlen d_reclen
|
||||
#define d_fileno d_ino
|
||||
#ifndef LINUX
|
||||
#define L_SET SEEK_SET
|
||||
#endif
|
||||
@ -2364,6 +2367,8 @@ LispPTR COM_getfreeblock(register LispPTR *args)
|
||||
char drive[2];
|
||||
#ifdef ULTRIX
|
||||
struct fs_data sfsbuf;
|
||||
#elif defined(OS5)
|
||||
struct statvfs sfsbuf;
|
||||
#else
|
||||
#ifndef AIXPS2
|
||||
#ifndef DOS
|
||||
@ -2464,9 +2469,12 @@ LispPTR COM_getfreeblock(register LispPTR *args)
|
||||
#elif INDIGO
|
||||
TIMEOUT(rval = statfs(dir, &sfsbuf, sizeof(struct statfs), 0));
|
||||
if (rval != 0) {
|
||||
#elif SYSVONLY
|
||||
#elif defined(SYSVONLY)
|
||||
TIMEOUT(rval = statfs(dir, &sfsbuf, sizeof(struct statfs), 0));
|
||||
if (rval != 0) {
|
||||
#elif defined(OS5)
|
||||
TIMEOUT(rval = statvfs(dir, &sfsbuf));
|
||||
if (rval != 0) {
|
||||
#else
|
||||
#ifndef AIXPS2
|
||||
TIMEOUT(rval = statfs(dir, &sfsbuf));
|
||||
@ -2483,7 +2491,7 @@ LispPTR COM_getfreeblock(register LispPTR *args)
|
||||
*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)
|
||||
#elif defined(SYSVONLY) || defined(OS5)
|
||||
*buf = sfsbuf.f_bfree;
|
||||
#elif (!defined(AIXPS2))
|
||||
*buf = sfsbuf.f_bavail;
|
||||
|
||||
@ -29,11 +29,11 @@ int main(int argc, char *argv[]) { return (0); }
|
||||
#include <sys/stropts.h>
|
||||
#include <sys/pfmod.h>
|
||||
|
||||
#if defined(SVR4) && !defined(SUNOS5)
|
||||
#if defined(SVR4) && !defined(OS5)
|
||||
char *devices[] = {"emd0", "emd1", "emd2", "emd3", "emd4", 0};
|
||||
#endif
|
||||
|
||||
#ifdef SUNOS5
|
||||
#ifdef OS5
|
||||
#include <sys/bufmod.h>
|
||||
|
||||
char *devices[] = {"le0", "le1", "le2", "le3", "le4", "ie0", "ie1", "ie2", "ie3",
|
||||
@ -68,6 +68,7 @@ char *devices[] = {"le0", "le1", "le2", "le3", "le4", "ie0", "ie1", "i
|
||||
#include <nlist.h>
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <malloc.h>
|
||||
|
||||
#endif /* NOETHER */
|
||||
|
||||
@ -108,8 +109,9 @@ int main(int argc, char *argv[]) {
|
||||
/* Use DLPI to connect to the ethernet. This code is stolen
|
||||
from NFSWATCH4.3
|
||||
*/
|
||||
|
||||
if (ether_fd = setup_dlpi_dev(NULL)) { /* Open an ether interface */
|
||||
char *etherdev = (char *)getenv("LDEETHERDEV");
|
||||
ether_fd = setup_dlpi_dev(etherdev);
|
||||
if (ether_fd >= 0) { /* Open an ether interface */
|
||||
ether_intf_type = dlpi_devtype(ether_fd);
|
||||
printf("opened ldeether fd %d.\n", ether_fd);
|
||||
/* first and foremost, get the packet filter module attached
|
||||
|
||||
@ -29,6 +29,7 @@ static char *id = "$Id: main.c,v 1.4 2001/12/26 22:17:03 sybalsky Exp $ Copyrigh
|
||||
#ifndef DOS
|
||||
#include <sys/param.h>
|
||||
#include <sys/time.h>
|
||||
#include <unistd.h>
|
||||
#else /* DOS */
|
||||
#define MAXPATHLEN 128
|
||||
#define R_OK 04
|
||||
|
||||
@ -511,7 +511,7 @@ extern u_int LispWindowFd;
|
||||
static struct sigvec timerv;
|
||||
#endif /* SYSVSIGNALS */
|
||||
|
||||
#if (defined(OS4) || defined(SYSVONLY)) || defined(MACOSX) || defined(FREEBSD)
|
||||
#if (defined(OS4) || defined(SYSVONLY)) || defined(MACOSX) || defined(FREEBSD) || defined(OS5)
|
||||
void int_timer_service(int sig, int code, struct sigcontext *scp)
|
||||
#else
|
||||
int int_timer_service(int sig, int code, struct sigcontext *scp)
|
||||
|
||||
15
src/ufs.c
15
src/ufs.c
@ -48,7 +48,7 @@ static char *id = "$Id: ufs.c,v 1.2 1999/01/03 02:07:41 sybalsky Exp $ Copyright
|
||||
#endif /* APOLLO */
|
||||
#endif /* AIX */
|
||||
|
||||
#if defined(SYSVONLY) || defined(FREEBSD)
|
||||
#if defined(SYSVONLY) || defined(FREEBSD) || defined(OS5)
|
||||
#include <dirent.h>
|
||||
#include <unistd.h>
|
||||
#endif /* SYSVONLY | FREEBSD */
|
||||
@ -96,14 +96,6 @@ int Dummy_errno; /* If errno cell is not provided by Lisp, dummy_errno is used.
|
||||
/***********************************************/
|
||||
/* file-system-specific defns */
|
||||
/***********************************************/
|
||||
#ifdef DOS
|
||||
#define DIRSEP '\\'
|
||||
#define DIRSEPSTR "\\"
|
||||
#else
|
||||
#define DIRSEP '/'
|
||||
#define DIRSEPSTR "/"
|
||||
#endif
|
||||
#define DRIVESEP ':'
|
||||
|
||||
/* Used to limit DOS filenames to 8.3 format */
|
||||
|
||||
@ -913,12 +905,15 @@ int lisppathname(char *fullname, char *lispname, int dirp, int versionp)
|
||||
strcpy(lispname, "<");
|
||||
return (1);
|
||||
}
|
||||
|
||||
#ifdef DOS
|
||||
/* Split off the drive, if there is one. */
|
||||
if (fullname[1] == DRIVESEP) {
|
||||
*lispname++ = *fullname++;
|
||||
*lispname++ = *fullname++;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
if (!dirp) {
|
||||
/*
|
||||
* The characters which are dealt with specialy (i.e. are quoted)
|
||||
|
||||
@ -66,7 +66,7 @@ typedef int clockid_t;
|
||||
#include <unistd.h>
|
||||
#endif /* HPUX */
|
||||
|
||||
#ifdef SYSVONLY
|
||||
#if defined(SYSVONLY) || defined(OS5)
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#endif /* SYSVONLY */
|
||||
|
||||
@ -44,7 +44,7 @@ static char *id = "$Id: vmemsave.c,v 1.2 1999/01/03 02:07:45 sybalsky Exp $ Copy
|
||||
#include <signal.h>
|
||||
#include <setjmp.h>
|
||||
|
||||
#if defined(SYSVONLY) || defined(MACOSX) || defined(FREEBSD)
|
||||
#if defined(SYSVONLY) || defined(MACOSX) || defined(FREEBSD) || defined(OS5)
|
||||
#include <sys/fcntl.h>
|
||||
#include <dirent.h>
|
||||
#include <unistd.h>
|
||||
|
||||
@ -26,7 +26,7 @@ static char *id = "$Id: xrdopt.c,v 1.6 2001/12/26 22:17:07 sybalsky Exp $ Copyri
|
||||
#include <net/nit.h> /* needed for Ethernet stuff below */
|
||||
#endif /* USE_DLPI */
|
||||
#endif /* NOETHER */
|
||||
#ifdef SYSVONLY
|
||||
#if defined(SYSVONLY) || defined(OS5)
|
||||
#include <unistd.h>
|
||||
#endif /* SYSVONLY */
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user