#! /bin/sh /usr/share/dpatch/dpatch-run ## 26-local-getline.dpatch by Mathieu Parent ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: Rename conflicting function getline ## DP: See http://bugs.debian.org/552865 and http://bugs.debian.org/552848 @DPATCH@ diff -urNad kolab-cyrus-imapd-2.2.13~/contrib/sieve-spamasssassin kolab-cyrus-imapd-2.2.13/contrib/sieve-spamasssassin --- kolab-cyrus-imapd-2.2.13~/contrib/sieve-spamasssassin 2002-05-10 00:00:46.000000000 +0200 +++ kolab-cyrus-imapd-2.2.13/contrib/sieve-spamasssassin 2009-11-11 19:52:40.000000000 +0100 @@ -85,7 +85,7 @@ + /* spam support */ + + static int -+ getline (int s, char *buf, int len) ++ local_getline (int s, char *buf, int len) + { + char *bp = buf; + int ret = 1; @@ -129,8 +129,8 @@ + int score; + int threshold; + -+ if (! getline (s, buf, sizeof (buf))) { -+ syslog (LOG_ERR, "read_response: response getline failed"); ++ if (! local_getline (s, buf, sizeof (buf))) { ++ syslog (LOG_ERR, "read_response: response local_getline failed"); + return SIEVE_FAIL; + } + if (sscanf (buf, "SPAMD/%d.%d %d %*s", &major, &minor, &response) != 3) { @@ -143,8 +143,8 @@ + major, minor); + return SIEVE_FAIL; + } -+ if (! getline (s, buf, sizeof (buf))) { -+ syslog (LOG_ERR, "read_response: header getline failed"); ++ if (! local_getline (s, buf, sizeof (buf))) { ++ syslog (LOG_ERR, "read_response: header local_getline failed"); + return SIEVE_FAIL; + } + if (sscanf (buf, "Spam: %5s ; %d / %d", is_spam, &score, &threshold) != 3) { diff -urNad kolab-cyrus-imapd-2.2.13~/makedepend/def.h kolab-cyrus-imapd-2.2.13/makedepend/def.h --- kolab-cyrus-imapd-2.2.13~/makedepend/def.h 2003-02-13 21:15:43.000000000 +0100 +++ kolab-cyrus-imapd-2.2.13/makedepend/def.h 2009-11-11 19:51:34.000000000 +0100 @@ -161,7 +161,7 @@ char *copy(); char *base_name(); -char *getline(); +char *local_getline(); struct symtab *slookup(); struct symtab *isdefined(); struct symtab *fdefined(); diff -urNad kolab-cyrus-imapd-2.2.13~/makedepend/main.c kolab-cyrus-imapd-2.2.13/makedepend/main.c --- kolab-cyrus-imapd-2.2.13~/makedepend/main.c 2003-02-13 21:15:44.000000000 +0100 +++ kolab-cyrus-imapd-2.2.13/makedepend/main.c 2009-11-11 19:51:03.000000000 +0100 @@ -548,7 +548,7 @@ * Get the next line. We only return lines beginning with '#' since that * is all this program is ever interested in. */ -char *getline(filep) +char *local_getline(filep) register struct filepointer *filep; { register char *p, /* walking pointer */ diff -urNad kolab-cyrus-imapd-2.2.13~/makedepend/parse.c kolab-cyrus-imapd-2.2.13/makedepend/parse.c --- kolab-cyrus-imapd-2.2.13~/makedepend/parse.c 2003-02-13 21:15:44.000000000 +0100 +++ kolab-cyrus-imapd-2.2.13/makedepend/parse.c 2009-11-11 19:51:19.000000000 +0100 @@ -82,7 +82,7 @@ register int type; boolean recfailOK; - while (line = getline(filep)) { + while (line = local_getline(filep)) { switch(type = deftype(line, filep, file_red, file, TRUE)) { case IF: doif: @@ -204,7 +204,7 @@ register char *line; register int type; - while (line = getline(filep)) { + while (line = local_getline(filep)) { switch(type = deftype(line, filep, file_red, file, FALSE)) { case IF: case IFFALSE: