Mail Archives: djgpp/1998/04/27/06:19:20
On Mon, 27 Apr 1998, Gerhard W. Gruber wrote:
> I seek to position 5 of the file and call read with read(hdl, buffer,
> 4096). The result of read should be the number of bytes actually read or -1
> if an error occured. In this case it should return 5 bytes, because the
> remainder of the file is 5 bytes, but I get -1.
Please post the shortest complete program which exhibits this behavior.
> I thought that the standard says that reading beyond the EOF is not an
> error condition.
Which standard did you have in mind? `read' is only standard in Posix,
ANSI doesn't have it. I don't have Posix handy, so can you tell what
does it say in that case?
- Raw text -