Datasheet

This creates the following subdirectory structure:
tcc-0.9.23
doc
examples
include
sys
winapi
lib
tcc
With this particular version of TCC, you need to make two small adjustments before proceeding. In the
include/winapi directory, open the winnt.h file with your text editor. On lines 1814 and 2288, change
the occurrences of
Value to _Value.
Change your working directory to Lua’s source directory. For example, if you extracted the Lua tarball
in
c:\dev, use the following shell commands:
c:
cd \dev\lua-5.1.1\src
TCC requires a change to the file ldo.c. Open this file with your text editor and find line 487, which
reads as follows:
static void f_parser (lua_State *L, void *ud) {
Just beneath it, add the following line:
typedef Proto* (* load_func) (lua_State*, ZIO*, Mbuffer*, const char*);
Several lines lower, find the line that includes
((c == LUA_SIGNATURE[0]) ? luaU_undump : luaY_parser)
and replace
luaU_undump
with
(load_func) luaU_undump
and
luaY_parser
with
(load_func) luaY_parser.
15
Chapter 1: Getting Situated
04_069172 ch01.qxp 1/2/07 7:53 PM Page 15