diff options
| author | lneto <lneto@NetBSD.org> | 2013-12-02 04:39:10 +0000 |
|---|---|---|
| committer | lneto <lneto@NetBSD.org> | 2013-12-02 04:39:10 +0000 |
| commit | 2d33779d574f6f4ca78cdf54810b407914673c9d (patch) | |
| tree | 2a4a13a58b1bd4a14013e2b9d8c8752912c55359 /sys/modules/lua | |
| parent | 0c89781627a24374f9e5194d3dcfc563fd30785a (diff) | |
changed lua_Number to int64_t
Diffstat (limited to 'sys/modules/lua')
| -rw-r--r-- | sys/modules/lua/Makefile | 5 | ||||
| -rw-r--r-- | sys/modules/lua/luaconf.h | 11 |
2 files changed, 8 insertions, 8 deletions
diff --git a/sys/modules/lua/Makefile b/sys/modules/lua/Makefile index 366ec46ee5d..b4ab3820b8a 100644 --- a/sys/modules/lua/Makefile +++ b/sys/modules/lua/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2013/10/31 16:50:14 mbalmer Exp $ +# $NetBSD: Makefile,v 1.3 2013/12/02 04:39:10 lneto Exp $ .include "../Makefile.inc" @@ -44,6 +44,7 @@ SRCS+= strcspn.c \ CFLAGS+= -include ${.CURDIR}/luaconf.h -CPPFLAGS+= -I${S}/../external/mit/lua/dist/src +CPPFLAGS+= -I${S}/../external/mit/lua/dist/src \ + -I${S}/sys .include <bsd.kmodule.mk> diff --git a/sys/modules/lua/luaconf.h b/sys/modules/lua/luaconf.h index c5655a37f5a..cd61c03e9c3 100644 --- a/sys/modules/lua/luaconf.h +++ b/sys/modules/lua/luaconf.h @@ -1,5 +1,5 @@ /* -** $Id: luaconf.h,v 1.1 2013/10/16 19:44:57 mbalmer Exp $ +** $Id: luaconf.h,v 1.2 2013/12/02 04:39:10 lneto Exp $ ** Configuration file for Lua ** See Copyright Notice in lua.h */ @@ -505,8 +505,7 @@ */ #ifdef _KERNEL -#define LUA_NUMBER long long - +#define LUA_NUMBER int64_t #else #define LUA_NUMBER_DOUBLE #define LUA_NUMBER double @@ -528,9 +527,9 @@ */ #ifdef _KERNEL -#define LUA_NUMBER_SCAN "%lld" -#define LUA_NUMBER_FMT "%lld" -#define lua_str2number(s,p) strtoll((s), (p), 10) +#define LUA_NUMBER_SCAN "%" SCNd64 +#define LUA_NUMBER_FMT "%" PRId64 +#define lua_str2number(s,p) ((int64_t) strtoimax((s), (p), 10)) #else #define LUA_NUMBER_SCAN "%lf" #define LUA_NUMBER_FMT "%.14g" |
