diff --git a/components/lua/lua-5.1/host/luac.c b/components/lua/lua-5.1/host/luac.c index 62e0f38b..c57c8272 100644 --- a/components/lua/lua-5.1/host/luac.c +++ b/components/lua/lua-5.1/host/luac.c @@ -147,7 +147,7 @@ static int doargs(int argc, char* argv[]) } if (version) { - printf("%s %s\n",LUA_RELEASE,LUA_COPYRIGHT); + printf("%s %s [%s]\n",LUA_RELEASE,LUA_COPYRIGHT,XLUA_OPT_STR); if (version==argc-1) exit(EXIT_SUCCESS); } return i; diff --git a/components/lua/lua-5.1/luaconf.h b/components/lua/lua-5.1/luaconf.h index 2a9bbcf8..a318ff63 100644 --- a/components/lua/lua-5.1/luaconf.h +++ b/components/lua/lua-5.1/luaconf.h @@ -875,4 +875,10 @@ union luai_Cast { double l_d; long l_l; }; #define LUA_DEBUG_HOOK lua_debugbreak +#if defined(CONFIG_LUA_NUMBER_INTEGRAL) +# define XLUA_OPT_STR "5.1-integral" +#else +# define XLUA_OPT_STR "5.1-doublefp" +#endif + #endif diff --git a/components/lua/lua-5.3/host/luac.c b/components/lua/lua-5.3/host/luac.c index 02a55389..60acd3e6 100644 --- a/components/lua/lua-5.3/host/luac.c +++ b/components/lua/lua-5.3/host/luac.c @@ -161,7 +161,7 @@ static int doargs(int argc, char *argv[]) { argv[--i] = Output; } if (version) { - printf("%s\n", LUA_COPYRIGHT); + printf("%s [%s]\n", LUA_COPYRIGHT, XLUA_OPT_STR); if (version == argc - 1) exit(EXIT_SUCCESS); } return i; diff --git a/components/lua/lua-5.3/lua.c b/components/lua/lua-5.3/lua.c index c06fcc35..599c850e 100644 --- a/components/lua/lua-5.3/lua.c +++ b/components/lua/lua-5.3/lua.c @@ -244,8 +244,8 @@ static int pmain (lua_State *L) { print_version(L); } #else - printf("\n%s build %s powered by %s on IDF %s\n", - NODE_VERSION, BUILD_DATE, LUA_RELEASE, IDF_VER); + printf("\n%s build %s powered by %s [%s] on IDF %s\n", + NODE_VERSION, BUILD_DATE, LUA_RELEASE, XLUA_OPT_STR, IDF_VER); #endif /* * And last of all, kick off application initialisation. Note that if diff --git a/components/lua/lua-5.3/luaconf.h b/components/lua/lua-5.3/luaconf.h index a7089da2..cb5f9b41 100644 --- a/components/lua/lua-5.3/luaconf.h +++ b/components/lua/lua-5.3/luaconf.h @@ -441,4 +441,16 @@ #define LUA_DEBUG_HOOK lua_debugbreak +#if defined(CONFIG_LUA_NUMBER_INT64) +# define XLUA_INT_OPT "int64" +#else +# define XLUA_INT_OPT "int32" +#endif +#if defined(CONFIG_LUA_NUMBER_DOUBLE) +# define XLUA_FLOAT_OPT "doublefp" +#else +# define XLUA_FLOAT_OPT "singlefp" +#endif +#define XLUA_OPT_STR "5.3-" XLUA_INT_OPT "-" XLUA_FLOAT_OPT + #endif