Date: Mon, 13 Aug 2001 17:13:17 +0400 From: "Andrey A. Chernov" <ache@nagual.pp.ru> To: Joseph Koshy <jkoshy@FreeBSD.ORG> Cc: arch@FreeBSD.ORG Subject: Re: CFR: fseek<0 + feof error (with fix) Message-ID: <20010813171314.A76817@nagual.pp.ru> In-Reply-To: <20010813112848.ABF4437B406@hub.freebsd.org> References: <20010813145956.A75227@nagual.pp.ru> <20010813112848.ABF4437B406@hub.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Aug 13, 2001 at 04:28:48 -0700, Joseph Koshy wrote: > > Allowing negative file offsets for character special files is not actually > prohibited by the standards, IIRC, since this behaviour is termed > 'implementation dependent'. Perhaps someone with more standards expertise > than I have could clarify. Yet once, to make the difference more visible. What POSIX says about lseek(): [EINVAL] The whence argument is not a proper value, or the resulting file offset would be negative for a regular file, block special file, or directory. And now what about fseek{o}(): [EINVAL] The whence argument is invalid. The resulting file-position indicator would be set to a negative value. i.e. for all cases. BTW, for example I have OS/2 gcc result for test program I post and fseek() is POSIXed there, not so broken as ours. -- Andrey A. Chernov http://ache.pp.ru/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010813171314.A76817>