From mistral@imasy.or.jp  Mon Jan 17 07:29:52 2005
Return-Path: <mistral@imasy.or.jp>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id B8BCB16A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 17 Jan 2005 07:29:52 +0000 (GMT)
Received: from ns8.sony.co.jp (NS8.Sony.CO.JP [137.153.0.33])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 3499643D1D
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 17 Jan 2005 07:29:52 +0000 (GMT)
	(envelope-from mistral@imasy.or.jp)
Received: from mail20.sony.co.jp (mail20.sony.co.jp [43.0.1.220])
Received: from mail20.sony.co.jp (localhost [127.0.0.1])
	by mail20.sony.co.jp (R8/Sony) with ESMTP id j0H7TpKA011238
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 17 Jan 2005 16:29:51 +0900 (JST)
Received: from shimako.yamayuri.org ([43.17.41.157])
	by mail20.sony.co.jp (R8/Sony) with ESMTP id j0H7Tonq011235
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 17 Jan 2005 16:29:50 +0900 (JST)
Received: from shimako.yamayuri.org (localhost [IPv6:::1])
	by shimako.yamayuri.org (8.13.1/8.13.1/shimako) with ESMTP id j0H7Tedr040929
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 17 Jan 2005 16:29:40 +0900 (JST)
	(envelope-from mistral@imasy.or.jp)
Received: (from sarumaru@localhost)
	by shimako.yamayuri.org (8.13.1/8.13.1/Submit) id j0H7TeSA040928;
	Mon, 17 Jan 2005 16:29:40 +0900 (JST)
	(envelope-from sarumaru)
Message-Id: <200501170729.j0H7TeSA040928@shimako.yamayuri.org>
Date: Mon, 17 Jan 2005 16:29:40 +0900 (JST)
From: Yoshihiko Sarumaru <mistral@imasy.or.jp>
Reply-To: Yoshihiko Sarumaru <mistral@imasy.or.jp>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: EOF indicator can be cleared by not only clearerr(3).
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         76333
>Category:       docs
>Synopsis:       [patch] ferror(3): EOF indicator can be cleared by not only clearerr(3).
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    trhodes
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jan 17 07:30:24 GMT 2005
>Closed-Date:    Fri Feb 25 21:11:54 EST 2011
>Last-Modified:  Fri Feb 25 21:11:54 EST 2011
>Originator:     Yoshihiko Sarumaru
>Release:        FreeBSD 4.11-STABLE i386
>Organization:
>Environment:
System: FreeBSD shimako.yamayuri.org 4.11-STABLE FreeBSD 4.11-STABLE #1: Mon Jan 10 01:36:16 JST 2005 sarumaru@shimako.yamayuri.org:/usr/src/sys/compile/Z505VRK i386


	
>Description:
	The feof(3) tells that "The end-of-file indicator can only be cleared by the function clearerr()."
	But fseek(fp, 0, SEEK_SET) or writing extra bytes to the stream can clear the EOF indicator, too.

	POSIX (SUSv3) doesn't mention about it.
>How-To-Repeat:
	man 3 feof
>Fix:
This patch is for RELENG_4 (1.3.2.4) ferror.3, sorry.

--- /usr/src/lib/libc/stdio/ferror.3    Sat Dec 15 03:33:57 2001
+++ ferror.3    Mon Jan 17 16:24:45 2005
@@ -69,8 +69,6 @@
 tests the end-of-file indicator for the stream pointed to by
 .Fa stream ,
 returning non-zero if it is set.
-The end-of-file indicator can only be cleared by the function
-.Fn clearerr .
 .Pp
 The function
 .Fn ferror


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->patched 
State-Changed-By: trhodes 
State-Changed-When: Wed Jan 28 01:11:50 UTC 2009 
State-Changed-Why:  
Patch applied to CURRENT, thanks for the submission! 


Responsible-Changed-From-To: freebsd-doc->trhodes 
Responsible-Changed-By: trhodes 
Responsible-Changed-When: Wed Jan 28 01:11:50 UTC 2009 
Responsible-Changed-Why:  
Over to me. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=76333 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: docs/76333: commit references a PR
Date: Wed, 28 Jan 2009 01:11:30 +0000 (UTC)

 Author: trhodes
 Date: Wed Jan 28 01:11:20 2009
 New Revision: 187805
 URL: http://svn.freebsd.org/changeset/base/187805
 
 Log:
   Remove comment about clearerr() being the only method of clearing
   the EOF indicator, fseek() may also be used for this.
   
   Bump document date.
   
   PR:		76333
   Submitted by:	Yoshihiko Sarumaru <mistral@imasy.or.jp>
 
 Modified:
   head/lib/libc/stdio/ferror.3
 
 Modified: head/lib/libc/stdio/ferror.3
 ==============================================================================
 --- head/lib/libc/stdio/ferror.3	Wed Jan 28 00:15:35 2009	(r187804)
 +++ head/lib/libc/stdio/ferror.3	Wed Jan 28 01:11:20 2009	(r187805)
 @@ -32,7 +32,7 @@
  .\"     @(#)ferror.3	8.2 (Berkeley) 4/19/94
  .\" $FreeBSD$
  .\"
 -.Dd January 10, 2003
 +.Dd January 27, 2009
  .Dt FERROR 3
  .Os
  .Sh NAME
 @@ -77,8 +77,6 @@ The function
  tests the end-of-file indicator for the stream pointed to by
  .Fa stream ,
  returning non-zero if it is set.
 -The end-of-file indicator can only be cleared by the function
 -.Fn clearerr .
  .Pp
  The function
  .Fn ferror
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: patched->closed 
State-Changed-By: eadler 
State-Changed-When: Fri Feb 25 21:10:37 EST 2011 
State-Changed-Why:  
This has already been MFCed 

http://www.freebsd.org/cgi/query-pr.cgi?pr=76333 
>Unformatted:
