Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-devel/autoconf/files/, sys-devel/autoconf/
Date: Thu, 03 Nov 2022 01:52:11
Message-Id: 1667440314.d172fe309bd90487b1f61a106efd2a8b68f10367.sam@gentoo
1 commit: d172fe309bd90487b1f61a106efd2a8b68f10367
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Thu Nov 3 01:51:24 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Thu Nov 3 01:51:54 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d172fe30
7
8 sys-devel/autoconf: more Clang 16 fixes for autoconf 2.13
9
10 Bug: https://bugs.gentoo.org/874366
11 See: c305a45884a8f01838d6e032f469d7f9423154e1
12 Signed-off-by: Sam James <sam <AT> gentoo.org>
13
14 ...conf-2.13-r4.ebuild => autoconf-2.13-r5.ebuild} | 0
15 ...onf-2.13-Clang-16-fixes-for-various-tests.patch | 88 +++++++++++++++++-----
16 2 files changed, 71 insertions(+), 17 deletions(-)
17
18 diff --git a/sys-devel/autoconf/autoconf-2.13-r4.ebuild b/sys-devel/autoconf/autoconf-2.13-r5.ebuild
19 similarity index 100%
20 rename from sys-devel/autoconf/autoconf-2.13-r4.ebuild
21 rename to sys-devel/autoconf/autoconf-2.13-r5.ebuild
22
23 diff --git a/sys-devel/autoconf/files/autoconf-2.13-Clang-16-fixes-for-various-tests.patch b/sys-devel/autoconf/files/autoconf-2.13-Clang-16-fixes-for-various-tests.patch
24 index b9319f0a4b71..55eda96241ab 100644
25 --- a/sys-devel/autoconf/files/autoconf-2.13-Clang-16-fixes-for-various-tests.patch
26 +++ b/sys-devel/autoconf/files/autoconf-2.13-Clang-16-fixes-for-various-tests.patch
27 @@ -1,4 +1,4 @@
28 -From de47e22d9b4f5fd5f1c9b9de798218a46ef94b98 Mon Sep 17 00:00:00 2001
29 +From 42a47ba46cacb85dfcf6efdba372a3eb3995a844 Mon Sep 17 00:00:00 2001
30 From: Sam James <sam@g.o>
31 Date: Thu, 3 Nov 2022 01:19:39 +0000
32 Subject: [PATCH] Clang 16 fixes for various tests
33 @@ -8,6 +8,7 @@ issues in various built-in tests.
34
35 Noticed when building XEmacs 21.4 (thanks to matsl for reporting).
36
37 +Bug: https://bugs.gentoo.org/874366
38 Signed-off-by: Sam James <sam@g.o>
39 --- a/acgeneral.m4
40 +++ b/acgeneral.m4
41 @@ -37,7 +38,16 @@ Signed-off-by: Sam James <sam@g.o>
42 #include <$ac_header_dirent>
43 int closedir(...); int main(void) { exit(closedir(opendir(".")) != 0); }],
44 ac_cv_func_closedir_void=no, ac_cv_func_closedir_void=yes, ac_cv_func_closedir_void=yes)])
45 -@@ -988,6 +990,7 @@ AC_DEFUN(AC_FUNC_CLOSEDIR_VOID,
46 +@@ -907,6 +909,8 @@ AC_CACHE_CHECK(type of array argument to getgroups, ac_cv_type_getgroups,
47 + changequote(<<, >>)dnl
48 + <<
49 + /* Thanks to Mike Rendell for this test. */
50 ++#include <stdlib.h>
51 ++#include <unistd.h>
52 + #include <sys/types.h>
53 + #define NGID 256
54 + #undef MAX
55 +@@ -988,6 +992,7 @@ AC_DEFUN(AC_FUNC_CLOSEDIR_VOID,
56 [AC_REQUIRE([AC_HEADER_DIRENT])dnl
57 AC_CACHE_CHECK(whether closedir returns void, ac_cv_func_closedir_void,
58 [AC_TRY_RUN([#include <sys/types.h>
59 @@ -45,7 +55,18 @@ Signed-off-by: Sam James <sam@g.o>
60 #include <$ac_header_dirent>
61 int closedir(...); int main(void) { exit(closedir(opendir(".")) != 0); }],
62 ac_cv_func_closedir_void=no, ac_cv_func_closedir_void=yes, ac_cv_func_closedir_void=yes)])
63 -@@ -1038,6 +1041,7 @@ AC_CACHE_CHECK(for working mmap, ac_cv_func_mmap_fixed_mapped,
64 +@@ -1001,7 +1006,9 @@ AC_DEFUN(AC_FUNC_FNMATCH,
65 + # Some versions of Solaris or SCO have a broken fnmatch function.
66 + # So we run a test program. If we are cross-compiling, take no chance.
67 + # Thanks to John Oleynick and Franc,ois Pinard for this test.
68 +-[AC_TRY_RUN([int main(void) { exit (fnmatch ("a*", "abc", 0) != 0); }],
69 ++[AC_TRY_RUN([#include <stdlib.h>
70 ++#include <fnmatch.h>
71 ++int main(void) { exit (fnmatch ("a*", "abc", 0) != 0); }],
72 + ac_cv_func_fnmatch_works=yes, ac_cv_func_fnmatch_works=no,
73 + ac_cv_func_fnmatch_works=no)])
74 + if test $ac_cv_func_fnmatch_works = yes; then
75 +@@ -1038,6 +1045,7 @@ AC_CACHE_CHECK(for working mmap, ac_cv_func_mmap_fixed_mapped,
76 #include <sys/types.h>
77 #include <fcntl.h>
78 #include <sys/mman.h>
79 @@ -53,7 +74,7 @@ Signed-off-by: Sam James <sam@g.o>
80
81 /* This mess was copied from the GNU getpagesize.h. */
82 #ifndef HAVE_GETPAGESIZE
83 -@@ -1165,49 +1169,17 @@ AC_DEFUN(AC_FUNC_GETPGRP,
84 +@@ -1165,49 +1173,17 @@ AC_DEFUN(AC_FUNC_GETPGRP,
85 *
86 * Snarfed from Chet Ramey's bash pgrp.c test program
87 */
88 @@ -111,7 +132,7 @@ Signed-off-by: Sam James <sam@g.o>
89 }
90 ], ac_cv_func_getpgrp_void=yes, ac_cv_func_getpgrp_void=no,
91 AC_MSG_ERROR(cannot check getpgrp if cross compiling))
92 -@@ -1220,9 +1192,7 @@ fi
93 +@@ -1220,9 +1196,7 @@ fi
94 AC_DEFUN(AC_FUNC_SETPGRP,
95 [AC_CACHE_CHECK(whether setpgrp takes no argument, ac_cv_func_setpgrp_void,
96 AC_TRY_RUN([
97 @@ -122,7 +143,7 @@ Signed-off-by: Sam James <sam@g.o>
98
99 /*
100 * If this system has a BSD-style setpgrp, which takes arguments, exit
101 -@@ -1230,10 +1200,13 @@ AC_TRY_RUN([
102 +@@ -1230,10 +1204,13 @@ AC_TRY_RUN([
103 */
104 int main(void)
105 {
106 @@ -140,7 +161,7 @@ Signed-off-by: Sam James <sam@g.o>
107 }
108 ], ac_cv_func_setpgrp_void=no, ac_cv_func_setpgrp_void=yes,
109 AC_MSG_ERROR(cannot check setpgrp if cross compiling))
110 -@@ -1255,9 +1228,11 @@ AC_DEFUN(AC_FUNC_VFORK,
111 +@@ -1255,9 +1232,11 @@ AC_DEFUN(AC_FUNC_VFORK,
112 AC_CHECK_HEADER(vfork.h, AC_DEFINE(HAVE_VFORK_H))
113 AC_CACHE_CHECK(for working vfork, ac_cv_func_vfork_works,
114 [AC_TRY_RUN([/* Thanks to Paul Eggert for this test. */
115 @@ -152,7 +173,7 @@ Signed-off-by: Sam James <sam@g.o>
116 #ifdef HAVE_UNISTD_H
117 #include <unistd.h>
118 #endif
119 -@@ -1270,7 +1245,7 @@ AC_CACHE_CHECK(for working vfork, ac_cv_func_vfork_works,
120 +@@ -1270,7 +1249,7 @@ AC_CACHE_CHECK(for working vfork, ac_cv_func_vfork_works,
121 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
122 Test for this by using a static variable whose address
123 is put into a register that is clobbered by the vfork. */
124 @@ -161,23 +182,35 @@ Signed-off-by: Sam James <sam@g.o>
125 #ifdef __cplusplus
126 sparc_address_test (int arg)
127 #else
128 -@@ -1359,6 +1334,7 @@ AC_DEFUN(AC_FUNC_WAIT3,
129 +@@ -1359,6 +1338,8 @@ AC_DEFUN(AC_FUNC_WAIT3,
130 #include <sys/time.h>
131 #include <sys/resource.h>
132 #include <stdio.h>
133 +#include <stdlib.h>
134 ++#include <unistd.h>
135 /* HP-UX has wait3 but does not fill in rusage at all. */
136 int main(void) {
137 struct rusage r;
138 -@@ -1582,6 +1558,7 @@ AC_DEFUN(AC_FUNC_UTIME_NULL,
139 +@@ -1452,7 +1433,8 @@ done
140 + fi
141 +
142 + AC_CACHE_CHECK(stack direction for C alloca, ac_cv_c_stack_direction,
143 +-[AC_TRY_RUN([find_stack_direction ()
144 ++[AC_TRY_RUN([#include <stdlib.h>
145 ++int find_stack_direction ()
146 + {
147 + static char *addr = 0;
148 + auto char dummy;
149 +@@ -1582,6 +1564,8 @@ AC_DEFUN(AC_FUNC_UTIME_NULL,
150 # Sequent interprets utime(file, 0) to mean use start of epoch. Wrong.
151 AC_TRY_RUN([#include <sys/types.h>
152 #include <sys/stat.h>
153 +#include <stdlib.h>
154 ++#include <utime.h>
155 int main(void) {
156 struct stat s, t;
157 exit(!(stat ("conftestdata", &s) == 0 && utime("conftestdata", (long *)0) == 0
158 -@@ -1598,6 +1575,7 @@ fi
159 +@@ -1598,6 +1582,7 @@ fi
160 AC_DEFUN(AC_FUNC_STRCOLL,
161 [AC_CACHE_CHECK(for working strcoll, ac_cv_func_strcoll_works,
162 [AC_TRY_RUN([#include <string.h>
163 @@ -185,7 +218,7 @@ Signed-off-by: Sam James <sam@g.o>
164 int main (void)
165 {
166 exit (strcoll ("abc", "def") >= 0 ||
167 -@@ -1614,6 +1592,7 @@ AC_DEFUN(AC_FUNC_SETVBUF_REVERSED,
168 +@@ -1614,6 +1599,7 @@ AC_DEFUN(AC_FUNC_SETVBUF_REVERSED,
169 [AC_CACHE_CHECK(whether setvbuf arguments are reversed,
170 ac_cv_func_setvbuf_reversed,
171 [AC_TRY_RUN([#include <stdio.h>
172 @@ -193,7 +226,7 @@ Signed-off-by: Sam James <sam@g.o>
173 /* If setvbuf has the reversed format, exit 0. */
174 int main (void) {
175 /* This call has the arguments reversed.
176 -@@ -1646,7 +1625,8 @@ LIBS="-lintl $LIBS"])])])
177 +@@ -1646,7 +1632,8 @@ LIBS="-lintl $LIBS"])])])
178
179 AC_DEFUN(AC_FUNC_MEMCMP,
180 [AC_CACHE_CHECK(for 8-bit clean memcmp, ac_cv_func_memcmp_clean,
181 @@ -203,7 +236,7 @@ Signed-off-by: Sam James <sam@g.o>
182 int main(void)
183 {
184 char c0 = 0x40, c1 = 0x80, c2 = 0x81;
185 -@@ -1805,6 +1785,7 @@ AC_TRY_RUN(
186 +@@ -1805,6 +1792,7 @@ AC_TRY_RUN(
187 #if !defined(__STDC__) || __STDC__ != 1
188 #define volatile
189 #endif
190 @@ -211,7 +244,7 @@ Signed-off-by: Sam James <sam@g.o>
191 int main(void) {
192 volatile char c = 255; exit(c < 0);
193 }], ac_cv_c_char_unsigned=yes, ac_cv_c_char_unsigned=no)
194 -@@ -1819,7 +1800,8 @@ AC_DEFUN(AC_C_LONG_DOUBLE,
195 +@@ -1819,7 +1807,8 @@ AC_DEFUN(AC_C_LONG_DOUBLE,
196 [if test "$GCC" = yes; then
197 ac_cv_c_long_double=yes
198 else
199 @@ -221,7 +254,7 @@ Signed-off-by: Sam James <sam@g.o>
200 /* The Stardent Vistra knows sizeof(long double), but does not support it. */
201 long double foo = 0.0;
202 /* On Ultrix 4.3 cc, long double is 4 and double is 8. */
203 -@@ -1834,7 +1816,8 @@ fi
204 +@@ -1834,7 +1823,8 @@ fi
205 AC_DEFUN(AC_INT_16_BITS,
206 [AC_OBSOLETE([$0], [; instead use AC_CHECK_SIZEOF(int)])dnl
207 AC_MSG_CHECKING(whether int is 16 bits)
208 @@ -231,7 +264,7 @@ Signed-off-by: Sam James <sam@g.o>
209 [AC_MSG_RESULT(yes)
210 AC_DEFINE(INT_16_BITS)], AC_MSG_RESULT(no))
211 ])
212 -@@ -1842,7 +1825,8 @@ AC_TRY_RUN([int main(void) { exit(sizeof(int) != 2); }],
213 +@@ -1842,7 +1832,8 @@ AC_TRY_RUN([int main(void) { exit(sizeof(int) != 2); }],
214 AC_DEFUN(AC_LONG_64_BITS,
215 [AC_OBSOLETE([$0], [; instead use AC_CHECK_SIZEOF(long)])dnl
216 AC_MSG_CHECKING(whether long int is 64 bits)
217 @@ -241,3 +274,24 @@ Signed-off-by: Sam James <sam@g.o>
218 [AC_MSG_RESULT(yes)
219 AC_DEFINE(LONG_64_BITS)], AC_MSG_RESULT(no))
220 ])
221 +@@ -1862,7 +1853,8 @@ AC_TRY_COMPILE([#include <sys/types.h>
222 + not big endian
223 + #endif], ac_cv_c_bigendian=yes, ac_cv_c_bigendian=no)])
224 + if test $ac_cv_c_bigendian = unknown; then
225 +-AC_TRY_RUN([int main (void) {
226 ++AC_TRY_RUN([#include <stdlib.h>
227 ++int main (void) {
228 + /* Are we little or big endian? From Harbison&Steele. */
229 + union
230 + {
231 +@@ -2275,7 +2267,10 @@ AC_DEFUN(AC_SYS_RESTARTABLE_SYSCALLS,
232 + i.e. the pid of the child, which means that wait was restarted
233 + after getting the signal. */
234 + #include <sys/types.h>
235 ++#include <sys/wait.h>
236 + #include <signal.h>
237 ++#include <stdlib.h>
238 ++#include <unistd.h>
239 + ucatch (isig) { }
240 + int main (void) {
241 + int i = fork (), status;