Commit | Line | Data |
---|---|---|
e90819c4 LG |
1 | Rename getline() to procmail_getline() to avoid namespace clash with |
2 | POSIX getline(). Fixes FTBFS. | |
3 | ||
4 | Copied from Debian: | |
5 | http://sources.debian.net/src/procmail/3.22-24/debian/patches/24/ | |
6 | ||
7 | References: | |
8 | http://bugs.debian.org/549426 | |
9 | ||
10 | --- a/src/fields.c | |
11 | +++ b/src/fields.c | |
12 | @@ -110,16 +110,16 @@ | |
13 | /* try and append one valid field to rdheader from stdin */ | |
14 | int readhead P((void)) | |
15 | { int idlen; | |
16 | - getline(); | |
17 | + procmail_getline(); | |
18 | if((idlen=breakfield(buf,buffilled))<=0) /* not the start of a valid field */ | |
19 | return 0; | |
20 | if(idlen==STRLEN(FROM)&&eqFrom_(buf)) /* it's a From_ line */ | |
21 | { if(rdheader) | |
22 | return 0; /* the From_ line was a fake! */ | |
23 | - for(;buflast=='>';getline()); /* gather continued >From_ lines */ | |
24 | + for(;buflast=='>';procmail_getline()); /* gather continued >From_ lines */ | |
25 | } | |
26 | else | |
27 | - for(;;getline()) /* get the rest of the continued field */ | |
28 | + for(;;procmail_getline()) /* get the rest of the continued field */ | |
29 | { switch(buflast) /* will this line be continued? */ | |
30 | { case ' ':case '\t': /* yep, it sure is */ | |
31 | continue; | |
32 | --- a/src/formail.c | |
33 | +++ b/src/formail.c | |
34 | @@ -819,7 +819,7 @@ | |
35 | { if(split) /* gobble up the next start separator */ | |
36 | { buffilled=0; | |
37 | #ifdef sMAILBOX_SEPARATOR | |
38 | - getline();buffilled=0; /* but only if it's defined */ | |
39 | + procmail_getline();buffilled=0; /* but only if it's defined */ | |
40 | #endif | |
41 | if(buflast!=EOF) /* if any */ | |
42 | goto splitit; | |
43 | --- a/src/formisc.c | |
44 | +++ b/src/formisc.c | |
45 | @@ -115,7 +115,7 @@ | |
46 | buf[buffilled++]=c; | |
47 | } | |
48 | ||
49 | -int getline P((void)) /* read a newline-terminated line */ | |
50 | +int procmail_getline P((void)) /* read a newline-terminated line */ | |
51 | { if(buflast==EOF) /* at the end of our Latin already? */ | |
52 | { loadchar('\n'); /* fake empty line */ | |
53 | return EOF; /* spread the word */ | |
54 | --- a/src/formisc.h | |
55 | +++ b/src/formisc.h | |
56 | @@ -17,4 +17,4 @@ | |
57 | char* | |
58 | skipwords P((char*start)); | |
59 | int | |
60 | - getline P((void)); | |
61 | + procmail_getline P((void)); |