Hi, I've had a short look at your files (especialy lua.pas).

1. Don't use libC in unix, use baseunix and unix units instead.
2. Don't use {$IFDEF LINUX} but {$IFDEF UNIX} or {$IFNDEF MSWINDOWS} otherwise BSD and other unices won't work

I haven't been able to get it to compile on my FreeBSD yet due to afforementioned problems but I'll try tomorrow and see what I can see

I'll keep you posted.