Created attachment 189165 [details]
Unbreak with lua53 right way
Currently luaexpat fails to build against lua53 due to incorrect INT definition, LUA_INT_LONG doesn't affect at all int/long variations.
But LUA_32BITS do it right way, and widely used in other lua-based ports
Does this still play nice with Lua 5.1?
(In reply to David Thiel from comment #1)
Yes, this solution works with lua51 too.
AFAIR, most distros build 3dparty lua components with LUA_32BITS
A commit references this bug:
Date: Fri Jan 12 21:48:52 UTC 2018
New revision: 458877
Correctly unbreak with lua53.
Submitted by: fluffy
Using LUA_32BITS is always the wrong fix. Always. It makes the module incompatible with the ABI of the Lua interpreter it's linked against, so that if it works it's only by chance.
The error here is happening due to the use of strict ANSI (-ansi) without specifying -std=c99. This breaks the logic in luaconf.h, which needs to get the same result as it did when building the Lua interpreter itself.
It's easy to demonstrate that the module fails its own test scripts when built with LUA_32BITS and passes if built with -std=c99 instead.
(In reply to andrew from comment #5)
I have opened a new bug for this: