--- luatex-beta-0.30.3.orig/src/libs/lua51/ldebug.c 2008-11-28 14:24:28.000000000 +0400 +++ luatex-beta-0.30.3.orig/src/libs/lua51/ldebug.c 2009-05-20 00:05:20.355459330 +0500 @@ -48,7 +48,7 @@ static int currentline (lua_State *L, Ca if (pc < 0) return -1; /* only active lua functions have current-line information */ else - return getline(ci_func(ci)->l.p, pc); + return _getline(ci_func(ci)->l.p, pc); } --- luatex-beta-0.30.3.orig/src/libs/lua51/ldebug.h 2008-11-28 14:24:28.000000000 +0400 +++ luatex-beta-0.30.3.orig/src/libs/lua51/ldebug.h 2009-05-20 00:05:17.644122163 +0500 @@ -13,7 +13,7 @@ #define pcRel(pc, p) (cast(int, (pc) - (p)->code) - 1) -#define getline(f,pc) (((f)->lineinfo) ? (f)->lineinfo[pc] : 0) +#define _getline(f,pc) (((f)->lineinfo) ? (f)->lineinfo[pc] : 0) #define resethookcount(L) (L->hookcount = L->basehookcount) --- luatex-beta-0.30.3.orig/src/libs/lua51/lvm.c 2008-11-28 14:24:28.000000000 +0400 +++ luatex-beta-0.30.3.orig/src/libs/lua51/lvm.c 2009-05-20 00:05:13.494428829 +0500 @@ -70,10 +70,10 @@ static void traceexec (lua_State *L, con if (mask & LUA_MASKLINE) { Proto *p = ci_func(L->ci)->l.p; int npc = pcRel(pc, p); - int newline = getline(p, npc); + int newline = _getline(p, npc); /* call linehook when enter a new function, when jump back (loop), or when enter a new line */ - if (npc == 0 || pc <= oldpc || newline != getline(p, pcRel(oldpc, p))) + if (npc == 0 || pc <= oldpc || newline != _getline(p, pcRel(oldpc, p))) luaD_callhook(L, LUA_HOOKLINE, newline); } } --- luatex-beta-0.30.3.orig/src/libs/lua51/print.c 2008-11-28 14:24:28.000000000 +0400 +++ luatex-beta-0.30.3.orig/src/libs/lua51/print.c 2009-05-20 00:05:04.324799768 +0500 @@ -84,7 +84,7 @@ static void PrintCode(const Proto* f) int c=GETARG_C(i); int bx=GETARG_Bx(i); int sbx=GETARG_sBx(i); - int line=getline(f,pc); + int line=_getline(f,pc); printf("\t%d\t",pc+1); if (line>0) printf("[%d]\t",line); else printf("[-]\t"); printf("%-9s\t",luaP_opnames[o]); --- luatex-beta-0.30.3.orig/src/texk/web2c/cpascal.h 2008-11-28 14:25:11.000000000 +0400 +++ luatex-beta-0.30.3.orig/src/texk/web2c/cpascal.h 2009-05-20 00:04:32.614201956 +0500 @@ -14,6 +14,7 @@ /* We must include this first, to resolve many C issues. */ #include "config.h" +#define getline _getline /* We only use getopt in the applications, not in web2c itself. */ #include --- luatex-beta-0.30.3.orig/src/texk/web2c/mpware/mpto.c 2008-11-28 14:24:54.000000000 +0400 +++ luatex-beta-0.30.3.orig/src/texk/web2c/mpware/mpto.c 2009-05-20 00:04:32.614201956 +0500 @@ -97,7 +97,7 @@ usage(char *progn) } char * -getline(void) +_getline(void) { /* returns NULL on EOF or error, otherwise buf */ int c; unsigned loc = 0; @@ -302,7 +302,7 @@ copytex(void) char *res = NULL; do { if (*aa == 0) - if ((aa = getline()) == NULL) + if ((aa = _getline()) == NULL) err("btex section does not end"); if (getbta(aa) && *tt == 'e') { @@ -483,7 +483,7 @@ Current maintainer: Taco Hoekwater.\n"); postverb = troff_postverb; } printf("%s", predoc); - while (getline() != NULL) + while (_getline() != NULL) do_line(); printf("%s", postdoc); exit(0);