Commit e5126aaf authored by Unicorn369's avatar Unicorn369

fix

parent 96c8ecb7
...@@ -9,12 +9,12 @@ include $(CLEAR_VARS) ...@@ -9,12 +9,12 @@ include $(CLEAR_VARS)
LOCAL_MODULE := ocgcore LOCAL_MODULE := ocgcore
ifndef NDEBUG ifndef NDEBUG
LOCAL_CFLAGS += -g -D_DEBUG LOCAL_CFLAGS += -g -D_DEBUG -DLUA_USE_POSIX -DLUA_COMPAT_5_2
else else
LOCAL_CFLAGS += -fexpensive-optimizations -O3 LOCAL_CFLAGS += -fexpensive-optimizations -O3 -DLUA_USE_POSIX -DLUA_COMPAT_5_2
endif endif
ifeq ($(TARGET_ARCH_ABI),x86) ifeq ($(TARGET_ARCH_ABI), x86)
LOCAL_CFLAGS += -fno-stack-protector LOCAL_CFLAGS += -fno-stack-protector
endif endif
...@@ -56,6 +56,7 @@ LOCAL_SRC_FILES := ocgcore/lua/lapi.c \ ...@@ -56,6 +56,7 @@ LOCAL_SRC_FILES := ocgcore/lua/lapi.c \
ocgcore/lua/ltablib.c \ ocgcore/lua/ltablib.c \
ocgcore/lua/ltm.c \ ocgcore/lua/ltm.c \
ocgcore/lua/lundump.c \ ocgcore/lua/lundump.c \
ocgcore/lua/lutf8lib.c \
ocgcore/lua/lvm.c \ ocgcore/lua/lvm.c \
ocgcore/lua/lzio.c \ ocgcore/lua/lzio.c \
ocgcore/card.cpp \ ocgcore/card.cpp \
......
...@@ -184,8 +184,11 @@ static int math_log (lua_State *L) { ...@@ -184,8 +184,11 @@ static int math_log (lua_State *L) {
else { else {
lua_Number base = luaL_checknumber(L, 2); lua_Number base = luaL_checknumber(L, 2);
#if !defined(LUA_USE_C89) #if !defined(LUA_USE_C89)
#if __ANDROID__
#else
if (base == l_mathop(2.0)) if (base == l_mathop(2.0))
res = l_mathop(log2)(x); else res = l_mathop(log2)(x); else
#endif
#endif #endif
if (base == l_mathop(10.0)) if (base == l_mathop(10.0))
res = l_mathop(log10)(x); res = l_mathop(log10)(x);
......
...@@ -677,8 +677,12 @@ ...@@ -677,8 +677,12 @@
** macro must include header 'locale.h'.) ** macro must include header 'locale.h'.)
*/ */
#if !defined(lua_getlocaledecpoint) #if !defined(lua_getlocaledecpoint)
#if __ANDROID__
#define lua_getlocaledecpoint() ('.')
#else
#define lua_getlocaledecpoint() (localeconv()->decimal_point[0]) #define lua_getlocaledecpoint() (localeconv()->decimal_point[0])
#endif #endif
#endif
/* }================================================================== */ /* }================================================================== */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment