Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!snorkelwacker!bloom-beacon!mitech.COM!gjc From: gjc@mitech.COM Newsgroups: comp.lang.scheme Subject: on the portability of SIOD Message-ID: <9008170327.AA21454@mailhost.samsung.com> Date: 16 Aug 90 13:33:00 GMT Sender: daemon@athena.mit.edu (Mr Background) Reply-To: gjc@mitech.com Organization: The Internet Lines: 31 I agree that I get sloppy with respect to sizeof(int) != sizeof(long). But a port of SIOD to a machine where sizeof(int) = 2 and sizeof(long) = 4 was done: The Macintosh under lightspeed C version 4.0 (This version is also available on BU.EDU in users/gjc/siod-v2*-hqx or *mac*) The trick was to use the REQUIRE ANSI PROTOTYPES mode. Then one was forced to create a prototype for each and every function. Jim O'Dell did the dirty work for me (he is a macintosh machovist, having ported FRANZ LISP a year ago and GNU UUCP recently). Once those prototypes were defined, and all the "%d" in printfs changed to "%ld" where needed, SIOD ran fine. Further work involved adding a SYSEVENTS POLL in the loop for EVAL and PRINT, and a stack-level check in EVAL and PRINT. Even stranger machines have had ports of SIOD. Somebody did a PRIME/PRIMOS port, and mentioned that different types of arguments were returned in different registers, so that prototypes were invaluable. Why don't I include the PROTOTYPES (SIOD_PROTO.H) in the main release? I guess I was bothered by the extra size of the source file involved, and the fact that not all compilers (e.g. SUN microsystems) will allow the use of prototypes. If you want to see a "machine" in which SIOD is *hopeless* try the SABER-C interpreted environment. At least in mode -g0 the stack marking code is completely useless. -gjc