- avoid clashes with getline() from glibc

- increase default bibtex/jbibtex limits (#492136)
This commit is contained in:
Jindrich Novy 2009-04-02 16:35:45 +00:00
parent 88211b8584
commit 6d2b15b115
3 changed files with 207 additions and 1 deletions

142
texlive-getline.patch Normal file
View File

@ -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 <kpathsea/getopt.h>
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);

54
texlive-poolfix.patch Normal file
View File

@ -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 |<buf_size|}
@!aux_stack_size=20; {maximum number of simultaneous open \.{.aux} files}
@!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
diff -up texlive-2007/texk/web2c/ptex-src-3.1.10/jbibtex.ch.poolfix texlive-2007/texk/web2c/ptex-src-3.1.10/jbibtex.ch
--- texlive-2007/texk/web2c/ptex-src-3.1.10/jbibtex.ch.poolfix 2009-04-02 18:06:56.000000000 +0200
+++ texlive-2007/texk/web2c/ptex-src-3.1.10/jbibtex.ch 2009-04-02 18:07:52.000000000 +0200
@@ -179,7 +179,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
@@ -189,7 +189,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

View File

@ -21,7 +21,7 @@
Name: texlive
Version: %{texlive_ver}
Release: 41%{?dist}
Release: 42%{?dist}
Summary: Binaries for the TeX formatting system
Group: Applications/Publishing
@ -75,6 +75,8 @@ Patch28: texlive-man-notetex.patch
Patch29: texlive-man-context.patch
Patch30: texlive-lacheck.patch
Patch31: texlive-elif.patch
Patch32: texlive-getline.patch
Patch33: texlive-poolfix.patch
######
# mpeters contributed patches
@ -122,6 +124,7 @@ Patch1004: texlive-2007-jp-platex209.patch
Patch1005: texlive-2007-pdvips.patch
Patch1006: texlive-2007-ptex-3.1.10.patch
Patch1007: texlive-2007-fmtutil-ptex.patch
Patch1008: texlive-poolfix.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -392,6 +395,7 @@ chmod -x texk/dvipdfm/encodings.c
%patch29 -p1 -b .man-context
%patch30 -p1 -b .lacheck
%patch31 -p1 -b .elif
%patch32 -p1 -b .getline
# fix non utf man pages
%patch42 -p1 -b .notutf8-2
@ -458,6 +462,8 @@ ln -s dvips.1 texk/pdvipsk/pdvips.1
# set up mendexk
tar xfz %{SOURCE1002} -C texk
%patch1008 -p1 -b .poolfix
%build
set -x
# define CCACHE_DIR to let the build pass with ccache enabled.
@ -1230,6 +1236,10 @@ fi
%{_mandir}/man1/texutil.1*
%changelog
* Thu Apr 02 2009 Jindrich Novy <jnovy@redhat.com> - 2007-42
- avoid clashes with getline() from glibc
- increase default bibtex/jbibtex limits (#492136)
* Thu Feb 26 2009 Jindrich Novy <jnovy@redhat.com> - 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,