and i wrote:
 |The POSIX standard says that the error condition shall be set if
 |a read or write error occurs only, but this should not be the case
 |here, no?  So looking at [master]:lib/libc/stdio/fseek.c:_fseeko()
 |(note my machine is not strong enough to compile any compiler (but
 |pcc, tcc) or even operating systems, i cannot verify) there is
 |only one condition where the stream error indicator is set, after
 |the dumb: label.
 |I would expect the error indicator for a failing __srefill() or
 |__sflush() (only: not following branches), but _here_ it is set
 |for a "long overflow" check failure.  This looks wrong to me, but
 |of course: without having any idea nor test possibilities.  Also
 |note this is 32-bit FreeBSD, can it be that /dev/null -2L,SEEK_END
 |sees enters 64-bit range?  That also feels wrong, for /dev/null
 |anyway, where it should not matter and simply succeed.  (The
 |tested OpenBSD was 32-bit, too.)

Also, the return of fseek(3) is "int", so testing LONG_MAX looks
a bit odd as such, from my point of view?


|Der Kragenbaer,                The moon bear,
|der holt sich munter           he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)
_______________________________________________ mailing list
To unsubscribe, send any mail to ""

Reply via email to