[Midnightbsd-cvs] [MidnightBSD/src] c46e18: stand/liblua: fix loader build with lua 5.4.7 (res...
Lucas Holt
noreply at github.com
Thu Jun 11 11:45:15 EDT 2026
Branch: refs/heads/stable/4.1
Home: https://github.com/MidnightBSD/src
Commit: c46e188093a0cf43329bf519a7ddb35eb00627ba
https://github.com/MidnightBSD/src/commit/c46e188093a0cf43329bf519a7ddb35eb00627ba
Author: Lucas Holt <luke at foolishgames.com>
Date: 2026-06-11 (Thu, 11 Jun 2026)
Changed paths:
M contrib/lua/src/lcode.c
M contrib/lua/src/lstrlib.c
M stand/liblua/luaconf.h
Log Message:
-----------
stand/liblua: fix loader build with lua 5.4.7 (restore LUA_AVOID_FLOAT)
The lua 5.4.7 vendor import reverted the local patches that keep the
bootloader's float-free (LUA_FLOAT_INT64) Lua build working, and the
INT64 hack in stand/liblua/luaconf.h still defined the old 5.3-era
l_mathlim macro instead of the 5.4 l_floatatt name. As a result the
loader failed to build (l_floatatt/MANT_DIG undeclared, the invalid
token lstd_1.0 from l_mathop(ldexp)(l_mathop(1.0), ...), and float/
double/HUGE_VAL code tripping the loader's keyword poison).
Restore the FreeBSD LUA_AVOID_FLOAT mechanism:
- stand/liblua/luaconf.h: rename l_mathlim -> l_floatatt (used by
lstrlib.c MAX_ITEMF and lvm.c NBM) and #define LUA_AVOID_FLOAT for the
LUA_FLOAT_INT64 build.
- contrib/lua/src/lcode.c: guard the float-key path in luaK_numberK.
- contrib/lua/src/lstrlib.c: guard the C float/double pack/unpack,
quotefloat, and %f format paths.
Verified by building stand/liblua for amd64.
Co-Authored-By: Claude Opus 4.8 <noreply at anthropic.com>
To unsubscribe from these emails, change your notification settings at https://github.com/MidnightBSD/src/settings/notifications
More information about the Midnightbsd-cvs
mailing list