Date: Mon, 31 Oct 2005 00:21:17 +0300 (MSK) From: "Boris B. Samorodov" <bsam@ipt.ru> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/88253: [update] devel/mime: unbreak compiling on FreeBSD >= 6.0 Message-ID: <200510302121.j9ULLHR2039610@mi.ipt.ru> Resent-Message-ID: <200510302130.j9ULU5jZ091145@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 88253 >Category: ports >Synopsis: [update] devel/mime: unbreak compiling on FreeBSD >= 6.0 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Sun Oct 30 21:30:04 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Boris B. Samorodov >Release: FreeBSD 6.0-RC1 i386 >Organization: InPharmTech, Co. >Environment: System: FreeBSD mi.ipt.ru 6.0-RC1 FreeBSD 6.0-RC1 #0: Thu Oct 20 21:31:03 MSD 2005 bsam@mi.ipt.ru:/usr/obj/usr/src/sys/PROBA1 i386 >Description: The port devel/mime does not compile on FreeBSD >= 6.0: http://pointyhat.freebsd.org/errorlogs/amd64-errorlogs/e.7.2005100423/mime-1.1_1.log >How-To-Repeat: >Fix: The memmem port's vatiable conflicts with one form the system. The port's one is changed to memmemory. The patch should be applied to /usr/ports/devel: # cd /usr/ports/devel # patch -p0 < the_patch <delete *.orig files from devel/mime, devel/mime/files> --- devel-mime.patch begins here --- diff -ruN mime.orig/Makefile mime/Makefile --- mime.orig/Makefile Fri Feb 11 12:18:32 2005 +++ mime/Makefile Sun Oct 30 23:45:34 2005 @@ -7,7 +7,7 @@ PORTNAME= mime PORTVERSION= 1.1 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= devel MASTER_SITES= http://resnet.uoregon.edu/~gurney_j/jmpc/dist/ diff -ruN /dev/null mime/files/patch-header.c --- /dev/null Thu Jan 1 03:00:00 1970 +++ mime/files/patch-header.c Sun Oct 30 23:41:30 2005 @@ -0,0 +1,20 @@ +--- header.c.orig Sun Oct 30 23:37:49 2005 ++++ header.c Sun Oct 30 23:38:13 2005 +@@ -67,7 +67,7 @@ + alc = 0; + + while (value < end) { +- crlf = memmem(value, end - value, crlfpair, strlen(crlfpair)); ++ crlf = memmemory(value, end - value, crlfpair, strlen(crlfpair)); + if (crlf == NULL) + goto fv_error; + +@@ -123,7 +123,7 @@ + * header line + */ + colon = memchr(header, ':', end - header); +- crlf = memmem(header, end - header, crlfpair, strlen(crlfpair)); ++ crlf = memmemory(header, end - header, crlfpair, strlen(crlfpair)); + + if (colon == NULL || crlf == NULL || colon > crlf) + goto mph_error; diff -ruN mime.orig/files/patch-message.c mime/files/patch-message.c --- mime.orig/files/patch-message.c Sun Jun 13 00:24:01 2004 +++ mime/files/patch-message.c Sun Oct 30 23:40:49 2005 @@ -1,5 +1,25 @@ ---- message.c.orig Sat Jun 12 22:24:35 2004 -+++ message.c Sat Jun 12 22:24:52 2004 +--- message.c.orig Tue Sep 16 03:37:19 2003 ++++ message.c Sun Oct 30 23:38:44 2005 +@@ -89,7 +89,7 @@ + * XXX - need to be fixed to support "\r\n" + */ + bdcm = bd_makenorm(bd, crlfpair); +- bdlc = memmem(pos, len - (pos - msg), bdcm, strlen(bdcm)); ++ bdlc = memmemory(pos, len - (pos - msg), bdcm, strlen(bdcm)); + free(bdcm); + + if (bdlc != pos) { +@@ -146,8 +146,8 @@ + for (;;) { + ret = realloc(ret, sizeof *ret * *cnt + 1); + +- if ((next = memmem(msg, len, bdnorm, bdnormlen)) == NULL) +- next = memmem(msg, len, bdtail, bdtaillen); ++ if ((next = memmemory(msg, len, bdnorm, bdnormlen)) == NULL) ++ next = memmemory(msg, len, bdtail, bdtaillen); + + ret[(*cnt)++] = mime_readmessage(msg, next - msg, crlfpair); + @@ -272,6 +272,7 @@ eqcnt++; break; diff -ruN /dev/null mime/files/patch-util.c --- /dev/null Thu Jan 1 03:00:00 1970 +++ mime/files/patch-util.c Sun Oct 30 23:41:55 2005 @@ -0,0 +1,20 @@ +--- util.c.orig Sun Oct 30 23:38:55 2005 ++++ util.c Sun Oct 30 23:39:26 2005 +@@ -31,7 +31,7 @@ + + #if 0 + char * +-memmem(const char *big, int blen, const char *lit, int llen) ++memmemory(const char *big, int blen, const char *lit, int llen) + { + const char *pos; + +@@ -61,7 +61,7 @@ + } + + const char * +-memmem(const char *T, size_t n, const char *P, size_t m) ++memmemory(const char *T, size_t n, const char *P, size_t m) + { + static unsigned int q = 4294967291u; + static unsigned int d = 256; diff -ruN /dev/null mime/files/patch-util.h --- /dev/null Thu Jan 1 03:00:00 1970 +++ mime/files/patch-util.h Sun Oct 30 23:42:21 2005 @@ -0,0 +1,10 @@ +--- util.h.orig Sun Oct 30 23:39:40 2005 ++++ util.h Sun Oct 30 23:39:56 2005 +@@ -30,6 +30,6 @@ + #ifndef _UTIL_H_ + #define _UTIL_H_ + +-char *memmem(const char *, int, const char *, int); ++char *memmemory(const char *, int, const char *, int); + + #endif --- devel-mime.patch ends here --- WBR -- bsam >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200510302121.j9ULLHR2039610>