Public Comment Number PC-UK0092 ISO/IEC CD 9899 (SC22N2620) Public Comment =========================================== Date: 1998-02-25 Author: N.M Maclaren Author Affiliation: Self Postal Address: University of Cambridge, Computer Laboratory, New Museums Site, Pembroke Street, Cambridge CB3 3QG, United Kingdom E-mail Address: Telephone Number: +44 1223 334761 Fax Number: +44 1223 334679 Number of individual comments: 1 Comment 1. Category: Normative change to existing feature retaining the original intent Committee Draft subsection: 7.13.9.2, 7.13.9.3, 7.13.9.5, 7.13.10.1 Title: Hard I/O errors and EOF Detailed description: 7.13.9.2 The fseek function, 7.13.9.3 The fsetpos function, 7.13.9.5 The rewind function and 7.13.10.1 The clearerr function all make the assumption that the end-of-file and error indicators can be cleared, and still have a useful specification. This is not true, even under Unix. Consider EOF from a pipe or an I/O error from a remote socket, for example. Furthermore, many implementations already support an enhanced interface (described below), and some programs rely on it, so C9X should be updated to reflect existing practice. It is a great pity that two of them are void functions, but that cannot be changed now, so I suggest adding the following paragraph to the first two: If either of the end-of-file or error indicators are set, and the implementation can determine that the condition that caused them to be set cannot be cleared, it shall set an implementation-defined positive value in errno and return a nonzero value. and the following to the second two: If either of the end-of-file or error indicators are set, and the implementation can determine that the condition that caused them to be set cannot be cleared, it shall set an implementation-defined positive value in errno.