Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!panda!talcott!harvard!seismo!brl-adm!brl-smoke!smoke!cottrell@NBS-VMS.ARPA From: cottrell@NBS-VMS.ARPA (COTTRELL, JAMES) Newsgroups: net.lang.c Subject: C Portability Message-ID: <1408@brl-smoke.ARPA> Date: Fri, 28-Feb-86 15:14:51 EST Article-I.D.: brl-smok.1408 Posted: Fri Feb 28 15:14:51 1986 Date-Received: Mon, 3-Mar-86 00:34:04 EST Sender: news@brl-smoke.ARPA Lines: 33 /* > The point about the "C" being as portable as Stonehenge was made NOT to > imply that programs should be routinely written in Assembler Language > (pun not intended), but rather that porting of programs written in "C" > has its own different set of problems, the solution to some of which are > noted above. This is very obvious to organizations, such as mine, that > distribute "C"-based software for use on many different host systems, all of > which allegedly have "standard UNIX" and "standard C" (whatever "standard" > means these days). If it didn't have `it's own set of problems' your company wouldn't exist. Do you think all you have to do is show up at your customer's site with tar tapes, run a `make install, & go home? Any fool can do that. > Of course, we would never be able to distribute our software for so many > different host systems if we were required to write the code in Assembler, > but, on the other hand, we must go through significant coding gymnastics to > assure the portability including sticking to the "least common multiple" of > language features and "detuning" programs due to the compiler restrictions > (authors call them features, of course) on some systems. We don't have the > luxury of telling our customers "too bad, your system doesn't have a good > or standard enough C compiler!" Ever heard of `#ifdefs'? That way you can write your code for a `normal' machine & your favorite environment, then put in #ifdefs for other environments. You may not have the luxury of telling your customers too bad (you must not be from SUN :-), but you *can* charge them a different price for your services. After all, it's the weird ones that make it harder, let *them* pay for it. jim cottrell@nbs */ ------