summaryrefslogtreecommitdiff
path: root/devel/ORBit/files/patch-ae
blob: 326dcfe4b6517f97811098a85bbd98d20e2c6271 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
$FreeBSD$

--- configure.orig	Thu Jun  6 14:27:24 2002
+++ configure	Fri Jun  7 19:30:22 2002
@@ -6430,6 +6430,7 @@
 
 # This can be used to rebuild libtool when needed
 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
+$ac_aux_dir/ltconfig $LIBTOOL_DEPS
 
 # Always use our own libtool.
 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
@@ -7396,9 +7397,9 @@
 
   rm -f conf.glibtest
 
-GMODULE_CFLAGS=`glib-config --cflags gmodule`
+GMODULE_CFLAGS=`$GLIB_CONFIG --cflags gmodule`
 
-GMODULE_LIBS=`glib-config --libs gmodule`
+GMODULE_LIBS=`$GLIB_CONFIG --libs gmodule`
 
 for ac_prog in 'bison -y' byacc
 do
@@ -9244,9 +9245,11 @@
 
 fi
 
+echo $ac_n "checking how many vectors writev is capable to handle""... $ac_c" 1>&6
+echo "configure:3761: 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
+  MAXIOV=16
 EOF
 
 else
@@ -9254,29 +9257,23 @@
 #line 9254 "configure"
 #include "confdefs.h"
 
-#include <fcntl.h>
+#include <sys/types.h>
 #include <sys/uio.h>
-#define NIOVECS 50
+#include <fcntl.h>
+#include <stdio.h>
 int main(int argc, char *argv[])
 {
-	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);
 }
 
 _ACEOF
@@ -9291,18 +9288,16 @@
   ac_status=$?
   echo "$as_me:9292: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  :
+  MAXIOV=`cat conftestval`
 else
   echo "$as_me: program exited with status $ac_status" >&5
 echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-cat >>confdefs.h <<\EOF
-#define HAVE_LIMITED_WRITEV 1
-EOF
-
+  MAXIOV=16
 fi
 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
+echo "$ac_t""$MAXIOV" 1>&6
 
 #######################
 # type alignment test #
@@ -10700,7 +10695,7 @@
 s,@LIB_WRAP@,$LIB_WRAP,;t t
 s,@HAVE_HOSTS_ACCESS_TRUE@,$HAVE_HOSTS_ACCESS_TRUE,;t t
 s,@HAVE_HOSTS_ACCESS_FALSE@,$HAVE_HOSTS_ACCESS_FALSE,;t t
-s,@HAVE_LIMITED_WRITEV@,$HAVE_LIMITED_WRITEV,;t t
+s,@MAXIOV@,$MAXIOV,;t t
 s,@subdirs@,$subdirs,;t t
 s,@pkglibdir@,$pkglibdir,;t t
 CEOF