summaryrefslogtreecommitdiff
path: root/mail
diff options
context:
space:
mode:
authorsketch <sketch>2008-03-03 11:45:17 +0000
committersketch <sketch>2008-03-03 11:45:17 +0000
commit690b439bc4292d4ae1b683032785afee70ae82cc (patch)
tree038c0da6860d4141af7b517618d1df44d66ac834 /mail
parenta011ba75fb1dd02c4d7f13737d22ca4a1be6f479 (diff)
downloadpkgsrc-690b439bc4292d4ae1b683032785afee70ae82cc.tar.gz
Solaris/SunPro fixes.
Diffstat (limited to 'mail')
-rw-r--r--mail/policyd/distinfo7
-rw-r--r--mail/policyd/patches/patch-ab16
-rw-r--r--mail/policyd/patches/patch-ac13
-rw-r--r--mail/policyd/patches/patch-ad37
-rw-r--r--mail/policyd/patches/patch-ae31
5 files changed, 98 insertions, 6 deletions
diff --git a/mail/policyd/distinfo b/mail/policyd/distinfo
index e9479c492e6..1c15e14ee97 100644
--- a/mail/policyd/distinfo
+++ b/mail/policyd/distinfo
@@ -1,7 +1,10 @@
-$NetBSD: distinfo,v 1.2 2007/08/20 07:30:09 ghen Exp $
+$NetBSD: distinfo,v 1.3 2008/03/03 11:45:17 sketch Exp $
SHA1 (policyd-1.82.tar.gz) = 4a9bf4bcf63eb3792794d87682e67b15e4a04707
RMD160 (policyd-1.82.tar.gz) = 0258ee9abaa00cde9a139bdeafed36df1ec37537
Size (policyd-1.82.tar.gz) = 68372 bytes
SHA1 (patch-aa) = f1be4bf5f101e15d8f73b05a73fdd1ca324b72eb
-SHA1 (patch-ab) = 9ef169a450d316c5f9f6b863fa5d618c77636738
+SHA1 (patch-ab) = 3bc5c7270a4c96b694c03bbb30722e1146a21170
+SHA1 (patch-ac) = b8e254e0c05a5e5ea599a068b9b63a2fd030b5b1
+SHA1 (patch-ad) = b0db714c2379deb225774ed4c237ea8ad0e52916
+SHA1 (patch-ae) = 8a9db8b9e050f2692c4a9201a1319248a9f30db6
diff --git a/mail/policyd/patches/patch-ab b/mail/policyd/patches/patch-ab
index 66886e1f400..48180b97ed0 100644
--- a/mail/policyd/patches/patch-ab
+++ b/mail/policyd/patches/patch-ab
@@ -1,8 +1,8 @@
-$NetBSD: patch-ab,v 1.1.1.1 2007/08/07 12:34:56 ghen Exp $
+$NetBSD: patch-ab,v 1.2 2008/03/03 11:45:17 sketch Exp $
---- Makefile.orig 2007-07-11 09:06:23.000000000 +0200
-+++ Makefile
-@@ -14,6 +14,8 @@ lib += -L/usr/pkg/lib/mysql
+--- Makefile.orig 2007-08-20 07:42:05.000000000 +0100
++++ Makefile 2008-03-03 11:05:32.976857000 +0000
+@@ -14,6 +14,8 @@
# os x
lib += -L/usr/local/mysql
@@ -11,3 +11,11 @@ $NetBSD: patch-ab,v 1.1.1.1 2007/08/07 12:34:56 ghen Exp $
CC := gcc
CPPFLAGS := -O $(inc)
+@@ -23,6 +25,7 @@
+
+ ifeq "${OS_NAME}" "sunos"
+ LDLIBS += -lsocket -lnsl -lm
++CPPFLAGS += -DMSG_NOSIGNAL=0
+ endif
+
+ .c.o:
diff --git a/mail/policyd/patches/patch-ac b/mail/policyd/patches/patch-ac
new file mode 100644
index 00000000000..04e52bab1d1
--- /dev/null
+++ b/mail/policyd/patches/patch-ac
@@ -0,0 +1,13 @@
+$NetBSD: patch-ac,v 1.1 2008/03/03 11:45:17 sketch Exp $
+
+--- sockets.c.orig 2007-08-20 07:42:05.000000000 +0100
++++ sockets.c 2008-03-03 11:05:33.815255000 +0000
+@@ -177,7 +177,7 @@
+ if (strncmp(ptr + buf_counter[fd] - 2, "\n\n", 2) == 0)
+ {
+ if (DEBUG > 2)
+- logmessage("DEBUG: fd %d: %s: returning -2 after reading %d bytes\n",fd, __FUNCTION__, data_read);
++ logmessage("DEBUG: fd %d: %s: returning -2 after reading %d bytes\n",fd, __func__, data_read);
+
+ return -2;
+ }
diff --git a/mail/policyd/patches/patch-ad b/mail/policyd/patches/patch-ad
new file mode 100644
index 00000000000..1eafdd20508
--- /dev/null
+++ b/mail/policyd/patches/patch-ad
@@ -0,0 +1,37 @@
+$NetBSD: patch-ad,v 1.1 2008/03/03 11:45:17 sketch Exp $
+
+--- throttle.c.orig 2008-03-03 11:09:11.691752000 +0000
++++ throttle.c 2008-03-03 11:26:23.792297000 +0000
+@@ -155,19 +155,21 @@
+ logmessage("DEBUG: fd: %d: tresult: %d\n", fd, tresult);
+
+ /* percentage won, set attribute accordingly */
+- switch (tresult)
+- {
+-
+- case 0 ... 49: tattrib_array[fd][0] = 'a'; break;
+- case 50 ... 89: tattrib_array[fd][0] = 'w'; break;
+- case 90 ... 900000: tattrib_array[fd][0] = 'p'; break;
+- /* allow for big percentage overshoot */
++ if (tresult >= 0 && tresult <= 49)
++ tattrib_array[fd][0] = 'a';
+
+- default:
+- logmessage("fatal: throttle_check(): invalid tresult: %d\n", tresult);
+- return (-1);
+- }
++ else if (tresult >= 50 && tresult <= 89)
++ tattrib_array[fd][0] = 'w';
+
++ /* allow for big percentage overshoot */
++ else if (tresult >= 90 && tresult <= 900000)
++ tattrib_array[fd][0] = 'p';
++
++ else {
++ logmessage("fatal: throttle_check(): invalid tresult: %d\n", tresult);
++ return (-1);
++ }
++
+ /* we selectively choose which throttle module we want */
+ switch(tnum)
+ {
diff --git a/mail/policyd/patches/patch-ae b/mail/policyd/patches/patch-ae
new file mode 100644
index 00000000000..92753492cda
--- /dev/null
+++ b/mail/policyd/patches/patch-ae
@@ -0,0 +1,31 @@
+$NetBSD: patch-ae,v 1.1 2008/03/03 11:45:17 sketch Exp $
+
+--- throttle_rcpt.c.orig 2007-08-20 07:42:05.000000000 +0100
++++ throttle_rcpt.c 2008-03-03 11:40:14.424059000 +0000
+@@ -61,15 +61,18 @@
+ trcpt[fd] = atof(mysqlchar_array[fd][2]) / atof(mysqlchar_array[fd][1]) * 100;
+
+ /* percentage won, set attribute accordingly */
+- switch (trcpt[fd])
+- {
+- case 0 ... 49: tattrib_array[fd][0] = 'a'; break;
+- case 50 ... 89: tattrib_array[fd][0] = 'w'; break;
+- case 90 ... 1000: tattrib_array[fd][0] = 'p'; break;
++ if (trcpt[fd] >= 0 && trcpt[fd] <= 49)
++ tattrib_array[fd][0] = 'a';
+
+- default:
+- logmessage("fatal: throttle_rcpt(): invalid tresult: %d\n", trcpt[fd]);
+- }
++ else if (trcpt[fd] >= 50 && trcpt[fd] <= 89)
++ tattrib_array[fd][0] = 'w';
++
++ /* allow for big percentage overshoot */
++ else if (trcpt[fd] >= 90 && trcpt[fd] <= 1000)
++ tattrib_array[fd][0] = 'p';
++
++ else
++ logmessage("fatal: throttle_rcpt(): invalid tresult: %d\n", trcpt[fd]);
+
+ /* user is not in the database */
+ if(strlen(mysqlchar_array[fd][0]) < 2)