From owner-svn-src-all@FreeBSD.ORG Wed Jan 28 12:02:21 2009 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 059A91065705; Wed, 28 Jan 2009 12:02:12 +0000 (UTC) (envelope-from trhodes@FreeBSD.org) Received: from gloomweaver.pittgoth.com (gloomweaver.pittgoth.com [205.134.165.107]) by mx1.freebsd.org (Postfix) with ESMTP id 816B38FC32; Wed, 28 Jan 2009 12:02:09 +0000 (UTC) (envelope-from trhodes@FreeBSD.org) Received: from localhost.fbsdsecure.org (c-68-83-213-214.hsd1.va.comcast.net [68.83.213.214]) (authenticated bits=0) by gloomweaver.pittgoth.com (8.14.3/8.14.3) with ESMTP id n0SBUEs2089606 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 28 Jan 2009 06:30:15 -0500 (EST) (envelope-from trhodes@FreeBSD.org) Date: Wed, 28 Jan 2009 06:28:53 -0500 From: Tom Rhodes To: Bruce Evans Message-Id: <20090128062853.06ee8c95.trhodes@FreeBSD.org> In-Reply-To: <20090128212904.E45316@delplex.bde.org> References: <200901280111.n0S1BL7n003092@svn.freebsd.org> <20090128081914.GA22309@freebsd.org> <20090128212904.E45316@delplex.bde.org> X-Mailer: Sylpheed version 1.0.6 (GTK+ 1.2.10; amd64-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, rdivacky@FreeBSD.org, src-committers@FreeBSD.org, svn-src-all@FreeBSD.org Subject: Re: svn commit: r187805 - head/lib/libc/stdio X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2009 12:02:34 -0000 On Wed, 28 Jan 2009 22:15:22 +1100 (EST) Bruce Evans wrote: > On Wed, 28 Jan 2009, Roman Divacky wrote: > > > On Wed, Jan 28, 2009 at 01:11:21AM +0000, Tom Rhodes wrote: > >> Log: > >> Remove comment about clearerr() being the only method of clearing > >> the EOF indicator, fseek() may also be used for this. > > fseek() can't always be used for this, since fseek() fails for unseekable > files (even SEEK_CUR fails then). However, when it works, it has the > advantage(?) of not clobbering the error indicator. > > The comment was also wrong because the EOF indicator can also be cleared > by clearerr_unlocked() in some cases and by fseeko() in the same cases as > by fseek(). > > > why not saying what you state in the commit message in the man page > > instead of removing the info entirely? > > Well, neither C99 nor POSIX say this for feof(). > > The man page still says that the error indicator can only be cleared by > clearerr(). This is false since a sucessful rewind() clears both > indicators, and the indicator can be cleared by clearerr_unlocked() in > some cases. > > I think the man page is trying to make the false claims that the > indicators are not cleared as side effects and is not trying to list > all the functions that do clear the indicators as side effects, and > that it shouldn't try to do the latter. The list for the EOF indicator > may be quite long and system-and-time-dependent since it includes the > closure of all functions that call fseek(), or fseeko()). For both > indicators, the list includes the closure of all functions that call > clearerr() or clearerr_unlocked(). Perhaps no such functions in > standard libraries are permitted to operate on application streams, > but this is unclear. > > Bruce > Exactly, listing every possible method is a bit much I think. Anyway, I picked off the last mention of it, which I missed earlier. Thanks! -- Tom Rhodes