From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.clark.net ([168.143.0.10]) by hawkwind.utcs.utoronto.ca with SMTP id <24629>; Thu, 6 Mar 1997 08:47:12 -0500 Received: from explorer2.clark.net (culliton@explorer2.clark.net [168.143.0.5]) by mail.clark.net (8.8.5/8.6.5) with ESMTP id IAA11762; Thu, 6 Mar 1997 08:45:40 -0500 (EST) From: Tom Culliton Received: (from culliton@localhost) by explorer2.clark.net (8.8.5/8.7.1) id IAA24892; Thu, 6 Mar 1997 08:46:06 -0500 (EST) Date: Thu, 6 Mar 1997 08:46:06 -0500 Message-Id: <199703061346.IAA24892@explorer2.clark.net> To: Bengt.Kleberg@ms.uab.ericsson.se, rc@hawkwind.utcs.toronto.edu Subject: Re: RC => POSIX > What if we wrote rc to posix (or UNIX(tm) if posix isn't enough) and > removed as much of the #ifdef's as possible. Then, on systems without > posix support, we could create a posix library for that operating > system. Only covering the missing posix calls that rc uses, ofcourse. > > Has this kind of thing been done before and failed? > Comments/Suggestions/xxx. The problem is harder than that in rc's case. Signal semantics make a good example. To be really posixy you'd use sigaction(), and while you can write signal() in terms of sigaction, the reverse is not very doable. The differences between BSD and SysV signal semantics are one of the reasons that RC has a bunch of #if's. Others include optional features such as readline, nonstandard OS features that make something work in a better, safer way when they're present such as /dev/fd and kernel recognition of "#!" in executable scrpts. All your proposal would do is move the #if's into the compatibility library. BTW - While I'm thinking of it has anyone looked at how much effort it would take to make the /dev/fd code work with a /proc file system? I mean without putting symbolic links in /dev. Actually if that works, as someone suggested, it seems like the code change should be easy... Tom