summary refs log tree commit diff
path: root/pkgs/misc/tex/tetex/getline.patch
blob: c82c1b3ac360f22a9ededb577e4976afe6e6b575 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
Glibc 2.10 has a `getline' symbol that clashes with teTeX's.
Taken from http://lists.ibiblio.org/pipermail/sm-commit/2009-July/024831.html

diff -rc -x '*~' tetex-src-3.0-orig/texk/dvipsk/afm2tfm.c tetex-src-3.0/texk/dvipsk/afm2tfm.c
*** tetex-src-3.0-orig/texk/dvipsk/afm2tfm.c	2005-01-30 14:17:09.000000000 +0100
--- tetex-src-3.0/texk/dvipsk/afm2tfm.c	2010-02-03 13:50:21.000000000 +0100
***************
*** 257,263 ****
  }
  
  int
! getline P1H(void) {
     register char *p ;
     register int c ;
  
--- 257,263 ----
  }
  
  int
! tetex_getline P1H(void) {
     register char *p ;
     register int c ;
  
***************
*** 606,612 ****
     ai = newchar() ;
     ai->adobenum = -1 ;
     ai->adobename = "||" ; /* boundary character name */
!    while (getline()) {
        switch(interest(paramstring())) {
  case FontName:
           fontname = paramnewstring() ;
--- 606,612 ----
     ai = newchar() ;
     ai->adobenum = -1 ;
     ai->adobename = "||" ; /* boundary character name */
!    while (tetex_getline()) {
        switch(interest(paramstring())) {
  case FontName:
           fontname = paramnewstring() ;
***************
*** 1882,1888 ****
  
     while (1) {
        while (param == 0 || *param == 0) {
!          if (getline() == 0)
              error("! premature end in encoding file") ;
           for (p=buffer; *p; p++)
              if (*p == '%') {
--- 1882,1888 ----
  
     while (1) {
        while (param == 0 || *param == 0) {
!          if (tetex_getline() == 0)
              error("! premature end in encoding file") ;
           for (p=buffer; *p; p++)
              if (*p == '%') {
***************
*** 1973,1979 ****
        p = gettoken() ;
        if (strcmp(p, "]"))
           error("! token 258 in encoding must be make-array (])") ;
!       while (getline()) {
           for (p=buffer; *p; p++)
              if (*p == '%') {
                 if (ignoreligkern == 0)
--- 1973,1979 ----
        p = gettoken() ;
        if (strcmp(p, "]"))
           error("! token 258 in encoding must be make-array (])") ;
!       while (tetex_getline()) {
           for (p=buffer; *p; p++)
              if (*p == '%') {
                 if (ignoreligkern == 0)
diff -rc -x '*~' tetex-src-3.0-orig/texk/web2c/cpascal.h tetex-src-3.0/texk/web2c/cpascal.h
*** tetex-src-3.0-orig/texk/web2c/cpascal.h	2004-08-28 22:49:59.000000000 +0200
--- tetex-src-3.0/texk/web2c/cpascal.h	2010-02-03 13:51:04.000000000 +0100
***************
*** 240,245 ****
--- 240,255 ----
  #undef getname
  #define getname vms_getname
  #endif
+ 
+ /* Apparently POSIX 2008 has getline and glibc 2.9.90 exports it.
+  *    tangle, weave, et al. use that symbol; try to define it away so
+  *       something that a standard won't usurp.
+  * From http://tutimura.ath.cx/ptetex/?%C6%B0%BA%EE%CA%F3%B9%F0%2F134 */
+ #ifdef getline
+ #undef getline
+ #endif
+ #define getline web2c_getline
+ 
  
  /* Declarations for the routines we provide ourselves in lib/.  */