1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-02-07 08:47:09 +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

@@ -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);
}