You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

75 lines
3.2 KiB

# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../procmail/getline.patch
# Copyright (C) 2010 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
# of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
# --- SDE-COPYRIGHT-NOTE-END ---
Avoid conflict with glibc's getline function.
diff -ruN procmail-3.22-orig/src/fields.c procmail-3.22/src/fields.c
--- procmail-3.22-orig/src/fields.c 2001-09-11 06:57:08.000000000 +0200
+++ procmail-3.22/src/fields.c 2010-07-26 17:28:30.700504572 +0200
@@ -110,16 +110,16 @@
/* try and append one valid field to rdheader from stdin */
int readhead P((void))
{ int idlen;
- getline();
+ procmail_getline();
if((idlen=breakfield(buf,buffilled))<=0) /* not the start of a valid field */
return 0;
if(idlen==STRLEN(FROM)&&eqFrom_(buf)) /* it's a From_ line */
{ if(rdheader)
return 0; /* the From_ line was a fake! */
- for(;buflast=='>';getline()); /* gather continued >From_ lines */
+ for(;buflast=='>';procmail_getline()); /* gather continued >From_ lines */
}
else
- for(;;getline()) /* get the rest of the continued field */
+ for(;;procmail_getline()) /* get the rest of the continued field */
{ switch(buflast) /* will this line be continued? */
{ case ' ':case '\t': /* yep, it sure is */
continue;
diff -ruN procmail-3.22-orig/src/formail.c procmail-3.22/src/formail.c
--- procmail-3.22-orig/src/formail.c 2001-09-11 06:57:32.000000000 +0200
+++ procmail-3.22/src/formail.c 2010-07-26 17:28:30.696504668 +0200
@@ -819,7 +819,7 @@
{ if(split) /* gobble up the next start separator */
{ buffilled=0;
#ifdef sMAILBOX_SEPARATOR
- getline();buffilled=0; /* but only if it's defined */
+ procmail_getline();buffilled=0; /* but only if it's defined */
#endif
if(buflast!=EOF) /* if any */
goto splitit;
diff -ruN procmail-3.22-orig/src/formisc.c procmail-3.22/src/formisc.c
--- procmail-3.22-orig/src/formisc.c 2001-06-29 04:20:45.000000000 +0200
+++ procmail-3.22/src/formisc.c 2010-07-26 17:28:30.692019896 +0200
@@ -115,7 +115,7 @@
buf[buffilled++]=c;
}
-int getline P((void)) /* read a newline-terminated line */
+int procmail_getline P((void)) /* read a newline-terminated line */
{ if(buflast==EOF) /* at the end of our Latin already? */
{ loadchar('\n'); /* fake empty line */
return EOF; /* spread the word */
diff -ruN procmail-3.22-orig/src/formisc.h procmail-3.22/src/formisc.h
--- procmail-3.22-orig/src/formisc.h 1999-04-19 08:42:15.000000000 +0200
+++ procmail-3.22/src/formisc.h 2010-07-26 17:28:30.700504572 +0200
@@ -17,4 +17,4 @@
char*
skipwords P((char*start));
int
- getline P((void));
+ procmail_getline P((void));