ports/devel/ORBit/files/patch-src::IIOP::giop-msg-buffer.c
Maxim Sobolev 128ab3ea69 Reimplement fix for an imcompatibility between ORBit and FreeBSD properly.
Instead of replacing writev(2) with loop based on write(2), test system
limit on the number of vectors writev(2) accepts and split call to writev(2)
to several calls in such a way that number of vectors in each call doesn't
exceed this limit (aka UIO_MAXIOV). Bump PORTREVISION.
2001-10-29 08:19:24 +00:00

34 lines
769 B
C

$FreeBSD$
--- src/IIOP/giop-msg-buffer.c.orig Wed Oct 3 09:51:21 2001
+++ src/IIOP/giop-msg-buffer.c Sat Oct 27 15:52:11 2001
@@ -34,10 +34,6 @@
#include "IIOP.h"
#include "IIOP-private.h"
-#ifdef HAVE_LIMITED_WRITEV
-#define writev g_writev
-#endif
-
/* type defs */
#ifdef __GNUC__
@@ -197,7 +193,7 @@
sum);
}
#endif
- res = writev(fd, curvec, nvecs);
+ res = g_writev(fd, curvec, nvecs);
sum = (GIOP_MESSAGE_BUFFER(send_buffer)->message_header.message_size + sizeof(GIOPMessageHeader));
if(res < sum) {
@@ -227,7 +223,7 @@
fcntl(fd, F_SETFL, fcntl(fd, F_GETFL, 0) & ~O_NONBLOCK);
- t = writev(fd, curvec, nvecs);
+ t = g_writev(fd, curvec, nvecs);
fcntl(fd, F_SETFL, fcntl(fd, F_GETFL, 0) | O_NONBLOCK);