On 29/07/2011 14.56, KHMan wrote:
On 7/29/2011 7:47 PM, Lorenzo Donati wrote:
On 27/07/2011 23.10, Luiz Henrique de Figueiredo wrote:
[snipped all]
So there must be some strange combination of compiler flags in the
standard makefile that makes GCC do the wrong thing for %lld in
printf.
I also checked with DependencyWalker that test.exe uses the same
runtime (only msvcrt.dll). So it seems that it isn't msvcrt's
fault either.
[snip]
Adding -D__USE_MINGW_ANSI_STDIO into SYSCFLAGS in the Makefile
will give
the proper 'll' result, after fixing the LUA_WIN defines in
luaconf.h to
include LUA_USE_LONGLONG. This pulls in a more complete *printf
from
mingwex.
That worked! Thank you very much KHman!
I already tried the LUA_USE_LONG_LONG path, but alone it wasn't
enough.
Just for reference I attach a patch with the mods that worked for me.
BTW I wonder if this issue is going to be fixed in some way in
5.2.0. Lua team hasn't commented on the subject so I wonder
whether it is considered a bug to be squashed in the official
distro, or it is to be viewed simply as a "platform idiosyncrasy"
to be coped with downstream.