pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mail/imap-uw Rename hash_lookup() in src/c-client/misc...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/612da0a63605
branches:  trunk
changeset: 363138:612da0a63605
user:      taca <taca%pkgsrc.org@localhost>
date:      Fri Jun 02 05:35:21 2017 +0000

description:
Rename hash_lookup() in src/c-client/misc.c to unusual name.
This hash_lookup() is internal function of imap but conflict with other
package (converters/php-recode) and cause php binary to crash.

Bump PKGREVISION.

diffstat:

 mail/imap-uw/Makefile                          |   4 +-
 mail/imap-uw/distinfo                          |   5 ++-
 mail/imap-uw/patches/patch-src_c-client_mail.c |  43 ++++++++++++++++++++++++++
 mail/imap-uw/patches/patch-src_c-client_misc.c |  16 +++++++++
 mail/imap-uw/patches/patch-src_c-client_misc.h |  16 +++++++++
 5 files changed, 81 insertions(+), 3 deletions(-)

diffs (122 lines):

diff -r a61673e822b7 -r 612da0a63605 mail/imap-uw/Makefile
--- a/mail/imap-uw/Makefile     Fri Jun 02 04:16:35 2017 +0000
+++ b/mail/imap-uw/Makefile     Fri Jun 02 05:35:21 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.143 2016/03/05 11:27:50 jperkin Exp $
+# $NetBSD: Makefile,v 1.144 2017/06/02 05:35:21 taca Exp $
 #
 # ATTENTION:
 # The Kerberos support in this software is known to be problematic. If you
@@ -11,7 +11,7 @@
 
 DISTNAME=      imap-2007f
 PKGNAME=       ${DISTNAME:S/-/-uw-/}
-PKGREVISION=   3
+PKGREVISION=   4
 CATEGORIES=    mail
 MASTER_SITES=  ftp://ftp.cac.washington.edu/imap/
 EXTRACT_SUFX=  .tar.Z
diff -r a61673e822b7 -r 612da0a63605 mail/imap-uw/distinfo
--- a/mail/imap-uw/distinfo     Fri Jun 02 04:16:35 2017 +0000
+++ b/mail/imap-uw/distinfo     Fri Jun 02 05:35:21 2017 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.44 2015/11/03 23:27:07 agc Exp $
+$NetBSD: distinfo,v 1.45 2017/06/02 05:35:21 taca Exp $
 
 SHA1 (imap-2007f.tar.Z) = 1c9935e5a261baec85dadcbc0c514b66fa3ce0a5
 RMD160 (imap-2007f.tar.Z) = 14f40284e9e164c0ed7677f1e5d8e3309c7c58c1
@@ -36,4 +36,7 @@
 SHA1 (patch-bf) = 63c582e88bd6286295d5d9639bafec355278d537
 SHA1 (patch-bg) = c95483ed73d7c6015df99967c0509cf0ea67d28f
 SHA1 (patch-bh) = c43dc5df9fb61ea44b5195fc15c697e5f540dfae
+SHA1 (patch-src_c-client_mail.c) = fca90d3a5a8770b8728bdef6aec2623d16c12b6d
+SHA1 (patch-src_c-client_misc.c) = d22ca95fb333b5234c66440faf5d6e30a148bad1
+SHA1 (patch-src_c-client_misc.h) = 5cf51d186b04ebb45c79b8042bbdcb01716dd2ce
 SHA1 (patch-src_mlock_Makefile) = 6bf652f597ad21dffa44e01d6cb89525eeaf7fc9
