[Top][All Lists]

[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 12:52:29 -0600

"Derek R. Price" wrote:
> Larry Jones wrote:
> > Noel L Yap writes:
> > >
> > > Hmmm.  How does diff-utils deal with this situation?
> >
> > I don't think diff-utils is interested in running on non-Unix/Posix
> > systems.  CVS is (although it doesn't quite succeed just yet).
> Still, where's the harm in returning only EXIT_SUCCESS & EXIT_FAILURE on
> systems that require that and a little more information on systems which
> support it?

Because any system that requires it is broken.  I doubt that
catering for individual broken systems is high on anybody's
priority list (except somebody who works on that system).

More specifically, the proposal seems to be catering to
hypothetical broken systems, and I really don't think that
is a good idea.  If we have a specific broken system in
mind, then we can look at it and figure out what it needs
in detail - and any system that runs a C compiler that
conforms neither to the standard nor to older Unix code
is likely to have problems in more than one detail.

  We're talking about a few lines in, maybe one
> in acconfig.h, a line in system.h, and a single line in main.  I'll do
> the work, or what Donald hasn't done already.
Redefining constants that should be defined in the standard headers,
even with #ifndef guards, is not good practice.  In my experience,
it removes error messages that occur, and should occur, if a
required header is omitted, or if the header is defective.

(Of course, I am much stickier about standards conformance than
some people.  I think it promotes portability and understandability
to write conforming code, and not to cater to non-standard systems
without specific reason.)

> Derek
> P.S.  run.c already seems to non-portably _exit() with bash's 127 when
> it can't exec a program.
Now, that should be fixed.  CVS is supposed to be portable, and
any main() should return only EXIT_SUCCESS or 0 (which are
interchangeable) and EXIT_FAILURE.
David H. Thornley                          Software Engineer
at CES International, Inc.:  address@hidden or (763)-694-2556
at home: (612)-623-0552 or address@hidden or

reply via email to

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