1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-01-14 07:30:21 +00:00

First cleanup to get to compiling (warnings, no errors) FreeBSD

This commit is contained in:
Nick Briggs 2017-05-25 12:51:47 -07:00
parent be2101ac49
commit 02569edbe0
12 changed files with 44 additions and 18 deletions

View File

@ -19,14 +19,14 @@ XFLAGS = -I/usr/local/include -DXWINDOW -DNOPIXRECT -D$(XVERSION) # $(CLXFLAGS)
# This is to make the %$#@! Apollo cc happy
OEXT = .o
# OPTFLAGS is normally -O2.
OPTFLAGS = -Ofast -g
DISPOPTFLAGS = -O -g
OPTFLAGS = -O1 -gdwarf-2
DISPOPTFLAGS = -O1 -gdwarf-2
FPFLAGS =
DFLAGS = -DFSERROR -DNEW_STORAGE -DFREEBSD -DOLD_CURSOR -DUSETERMIOS \
-DBYTESWAP -DFORKCOMM -DNOFORN -DLOGINT $(XFLAGS) \
-DRELEASE=351 -D__USE_BSD
LDFLAGS = -L/usr/local/lib -lX11 -lc -lm
LDFLAGS = -L/usr/local/lib -lX11 -lc -lm -lcrypt
LDELDFLAGS = -L/usr/local/lib -lX11 -lc -lm
INLINE = # $(SRCDIR)dspSPARC.il

View File

