summaryrefslogtreecommitdiff
path: root/net/ORBit
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2003-01-19 13:48:18 +0000
committerwiz <wiz@pkgsrc.org>2003-01-19 13:48:18 +0000
commit5370b9765e35060a59a6d47aae0fbb2e6be6d3a4 (patch)
treedbb46a318e74cb8819c619c35f8ab8f745be0023 /net/ORBit
parent7787c58abe01796e3ee8087f53bc1fe9ce242137 (diff)
downloadpkgsrc-5370b9765e35060a59a6d47aae0fbb2e6be6d3a4.tar.gz
Replace wrap_writev with a simpler solution (old one had some problems).
Fixes endless loop problems. Report and suggestion by Greg Troxel gdt at ir bbn com in private mail; some comments by Alistair Crooks; patch reviewed and okayed by Jaromir Dolecek. Bump PKGREVISION to 3.
Diffstat (limited to 'net/ORBit')
-rw-r--r--net/ORBit/Makefile4
-rw-r--r--net/ORBit/distinfo4
-rw-r--r--net/ORBit/patches/patch-an48
3 files changed, 13 insertions, 43 deletions
diff --git a/net/ORBit/Makefile b/net/ORBit/Makefile
index 9da2c6beb4c..797ad343541 100644
--- a/net/ORBit/Makefile
+++ b/net/ORBit/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.83 2002/11/26 10:29:31 jlam Exp $
+# $NetBSD: Makefile,v 1.84 2003/01/19 13:48:18 wiz Exp $
#
DISTNAME= ORBit-0.${ORBIT_MAJOR}.${ORBIT_MINOR}
-PKGREVISION= 2
+PKGREVISION= 3
CATEGORIES= net
MASTER_SITES= ${MASTER_SITE_GNOME:=sources/ORBit/0.${ORBIT_MAJOR}/}
diff --git a/net/ORBit/distinfo b/net/ORBit/distinfo
index 9afbd309d71..b3ad731b689 100644
--- a/net/ORBit/distinfo
+++ b/net/ORBit/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.15 2002/11/25 21:20:06 jlam Exp $
+$NetBSD: distinfo,v 1.16 2003/01/19 13:48:18 wiz Exp $
SHA1 (ORBit-0.5.15.tar.gz) = 1571976662311060175008d225de05e9bc2eb038
Size (ORBit-0.5.15.tar.gz) = 1335272 bytes
@@ -13,5 +13,5 @@ SHA1 (patch-ai) = 06e1cb2bc9f4f5460cdde71526417cdaa38ff310
SHA1 (patch-ak) = d569014320dbea40ccdb9e369e07c984ee7bd9de
SHA1 (patch-al) = 7f2992136c3f7b1badfc76a83d6fed0aa73a8873
SHA1 (patch-am) = f52369447d04a382d6e93a6bddaf3962a3ab6677
-SHA1 (patch-an) = 7b8ead20b77dc8bad497216c958578d1b285391d
+SHA1 (patch-an) = 970dfe187ddf7ccc64cfb292e60e470d6ffae98e
SHA1 (patch-ao) = 4346486e6a3d947350b162088490692543dde2f3
diff --git a/net/ORBit/patches/patch-an b/net/ORBit/patches/patch-an
index 4ed426c648a..430ae1381e9 100644
--- a/net/ORBit/patches/patch-an
+++ b/net/ORBit/patches/patch-an
@@ -1,43 +1,13 @@
-$NetBSD: patch-an,v 1.2 2002/04/25 12:17:05 agc Exp $
-Also handle EINVAL error to writev(2).
+$NetBSD: patch-an,v 1.3 2003/01/19 13:48:19 wiz Exp $
--- src/IIOP/giop-msg-buffer.c.orig Mon Mar 11 13:40:02 2002
+++ src/IIOP/giop-msg-buffer.c
-@@ -165,6 +165,37 @@
- return msgbuf;
- }
+@@ -210,7 +210,7 @@ giop_send_buffer_write(GIOPSendBuffer *s
+ res = writev (fd, curvec, MIN (nvecs, MAX_LIMITED_IOVECS));
+ /* fprintf (stderr, "wrote %ld bytes [%d]\n", res, (int) errno); */
+ #else
+- res = writev (fd, curvec, nvecs);
++ res = writev (fd, curvec, MIN(nvecs, IOV_MAX));
+ #endif
+ } while (res < 0 && errno == EINTR);
-+#ifdef __NetBSD__
-+/* NetBSD returns EINVAL if we try to send > IOV_MAX iovecs */
-+/* wrap writev so that we only ever try to send IOV_MAX at most */
-+
-+#include <limits.h>
-+
-+static int
-+wrap_writev(int fd, const struct iovec *vector, size_t count)
-+{
-+ size_t n;
-+ int ret;
-+ int wc;
-+
-+ ret = 0;
-+ while (count > 0) {
-+ n = MIN(IOV_MAX, count);
-+ if ((wc = writev(fd, vector, n)) < 0) {
-+ break;
-+ }
-+ ret += wc;
-+ vector += n;
-+ count -= n;
-+ }
-+ return ret;
-+}
-+
-+#define writev wrap_writev
-+
-+#endif /* __NetBSD__ */
-+
-+
- gint
- giop_send_buffer_write(GIOPSendBuffer *send_buffer)
- {