lua-l archive
[
Date Prev
][
Date Next
][
Thread Prev
][
Thread Next
] [
Date Index
] [
Thread Index
]
Subject
:
[BUG] Lua 5.2 on PowerPC64
From
: Elizabeth Kammer <eakammer@
...
>
Date
: Wed, 31 May 2017 10:16:31 -0700
Hi, I've run into issues attempting to run Lua on PowerPC64, resulting in a the following ERROR:
PANIC: unprotected error in call to Lua API (bad conversion number->int; must recompile Lua with proper settings)
PowerPC64 can now be Little Endian, so I believe the issue can be resolved by updating luaconf.h to check for endianness as follows:
<code>
/* pentium 64 bits? */
#elif defined(__x86_64) /* }{ */
#define LUA_IEEE754TRICK
#define LUA_IEEEENDIAN
0
+ #elif defined(__powerpc64__) || defined(__PPC64__) /* }{ */
+
+ #define LUA_IEEE754TRICK
+
+ #if defined(__LITTLE_ENDIAN__)
+ #define LUA_IEEEENDIAN 0
+ #else
+ #define LUA_IEEEENDIAN 1
+ #endif
+
#elif defined(__POWERPC__) || defined(__ppc__) /* }{ */
</code>
Thanks,
Liz
Prev by Date:
Re: ERROR of I/O
Next by Date:
Re: Lua registry ?
Previous by thread:
Re: ERROR of I/O
Next by thread:
Question about use of local and Lua 5.2 optimization
Index(es):
Date
Thread