Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA Path: utzoo!linus!philabs!cmcl2!seismo!brl-tgr!gwyn From: gwyn@brl-tgr.ARPA (Doug Gwyn) Newsgroups: net.lang.c Subject: Re: Re: casts to (void) Message-ID: <549@brl-tgr.ARPA> Date: Thu, 8-Aug-85 19:14:19 EDT Article-I.D.: brl-tgr.549 Posted: Thu Aug 8 19:14:19 1985 Date-Received: Sun, 11-Aug-85 07:28:03 EDT References: <441@brl-tgr.ARPA> <261@kitty.UUCP> Organization: Ballistic Research Lab Lines: 23 > > If you are trying to write code that runs unmodified both in > > standard environments and on 4.2BSD (not recommended), ... > > Why not? I try to make sure my code runs on K&R, 4.2, SV, and MS-DOS > without modification. Apart from system calls I'm usually successful. The reason why not is, you have to limit yourself to a fairly puny common subset and implement your own replacements for such useful functions as drand48(), hsearch(), tempnam(), getopt(), etc. etc. Also, it is hard to use the basic utilities via popen() since they don't behave the same in many cases. You also cannot exploit the more powerful features of "make", you have a "ranlib" problem, etc. I am very much in favor of both C and Portable OS standards, which are now in the works, to make this business much less painful in the future. For right now, I develop software for a UNIX System V plus directory access routines minus AT&T-only kernel features (shared memory, FIFOs, etc.) and install a suitable environment as needed on non-UNIX System V hosts that I take my software to. Since this is close to the environment being standardized, I expect little work to be needed to continue porting my applications for the foreseeable future, and I haven't had to give up use of the more nifty System V development support aids.