lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi Philipp,

>> #define l_seeknum off_t
> You should use `off64_t` here instead. `off_t` is typedefed as `long` which is 32 bit on Windows.

Good point. For some reason the result is the same, but I switch to
using off64_t here.

>> nil    "Invalid argument"    22
>> f:seek("set", -1) returned the same result. I think it's a bit
>> misleading as there is nothing wrong with the arguments I passed.

> Works fine here!

I mean that when I take Lua 5.3.1 (*without* the fix above), compile
it with mingw as 32bit app on Windows 64bit and run on a file larger
than 2G, I get

nil    "Invalid argument"    22

*With* the fix I get the correct result. Do you get a different result
from vanilla Lua 5.3.1?

> Maybe your lua.exe is picking up the wrong DLL?!

Unlikely ;). I double checked.

Paul.