Making voids work portably (was re: efopen.c)

John Gilmore gnu at l5.uucp
Mon Oct 21 16:14:31 AEST 1985

In article <493 at ttrdc.UUCP>, levy at ttrdc.UUCP (Daniel R. Levy) writes:
> (void)whatever is not supported at all under VAX/VMS C.  It will barf
> severely on (originally) Unix C programs which have been heavily larded with
> (void)'s for the sake of lint.  Not the entire C world is Unix.

Void is well defined and pretty easily portable, though it's true that
many compilers don't fully implement it.  If you write the code
with void, it can be trivially made to work on systems without broken voids
by adding COPTS='-Dvoid=int' to the Makefile -- without source changes.
*That*'s portability...

More information about the Comp.lang.c mailing list