Page MenuHomeFreeBSD
Paste P206

Alternate fix
ActivePublic

Authored by imp on Aug 14 2018, 6:05 PM.
Tags
None
Referenced Files
F3651603: Alternate fix
Aug 14 2018, 6:05 PM
Subscribers
None
diff --git a/contrib/lua/src/lstrlib.c b/contrib/lua/src/lstrlib.c
index d6aac616add5..7471345ae7b1 100644
--- a/contrib/lua/src/lstrlib.c
+++ b/contrib/lua/src/lstrlib.c
@@ -928,6 +928,7 @@ static void addquoted (luaL_Buffer *b, const char *s, size_t len) {
}
+#if LUA_FLOAT_TYPE != LUA_FLOAT_INT64
/*
** Ensures the 'buff' string uses a dot as the radix character.
*/
@@ -938,7 +939,7 @@ static void checkdp (char *buff, int nb) {
if (ppoint) *ppoint = '.'; /* change it to a dot */
}
}
-
+#endif
static void addliteral (lua_State *L, luaL_Buffer *b, int arg) {
switch (lua_type(L, arg)) {
diff --git a/contrib/lua/src/lvm.c b/contrib/lua/src/lvm.c
index 84ade6b2fa6c..9040b04a3d11 100644
--- a/contrib/lua/src/lvm.c
+++ b/contrib/lua/src/lvm.c
@@ -41,7 +41,7 @@
** float without rounding. Used in comparisons. Left undefined if
** all integers fit in a float precisely.
*/
-#if !defined(l_intfitsf)
+#if !defined(l_intfitsf) && LUA_FLOAT_TYPE != LUA_FLOAT_INT64
/* number of bits in the mantissa of a float */
#define NBM (l_mathlim(MANT_DIG))
diff --git a/stand/liblua/luaconf.h b/stand/liblua/luaconf.h
index 7ed0e85db3a1..6eee830bc404 100644
--- a/stand/liblua/luaconf.h
+++ b/stand/liblua/luaconf.h
@@ -450,9 +450,7 @@
** and therefore its conversion to float may have an ill-defined value.)
*/
#define lua_numbertointeger(n,p) \
- ((n) >= (LUA_NUMBER)(LUA_MININTEGER) && \
- (n) < -(LUA_NUMBER)(LUA_MININTEGER) && \
- (*(p) = (LUA_INTEGER)(n), 1))
+ (*(p) = (LUA_INTEGER)(n), 1)
/* now the variable definitions */

Event Timeline

imp created this object in space S1 Global.