From owner-freebsd-doc@FreeBSD.ORG Mon Jan 17 07:30:25 2005 Return-Path: Delivered-To: freebsd-doc@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E5B5716A4CE for ; Mon, 17 Jan 2005 07:30:24 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id A0C9243D31 for ; Mon, 17 Jan 2005 07:30:24 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id j0H7UOte036583 for ; Mon, 17 Jan 2005 07:30:24 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id j0H7UOVL036577; Mon, 17 Jan 2005 07:30:24 GMT (envelope-from gnats) Resent-Date: Mon, 17 Jan 2005 07:30:24 GMT Resent-Message-Id: <200501170730.j0H7UOVL036577@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-doc@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Yoshihiko Sarumaru Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B8BCB16A4CE for ; 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 ; 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 ; 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 ; Mon, 17 Jan 2005 16:29:50 +0900 (JST) Received: from shimako.yamayuri.org (localhost [IPv6:::1]) j0H7Tedr040929 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; 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 To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: docs/76333: EOF indicator can be cleared by not only clearerr(3). X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Yoshihiko Sarumaru List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Jan 2005 07:30:25 -0000 >Number: 76333 >Category: docs >Synopsis: EOF indicator can be cleared by not only clearerr(3). >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-doc >State: open >Quarter: >Keywords: >Date-Required: >Class: doc-bug >Submitter-Id: current-users >Arrival-Date: Mon Jan 17 07:30:24 GMT 2005 >Closed-Date: >Last-Modified: >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: >Unformatted: