projects/aports·blob master · refs

196 lines · 6.3 KiB

1Various fixes for the configure script. Most of them are specific to
2this package, and not related to autoconf limitations. The
3configure.in/configure.ac autoconf input is not included among
4upstream sources, so they are not patched here.
5
6Submitted upstream: <https://rt.cpan.org/Public/Bug/Display.html?id=145943>
7
8diff --git a/FileList/configure b/FileList/configure
9index 023b6066e0f9d362..cdf2a72b57d73abf 100755
10--- a/FileList/configure
11+++ b/FileList/configure
12@@ -2246,7 +2246,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14 (exit $ac_status); }; }; then
15 for ac_declaration in \
16- '' \
17+ '#include <stdlib.h>' \
18 'extern "C" void std::exit (int) throw (); using std::exit;' \
19 'extern "C" void std::exit (int); using std::exit;' \
20 'extern "C" void exit (int) throw ();' \
21@@ -2905,6 +2905,8 @@ cat >>conftest.$ac_ext <<_ACEOF
22 #include <fcntl.h>
23 #include <sys/types.h>
24 #include <sys/wait.h>
25+#include <stdlib.h>
26+#include <string.h>
27
28 int main(void)
29 {
30@@ -4492,8 +4494,8 @@ main ()
31 for (i = 0; i < 256; i++)
32 if (XOR (islower (i), ISLOWER (i))
33 || toupper (i) != TOUPPER (i))
34- exit(2);
35- exit (0);
36+ return 2;
37+ return 0;
38 }
39 _ACEOF
40 rm -f conftest$ac_exeext
41@@ -6841,6 +6843,8 @@ cat >>conftest.$ac_ext <<_ACEOF
42 #define NGID 256
43 #undef MAX
44 #define MAX(x, y) ((x) > (y) ? (x) : (y))
45+#include <unistd.h>
46+#include <stdlib.h>
47
48 int
49 main ()
50@@ -8828,12 +8832,13 @@ cat confdefs.h >>conftest.$ac_ext
51 cat >>conftest.$ac_ext <<_ACEOF
52 /* end confdefs.h. */
53 $ac_includes_default
54+#include <utime.h>
55 int
56 main ()
57 {
58 struct stat s, t;
59 exit (!(stat ("conftest.data", &s) == 0
60- && utime ("conftest.data", (long *)0) == 0
61+ && utime ("conftest.data", 0) == 0
62 && stat ("conftest.data", &t) == 0
63 && t.st_mtime >= s.st_mtime
64 && t.st_mtime - s.st_mtime < 120));
65@@ -9397,9 +9402,9 @@ cat >>conftest.$ac_ext <<_ACEOF
66 #include <sys/types.h>
67 #include <sys/socket.h>
68
69-main() {
70+int main(void) {
71 int fd[2];
72- exit((socketpair(AF_UNIX, SOCK_STREAM, 0, fd) != -1) ? 0 : 1);
73+ return (socketpair(AF_UNIX, SOCK_STREAM, 0, fd) != -1) ? 0 : 1;
74 }
75 _ACEOF
76 rm -f conftest$ac_exeext
77@@ -9451,7 +9456,7 @@ cat confdefs.h >>conftest.$ac_ext
78 cat >>conftest.$ac_ext <<_ACEOF
79 /* end confdefs.h. */
80 #include <stdio.h>
81-main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }
82+int main(void) { long long x = 1000000; x *= x; return ((x/1000000) == 1000000)? 0: 1; }
83 _ACEOF
84 rm -f conftest$ac_exeext
85 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
86@@ -9503,7 +9508,7 @@ cat >>conftest.$ac_ext <<_ACEOF
87 /* end confdefs.h. */
88 #include <stdio.h>
89 #include <sys/stat.h>
90-main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
91+int main(void) { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) return 1; return (lstat64("/dev/null", &st)==0)?0:1; }
92 _ACEOF
93 rm -f conftest$ac_exeext
94 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
95@@ -9556,7 +9561,7 @@ cat >>conftest.$ac_ext <<_ACEOF
96 #include <stdio.h>
97 #include <sys/types.h>
98 #include <sys/stat.h>
99-main() { if (sizeof(ino_t) < sizeof(unsigned int)) return 0; return 1; }
100+int main(void) { if (sizeof(ino_t) < sizeof(unsigned int)) return 0; return 1; }
101 _ACEOF
102 rm -f conftest$ac_exeext
103 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
104@@ -9607,7 +9612,7 @@ cat confdefs.h >>conftest.$ac_ext
105 cat >>conftest.$ac_ext <<_ACEOF
106 /* end confdefs.h. */
107 #include <stdio.h>
108-main() { char c; c=250; exit((c > 0)?0:1); }
109+int main(void) { char c; c=250; return (c > 0)?0:1; }
110 _ACEOF
111 rm -f conftest$ac_exeext
112 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
113@@ -9659,9 +9664,9 @@ cat >>conftest.$ac_ext <<_ACEOF
114 /* end confdefs.h. */
115 #include <sys/types.h>
116 #include <dirent.h>
117-main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
118+int main(void) { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
119 if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
120-di->d_name[0] == 0) exit(0); exit(1);}
121+di->d_name[0] == 0) return 0; return 1;}
122 _ACEOF
123 rm -f conftest$ac_exeext
124 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
125@@ -9713,7 +9718,7 @@ cat >>conftest.$ac_ext <<_ACEOF
126 int
127 main ()
128 {
129-struct utimbuf tbuf; tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));
130+struct utimbuf tbuf; tbuf.actime = 0; tbuf.modtime = 1; return utime("foo.c",&tbuf);
131 ;
132 return 0;
133 }
134@@ -9777,7 +9782,7 @@ cat >>conftest.$ac_ext <<_ACEOF
135
136 #include <sys/time.h>
137 #include <unistd.h>
138-main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}
139+int main(void) { struct timeval tv; return gettimeofday(&tv, NULL);}
140 _ACEOF
141 rm -f conftest$ac_exeext
142 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
143@@ -9830,6 +9835,9 @@ cat >>conftest.$ac_ext <<_ACEOF
144
145 #include <sys/types.h>
146 #include <stdarg.h>
147+#include <stdio.h>
148+#include <stdlib.h>
149+#include <string.h>
150 void foo(const char *format, ...) {
151 va_list ap;
152 int len;
153@@ -9844,7 +9852,7 @@ void foo(const char *format, ...) {
154
155 exit(0);
156 }
157-main() { foo("hello"); }
158+int main(void) { foo("hello"); }
159
160 _ACEOF
161 rm -f conftest$ac_exeext
162@@ -9900,7 +9908,7 @@ cat >>conftest.$ac_ext <<_ACEOF
163 #include <sys/types.h>
164 #include <sys/stat.h>
165 #include <unistd.h>
166-main() {
167+int main(void) {
168 struct stat st;
169 char tpl[20]="/tmp/test.XXXXXX";
170 int fd = mkstemp(tpl);
171@@ -9965,10 +9973,11 @@ cat >>conftest.$ac_ext <<_ACEOF
172 #include <sys/types.h>
173 #include <netinet/in.h>
174 #include <arpa/inet.h>
175-main() { struct in_addr ip; ip.s_addr = 0x12345678;
176+#include <string.h>
177+int main(void) { struct in_addr ip; ip.s_addr = 0x12345678;
178 if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
179- strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(1); }
180-exit(0);}
181+ strcmp(inet_ntoa(ip),"120.86.52.18")) { return 1; }
182+return 0;}
183 _ACEOF
184 rm -f conftest$ac_exeext
185 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
186@@ -10024,8 +10033,8 @@ cat >>conftest.$ac_ext <<_ACEOF
187 #include <sys/types.h>
188 #include <netinet/in.h>
189 #include <arpa/inet.h>
190-main() { struct in_addr ip;
191-if (inet_aton("example", &ip) == 0) exit(0); exit(1);}
192+int main(void) { struct in_addr ip;
193+if (inet_aton("example", &ip) == 0) return 0; return 1;}
194 _ACEOF
195 rm -f conftest$ac_exeext
196 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5