Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 1 Sep 2001 03:37:27 +0400
From:      "Andrey A. Chernov" <ache@nagual.pp.ru>
To:        Garrett Wollman <wollman@khavrinen.lcs.mit.edu>
Cc:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/lib/libc/stdio ftell.c ungetc.c
Message-ID:  <20010901033723.B24264@nagual.pp.ru>
In-Reply-To: <200108312327.f7VNRMs83151@khavrinen.lcs.mit.edu>
References:  <200108311950.f7VJoPd48683@freefall.freebsd.org> <mu9n14g2bq8.wl@cx281057-a.irvn1.occa.home.com> <20010901010738.B21988@nagual.pp.ru> <20010901024748.A23318@nagual.pp.ru> <200108312327.f7VNRMs83151@khavrinen.lcs.mit.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Aug 31, 2001 at 19:27:22 -0400, Garrett Wollman wrote:
> fseek() and ftell() are incorporated into POSIX from ISO C, and POSIX
> defers to the C definition of these interfaces.

But they are sometimes different from ISO C and POSIX notes so.

> > It says "otherwise", i.e. ftell() can't return -1 normally, so we are in
> > conflict.
> 
> No, it does not say anything remotely like that.

I was short and not explain whole picture.

Maybe all "and" conditions there arranged in whole block, not -1 condition
only, but in all such cases (when return code for error and normal cases
is equal) POSIX recommend to test errno value and NOT return code. All
apps I saw test ftell() return code and not errno value. Moreover,
fseek(ftell()) is impossible if ftell() return something negative due to
disabling negative offsets for fseek() per POSIX. All it means that
ftell() can't return something negative in normal case.

-- 
Andrey A. Chernov
http://ache.pp.ru/

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010901033723.B24264>