diff options
author | Miodrag Milanovic <mmicko@gmail.com> | 2015-01-10 15:06:17 +0100 |
---|---|---|
committer | Miodrag Milanovic <mmicko@gmail.com> | 2015-01-10 15:06:17 +0100 |
commit | 022e6c7a5bf7a2046a0540022c5aab999d7d7cf4 (patch) | |
tree | 85e108fc9ed8221dce90ae990e7129b2d7475011 | |
parent | b3382b22d32a3583359ba8125a7311c7db30defe (diff) |
Fixed LUA compile
-rw-r--r-- | 3rdparty/lsqlite3/lsqlite3.c | 4 | ||||
-rw-r--r-- | 3rdparty/lua/src/liolib.c | 2 | ||||
-rw-r--r-- | 3rdparty/lua/src/lobject.c | 2 | ||||
-rw-r--r-- | 3rdparty/lua/src/loslib.c | 8 | ||||
-rw-r--r-- | 3rdparty/lua/src/lvm.c | 2 | ||||
-rw-r--r-- | makefile | 1 | ||||
-rw-r--r-- | src/emu/luaengine.c | 2 | ||||
-rw-r--r-- | src/emu/luaengine.h | 2 |
8 files changed, 12 insertions, 11 deletions
diff --git a/3rdparty/lsqlite3/lsqlite3.c b/3rdparty/lsqlite3/lsqlite3.c index 34f4ca573f0..5c11aa31437 100644 --- a/3rdparty/lsqlite3/lsqlite3.c +++ b/3rdparty/lsqlite3/lsqlite3.c @@ -31,8 +31,8 @@ #include <assert.h> #define LUA_LIB -#include "lua/lua.h" -#include "lua/lauxlib.h" +#include "lua.h" +#include "lauxlib.h" #if LUA_VERSION_NUM > 501 // diff --git a/3rdparty/lua/src/liolib.c b/3rdparty/lua/src/liolib.c index 2a4ec4aa344..ab89e3508f4 100644 --- a/3rdparty/lua/src/liolib.c +++ b/3rdparty/lua/src/liolib.c @@ -556,7 +556,7 @@ static int f_seek (lua_State *L) { if (op) return luaL_fileresult(L, 0, NULL); /* error */ else { - lua_pushnumber(L, (lua_Number)l_ftell(f)); + lua_pushnumber(L, (lua_Number)(1.0 * l_ftell(f))); return 1; } } diff --git a/3rdparty/lua/src/lobject.c b/3rdparty/lua/src/lobject.c index 882d994d413..5def409f05d 100644 --- a/3rdparty/lua/src/lobject.c +++ b/3rdparty/lua/src/lobject.c @@ -104,7 +104,7 @@ static int isneg (const char **s) { static lua_Number readhexa (const char **s, lua_Number r, int *count) { for (; lisxdigit(cast_uchar(**s)); (*s)++) { /* read integer part */ - r = (r * cast_num(16.0)) + cast_num(luaO_hexavalue(cast_uchar(**s))); + r = (r * cast_num(16.0)) + cast_num(1.0*luaO_hexavalue(cast_uchar(**s))); (*count)++; } return r; diff --git a/3rdparty/lua/src/loslib.c b/3rdparty/lua/src/loslib.c index 052ba174413..41aeeef81d1 100644 --- a/3rdparty/lua/src/loslib.c +++ b/3rdparty/lua/src/loslib.c @@ -120,7 +120,7 @@ static int os_getenv (lua_State *L) { static int os_clock (lua_State *L) { - lua_pushnumber(L, ((lua_Number)clock())/(lua_Number)CLOCKS_PER_SEC); + lua_pushnumber(L, ((lua_Number)(1.0*clock()))/(lua_Number)CLOCKS_PER_SEC); return 1; } @@ -194,7 +194,7 @@ static const char *checkoption (lua_State *L, const char *conv, char *buff) { static int os_date (lua_State *L) { const char *s = luaL_optstring(L, 1, "%c"); - time_t t = luaL_opt(L, (time_t)luaL_checknumber, 2, time(NULL)); + time_t t = luaL_opt(L, luaL_checknumber, 2, time(NULL)); struct tm tmr, *stm; if (*s == '!') { /* UTC? */ stm = l_gmtime(&t, &tmr); @@ -264,8 +264,8 @@ static int os_time (lua_State *L) { static int os_difftime (lua_State *L) { - lua_pushnumber(L, difftime((time_t)(luaL_checknumber(L, 1)), - (time_t)(luaL_optnumber(L, 2, 0)))); + lua_pushnumber(L, difftime((luaL_checknumber(L, 1)), + (luaL_optnumber(L, 2, 0)))); return 1; } diff --git a/3rdparty/lua/src/lvm.c b/3rdparty/lua/src/lvm.c index 141b9fd19c3..25fa82e7137 100644 --- a/3rdparty/lua/src/lvm.c +++ b/3rdparty/lua/src/lvm.c @@ -339,7 +339,7 @@ void luaV_objlen (lua_State *L, StkId ra, const TValue *rb) { Table *h = hvalue(rb); tm = fasttm(L, h->metatable, TM_LEN); if (tm) break; /* metamethod? break switch to call it */ - setnvalue(ra, cast_num(luaH_getn(h))); /* else primitive len */ + setnvalue(ra, cast_num(1.0*luaH_getn(h))); /* else primitive len */ return; } case LUA_TSTRING: { @@ -643,6 +643,7 @@ INCPATH += \ -I$(SRC)/lib/util \ -I$(SRC)/lib \ -I$(3RDPARTY) \ + -I$(3RDPARTY)/lua/src \ -I$(SRC)/osd \ -I$(SRC)/osd/$(OSD) \ diff --git a/src/emu/luaengine.c b/src/emu/luaengine.c index bf854d2efda..6db3a48b2f2 100644 --- a/src/emu/luaengine.c +++ b/src/emu/luaengine.c @@ -9,7 +9,7 @@ ***************************************************************************/ #include <limits> -#include "lua/lua.hpp" +#include "lua.hpp" #include "luabridge/Source/LuaBridge/LuaBridge.h" #include <signal.h> #include "emu.h" diff --git a/src/emu/luaengine.h b/src/emu/luaengine.h index 267b3de8c60..6206b426a36 100644 --- a/src/emu/luaengine.h +++ b/src/emu/luaengine.h @@ -24,7 +24,7 @@ #undef None #endif -#include "lua/lua.hpp" +#include "lua.hpp" #include "luabridge/Source/LuaBridge/LuaBridge.h" struct lua_State; |