Subject: SunOS Compat, Intuition compiled!
To: port-amiga <port-amiga@NetBSD.ORG>
From: Markus Illenseer <markus@tiger.teuto.de>
List: port-amiga
Date: 04/02/1996 10:21:26
 Something wonderful happened yesterday, I would like to tell you about.
(No, this is _not_ an April fools joke)

 Maybe some old Amiga hacker in this forum know that the Amiga Intuition
was compiled on a Sun3 using SunOS and the greenhill compiler.  As you
might guess this became important in the last weeks to port the AmigaOS to
PowerPC.

 Recently an Amiga Technologies developer managed to compile intuition on
an Amiga running NetBSD 1.1 and the COMPAT_SUNOS flag in the Kernel.  It
was byte by byte identical to what Andy Finkel had as a result almost a
decade ago. Promising, no?

 Unfortunately it turned out, that the compatibility is not perfect, so he
had to hack around in the sunos_compat tree.  The problem was, that the
greenhill compiler seems to be dependend on a Sun2 architecture (what CPU
is that?  68010?  I remember that the first Sun had no MMU but two 68010),
and the SunOS-Compat routines only seem to check for Sun3 and Sparc.

 So here is his patch.  All I can do is to pass it and ask the core team
(Ignatios, Michael?) to re-integrate his patch in a better manner, as we
are not sure about the other #defines there.

   diff-output (diff /usr/src/sys/compat/sunos/sunos_exec.c.orig \
/usr/src/sys/compat/sunos/sunos_exec.c):

----------------------------------8<---------------------------------
104c104
<
---
> /*
105a106,109
>               return (ENOEXEC);
> */
>
>       if(sunmag->a_machtype != 1 && sunmag->a_machtype != 2)
----------------------------------8<---------------------------------

 I am going to find out the other issues he had (some SysCalls seem to be
incompatible as well).  Unfortunately I am away for some holiday, stay
tuned after Easter.

-- 
Markus Illenseer