editors/pragtical: fix build on powerpc*

1. On powerpc:
../src/api/utf8.c:854:22: error: use of undeclared identifier 'INT_MAX'
  854 |   if (pose - posi >= INT_MAX)  /* (lua_Integer -> int) overflow? */
      |                      ^
2. Also set USES=luajit to use luajit-openresty on powerpc64*.
This commit is contained in:
Piotr Kubaj 2025-01-21 22:03:42 +01:00
parent 5fd53d1421
commit a0f1ff5a4e
2 changed files with 11 additions and 1 deletions

View file

@ -31,7 +31,7 @@ OPTIONS_DEFAULT= JIT
OPTIONS_SUB= yes OPTIONS_SUB= yes
JIT_DESC= Use Lua JIT compiler JIT_DESC= Use Lua JIT compiler
JIT_LIB_DEPENDS= libluajit-5.1.so:lang/luajit-devel JIT_USES= luajit
JIT_USES_OFF= lua:54 JIT_USES_OFF= lua:54
JIT_MESON_OFF= -Djit=false JIT_MESON_OFF= -Djit=false

View file

@ -0,0 +1,10 @@
--- src/api/utf8.c.orig 2025-01-21 19:20:49 UTC
+++ src/api/utf8.c
@@ -29,6 +29,7 @@
#include <lualib.h>
#include <assert.h>
+#include <limits.h>
#include <string.h>
#include <stdint.h>
#include <stdlib.h>