1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-01-28 12:39:28 +00:00

Patches that made it possible to compile on MacOS X as of Nov 13, 2011.

This commit is contained in:
Nick Briggs
2015-04-20 21:14:32 -07:00
parent de170a64d9
commit 5a702e808a
16 changed files with 67 additions and 7 deletions

View File

@@ -84,7 +84,7 @@ extern IOPAGE *IOPage68K;
#ifdef AIX
#include <sys/types.h>
#ifndef LINUX /* LINUX has no macros.h */
#if !defined(LINUX) && !defined(MACOSX) /* LINUX and MACOSX have no macros.h */
#include <macros.h>
#endif /* LINUX */
#endif /* AIX */

View File

@@ -21,6 +21,7 @@ static char *id = "$Id: common.c,v 1.2 1999/01/03 02:06:52 sybalsky Exp $ Copyri
#include <stdio.h>
#include <setjmp.h>
#include <fcntl.h>
#include <string.h> /* for memset */
#include "lispemul.h"
#include "lispmap.h"
#include "adr68k.h"

View File

@@ -111,7 +111,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"
#ifdef ULTRIX
#if defined(ULTRIX) || defined(MACOSX)
#include <sys/mount.h>
#elif OSF1
#include <sys/mount.h>

View File

@@ -772,7 +772,7 @@ int dic_no_array[TABLE_MAX];
printf("dic_no_array = %d,dic_name_len_array = %d,dic_name_array = %s\n",dic_no_array[i],dic_name_len_array[i],&dic_name_array[i][0]);
}
}
printf("wnn_errorno = %d,wnn_errorno);
printf("wnn_errorno = %d", wnn_errorno);
#endif
return (wnn_errorno) ;

View File

@@ -44,6 +44,7 @@ static char *id = "$Id: gcmain3.c,v 1.4 1999/05/31 23:35:31 sybalsky Exp $ Copyr
/* \Tomtom */
/*************************************************************************/
#include <stdio.h> /* for sprintf */
#include "lispemul.h"
#include "lispmap.h"
#include "lsptypes.h"

View File

@@ -22,6 +22,7 @@ static char *id = "$Id: inet.c,v 1.3 2001/12/24 01:09:03 sybalsky Exp $ Copyrigh
#include <stdio.h>
#include <ctype.h>
#include <string.h> /* for mem... fns */
#ifndef DOS
#include <sys/types.h>
#include <sys/file.h>

View File

@@ -168,7 +168,7 @@ int Win_security_p;
/* Now takes 68k address, function renamed for safety */
init_display2(display_addr, display_max)
int display_addr, display_max;
INT display_addr, display_max;
{
int mmapstat;
int fbgattr_result;

View File

@@ -27,7 +27,11 @@ 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
#include <stdlib.h>
#else
#include <malloc.h>
#endif
#ifndef DOS
#include <pwd.h>
#else
@@ -167,7 +171,12 @@ init_ifpage(int sysout_size)
{struct passwd *pwd;
char *s = (char*)Addr68k_from_LADDR(0155001);
/* try getpwuid first; use cuserid if it fails */
if((pwd = getpwuid(getuid())) == NULL) cuserid(s+1);
if((pwd = getpwuid(getuid())) == NULL)
#ifdef MACOSX
;
#else
cuserid(s+1);
#endif
else strcpy(s+1, pwd->pw_name);
*s = (char)strlen(s+1);
}

View File

@@ -31,6 +31,7 @@ static char *id = "$Id: llstk.c,v 1.5 2001/12/26 22:17:03 sybalsky Exp $ Copyrig
*/
/******************************************************************/
#include <stdio.h> /* for printf */
#include "lispemul.h"
#include "lispmap.h"
#include "adr68k.h"

View File

@@ -24,6 +24,7 @@ static char *id = "$Id: perrno.c,v 1.4 2001/12/26 22:17:04 sybalsky Exp $ Copyri
#include <stdio.h>
#include <errno.h>
#include "osmsg.h"
@@ -37,10 +38,15 @@ static char *id = "$Id: perrno.c,v 1.4 2001/12/26 22:17:04 sybalsky Exp $ Copyri
/************************************************************************/
extern int errno;
#ifdef MACOSX
extern const char * const sys_errlist[];
extern const int sys_nerr;
#else
int sys_nerr;
#ifndef LINUX
extern char *sys_errlist[];
#endif /* LINUX */
#endif
perrorn(char *s, int n)
{

View File

@@ -26,7 +26,7 @@ static char *id = "$Id: storage.c,v 1.5 2001/12/26 22:17:04 sybalsky Exp $ Copyr
*/
/*****************************************************************/
#include <stdio.h> /* for printf */
#include "hdw_conf.h"
#include "lispemul.h"
#include "address.h"

View File

@@ -42,12 +42,15 @@ Unix Interface Communications
#include <setjmp.h>
#include "timeout.h"
#include <stdio.h>
#include <string.h> /* for strcpy etc. */
#ifdef OS4
#include <sys/termios.h>
#elif APOLLO
#include </sys5/usr/include/termios.h>
#elif LINUX
#include <termio.h>
#elif MACOSX
#include <termios.h>
#else
#include <sys/termio.h>
#endif /* OS4 */

View File

@@ -48,7 +48,7 @@ static char *id = "$Id: unixfork.c,v 1.6 2001/12/26 22:17:05 sybalsky Exp $ Copy
#ifndef USETERMIOS
#include <sys/ioctl.h>
#else
#ifdef INDIGO
#if defined(INDIGO) || defined(MACOSX)
#include <termios.h>
#else
#include <sys/termios.h>
@@ -676,13 +676,21 @@ ForkUnixShell(slot, ltr, numb, termtype, shellarg)
kill processing, echo, backspace to erase, echo ctrl
chars as ^x, kill line by backspacing */
#ifdef MACOSX
tcgetattr(SlaveFD, &tio);
#else
ioctl(SlaveFD, TCGETS, (char *)&tio);
#endif
#ifdef INDIGO
tio.c_lflag |= ICANON | ECHO | ECHOE;
#else
tio.c_lflag |= ICANON | ECHO | ECHOE | ECHOCTL | ECHOKE;
#endif /* INDIGO */
#ifdef MACOSX
tcsetattr(SlaveFD, TCSANOW, &tio);
#else
ioctl(SlaveFD, TCSETS, (char *)&tio);
#endif
#endif /* USETERMIOS */
(void) dup2(SlaveFD, 0);

View File

@@ -21,7 +21,11 @@ static char *id = "$Id: xcursor.c,v 1.4 2001/12/26 22:17:06 sybalsky Exp $ Copyr
#include <stdio.h>
#ifdef MACOSX
#include <stdlib.h>
#else
#include <malloc.h>
#endif
#include <X11/Xlib.h>
#include <X11/Xutil.h>

View File

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