Hi Enrico,

Thanks for the heads up on this.

> On 5 Jul 2015, at 16:07, Enrico <notificati...@github.com> wrote:
> 
> The bug was filed on the Debian package, 
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=789534
> 
> The Debian package is still the old version 31, but looking at the changelog 
> I could not see this particular issue being fixed.

Unfortunately, this is a limitation of Lua 5.1 (a 12 year old codebase, albeit 
maintained with bug fixes until 3 years ago), which has but a single numeric 
type, where even integers are represented inside Lua itself as a 64bit double; 
i.e. only 53 bits of precision, which is not large enough to accurately contain 
any 64bit integers that use the 11 MSB.

Moving debian up to Lua 5.3, which represents integers as a 64bit type where 
available (either int or long, as required) and floating point values 
separately as doubles, will provide luaposix with enough bits to represent 
pid_t, ino_t and other 64bit types on modern machines using a lua_Integer.

I am not sure whether keeping up compatibility with PUC Rio Lua 5.1 is such a 
good idea given this, and several other shortcomings that testing has revealed. 
That said, an ugly solution with Lua 5.1 compatibility might be to wrap all 
potentially 64bit C types used by luaposix in a Lua userdata that displays as a 
hex-string and can round-trip the C->Lua->C API successfully.  Patches along 
those lines are most welcome :)

For sure, fiddling with _FILE_OFFSET_BITS won’t help in the least.

Cheers,
Gary

--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to