public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo commit in src/patchsets/luatex/0.30.3: 120_all_getline.patch series
@ 2009-05-23  9:46 Alexis Ballier (aballier)
  0 siblings, 0 replies; only message in thread
From: Alexis Ballier (aballier) @ 2009-05-23  9:46 UTC (permalink / raw
  To: gentoo-commits

aballier    09/05/23 09:46:34

  Modified:             series
  Added:                120_all_getline.patch
  Log:
  add a patch to build with glibc 2.10, by Constantin Baranov, bug #270474

Revision  Changes    Path
1.3                  src/patchsets/luatex/0.30.3/series

file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/luatex/0.30.3/series?rev=1.3&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/luatex/0.30.3/series?rev=1.3&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/luatex/0.30.3/series?r1=1.2&r2=1.3

Index: series
===================================================================
RCS file: /var/cvsroot/gentoo/src/patchsets/luatex/0.30.3/series,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- series	14 May 2009 17:31:51 -0000	1.2
+++ series	23 May 2009 09:46:34 -0000	1.3
@@ -9,3 +9,4 @@
 090_all_texlua.patch
 100_all_xpdfversion.patch
 110_all_poppler-0.11.patch
+120_all_getline.patch



1.1                  src/patchsets/luatex/0.30.3/120_all_getline.patch

file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/luatex/0.30.3/120_all_getline.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/luatex/0.30.3/120_all_getline.patch?rev=1.1&content-type=text/plain

Index: 120_all_getline.patch
===================================================================
Fix build with glibc 2.10; getline conflicts.
By Constantin Baranov
https://bugs.gentoo.org/show_bug.cgi?id=270474

Index: luatex-beta-0.30.3/src/libs/lua51/ldebug.c
===================================================================
--- luatex-beta-0.30.3.orig/src/libs/lua51/ldebug.c
+++ luatex-beta-0.30.3/src/libs/lua51/ldebug.c
@@ -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);
 }
 
 
Index: luatex-beta-0.30.3/src/libs/lua51/ldebug.h
===================================================================
--- luatex-beta-0.30.3.orig/src/libs/lua51/ldebug.h
+++ luatex-beta-0.30.3/src/libs/lua51/ldebug.h
@@ -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)
 
Index: luatex-beta-0.30.3/src/libs/lua51/lvm.c
===================================================================
--- luatex-beta-0.30.3.orig/src/libs/lua51/lvm.c
+++ luatex-beta-0.30.3/src/libs/lua51/lvm.c
@@ -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);
   }
 }
Index: luatex-beta-0.30.3/src/libs/lua51/print.c
===================================================================
--- luatex-beta-0.30.3.orig/src/libs/lua51/print.c
+++ luatex-beta-0.30.3/src/libs/lua51/print.c
@@ -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]);
Index: luatex-beta-0.30.3/src/texk/web2c/cpascal.h
===================================================================
--- luatex-beta-0.30.3.orig/src/texk/web2c/cpascal.h
+++ luatex-beta-0.30.3/src/texk/web2c/cpascal.h
@@ -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 <kpathsea/getopt.h>
Index: luatex-beta-0.30.3/src/texk/web2c/mpware/mpto.c
===================================================================
--- luatex-beta-0.30.3.orig/src/texk/web2c/mpware/mpto.c
+++ luatex-beta-0.30.3/src/texk/web2c/mpware/mpto.c
@@ -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);






^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-05-23  9:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-23  9:46 [gentoo-commits] gentoo commit in src/patchsets/luatex/0.30.3: 120_all_getline.patch series Alexis Ballier (aballier)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox