casts to (void)

Doug Gwyn <gwyn> gwyn at brl-tgr.ARPA
Fri Aug 9 09:14:19 AEST 1985


> > 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.



More information about the Comp.lang.c mailing list