lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Tue, Oct 5, 2010 at 6:32 PM, Luiz Henrique de Figueiredo
<lhf@tecgraf.puc-rio.br> wrote:
>> [2] http://netbsd-soc.sourceforge.net/projects/luakern/
>
> That page says:
>   Lua port - a port of the Lua interpreter to the NetBSD kernel. Lua
>   works just like a regular ANSI C library, in fact Lua is a regular
>   ANSI C library. However, since the kernel does not provide the entire
>   C standard library, this project intends to deliver a modified Lua
>   interpreter suited to work within the NetBSD kernel.
>
> Could you please give us some details on what had to be changed in Lua?
> Thanks.

I didn't need to change anything in the Lua core =). I had only to
change the Lua number type to an integer type (long long, in that
case) and to redefine the setjmp/longjmp calls to use the NetBSD
kernel internal setjmp implementation, both in the _luaconf.h_. I had
also to provide some macros and functions of the libc that are not
present in the NetBSD kernel (such as strncat and strcspn from
string.h), but without changing Lua itself. Moreover, to provide Lua
auxiliary Iibrary for the kernel, I had to disable all "OS-dependent"
code, such as file handling and memory allocation. If you want more
details, please let me know.

Cheers,
--
Lourival Vieira Neto