diff options
author | Maxim Sobolev <sobomax@FreeBSD.org> | 2001-10-29 08:19:24 +0000 |
---|---|---|
committer | Maxim Sobolev <sobomax@FreeBSD.org> | 2001-10-29 08:19:24 +0000 |
commit | 128ab3ea692fd95d9f843bb4158cb7a5a865dff1 (patch) | |
tree | 5d47b869b3289261f8bcfc911abad5e0b6efab9c /devel/ORBit2/files/patch-ae | |
parent | Update to 0.12.6. (diff) |
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.
Notes
Notes:
svn path=/head/; revision=49315
Diffstat (limited to 'devel/ORBit2/files/patch-ae')
-rw-r--r-- | devel/ORBit2/files/patch-ae | 102 |
1 files changed, 97 insertions, 5 deletions
diff --git a/devel/ORBit2/files/patch-ae b/devel/ORBit2/files/patch-ae index 7ba0a489c38b..7e43d15302c9 100644 --- a/devel/ORBit2/files/patch-ae +++ b/devel/ORBit2/files/patch-ae @@ -1,9 +1,12 @@ ---- configure.orig Fri Feb 19 00:50:06 1999 -+++ configure Fri Feb 19 00:50:21 1999 -@@ -2499,9 +2499,9 @@ - + +$FreeBSD$ + +--- configure 2001/10/27 12:43:19 1.1 ++++ configure 2001/10/27 12:43:58 +@@ -5747,9 +5747,9 @@ rm -f conf.glibtest + -GMODULE_CFLAGS=`glib-config --cflags gmodule` +GMODULE_CFLAGS=`$GLIB_CONFIG --cflags gmodule` @@ -12,7 +15,96 @@ for ac_prog in 'bison -y' byacc -@@ -5288,10 +5288,6 @@ +@@ -7273,57 +7273,47 @@ + fi + + ++echo $ac_n "checking how many vectors writev is capable to handle""... $ac_c" 1>&6 ++echo "configure:7278: checking how many vectors writev is capable to handle" >&5 + if test "$cross_compiling" = yes; then +- cat >> confdefs.h <<\EOF +-#define HAVE_LIMITED_WRITEV 1 +-EOF +- ++ MAXIOV=16 + else + cat > conftest.$ac_ext <<EOF +-#line 7284 "configure" ++#line 7283 "configure" + #include "confdefs.h" + +-#include <fcntl.h> ++#include <sys/types.h> + #include <sys/uio.h> +-#define NIOVECS 50 +-int main(int argc, char *argv[]) ++#include <fcntl.h> ++#include <stdio.h> ++int main() + { +- char dumbuf[20] = "\n"; +- struct iovec iovecs[NIOVECS]; +- int i,fd; +- +- for(i = 0; i < NIOVECS; i++) { +- iovecs[i].iov_base = dumbuf; +- iovecs[i].iov_len = 1; +- } +- +- fd=open("/dev/null", O_WRONLY); +- if(fd==-1) +- return(1); +- +- if(writev(fd, iovecs, NIOVECS) < 0) +- return 1; +- ++ FILE *f; ++ int fd, i; ++ static struct iovec iovecs[4097]; ++ if ((f = fopen("conftestval", "w")) == NULL || \ ++ (fd = open("/dev/null", O_WRONLY)) < 0) ++ exit(1); ++ for (i = 1; i < 4098 && writev(fd, iovecs, i) >= 0; i++); ++ fprintf(f, "%d\n", i - 1); ++ fclose(f); + close(fd); +- return 0; ++ exit(0); + } + + EOF +-if { (eval echo configure:7313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:7306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then +- : ++ MAXIOV=`cat conftestval` + else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* +- cat >> confdefs.h <<\EOF +-#define HAVE_LIMITED_WRITEV 1 +-EOF +- ++ MAXIOV=16 + fi + rm -fr conftest* + fi +- ++echo "$ac_t""$MAXIOV" 1>&6 + + + ####################### +@@ -8260,7 +8250,7 @@ + s%@LIB_WRAP@%$LIB_WRAP%g + s%@HAVE_HOSTS_ACCESS_TRUE@%$HAVE_HOSTS_ACCESS_TRUE%g + s%@HAVE_HOSTS_ACCESS_FALSE@%$HAVE_HOSTS_ACCESS_FALSE%g +-s%@HAVE_LIMITED_WRITEV@%$HAVE_LIMITED_WRITEV%g ++s%@MAXIOV@%$MAXIOV%g + s%@subdirs@%$subdirs%g + s%@pkglibdir@%$pkglibdir%g + +@@ -8584,10 +8574,6 @@ *) # Relative path. ac_sub_cache_file="$ac_dots$cache_file" ;; esac |