Sender: nate AT cartsys DOT com Message-ID: <36B4B676.504C69C8@cartsys.com> Date: Sun, 31 Jan 1999 12:00:54 -0800 From: Nate Eldredge X-Mailer: Mozilla 4.08 [en] (X11; I; Linux 2.0.36 i586) MIME-Version: 1.0 To: djgpp-workers AT delorie DOT com CC: Martin Str|mberg Subject: Re: tell() and 2^31 file sizes References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp-workers AT delorie DOT com Eli Zaretskii wrote: > > On Sun, 31 Jan 1999, Martin Str|mberg wrote: > > > What should tell() and friends return when the file pointer is beyond > > 2^31? -1? And set errno to what? > > I think it should return -1 and set errno to ENOSYS. > > > Do we need a _ltell() or _lltell()? > > I don't know. Do Linux and Solaris have something like that? I think `tell' is a DOS-ism. I can't find any reference to it in Linux (it's not in libc.so, nor is it a system call). The file position is fetched by lseek(fd, 0, SEEK_CUR) (or `_llseek' as the case may be), and that's how `ftell' et al handle it. So there's no precedent established there. -- Nate Eldredge nate AT cartsys DOT com