Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!husc6!bu-cs!mit-eddie!genrad!decvax!decwrl!hplabs!hpcea!hpda!hppcgo!hpdsd!hpisod2!decot From: decot@hpisod2.HP (Dave Decot) Newsgroups: comp.sources.d Subject: Re: How do you guys write such portable code? Message-ID: <2780001@hpisod2.HP> Date: Tue, 16-Dec-86 15:08:53 EST Article-I.D.: hpisod2.2780001 Posted: Tue Dec 16 15:08:53 1986 Date-Received: Sat, 20-Dec-86 06:13:48 EST References: <236@sas.UUCP> Lines: 25 > Recent comments to the contrary notwithstanding, I have had pretty good > luck taking source right from comp.sources (or wherever), unnsharing it > and compiling it on a couple of systems at work (HP and APOLLO, fyi). > My question is, how do you do it? Is the author just familiar with all > the sytems the code will be ported to? Or am I just lucky? Is there any > written documentation (oh no!) on how to write portable code? I am not > talking so much about making sure you don't make int/ptr assumptions, etc., > as all the operating system calls, I suppose. Thanks. > > -- Edmund Portability is a function of two things: how much attention the software author paid to being portable, and how much attention the designers of the target system paid to ensuring easy migration from other environments. The software you're referring to must have been written with great attention to using portable (i.e., standard) system calls. I'm not sure about Apollo, but I know why it was easy to port the software to an HP-UX system. It was designed to be compatible with System V, and to support as many of the 4.2BSD calls as possible while maintaining compatibility with System V. Dave Decot hpda!decot