Mail Archives: djgpp-workers/2000/09/02/14:09:36
> From: Jason Green <mail AT jgreen4 DOT fsnet DOT co DOT uk>
> Date: Sat, 02 Sep 2000 18:24:23 +0100
> > >
> > > Actually no, a system call can legally set errno even if no error
> > > occured.
> >
> > I think ANSI specifically disallows this: if no error occured, errno
> > should be left alone.
>
> You could be right, it's just that this is contrary to what I have
> read elsewhere.
The ANSI standard says:
The value of `errno' is zero at program startup, but is never set to
zero by any library function. The value of `errno' may be set to
nonzero by a library function call whether or not there is an error,
provided the use of `errno' is not documented in the description of
the function in this International Standard.
So the value of `errno' is prohibited from being reset to zero. The
standard indeed allows to set `errno' to a nonzero value when no
apparent error has happened (because some underlying system calls
could fail), but the DJGPP library generally tries very hard to avoid
that.
> The real point is whether to commit all or some of the patches to
> symify. IMHO, modified bail() should be commited.
FWIW, I agree.
- Raw text -