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

Valdis Kletnieks $VK0%CLVM.BITNET at WISCVM.ARPA
Tue Oct 22 13:15:41 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...

Well, Daniel Levy SAID that he was running it under VAX/VMS C.  This (at
least as far as I can see) sort of implies that he is running VAX/VMS.
The problem with adding COPTS='-Dvoid=int' to the Makefile is that "make"
is NOT a VAX/VMS command.  If we are going to talk about portability, let's
at least make sure that we have portable utilities as well.  Adding to a
control file for a non-existent utility will NOT make it all better, no matter
what the Unixoid life forms out there are trying to convince us...

                      Valdis Kletnieks
                      Systems Programmer
                      Educational Resources Center
                      Clarkson University

                      BITNET: $VK0 at CLVM.BITNET
                      UUCP: {pur-ee,ccvaxa,sun}!csd-gould!clutx!vk0
                              decvax!sii!trixie!csd-gould!clutx!vk0
                      ICBM: 44 40N  75 00W



More information about the Comp.sources.bugs mailing list