Path: utzoo!attcan!uunet!mcvax!ukc!icdoc!inmos!titan!davidb From: davidb@titan.inmos.co.uk (David Boreham) Newsgroups: comp.os.os9 Subject: Porting UNIX code to OS/9-68K Message-ID: <1625@brwa.inmos.co.uk> Date: 23 Jun 89 15:22:47 GMT Sender: news@inmos.co.uk Reply-To: davidb@inmos.co.uk () Organization: INMOS Limited, Bristol, UK. Lines: 45 What is involved in porting UNIX programs to OS/9-69000 ?? Well, I used to do a lot of this, and still do some, but the best I can do is give some pointers. Mabe someone else out there has the complete picture: 1) The file system is similar in that it is hierarchical and uses slashes. It does not allow links and has roots for each disk. As far as I know, all UNIX code doing disk file I/O works. Directory accesses work if the UNIX program is BSD. Many directories which you expect to find on a UNIX filesystem are absent (/etc, /usr....) 2) Yes the library supports many UNIX calls (more now than it used to). However, the main omissions are fork() and isatty(). Both of these cause major problems. I have in the past implemented my own isatty() by poking around in the file descriptors and so on. fork() is rather difficult since the OS-9 process creation mechanism is not like fork(). I usually re-write the code to use the OS-9 process creation call, but that's obviously not always convenient. 3) You don't have timers. 4) Any UNIX code which plays around with ioctl() and modifying terminal characteristics will need re-written to use the OS-9 calls. 5) The new OS-9 TCP/IP has sockets, provided by a thing called "socketman". I'm not sure exactly what this is yet. 6) Some UNIX programs use system() to invoke utilities like "ls". Obviously these will not be present on an OS-9 system. (Unless you have ported them -:) There are masses of things which are different but these are the ones which have caused me grief. However, you certainly can get pretty far porting UNIX code to OS9/68000. For instance, I've had "yacc", "lex", "kermit" and many other things going without much trouble. (I don't think X11 will work :) David Boreham, INMOS Limited | mail(uk): davidb@inmos.co.uk or ukc!inmos!davidb Bristol, England | (us): uunet!inmos-c!davidb +44 454 616616 ex 543 | Internet : @col.hp.com:davidb@inmos-c