iostat
Steve Kargl
sgk@troutmask.apl.washington.edu
Wed Aug 23 23:09:00 GMT 2006
On Thu, Aug 24, 2006 at 12:18:01AM +0200, Thomas Koenig wrote:
> On Wed, Aug 23, 2006 at 01:55:58PM -0700, Steve Kargl wrote:
>
> Hi Steve,
>
> > 2006-08-23 Steven G. Kargl <kargls@comcast.net>
> >
> > * runtime/error.c: Return errno for iostat on OS errors.
>
> If you do this, please make sure the errno numbers don't collide
> with the error numbers in libgfortran.h. I don't know how to
> do this except to use a Very Large Offset for the libgfortran.h
> numbers.
A very large offset may not be sufficient. I would need to
look at the C standard, but I suspect that the values of
errno and the possible range of values are not specified.
So, there will always exist the possibility that an OS
may chose the same range of the "very large offset".
OK, I just checked n1124.pdf, the working draft of ISO C,
the values aren't specified other than errno is of type int.
One technical point is that errno should be set to zero
before every libc function call that may alter errno. Otherwise,
an error condition (ie., nonzero errno) that occurred much
earlier in execution may persist.
--
Steve
More information about the Fortran
mailing list