diff -r a61673e822b7 -r 612da0a63605 mail/imap-uw/patches/patch-src_c-client_mail.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/imap-uw/patches/patch-src_c-client_mail.c    Fri Jun 02 05:35:21 2017 +0000
@@ -0,0 +1,43 @@
+$NetBSD: patch-src_c-client_mail.c,v 1.1 2017/06/02 05:35:21 taca Exp $
+
+Rename hash_lookup() to unusual name to avoid conflict to other
+shared libraries.  It should be internal function of libc-client.
+
+--- src/c-client/mail.c.orig   2011-07-23 00:20:18.000000000 +0000
++++ src/c-client/mail.c
+@@ -4938,7 +4938,7 @@ THREADNODE *mail_thread_references (MAIL
+     if (s->unique && (s->unique != s->message_id))
+       fs_give ((void **) &s->unique);
+     s->unique = s->message_id ?       /* don't permit Message ID duplicates */
+-      (hash_lookup (ht,s->message_id) ? cpystr (tmp) : s->message_id) :
++      (hash_lookup_ (ht,s->message_id) ? cpystr (tmp) : s->message_id) :
+       (s->message_id = cpystr (tmp));
+                               /* add unique string to hash table */
+     hash_add (ht,s->unique,s,THREADLINKS);
+@@ -4960,7 +4960,7 @@ THREADNODE *mail_thread_references (MAIL
+       }
+     else con = NIL;           /* else message has no ancestors */
+                       /* Step 1B */
+-    if ((prc = PARENT ((nxc = hash_lookup (ht,s->unique)))) &&
++    if ((prc = PARENT ((nxc = hash_lookup_ (ht,s->unique)))) &&
+       (prc != con)) {         /* break links if have a different parent */
+       SETPARENT (nxc,NIL);    /* easy if direct child */
+       if (nxc == CHILD (prc)) SETCHILD (prc,SIBLING (nxc));
+@@ -5022,7 +5022,7 @@ THREADNODE *mail_thread_references (MAIL
+   for (cur = root; cur; cur = cur->branch)
+     if ((t = (nxt = (cur->sc ? cur : cur->next))->sc->subject) && *t) {
+                               /* add new subject to hash table */
+-      if (!(sub = hash_lookup (ht,t))) hash_add (ht,t,cur,0);
++      if (!(sub = hash_lookup_ (ht,t))) hash_add (ht,t,cur,0);
+                               /* if one in table not dummy and */
+       else if ((s = (lst = (THREADNODE *) sub[0])->sc) &&
+                               /* current dummy, or not re/fwd and table is */
+@@ -5034,7 +5034,7 @@ THREADNODE *mail_thread_references (MAIL
+   for (cur = root, sis = NIL; cur; cur = msg) {
+                               /* do nothing if current message or no sub */
+     if (!(t = (cur->sc ? cur : cur->next)->sc->subject) || !*t ||
+-      ((lst = (THREADNODE *) (sub = hash_lookup (ht,t))[0]) == cur))
++      ((lst = (THREADNODE *) (sub = hash_lookup_ (ht,t))[0]) == cur))
+       msg = (sis = cur)->branch;
+     else if (!lst->sc) {      /* is message in the table a dummy? */
+                               /* find youngest daughter of msg in table */
diff -r a61673e822b7 -r 612da0a63605 mail/imap-uw/patches/patch-src_c-client_misc.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/imap-uw/patches/patch-src_c-client_misc.c    Fri Jun 02 05:35:21 2017 +0000
@@ -0,0 +1,16 @@
+$NetBSD: patch-src_c-client_misc.c,v 1.1 2017/06/02 05:35:21 taca Exp $
+
+Rename hash_lookup() to unusual name to avoid conflict to other
+shared libraries.  It should be internal function of libc-client.
+
+--- src/c-client/misc.c.orig   2011-07-23 00:20:18.000000000 +0000
++++ src/c-client/misc.c
+@@ -343,7 +343,7 @@ unsigned long hash_index (HASHTAB *hasht
+  * Returns: associated data
+  */
+ 
+-void **hash_lookup (HASHTAB *hashtab,char *key)
++void **hash_lookup_ (HASHTAB *hashtab,char *key)
+ {
+   HASHENT *ret;
+   for (ret = hashtab->table[hash_index (hashtab,key)]; ret; ret = ret->next)
diff -r a61673e822b7 -r 612da0a63605 mail/imap-uw/patches/patch-src_c-client_misc.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/imap-uw/patches/patch-src_c-client_misc.h    Fri Jun 02 05:35:21 2017 +0000
@@ -0,0 +1,16 @@
+$NetBSD: patch-src_c-client_misc.h,v 1.1 2017/06/02 05:35:21 taca Exp $
+
+Rename hash_lookup() to unusual name to avoid conflict to other
+shared libraries.  It should be internal function of libc-client.
+
+--- src/c-client/misc.h.orig   2011-07-23 00:20:18.000000000 +0000
++++ src/c-client/misc.h
+@@ -100,7 +100,7 @@ HASHTAB *hash_create (size_t size);
+ void hash_destroy (HASHTAB **hashtab);
+ void hash_reset (HASHTAB *hashtab);
+ unsigned long hash_index (HASHTAB *hashtab,char *key);
+-void **hash_lookup (HASHTAB *hashtab,char *key);
++void **hash_lookup_ (HASHTAB *hashtab,char *key);
+ HASHENT *hash_add (HASHTAB *hashtab,char *key,void *data,long extra);
+ void **hash_lookup_and_add (HASHTAB *hashtab,char *key,void *data,long extra);
+ unsigned char hex2byte (unsigned char c1,unsigned char c2);



Home | Main Index | Thread Index | Old Index