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
...@@ -27,54 +27,55 @@ LOCAL_C_INCLUDES += $(LOCAL_PATH)/ocgcore/lua ...@@ -27,54 +27,55 @@ LOCAL_C_INCLUDES += $(LOCAL_PATH)/ocgcore/lua
LOCAL_C_INCLUDES += $(LOCAL_PATH)/ocgcore/sqlite3 LOCAL_C_INCLUDES += $(LOCAL_PATH)/ocgcore/sqlite3
LOCAL_SRC_FILES := ocgcore/lua/lapi.c \ LOCAL_SRC_FILES := ocgcore/lua/lapi.c \
ocgcore/lua/lauxlib.c \ ocgcore/lua/lauxlib.c \
ocgcore/lua/lbaselib.c \ ocgcore/lua/lbaselib.c \
ocgcore/lua/lbitlib.c \ ocgcore/lua/lbitlib.c \
ocgcore/lua/lcode.c \ ocgcore/lua/lcode.c \
ocgcore/lua/lcorolib.c \ ocgcore/lua/lcorolib.c \
ocgcore/lua/lctype.c \ ocgcore/lua/lctype.c \
ocgcore/lua/ldblib.c \ ocgcore/lua/ldblib.c \
ocgcore/lua/ldebug.c \ ocgcore/lua/ldebug.c \
ocgcore/lua/ldo.c \ ocgcore/lua/ldo.c \
ocgcore/lua/ldump.c \ ocgcore/lua/ldump.c \
ocgcore/lua/lfunc.c \ ocgcore/lua/lfunc.c \
ocgcore/lua/lgc.c \ ocgcore/lua/lgc.c \
ocgcore/lua/linit.c \ ocgcore/lua/linit.c \
ocgcore/lua/liolib.c \ ocgcore/lua/liolib.c \
ocgcore/lua/llex.c \ ocgcore/lua/llex.c \
ocgcore/lua/lmathlib.c \ ocgcore/lua/lmathlib.c \
ocgcore/lua/lmem.c \ ocgcore/lua/lmem.c \
ocgcore/lua/loadlib.c \ ocgcore/lua/loadlib.c \
ocgcore/lua/lobject.c \ ocgcore/lua/lobject.c \
ocgcore/lua/lopcodes.c \ ocgcore/lua/lopcodes.c \
ocgcore/lua/loslib.c \ ocgcore/lua/loslib.c \
ocgcore/lua/lparser.c \ ocgcore/lua/lparser.c \
ocgcore/lua/lstate.c \ ocgcore/lua/lstate.c \
ocgcore/lua/lstring.c \ ocgcore/lua/lstring.c \
ocgcore/lua/lstrlib.c \ ocgcore/lua/lstrlib.c \
ocgcore/lua/ltable.c \ ocgcore/lua/ltable.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/lvm.c \ ocgcore/lua/lutf8lib.c \
ocgcore/lua/lzio.c \ ocgcore/lua/lvm.c \
ocgcore/card.cpp \ ocgcore/lua/lzio.c \
ocgcore/duel.cpp \ ocgcore/card.cpp \
ocgcore/effect.cpp \ ocgcore/duel.cpp \
ocgcore/field.cpp \ ocgcore/effect.cpp \
ocgcore/group.cpp \ ocgcore/field.cpp \
ocgcore/interpreter.cpp \ ocgcore/group.cpp \
ocgcore/libcard.cpp \ ocgcore/interpreter.cpp \
ocgcore/libdebug.cpp \ ocgcore/libcard.cpp \
ocgcore/libduel.cpp \ ocgcore/libdebug.cpp \
ocgcore/libeffect.cpp \ ocgcore/libduel.cpp \
ocgcore/libgroup.cpp \ ocgcore/libeffect.cpp \
ocgcore/mem.cpp \ ocgcore/libgroup.cpp \
ocgcore/ocgapi.cpp \ ocgcore/mem.cpp \
ocgcore/operations.cpp \ ocgcore/ocgapi.cpp \
ocgcore/playerop.cpp \ ocgcore/operations.cpp \
ocgcore/processor.cpp \ ocgcore/playerop.cpp \
ocgcore/scriptlib.cpp \ ocgcore/processor.cpp \
ocgcore/scriptlib.cpp \
LOCAL_LDLIBS := -llog LOCAL_LDLIBS := -llog
include $(BUILD_SHARED_LIBRARY) include $(BUILD_SHARED_LIBRARY)
......
...@@ -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