lua-users home
lua-l archive

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


Aleksey Yutkin <ayutkin <at> gmail.com> writes:

> 
> 
> Do you have installed latest updates for tcc? See tcc mail list for details.
> 2006/9/5, Pavol Severa <pavol.severa <at> gmail.com>:
> Has anybody succeeded to compile lua with the tcc compiler? I've justtried it
(lua 
> 5.1.1, tcc 0.9.23, winxp), with errorsldo.c:495: function pointer
expectedandIn file included from loadlib.c:92:In file included from
c:/tcc/include/winapi/windows.h:105:In file included from
c:/tcc/include/winapi/windef.h:155:
> c:/tcc/include/winapi/winnt.h:1814: identifier expected
> 
> 
> -- Aleksey 
> 
My steps:

move all.c to src directory

Change ldo.c line 495 to 
  tf = ((c == LUA_SIGNATURE[0]) ? luaU_undump(L, p->z, &p->buff, p->name) :
luaY_parser(L, p->z, &p->buff, p->name));

Change luaconf.h
line 27 just have
#define LUA_ANSI

line 181
from 
#define LUAI_DATA	/* empty */
to
#define LUAI_DATA	static


then compile with 
tcc all.c

C:\lua-5.1.1\src>tcc all.c -bench
3688 idents, 19403 lines, 525400 bytes, 0.109 s, 178009 lines/s, 4.8 MB/s


Henk Schaer