Commit e5126aaf authored by Unicorn369's avatar Unicorn369

fix

parent 96c8ecb7
......@@ -9,12 +9,12 @@ include $(CLEAR_VARS)
LOCAL_MODULE := ocgcore
ifndef NDEBUG
LOCAL_CFLAGS += -g -D_DEBUG
LOCAL_CFLAGS += -g -D_DEBUG -DLUA_USE_POSIX -DLUA_COMPAT_5_2
else
LOCAL_CFLAGS += -fexpensive-optimizations -O3
LOCAL_CFLAGS += -fexpensive-optimizations -O3 -DLUA_USE_POSIX -DLUA_COMPAT_5_2
endif
ifeq ($(TARGET_ARCH_ABI),x86)
ifeq ($(TARGET_ARCH_ABI), x86)
LOCAL_CFLAGS += -fno-stack-protector
endif
......@@ -56,6 +56,7 @@ LOCAL_SRC_FILES := ocgcore/lua/lapi.c \
ocgcore/lua/ltablib.c \
ocgcore/lua/ltm.c \
ocgcore/lua/lundump.c \
ocgcore/lua/lutf8lib.c \
ocgcore/lua/lvm.c \
ocgcore/lua/lzio.c \
ocgcore/card.cpp \
......
......@@ -184,8 +184,11 @@ static int math_log (lua_State *L) {
else {
lua_Number base = luaL_checknumber(L, 2);
#if !defined(LUA_USE_C89)
#if __ANDROID__
#else
if (base == l_mathop(2.0))
res = l_mathop(log2)(x); else
#endif
#endif
if (base == l_mathop(10.0))
res = l_mathop(log10)(x);
......
......@@ -677,8 +677,12 @@
** macro must include header 'locale.h'.)
*/
#if !defined(lua_getlocaledecpoint)
#if __ANDROID__
#define lua_getlocaledecpoint() ('.')
#else
#define lua_getlocaledecpoint() (localeconv()->decimal_point[0])
#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