1 diff -ur lua-5.1.3-pt1/Makefile lua-5.1.3-pt2/Makefile
2 --- lua-5.1.3-pt1/Makefile 2008-04-05 14:23:14.000000000 +0200
3 +++ lua-5.1.3-pt2/Makefile 2008-04-05 15:13:38.000000000 +0200
8 -TO_INC= lua.h luaconf.h lualib.h lauxlib.h ../etc/lua.hpp
10 +TO_INC= lua.h luaconf.h lualib.h lauxlib.h ../etc/lua.hpp lnum_config.h
11 +TO_LIB= liblua.a liblua.so liblua.so.$R
14 # Lua version and release.
15 diff -ur lua-5.1.3-pt1/src/ldo.h lua-5.1.3-pt2/src/ldo.h
16 --- lua-5.1.3-pt1/src/ldo.h 2008-04-05 14:23:14.000000000 +0200
17 +++ lua-5.1.3-pt2/src/ldo.h 2008-04-05 14:25:40.000000000 +0200
19 LUAI_FUNC int luaD_poscall (lua_State *L, StkId firstResult);
20 LUAI_FUNC void luaD_reallocCI (lua_State *L, int newsize);
21 LUAI_FUNC void luaD_reallocstack (lua_State *L, int newsize);
22 -LUAI_FUNC void luaD_growstack (lua_State *L, int n);
23 +LUA_API void luaD_growstack (lua_State *L, int n);
25 LUAI_FUNC void luaD_throw (lua_State *L, int errcode);
26 LUAI_FUNC int luaD_rawrunprotected (lua_State *L, Pfunc f, void *ud);
27 diff -ur lua-5.1.3-pt1/src/lfunc.h lua-5.1.3-pt2/src/lfunc.h
28 --- lua-5.1.3-pt1/src/lfunc.h 2008-04-05 14:23:14.000000000 +0200
29 +++ lua-5.1.3-pt2/src/lfunc.h 2008-04-05 14:25:40.000000000 +0200
31 cast(int, sizeof(TValue *)*((n)-1)))
34 -LUAI_FUNC Proto *luaF_newproto (lua_State *L);
35 +LUA_API Proto *luaF_newproto (lua_State *L);
36 LUAI_FUNC Closure *luaF_newCclosure (lua_State *L, int nelems, Table *e);
37 LUAI_FUNC Closure *luaF_newLclosure (lua_State *L, int nelems, Table *e);
38 LUAI_FUNC UpVal *luaF_newupval (lua_State *L);
39 diff -ur lua-5.1.3-pt1/src/lmem.h lua-5.1.3-pt2/src/lmem.h
40 --- lua-5.1.3-pt1/src/lmem.h 2008-04-05 14:23:14.000000000 +0200
41 +++ lua-5.1.3-pt2/src/lmem.h 2008-04-05 14:25:40.000000000 +0200
43 ((v)=cast(t *, luaM_reallocv(L, v, oldn, n, sizeof(t))))
46 -LUAI_FUNC void *luaM_realloc_ (lua_State *L, void *block, size_t oldsize,
47 +LUA_API void *luaM_realloc_ (lua_State *L, void *block, size_t oldsize,
49 -LUAI_FUNC void *luaM_toobig (lua_State *L);
50 +LUA_API void *luaM_toobig (lua_State *L);
51 LUAI_FUNC void *luaM_growaux_ (lua_State *L, void *block, int *size,
52 size_t size_elem, int limit,
53 const char *errormsg);
54 diff -ur lua-5.1.3-pt1/src/lstring.h lua-5.1.3-pt2/src/lstring.h
55 --- lua-5.1.3-pt1/src/lstring.h 2008-04-05 14:23:14.000000000 +0200
56 +++ lua-5.1.3-pt2/src/lstring.h 2008-04-05 14:25:40.000000000 +0200
59 LUAI_FUNC void luaS_resize (lua_State *L, int newsize);
60 LUAI_FUNC Udata *luaS_newudata (lua_State *L, size_t s, Table *e);
61 -LUAI_FUNC TString *luaS_newlstr (lua_State *L, const char *str, size_t l);
62 +LUA_API TString *luaS_newlstr (lua_State *L, const char *str, size_t l);
66 diff -ur lua-5.1.3-pt1/src/lundump.h lua-5.1.3-pt2/src/lundump.h
67 --- lua-5.1.3-pt1/src/lundump.h 2008-04-05 14:23:14.000000000 +0200
68 +++ lua-5.1.3-pt2/src/lundump.h 2008-04-05 14:25:40.000000000 +0200
70 LUAI_FUNC void luaU_header (char* h);
72 /* dump one chunk; from ldump.c */
73 -LUAI_FUNC int luaU_dump (lua_State* L, const Proto* f, lua_Writer w, void* data, int strip);
74 +LUA_API int luaU_dump (lua_State* L, const Proto* f, lua_Writer w, void* data, int strip);
77 /* print one chunk; from print.c */
78 diff -ur lua-5.1.3-pt1/src/Makefile lua-5.1.3-pt2/src/Makefile
79 --- lua-5.1.3-pt1/src/Makefile 2008-04-05 14:23:31.000000000 +0200
80 +++ lua-5.1.3-pt2/src/Makefile 2008-04-05 14:25:40.000000000 +0200
82 PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris
86 CORE_O= lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o \
87 lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o \
88 lundump.o lvm.o lzio.o lnum.o
93 -LUAC_O= luac.o print.o
94 +LUAC_O= luac.o print.o lopcodes.o
96 ALL_O= $(CORE_O) $(LIB_O) $(LUA_O) $(LUAC_O)
97 -ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T)
98 +ALL_T= $(LUA_A) $(LUA_SO) $(LUA_T) $(LUAC_T)
110 $(LUA_A): $(CORE_O) $(LIB_O)
114 -$(LUA_T): $(LUA_O) $(LUA_A)
115 - $(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
116 +$(LUA_SO): $(CORE_O) $(LIB_O)
117 + $(LD) -o $@.$(PKG_VERSION) -shared -soname="$@.$(PKG_VERSION)" $?
118 + ln -fs $@.$(PKG_VERSION) $@
120 +$(LUA_T): $(LUA_O) $(LUA_SO)
121 + $(CC) -o $@ -L. -llua $(MYLDFLAGS) $(LUA_O) $(LIBS)
123 +$(LUAC_T): $(LUAC_O) $(LUA_SO)
124 + $(CC) -o $@ -L. -llua $(MYLDFLAGS) $(LUAC_O) $(LIBS)
126 -$(LUAC_T): $(LUAC_O) $(LUA_A)
127 +$(LUAC_T)-host: $(LUAC_O) $(LUA_A)
128 $(CC) -o $@ $(MYLDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS)
132 $(MAKE) all MYCFLAGS=
135 - $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-Wl,-E -ldl -lreadline -lhistory -lncurses"
136 + $(MAKE) all MYCFLAGS+=-DLUA_USE_LINUX MYLIBS="-Wl,-E -ldl -lreadline -lhistory -lncurses"
139 $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-lreadline"