info-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: incorrect return code on vms...


From: David H. Thornley
Subject: Re: incorrect return code on vms...
Date: Fri, 01 Dec 2000 09:47:52 -0600

Donald Sharp wrote:
> 
> If the return codes for a program are reversed on vms,
> such that success = 1 and failure = 0, then cvs would
> always exit with a failure on vms systems.  Attached
> is a patch to fix this problem.
> 
Assuming that VMS has a conforming C compiler, this is not
a problem.  The C system interprets both 0 and EXIT_SUCCESS
as successful exits, and EXIT_FAILURE as a failure exit.
These are defined in <stdlib.h>.

If the operating system has other conventions, and many have,
then the C compiler needs to create code that will change the
exit status appropriately.  In this case, it should transform
0 to 1 and whatever it uses as EXIT_FAILURE to 0.  In other
words, do what it takes to make ISO standard C work on the
system.

If CVS is telling VMS that it fails when it in fact succeeds,
then the C compiler is bad, and likely has other failings
as well.  Find a better compiler, or pester your vendor to
conform to the standard.

-- 
David H. Thornley                          Software Engineer
at CES International, Inc.:  address@hidden or (763)-694-2556
at home: (612)-623-0552 or address@hidden or
http://www.visi.com/~thornley/david/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]