From owner-svn-src-projects@FreeBSD.ORG Thu Mar 26 17:39:26 2015 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B7358611; Thu, 26 Mar 2015 17:39:26 +0000 (UTC) Received: from freebsd.czest.pl (freebsd.czest.pl [212.87.224.105]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BCF00D20; Thu, 26 Mar 2015 17:39:25 +0000 (UTC) Received: from freebsd.czest.pl (freebsd.czest.pl [212.87.224.105]) by freebsd.czest.pl (8.14.5/8.14.5) with ESMTP id t2QHR8Ee086578; Thu, 26 Mar 2015 17:27:08 GMT (envelope-from wkoszek@freebsd.czest.pl) Received: (from wkoszek@localhost) by freebsd.czest.pl (8.14.5/8.14.5/Submit) id t2QHR841086577; Thu, 26 Mar 2015 17:27:08 GMT (envelope-from wkoszek) Date: Thu, 26 Mar 2015 17:27:08 +0000 From: "Wojciech A. Koszek" To: Rui Paulo Subject: Re: svn commit: r280677 - projects/lua-bootloader/sys/contrib/lua/src Message-ID: <20150326172708.GA86549@FreeBSD.org> References: <201503260728.t2Q7SWwX002310@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <201503260728.t2Q7SWwX002310@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=2.1 required=5.0 tests=DNS_FROM_AHBL_RHSBL, RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=no version=3.3.2 X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on freebsd.czest.pl X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (freebsd.czest.pl [212.87.224.105]); Thu, 26 Mar 2015 17:27:12 +0000 (UTC) Cc: svn-src-projects@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2015 17:39:26 -0000 On Thu, Mar 26, 2015 at 07:28:32AM +0000, Rui Paulo wrote: > Author: rpaulo > Date: Thu Mar 26 07:28:32 2015 > New Revision: 280677 > URL: https://svnweb.freebsd.org/changeset/base/280677 > > Log: > Port lua to libstand. > > Rui, I appreciate you taking care of this project. Would we be willing to consider placing Lua in src/sys/... I originally requested that during GSOC, but it turned out we run out of time for this. Motivation: This would open up some new fronts for us. Thanks, Wojciech > Based on Pedro's version. > > Modified: > projects/lua-bootloader/sys/contrib/lua/src/lapi.c > projects/lua-bootloader/sys/contrib/lua/src/lauxlib.c > projects/lua-bootloader/sys/contrib/lua/src/lauxlib.h > projects/lua-bootloader/sys/contrib/lua/src/lbaselib.c > projects/lua-bootloader/sys/contrib/lua/src/lcode.c > projects/lua-bootloader/sys/contrib/lua/src/lcorolib.c > projects/lua-bootloader/sys/contrib/lua/src/ldblib.c > projects/lua-bootloader/sys/contrib/lua/src/ldebug.c > projects/lua-bootloader/sys/contrib/lua/src/ldo.c > projects/lua-bootloader/sys/contrib/lua/src/ldump.c > projects/lua-bootloader/sys/contrib/lua/src/lfunc.c > projects/lua-bootloader/sys/contrib/lua/src/lgc.c > projects/lua-bootloader/sys/contrib/lua/src/linit.c > projects/lua-bootloader/sys/contrib/lua/src/liolib.c > projects/lua-bootloader/sys/contrib/lua/src/llex.c > projects/lua-bootloader/sys/contrib/lua/src/lmathlib.c > projects/lua-bootloader/sys/contrib/lua/src/lmem.c > projects/lua-bootloader/sys/contrib/lua/src/loadlib.c > projects/lua-bootloader/sys/contrib/lua/src/lobject.c > projects/lua-bootloader/sys/contrib/lua/src/lopcodes.c > projects/lua-bootloader/sys/contrib/lua/src/loslib.c > projects/lua-bootloader/sys/contrib/lua/src/lparser.c > projects/lua-bootloader/sys/contrib/lua/src/lstate.c > projects/lua-bootloader/sys/contrib/lua/src/lstring.c > projects/lua-bootloader/sys/contrib/lua/src/lstrlib.c > projects/lua-bootloader/sys/contrib/lua/src/ltable.c > projects/lua-bootloader/sys/contrib/lua/src/ltablib.c > projects/lua-bootloader/sys/contrib/lua/src/ltm.c > projects/lua-bootloader/sys/contrib/lua/src/lua.c > projects/lua-bootloader/sys/contrib/lua/src/luac.c > projects/lua-bootloader/sys/contrib/lua/src/luaconf.h > projects/lua-bootloader/sys/contrib/lua/src/lundump.c > projects/lua-bootloader/sys/contrib/lua/src/lutf8lib.c > projects/lua-bootloader/sys/contrib/lua/src/lvm.c > projects/lua-bootloader/sys/contrib/lua/src/lzio.c > > Modified: projects/lua-bootloader/sys/contrib/lua/src/lapi.c > ============================================================================== > --- projects/lua-bootloader/sys/contrib/lua/src/lapi.c Thu Mar 26 07:27:38 2015 (r280676) > +++ projects/lua-bootloader/sys/contrib/lua/src/lapi.c Thu Mar 26 07:28:32 2015 (r280677) > @@ -9,9 +9,12 @@ > > #include "lprefix.h" > > - > +#ifdef BOOT_LUA > +#include > +#else > #include > #include > +#endif > > #include "lua.h" > > @@ -1266,5 +1269,3 @@ LUA_API void lua_upvaluejoin (lua_State > if (upisopen(*up1)) (*up1)->u.open.touched = 1; > luaC_upvalbarrier(L, *up1); > } > - > - > > Modified: projects/lua-bootloader/sys/contrib/lua/src/lauxlib.c > ============================================================================== > --- projects/lua-bootloader/sys/contrib/lua/src/lauxlib.c Thu Mar 26 07:27:38 2015 (r280676) > +++ projects/lua-bootloader/sys/contrib/lua/src/lauxlib.c Thu Mar 26 07:28:32 2015 (r280677) > @@ -9,13 +9,15 @@ > > #include "lprefix.h" > > - > +#ifdef BOOT_LUA > +#include > +#else > #include > #include > #include > #include > #include > - > +#endif > > /* This file uses only the official API of Lua. > ** Any function declared here could be written as an application function. > @@ -944,8 +946,7 @@ static void *l_alloc (void *ud, void *pt > return realloc(ptr, nsize); > } > > - > -static int panic (lua_State *L) { > +static int lpanic (lua_State *L) { > lua_writestringerror("PANIC: unprotected error in call to Lua API (%s)\n", > lua_tostring(L, -1)); > return 0; /* return to Lua to abort */ > @@ -954,7 +955,7 @@ static int panic (lua_State *L) { > > LUALIB_API lua_State *luaL_newstate (void) { > lua_State *L = lua_newstate(l_alloc, NULL); > - if (L) lua_atpanic(L, &panic); > + if (L) lua_atpanic(L, &lpanic); > return L; > } > > @@ -969,4 +970,3 @@ LUALIB_API void luaL_checkversion_ (lua_ > luaL_error(L, "version mismatch: app. needs %f, Lua core provides %f", > ver, *v); > } > - > > Modified: projects/lua-bootloader/sys/contrib/lua/src/lauxlib.h > ============================================================================== > --- projects/lua-bootloader/sys/contrib/lua/src/lauxlib.h Thu Mar 26 07:27:38 2015 (r280676) > +++ projects/lua-bootloader/sys/contrib/lua/src/lauxlib.h Thu Mar 26 07:28:32 2015 (r280677) > @@ -8,9 +8,13 @@ > #ifndef lauxlib_h > #define lauxlib_h > > - > +#ifdef BOOT_LUA > +#include > +#include > +#else > #include > #include > +#endif > > #include "lua.h" > > @@ -252,5 +256,3 @@ LUALIB_API void (luaL_openlib) (lua_Stat > > > #endif > - > - > > Modified: projects/lua-bootloader/sys/contrib/lua/src/lbaselib.c > ============================================================================== > --- projects/lua-bootloader/sys/contrib/lua/src/lbaselib.c Thu Mar 26 07:27:38 2015 (r280676) > +++ projects/lua-bootloader/sys/contrib/lua/src/lbaselib.c Thu Mar 26 07:28:32 2015 (r280677) > @@ -9,11 +9,14 @@ > > #include "lprefix.h" > > - > +#ifdef BOOT_LUA > +#include > +#else > #include > #include > #include > #include > +#endif > > #include "lua.h" > > @@ -517,4 +520,3 @@ LUAMOD_API int luaopen_base (lua_State * > lua_setfield(L, -2, "type"); > return 1; > } > - > > Modified: projects/lua-bootloader/sys/contrib/lua/src/lcode.c > ============================================================================== > --- projects/lua-bootloader/sys/contrib/lua/src/lcode.c Thu Mar 26 07:27:38 2015 (r280676) > +++ projects/lua-bootloader/sys/contrib/lua/src/lcode.c Thu Mar 26 07:28:32 2015 (r280677) > @@ -9,9 +9,13 @@ > > #include "lprefix.h" > > - > +#ifdef BOOT_LUA > +#include > +#include > +#else > #include > #include > +#endif > > #include "lua.h" > > @@ -951,4 +955,3 @@ void luaK_setlist (FuncState *fs, int ba > luaX_syntaxerror(fs->ls, "constructor too long"); > fs->freereg = base + 1; /* free registers with list values */ > } > - > > Modified: projects/lua-bootloader/sys/contrib/lua/src/lcorolib.c > ============================================================================== > --- projects/lua-bootloader/sys/contrib/lua/src/lcorolib.c Thu Mar 26 07:27:38 2015 (r280676) > +++ projects/lua-bootloader/sys/contrib/lua/src/lcorolib.c Thu Mar 26 07:28:32 2015 (r280677) > @@ -9,8 +9,11 @@ > > #include "lprefix.h" > > - > +#ifdef BOOT_LUA > +#include > +#else > #include > +#endif > > #include "lua.h" > > @@ -165,4 +168,3 @@ LUAMOD_API int luaopen_coroutine (lua_St > luaL_newlib(L, co_funcs); > return 1; > } > - > > Modified: projects/lua-bootloader/sys/contrib/lua/src/ldblib.c > ============================================================================== > --- projects/lua-bootloader/sys/contrib/lua/src/ldblib.c Thu Mar 26 07:27:38 2015 (r280676) > +++ projects/lua-bootloader/sys/contrib/lua/src/ldblib.c Thu Mar 26 07:28:32 2015 (r280677) > @@ -9,10 +9,13 @@ > > #include "lprefix.h" > > - > +#ifdef BOOT_LUA > +#include > +#else > #include > #include > #include > +#endif > > #include "lua.h" > > @@ -434,4 +437,3 @@ LUAMOD_API int luaopen_debug (lua_State > luaL_newlib(L, dblib); > return 1; > } > - > > Modified: projects/lua-bootloader/sys/contrib/lua/src/ldebug.c > ============================================================================== > --- projects/lua-bootloader/sys/contrib/lua/src/ldebug.c Thu Mar 26 07:27:38 2015 (r280676) > +++ projects/lua-bootloader/sys/contrib/lua/src/ldebug.c Thu Mar 26 07:28:32 2015 (r280677) > @@ -9,10 +9,13 @@ > > #include "lprefix.h" > > - > +#ifdef BOOT_LUA > +#include > +#else > #include > #include > #include > +#endif > > #include "lua.h" > > @@ -640,4 +643,3 @@ void luaG_traceexec (lua_State *L) { > luaD_throw(L, LUA_YIELD); > } > } > - > > Modified: projects/lua-bootloader/sys/contrib/lua/src/ldo.c > ============================================================================== > --- projects/lua-bootloader/sys/contrib/lua/src/ldo.c Thu Mar 26 07:27:38 2015 (r280676) > +++ projects/lua-bootloader/sys/contrib/lua/src/ldo.c Thu Mar 26 07:28:32 2015 (r280677) > @@ -9,10 +9,15 @@ > > #include "lprefix.h" > > - > +#ifdef BOOT_LUA > +#include > +#include > +#include > +#else > #include > #include > #include > +#endif > > #include "lua.h" > > @@ -713,5 +718,3 @@ int luaD_protectedparser (lua_State *L, > L->nny--; > return status; > } > - > - > > Modified: projects/lua-bootloader/sys/contrib/lua/src/ldump.c > ============================================================================== > --- projects/lua-bootloader/sys/contrib/lua/src/ldump.c Thu Mar 26 07:27:38 2015 (r280676) > +++ projects/lua-bootloader/sys/contrib/lua/src/ldump.c Thu Mar 26 07:28:32 2015 (r280677) > @@ -9,8 +9,11 @@ > > #include "lprefix.h" > > - > +#ifdef BOOT_LUA > +#include > +#else > #include > +#endif > > #include "lua.h" > > @@ -211,4 +214,3 @@ int luaU_dump(lua_State *L, const Proto > DumpFunction(f, NULL, &D); > return D.status; > } > - > > Modified: projects/lua-bootloader/sys/contrib/lua/src/lfunc.c > ============================================================================== > --- projects/lua-bootloader/sys/contrib/lua/src/lfunc.c Thu Mar 26 07:27:38 2015 (r280676) > +++ projects/lua-bootloader/sys/contrib/lua/src/lfunc.c Thu Mar 26 07:28:32 2015 (r280677) > @@ -9,8 +9,11 @@ > > #include "lprefix.h" > > - > +#ifdef BOOT_LUA > +#include > +#else > #include > +#endif > > #include "lua.h" > > @@ -148,4 +151,3 @@ const char *luaF_getlocalname (const Pro > } > return NULL; /* not found */ > } > - > > Modified: projects/lua-bootloader/sys/contrib/lua/src/lgc.c > ============================================================================== > --- projects/lua-bootloader/sys/contrib/lua/src/lgc.c Thu Mar 26 07:27:38 2015 (r280676) > +++ projects/lua-bootloader/sys/contrib/lua/src/lgc.c Thu Mar 26 07:28:32 2015 (r280677) > @@ -9,8 +9,11 @@ > > #include "lprefix.h" > > - > +#ifdef BOOT_LUA > +#include > +#else > #include > +#endif > > #include "lua.h" > > @@ -520,7 +523,7 @@ static lu_mem traversethread (global_Sta > StkId lim = th->stack + th->stacksize; /* real end of stack */ > for (; o < lim; o++) /* clear not-marked stack slice */ > setnilvalue(o); > - /* 'remarkupvals' may have removed thread from 'twups' list */ > + /* 'remarkupvals' may have removed thread from 'twups' list */ > if (!isintwups(th) && th->openupval != NULL) { > th->twups = g->twups; /* link it back to the list */ > g->twups = th; > @@ -1155,5 +1158,3 @@ void luaC_fullgc (lua_State *L, int isem > } > > /* }====================================================== */ > - > - > > Modified: projects/lua-bootloader/sys/contrib/lua/src/linit.c > ============================================================================== > --- projects/lua-bootloader/sys/contrib/lua/src/linit.c Thu Mar 26 07:27:38 2015 (r280676) > +++ projects/lua-bootloader/sys/contrib/lua/src/linit.c Thu Mar 26 07:28:32 2015 (r280677) > @@ -26,8 +26,11 @@ > > #include "lprefix.h" > > - > +#ifdef BOOT_LUA > +#include > +#else > #include > +#endif > > #include "lua.h" > > @@ -65,4 +68,3 @@ LUALIB_API void luaL_openlibs (lua_State > lua_pop(L, 1); /* remove lib */ > } > } > - > > Modified: projects/lua-bootloader/sys/contrib/lua/src/liolib.c > ============================================================================== > --- projects/lua-bootloader/sys/contrib/lua/src/liolib.c Thu Mar 26 07:27:38 2015 (r280676) > +++ projects/lua-bootloader/sys/contrib/lua/src/liolib.c Thu Mar 26 07:28:32 2015 (r280677) > @@ -9,13 +9,16 @@ > > #include "lprefix.h" > > - > +#ifdef BOOT_LUA > +#include > +#else > #include > #include > #include > #include > #include > #include > +#endif > > #include "lua.h" > > @@ -754,4 +757,3 @@ LUAMOD_API int luaopen_io (lua_State *L) > createstdfile(L, stderr, NULL, "stderr"); > return 1; > } > - > > Modified: projects/lua-bootloader/sys/contrib/lua/src/llex.c > ============================================================================== > --- projects/lua-bootloader/sys/contrib/lua/src/llex.c Thu Mar 26 07:27:38 2015 (r280676) > +++ projects/lua-bootloader/sys/contrib/lua/src/llex.c Thu Mar 26 07:28:32 2015 (r280677) > @@ -9,9 +9,13 @@ > > #include "lprefix.h" > > - > +#ifdef BOOT_LUA > +#include > +#include > +#else > #include > #include > +#endif > > #include "lua.h" > > @@ -599,4 +603,3 @@ int luaX_lookahead (LexState *ls) { > ls->lookahead.token = llex(ls, &ls->lookahead.seminfo); > return ls->lookahead.token; > } > - > > Modified: projects/lua-bootloader/sys/contrib/lua/src/lmathlib.c > ============================================================================== > --- projects/lua-bootloader/sys/contrib/lua/src/lmathlib.c Thu Mar 26 07:27:38 2015 (r280676) > +++ projects/lua-bootloader/sys/contrib/lua/src/lmathlib.c Thu Mar 26 07:28:32 2015 (r280677) > @@ -9,9 +9,12 @@ > > #include "lprefix.h" > > - > +#ifdef BOOT_LUA > +#include > +#else > #include > #include > +#endif > > #include "lua.h" > > @@ -259,7 +262,7 @@ static int math_random (lua_State *L) { > default: return luaL_error(L, "wrong number of arguments"); > } > /* random integer in the interval [low, up] */ > - luaL_argcheck(L, low <= up, 1, "interval is empty"); > + luaL_argcheck(L, low <= up, 1, "interval is empty"); > luaL_argcheck(L, low >= 0 || up <= LUA_MAXINTEGER + low, 1, > "interval too large"); > r *= (double)(up - low) + 1.0; > @@ -278,9 +281,9 @@ static int math_randomseed (lua_State *L > static int math_type (lua_State *L) { > if (lua_type(L, 1) == LUA_TNUMBER) { > if (lua_isinteger(L, 1)) > - lua_pushliteral(L, "integer"); > + lua_pushliteral(L, "integer"); > else > - lua_pushliteral(L, "float"); > + lua_pushliteral(L, "float"); > } > else { > luaL_checkany(L, 1); > @@ -401,4 +404,3 @@ LUAMOD_API int luaopen_math (lua_State * > lua_setfield(L, -2, "mininteger"); > return 1; > } > - > > Modified: projects/lua-bootloader/sys/contrib/lua/src/lmem.c > ============================================================================== > --- projects/lua-bootloader/sys/contrib/lua/src/lmem.c Thu Mar 26 07:27:38 2015 (r280676) > +++ projects/lua-bootloader/sys/contrib/lua/src/lmem.c Thu Mar 26 07:28:32 2015 (r280677) > @@ -9,8 +9,11 @@ > > #include "lprefix.h" > > - > +#ifdef BOOT_LUA > +#include > +#else > #include > +#endif > > #include "lua.h" > > @@ -96,4 +99,3 @@ void *luaM_realloc_ (lua_State *L, void > g->GCdebt = (g->GCdebt + nsize) - realosize; > return newblock; > } > - > > Modified: projects/lua-bootloader/sys/contrib/lua/src/loadlib.c > ============================================================================== > --- projects/lua-bootloader/sys/contrib/lua/src/loadlib.c Thu Mar 26 07:27:38 2015 (r280676) > +++ projects/lua-bootloader/sys/contrib/lua/src/loadlib.c Thu Mar 26 07:28:32 2015 (r280677) > @@ -13,9 +13,12 @@ > > #include "lprefix.h" > > - > +#ifdef BOOT_LUA > +#include > +#else > #include > #include > +#endif > > #include "lua.h" > > @@ -783,4 +786,3 @@ LUAMOD_API int luaopen_package (lua_Stat > lua_pop(L, 1); /* pop global table */ > return 1; /* return 'package' table */ > } > - > > Modified: projects/lua-bootloader/sys/contrib/lua/src/lobject.c > ============================================================================== > --- projects/lua-bootloader/sys/contrib/lua/src/lobject.c Thu Mar 26 07:27:38 2015 (r280676) > +++ projects/lua-bootloader/sys/contrib/lua/src/lobject.c Thu Mar 26 07:28:32 2015 (r280677) > @@ -9,11 +9,14 @@ > > #include "lprefix.h" > > - > +#ifdef BOOT_LUA > +#include > +#else > #include > #include > #include > #include > +#endif > > #include "lua.h" > > @@ -343,7 +346,7 @@ static void pushstr (lua_State *L, const > } > > > -/* this function handles only '%d', '%c', '%f', '%p', and '%s' > +/* this function handles only '%d', '%c', '%f', '%p', and '%s' > conventional formats, plus Lua-specific '%I' and '%U' */ > const char *luaO_pushvfstring (lua_State *L, const char *fmt, va_list argp) { > int n = 0; > @@ -467,4 +470,3 @@ void luaO_chunkid (char *out, const char > memcpy(out, POS, (LL(POS) + 1) * sizeof(char)); > } > } > - > > Modified: projects/lua-bootloader/sys/contrib/lua/src/lopcodes.c > ============================================================================== > --- projects/lua-bootloader/sys/contrib/lua/src/lopcodes.c Thu Mar 26 07:27:38 2015 (r280676) > +++ projects/lua-bootloader/sys/contrib/lua/src/lopcodes.c Thu Mar 26 07:28:32 2015 (r280677) > @@ -9,8 +9,11 @@ > > #include "lprefix.h" > > - > +#ifdef BOOT_LUA > +#include > +#else > #include > +#endif > > #include "lopcodes.h" > > @@ -121,4 +124,3 @@ LUAI_DDEF const lu_byte luaP_opmodes[NUM > ,opmode(0, 1, OpArgU, OpArgN, iABC) /* OP_VARARG */ > ,opmode(0, 0, OpArgU, OpArgU, iAx) /* OP_EXTRAARG */ > }; > - > > Modified: projects/lua-bootloader/sys/contrib/lua/src/loslib.c > ============================================================================== > --- projects/lua-bootloader/sys/contrib/lua/src/loslib.c Thu Mar 26 07:27:38 2015 (r280676) > +++ projects/lua-bootloader/sys/contrib/lua/src/loslib.c Thu Mar 26 07:28:32 2015 (r280677) > @@ -9,12 +9,15 @@ > > #include "lprefix.h" > > - > +#ifdef BOOT_LUA > +#include > +#else > #include > #include > #include > #include > #include > +#endif > > #include "lua.h" > > @@ -353,4 +356,3 @@ LUAMOD_API int luaopen_os (lua_State *L) > luaL_newlib(L, syslib); > return 1; > } > - > > Modified: projects/lua-bootloader/sys/contrib/lua/src/lparser.c > ============================================================================== > --- projects/lua-bootloader/sys/contrib/lua/src/lparser.c Thu Mar 26 07:27:38 2015 (r280676) > +++ projects/lua-bootloader/sys/contrib/lua/src/lparser.c Thu Mar 26 07:28:32 2015 (r280677) > @@ -9,8 +9,11 @@ > > #include "lprefix.h" > > - > +#ifdef BOOT_LUA > +#include > +#else > #include > +#endif > > #include "lua.h" > > @@ -1644,4 +1647,3 @@ LClosure *luaY_parser (lua_State *L, ZIO > L->top--; /* remove scanner's table */ > return cl; /* closure is on the stack, too */ > } > - > > Modified: projects/lua-bootloader/sys/contrib/lua/src/lstate.c > ============================================================================== > --- projects/lua-bootloader/sys/contrib/lua/src/lstate.c Thu Mar 26 07:27:38 2015 (r280676) > +++ projects/lua-bootloader/sys/contrib/lua/src/lstate.c Thu Mar 26 07:28:32 2015 (r280677) > @@ -9,9 +9,12 @@ > > #include "lprefix.h" > > - > +#ifdef BOOT_LUA > +#include > +#else > #include > #include > +#endif > > #include "lua.h" > > @@ -342,5 +345,3 @@ LUA_API void lua_close (lua_State *L) { > lua_lock(L); > close_state(L); > } > - > - > > Modified: projects/lua-bootloader/sys/contrib/lua/src/lstring.c > ============================================================================== > --- projects/lua-bootloader/sys/contrib/lua/src/lstring.c Thu Mar 26 07:27:38 2015 (r280676) > +++ projects/lua-bootloader/sys/contrib/lua/src/lstring.c Thu Mar 26 07:28:32 2015 (r280677) > @@ -9,8 +9,11 @@ > > #include "lprefix.h" > > - > +#ifdef BOOT_LUA > +#include > +#else > #include > +#endif > > #include "lua.h" > > @@ -179,4 +182,3 @@ Udata *luaS_newudata (lua_State *L, size > setuservalue(L, u, luaO_nilobject); > return u; > } > - > > Modified: projects/lua-bootloader/sys/contrib/lua/src/lstrlib.c > ============================================================================== > --- projects/lua-bootloader/sys/contrib/lua/src/lstrlib.c Thu Mar 26 07:27:38 2015 (r280676) > +++ projects/lua-bootloader/sys/contrib/lua/src/lstrlib.c Thu Mar 26 07:28:32 2015 (r280677) > @@ -9,13 +9,16 @@ > > #include "lprefix.h" > > - > +#ifdef BOOT_LUA > +#include > +#else > #include > #include > #include > #include > #include > #include > +#endif > > #include "lua.h" > > @@ -1110,7 +1113,7 @@ static KOption getoption (Header *h, con > ** 'psize' is filled with option's size, 'notoalign' with its > ** alignment requirements. > ** Local variable 'size' gets the size to be aligned. (Kpadal option > -** always gets its full alignment, other options are limited by > +** always gets its full alignment, other options are limited by > ** the maximum alignment ('maxalign'). Kchar option needs no alignment > ** despite its size. > */ > @@ -1427,4 +1430,3 @@ LUAMOD_API int luaopen_string (lua_State > createmetatable(L); > return 1; > } > - > > Modified: projects/lua-bootloader/sys/contrib/lua/src/ltable.c > ============================================================================== > --- projects/lua-bootloader/sys/contrib/lua/src/ltable.c Thu Mar 26 07:27:38 2015 (r280676) > +++ projects/lua-bootloader/sys/contrib/lua/src/ltable.c Thu Mar 26 07:28:32 2015 (r280677) > @@ -22,11 +22,14 @@ > ** to it), then the colliding element is in its own main position. > ** Hence even when the load factor reaches 100%, performance remains good. > */ > - > #include > +#ifdef BOOT_LUA > +#include > +#else > #include > #include > #include > +#endif > > #include "lua.h" > > > Modified: projects/lua-bootloader/sys/contrib/lua/src/ltablib.c > ============================================================================== > --- projects/lua-bootloader/sys/contrib/lua/src/ltablib.c Thu Mar 26 07:27:38 2015 (r280676) > +++ projects/lua-bootloader/sys/contrib/lua/src/ltablib.c Thu Mar 26 07:28:32 2015 (r280677) > @@ -9,9 +9,12 @@ > > #include "lprefix.h" > > - > +#ifdef BOOT_LUA > +#include > +#else > #include > #include > +#endif > > #include "lua.h" > > @@ -215,7 +218,7 @@ static int unpack (lua_State *L) { > return luaL_error(L, "too many results to unpack"); > do { /* must have at least one element */ > (*ta.geti)(L, 1, i); /* push arg[i..e] */ > - } while (i++ < e); > + } while (i++ < e); > > return (int)n; > } > @@ -354,4 +357,3 @@ LUAMOD_API int luaopen_table (lua_State > #endif > return 1; > } > - > > Modified: projects/lua-bootloader/sys/contrib/lua/src/ltm.c > ============================================================================== > --- projects/lua-bootloader/sys/contrib/lua/src/ltm.c Thu Mar 26 07:27:38 2015 (r280676) > +++ projects/lua-bootloader/sys/contrib/lua/src/ltm.c Thu Mar 26 07:28:32 2015 (r280677) > @@ -9,13 +9,16 @@ > > #include "lprefix.h" > > - > +#ifdef BOOT_LUA > +#include > +#else > #include > +#endif > > #include "lua.h" > > #include "ldebug.h" > -#include "ldo.h" > +#include "ldo.h" > #include "lobject.h" > #include "lstate.h" > #include "lstring.h" > @@ -140,4 +143,3 @@ int luaT_callorderTM (lua_State *L, cons > else > return !l_isfalse(L->top); > } > - > > Modified: projects/lua-bootloader/sys/contrib/lua/src/lua.c > ============================================================================== > --- projects/lua-bootloader/sys/contrib/lua/src/lua.c Thu Mar 26 07:27:38 2015 (r280676) > +++ projects/lua-bootloader/sys/contrib/lua/src/lua.c Thu Mar 26 07:28:32 2015 (r280677) > @@ -8,11 +8,14 @@ > > #include "lprefix.h" > > - > +#ifdef BOOT_LUA > +#include > +#else > #include > #include > #include > #include > +#endif > > #include "lua.h" > > @@ -458,7 +461,7 @@ static int handle_script (lua_State *L, > /* > ** Traverses all arguments from 'argv', returning a mask with those > ** needed before running any Lua code (or an error code if it finds > -** any invalid argument). 'first' returns the first not-handled argument > +** any invalid argument). 'first' returns the first not-handled argument > ** (either the script name or a bad argument in case of error). > */ > static int collectargs (char **argv, int *first) { > @@ -608,4 +611,3 @@ int main (int argc, char **argv) { > lua_close(L); > return (result && status == LUA_OK) ? EXIT_SUCCESS : EXIT_FAILURE; > } > - > > Modified: projects/lua-bootloader/sys/contrib/lua/src/luac.c > ============================================================================== > --- projects/lua-bootloader/sys/contrib/lua/src/luac.c Thu Mar 26 07:27:38 2015 (r280676) > +++ projects/lua-bootloader/sys/contrib/lua/src/luac.c Thu Mar 26 07:28:32 2015 (r280677) > @@ -9,11 +9,15 @@ > > #include "lprefix.h" > > +#ifdef BOOT_LUA > +#include > +#else > #include > #include > #include > #include > #include > +#endif > > #include "lua.h" > #include "lauxlib.h" > > Modified: projects/lua-bootloader/sys/contrib/lua/src/luaconf.h > ============================================================================== > --- projects/lua-bootloader/sys/contrib/lua/src/luaconf.h Thu Mar 26 07:27:38 2015 (r280676) > +++ projects/lua-bootloader/sys/contrib/lua/src/luaconf.h Thu Mar 26 07:28:32 2015 (r280677) > @@ -9,7 +9,11 @@ > #define luaconf_h > > #include > +#ifdef BOOT_LUA > +#include > +#else > #include > +#endif > > > /* > @@ -732,4 +736,3 @@ > > > #endif > - > > Modified: projects/lua-bootloader/sys/contrib/lua/src/lundump.c > ============================================================================== > --- projects/lua-bootloader/sys/contrib/lua/src/lundump.c Thu Mar 26 07:27:38 2015 (r280676) > +++ projects/lua-bootloader/sys/contrib/lua/src/lundump.c Thu Mar 26 07:28:32 2015 (r280677) > @@ -9,8 +9,11 @@ > > #include "lprefix.h" > > - > +#ifdef BOOT_LUA > +#include > +#else > #include > +#endif > > #include "lua.h" > > @@ -274,4 +277,3 @@ LClosure *luaU_undump(lua_State *L, ZIO > luai_verifycode(L, buff, cl->p); > return cl; > } > - > > Modified: projects/lua-bootloader/sys/contrib/lua/src/lutf8lib.c > ============================================================================== > --- projects/lua-bootloader/sys/contrib/lua/src/lutf8lib.c Thu Mar 26 07:27:38 2015 (r280676) > +++ projects/lua-bootloader/sys/contrib/lua/src/lutf8lib.c Thu Mar 26 07:28:32 2015 (r280677) > @@ -9,10 +9,13 @@ > > #include "lprefix.h" > > - > +#ifdef BOOT_LUA > +#include > +#else > #include > #include > #include > +#endif > > #include "lua.h" > > @@ -193,7 +196,7 @@ static int byteoffset (lua_State *L) { > lua_pushinteger(L, posi + 1); > else /* no such character */ > lua_pushnil(L); > - return 1; > + return 1; > } > > > @@ -252,4 +255,3 @@ LUAMOD_API int luaopen_utf8 (lua_State * > lua_setfield(L, -2, "charpattern"); > return 1; > } > - > > Modified: projects/lua-bootloader/sys/contrib/lua/src/lvm.c > ============================================================================== > --- projects/lua-bootloader/sys/contrib/lua/src/lvm.c Thu Mar 26 07:27:38 2015 (r280676) > +++ projects/lua-bootloader/sys/contrib/lua/src/lvm.c Thu Mar 26 07:28:32 2015 (r280677) > @@ -9,11 +9,15 @@ > > #include "lprefix.h" > > - > +#ifdef BOOT_LUA > +#include > +#include > +#else > #include > #include > #include > #include > +#endif > > #include "lua.h" > > @@ -299,7 +303,7 @@ int luaV_lessequal (lua_State *L, const > > > /* > -** Main operation for equality of Lua values; return 't1 == t2'. > +** Main operation for equality of Lua values; return 't1 == t2'. > ** L == NULL means raw equality (no metamethods) > */ > int luaV_equalobj (lua_State *L, const TValue *t1, const TValue *t2) { > @@ -448,7 +452,7 @@ lua_Integer luaV_div (lua_State *L, lua_ > > > /* > -** Integer modulus; return 'm % n'. (Assume that C '%' with > +** Integer modulus; return 'm % n'. (Assume that C '%' with > ** negative operands follows C99 behavior. See previous comment > ** about luaV_div.) > */ > @@ -743,7 +747,7 @@ void luaV_execute (lua_State *L) { > Protect(luaV_gettable(L, rb, RKC(i), ra)); > vmbreak; > } > - vmcase(OP_ADD) { > + vmcase(OP_ADD) { > TValue *rb = RKB(i); > TValue *rc = RKC(i); > lua_Number nb; lua_Number nc; > @@ -1179,4 +1183,3 @@ void luaV_execute (lua_State *L) { > } > > /* }================================================================== */ > - > > Modified: projects/lua-bootloader/sys/contrib/lua/src/lzio.c > ============================================================================== > --- projects/lua-bootloader/sys/contrib/lua/src/lzio.c Thu Mar 26 07:27:38 2015 (r280676) > +++ projects/lua-bootloader/sys/contrib/lua/src/lzio.c Thu Mar 26 07:28:32 2015 (r280677) > @@ -9,8 +9,11 @@ > > #include "lprefix.h" > > - > +#ifdef BOOT_LUA > +#include > +#else > #include > +#endif > > #include "lua.h" > > @@ -74,5 +77,3 @@ char *luaZ_openspace (lua_State *L, Mbuf > } > return buff->buffer; > } > - > - -- Wojciech A. Koszek wkoszek@FreeBSD.czest.pl http://FreeBSD.czest.pl/~wkoszek/