[Info-vax] Looking into C-include files on VMS
John E. Malmberg
wb8tyw at qsl.network
Sun Nov 1 22:38:10 EST 2009
Bob Eager wrote:
> On Fri, 30 Oct 2009 22:21:36 +0100, Wilm Boerhout wrote:
>
>>> VMS exit status is essentially a 32 bit value. The low order bit is 1
>>> for success, zero for failure.
>> But, open source and or "foreign" programs ported to VMS may not always
>> exit with a VMS exit status value.
>>
>> Both DEC C ($CC) and and HP C++ ($CXX) compilers exit with even status
>> values on compilation errors.
>
> That's really the point I was making. It's what he needs for configure.
>
> (When I've ported something to VMS, I've always made a point of adjusting
> exit status so that it's VMS-compliant).
If you use the /main=posix_exit/define=_POSIX_EXIT=1 then the CRTL will
translate the exit status to be DCL and VMS compliant and it will also
return the expected Unix exit code to C programs like Bash and Make.
If you make other changes to adjust the exit code to be correct for VMS,
it will probably no longer be correct to other C programs
Some time in the past this was done with the port of Curl to VMS, so
that it always returned VMS status codes from a message file set up for VMS.
The current port of Curl to VMS now checks the SHELL environment
variable, and if it does not exist, or is set to DCL, it will return the
VMS status codes as before, otherwise it will return the UNIX codes
encoded as per the _POSIX_EXIT=1 macro setting so that when Curl is used
under GNV Bash in scripts, the expected code is also returned.
-John
wb8tyw at qsl.network
Personal Opinion Only
More information about the Info-vax
mailing list