From 6d2b15b1154a30cb03d53df9fc52f5de5fe59780 Mon Sep 17 00:00:00 2001 From: Jindrich Novy Date: Thu, 2 Apr 2009 16:35:45 +0000 Subject: [PATCH] - avoid clashes with getline() from glibc - increase default bibtex/jbibtex limits (#492136) --- texlive-getline.patch | 142 ++++++++++++++++++++++++++++++++++++++++++ texlive-poolfix.patch | 54 ++++++++++++++++ texlive.spec | 12 +++- 3 files changed, 207 insertions(+), 1 deletion(-) create mode 100644 texlive-getline.patch create mode 100644 texlive-poolfix.patch diff --git a/texlive-getline.patch b/texlive-getline.patch new file mode 100644 index 0000000..1c3ced2 --- /dev/null +++ b/texlive-getline.patch @@ -0,0 +1,142 @@ +diff -up texlive-2007/texk/afm2pl/afm2pl.c.getline texlive-2007/texk/afm2pl/afm2pl.c +--- texlive-2007/texk/afm2pl/afm2pl.c.getline 2006-01-17 22:41:51.000000000 +0100 ++++ texlive-2007/texk/afm2pl/afm2pl.c 2009-04-02 15:18:30.000000000 +0200 +@@ -345,7 +345,7 @@ P2C (register int, x, register int, y) + + /* read a line from infile into buffer and obuffer */ + int +- getline ++ _getline + P1H (void) + { + register char *p; +@@ -781,7 +781,7 @@ P1H (void) + afmencoding->vec[i] = ".notdef"; + afmencoding->name = "Unspecified"; + +- while (getline ()) { ++ while (_getline ()) { + switch (interest (paramstring ())) { + case FontName: + fontname = paramnewstring (); +@@ -963,7 +963,7 @@ gettoken () + + while (1) { + while (param == 0 || *param == 0) { +- if (getline () == 0) ++ if (_getline () == 0) + error ("! premature end in encoding file"); + } + if (param[0] == '%') { +@@ -1540,7 +1540,7 @@ extraligkerninfo () + encfilename = + openin (encfilename, kpse_enc_format, ".enc"); + for (lig_it = 0; lig_it < 2; lig_it++) { +- while (getline ()) { ++ while (_getline ()) { + /* search for (ligkern) comment in line */ + for (p = buffer; *p; p++) + if (*p == '%') { +@@ -1576,7 +1576,7 @@ extraligkerninfo () + for (i = 0; i < ligfilenames->n; i++) { + ligfilename = openin (ligfilenames->names[i], + kpse_lig_format, ".lig"); +- while (getline ()) ++ while (_getline ()) + checkligkern (buffer, 0); /* 2nd param 0: lig file */ + fclose (infile); + } +@@ -1607,7 +1607,7 @@ extraligkerninfo () + for (i = 0; i < Ligfilenames->n; i++) { + ligfilename = openin (Ligfilenames->names[i], + kpse_lig_format, ".lig"); +- while (getline ()) ++ while (_getline ()) + checkligkern (buffer, 0); /* 2nd param 0: lig file */ + fclose (infile); + } +diff -up texlive-2007/texk/dvipsk/afm2tfm.c.getline texlive-2007/texk/dvipsk/afm2tfm.c +--- texlive-2007/texk/dvipsk/afm2tfm.c.getline 2009-04-02 15:10:49.000000000 +0200 ++++ texlive-2007/texk/dvipsk/afm2tfm.c 2009-04-02 15:20:59.000000000 +0200 +@@ -257,7 +257,7 @@ transform P2C(register int, x, register + } + + int +-getline P1H(void) { ++_getline P1H(void) { + register char *p ; + register int c ; + +@@ -612,7 +612,7 @@ readadobe P1H(void) { + ai = newchar() ; + ai->adobenum = -1 ; + ai->adobename = "||" ; /* boundary character name */ +- while (getline()) { ++ while (_getline()) { + switch(interest(paramstring())) { + case FontName: + fontname = paramnewstring() ; +@@ -1888,7 +1888,7 @@ char *gettoken() { + + while (1) { + while (param == 0 || *param == 0) { +- if (getline() == 0) ++ if (_getline() == 0) + error("! premature end in encoding file") ; + for (p=buffer; *p; p++) + if (*p == '%') { +@@ -1979,7 +1979,7 @@ struct encoding *readencoding P1C(char * + p = gettoken() ; + if (strcmp(p, "]")) + error("! token 258 in encoding must be make-array (])") ; +- while (getline()) { ++ while (_getline()) { + for (p=buffer; *p; p++) + if (*p == '%') { + if (ignoreligkern == 0) +diff -up texlive-2007/texk/web2c/cpascal.h.getline texlive-2007/texk/web2c/cpascal.h +--- texlive-2007/texk/web2c/cpascal.h.getline 2006-12-27 00:37:34.000000000 +0100 ++++ texlive-2007/texk/web2c/cpascal.h 2009-04-02 15:10:49.000000000 +0200 +@@ -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 +diff -up texlive-2007/texk/web2c/mpware/mpto.c.getline texlive-2007/texk/web2c/mpware/mpto.c +--- texlive-2007/texk/web2c/mpware/mpto.c.getline 2006-11-28 14:24:53.000000000 +0100 ++++ texlive-2007/texk/web2c/mpware/mpto.c 2009-04-02 15:10:50.000000000 +0200 +@@ -99,7 +95,7 @@ usage(char *progn) + } + + char * +-getline(void) ++_getline(void) + { /* returns NULL on EOF or error, otherwise buf */ + int c; + unsigned loc = 0; +@@ -304,11 +300,11 @@ copytex(void) + while (*aa == ' ' || *aa == '\t') + aa++; + if (*aa == 0) +- if ((aa = getline()) == NULL) ++ if ((aa = _getline()) == NULL) + err("btex section does not end"); + do { + if (*aa == 0) +- if ((aa = getline()) == NULL) ++ if ((aa = _getline()) == NULL) + err("btex section does not end"); + else + printf("\n"); +@@ -465,7 +461,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); diff --git a/texlive-poolfix.patch b/texlive-poolfix.patch new file mode 100644 index 0000000..9b9c0fe --- /dev/null +++ b/texlive-poolfix.patch @@ -0,0 +1,54 @@ +diff -up texlive-2007/texk/web2c/bibtex.ch.poolfix texlive-2007/texk/web2c/bibtex.ch +--- texlive-2007/texk/web2c/bibtex.ch.poolfix 2006-12-27 00:37:34.000000000 +0100 ++++ texlive-2007/texk/web2c/bibtex.ch 2009-04-02 18:06:56.000000000 +0200 +@@ -169,7 +169,7 @@ end. + + @x [still 14] + @!max_bib_files=20; {maximum number of \.{.bib} files allowed} +-@!pool_size=65000; {maximum number of characters in strings} ++@!pool_size=650000; {maximum number of characters in strings} + @!max_strings=4000; {maximum number of strings, including pre-defined; + must be |<=hash_size|} + @!max_cites=750; {maximum number of distinct cite keys; must be +@@ -179,7 +179,7 @@ end. + @!wiz_fn_space=3000; {maximum amount of |wiz_defined|-function space} + @y [still 14] + @!MAX_BIB_FILES=20; {initial number of \.{.bib} files allowed} +-@!POOL_SIZE=65000; {initial number of characters in strings} ++@!POOL_SIZE=650000; {initial number of characters in strings} + @!max_strings=35000; {maximum number of strings, including pre-defined; + must be |<=hash_size|} + @!max_cites=5000; {maximum number of distinct cite keys; must be +diff -up texlive-2007/texk/web2c/bibtex.web.poolfix texlive-2007/texk/web2c/bibtex.web +--- texlive-2007/texk/web2c/bibtex.web.poolfix 2006-01-17 22:41:51.000000000 +0100 ++++ texlive-2007/texk/web2c/bibtex.web 2009-04-02 18:06:56.000000000 +0200 +@@ -399,7 +399,7 @@ first limitation to be a problem, often + @!max_print_line=79; {the maximum: must be |>min_print_line| and | - 2007-42 +- avoid clashes with getline() from glibc +- increase default bibtex/jbibtex limits (#492136) + * Thu Feb 26 2009 Jindrich Novy - 2007-41 - texlive-east-asian now requires texlive-texmf-east-asian (#487258) - do not attempt to remove old fonts via cron in /var/lib/texmf,