[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: More thoughts on Lua 5.2
- From: Rob Kendrick <lua-l@...>
- Date: Sun, 24 Feb 2008 23:19:40 +0000
On Fri, 2008-02-22 at 22:44 +1100, Duck wrote:
> >Er, shouldn't the C library be able to handle
> >large files using FILE?
>
> Depends. fseek() takes a long (i.e. a signed long) as the file offset, so
> if long is 32-bits then you can't get past 2GB-1.
>
> Anyway, a default build of Lua on my 32-bit Linux has a 2GB-1 size limit
> on files it can process. (My QEMU virtual machine disk images are often
> bigger than that.)
Well, you can: you use fseek(..., SEEK_CUR); iteratively and keep track
of the pointer yourself.
B.