@ -17,7 +17,9 @@ 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)
#include <string.h>
#endif
#include <sys/types.h>
#ifndef DOS
@ -27,7 +29,11 @@ static char *id = "$Id: dsk.c,v 1.4 2001/12/24 01:09:01 sybalsky Exp $ Copyright
#include <strings.h>
#endif /* OS5 Solaris doesn't need strings.h */
#ifndef SYSVONLY
#ifndef MACOSX
#ifndef FREEBSD
#include <sys/dir.h>
#endif /* FREEBSD */
#endif /* MACOSX */
#endif /* SYSVONLY */
#include <sys/stat.h>
@ -82,7 +88,7 @@ static char *id = "$Id: dsk.c,v 1.4 2001/12/24 01:09:01 sybalsky Exp $ Copyright
#endif /* ISC */
#ifdef SYSVONLY
#if defined(SYSVONLY) || defined(MACOSX) || defined(FREEBSD)
#include <dirent.h>
#include <unistd.h>
#define direct dirent
@ -111,7 +117,7 @@ static char *id = "$Id: dsk.c,v 1.4 2001/12/24 01:09:01 sybalsky Exp $ Copyright
#include "osmsg.h"
#include "dbprint.h"
#if defined(ULTRIX) || defined(MACOSX)
#if defined(ULTRIX) || defined(MACOSX) || defined(FREEBSD)
#include <sys/mount.h>
#elif OSF1
#include <sys/mount.h>
@ -2527,7 +2533,7 @@ COM_getfreeblock(args)
#elif defined(LINUX)
TIMEOUT(rval = statfs(dir, &sfsbuf));
if (rval != 0) {
#elif defined(MACOSX)
#elif defined(MACOSX) || defined(FREEBSD)
TIMEOUT(rval = statfs(dir, &sfsbuf));
if (rval != 0) {
#elif HPUX

View File

@ -27,7 +27,7 @@ static char *id = "$Id: initsout.c,v 1.3 1999/05/31 23:35:34 sybalsky Exp $ Copy
#include <stdio.h>
#include <string.h>
#ifdef MACOSX
#if defined(MACOSX) || defined(FREEBSD)
#include <stdlib.h>
#else
#include <malloc.h>
@ -172,7 +172,7 @@ init_ifpage(int sysout_size)
char *s = (char*)Addr68k_from_LADDR(0155001);
/* try getpwuid first; use cuserid if it fails */
if((pwd = getpwuid(getuid())) == NULL)
#ifdef MACOSX
#if defined(MACOSX) || defined(FREEBSD)
;
#else
cuserid(s+1);

View File

@ -19,6 +19,7 @@ static char *id = "$Id: lisp2c.c,v 1.3 1999/05/31 23:35:37 sybalsky Exp $ Copyri
#include "version.h"
#include <stdio.h> /* for sprintf */
#include "lispemul.h"
#include "lspglob.h"

View File

@ -31,7 +31,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>
#else
#else /* DOS */
#define MAXPATHLEN 128
#define R_OK 04
#define index strchr
@ -75,6 +75,10 @@ static char *id = "$Id: main.c,v 1.4 2001/12/26 22:17:03 sybalsky Exp $ Copyrigh
#include <sys/dirent.h>
#endif
#if defined(MACOSX) || defined(FREEBSD)
#include <string.h>
#endif
#include <errno.h>
#include "emlglob.h"
@ -859,7 +863,11 @@ print_info_lines ()
#elif (RELEASE == 351)
printf("Emulator for Medley release 3.51\n");
#endif /* RELEASE */
#if defined(MACOSX) || defined(FREEBSD)
printf("Creation date: %s", ctime((const time_t *)&MDate));
#else
printf("Creation date: %s", ctime(&MDate));
#endif
#ifdef DEMO
printf("Demonstration emulator, not for commercial use\n");
#endif /* DEMO */

View File

@ -54,7 +54,9 @@ static char *id = "$Id: osmsg.c,v 1.2 1999/01/03 02:07:29 sybalsky Exp $ Copyrig
#ifndef AIX
#ifndef APOLLO
#ifndef MACOSX
#ifndef FREEBSD
#include <sys/vfs.h>
#endif /* FREEBSD */
#endif /* MACOSX */
#endif /* APOLLO */
#endif /* AIX */

View File

@ -38,7 +38,7 @@ static char *id = "$Id: perrno.c,v 1.4 2001/12/26 22:17:04 sybalsky Exp $ Copyri
/************************************************************************/
extern int errno;
#ifdef MACOSX
#if defined(MACOSX) || defined(FREEBSD)
extern const char * const sys_errlist[];
extern const int sys_nerr;
#else

View File

@ -24,10 +24,10 @@ static char *id = "$Id: ufs.c,v 1.2 1999/01/03 02:07:41 sybalsky Exp $ Copyright
#include <sys/types.h>
#ifndef DOS
#include <sys/param.h>
#ifndef SYSVONLY
#include <strings.h>
#if defined(SYSVONLY) || defined(MACOSX) || defined(FREEBSD)
#include <string.h>
#else
#include <string.h>
#include <strings.h>
#endif /* SYSVONLY */
#include <sys/file.h>
@ -45,7 +45,9 @@ static char *id = "$Id: ufs.c,v 1.2 1999/01/03 02:07:41 sybalsky Exp $ Copyright
#ifndef AIX
#ifndef APOLLO
#ifndef MACOSX
#ifndef FREEBSD
#include <sys/vfs.h>
#endif /* FREEBSD */
#endif /* MACOSX */
#endif /* APOLLO */
#endif /* AIX */

View File

@ -73,7 +73,10 @@ extern int Win_security_p;
#ifdef OS5
#include <stropts.h>
#endif /* OS5 */
#ifdef FREEBSD
/* for memset */
#include <string.h>
#endif
#include "lispemul.h"
#include "lispmap.h"
@ -388,7 +391,7 @@ uraid_commands()
LispPTR index;
DefCell *defcell68k;
#ifndef DOS
#ifdef SYSVONLY
#if defined(SYSVONLY) || defined(WAITINT)
int status;
#else
union wait status;

View File

@ -37,7 +37,9 @@ static char *id = "$Id: vmemsave.c,v 1.2 1999/01/03 02:07:45 sybalsky Exp $ Copy
#include <sys/param.h>
#ifndef AIX
#ifndef MACOSX
#ifndef FREEBSD
#include <sys/vfs.h>
#endif /* FREEBSD */
#endif /* MACOSX */
#endif /* AIX */
@ -47,7 +49,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>
#ifdef SYSVONLY
#if defined(SYSVONLY) || defined(MACOSX) || defined(FREEBSD)
#include <sys/fcntl.h>
#include <dirent.h>
#include <unistd.h>

View File

@ -21,7 +21,7 @@ static char *id = "$Id: xcursor.c,v 1.4 2001/12/26 22:17:06 sybalsky Exp $ Copyr
#include <stdio.h>
#ifdef MACOSX
#if defined(MACOSX) || defined(FREEBSD)
#include <stdlib.h>
#else
#include <malloc.h>

View File

@ -47,7 +47,9 @@ static char *id = "$Id: xinit.c,v 1.5 2001/12/26 22:17:06 sybalsky Exp $ Copyrig
#ifndef ULTRIX
#ifndef LINUX
#ifndef MACOSX
#ifndef FREEBSD
#include <stropts.h>
#endif /* FREEBSD */
#endif /* MACOSX */
#endif /* LINUX */
#endif /* ULTRIX */