1 |
commit: 3469ff9b4feb523eadf7aa5e0cbbc8d66b8811ed |
2 |
Author: Alfredo Tupone <tupone <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Mar 15 19:42:20 2023 +0000 |
4 |
Commit: Alfredo Tupone <tupone <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Mar 15 19:42:43 2023 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3469ff9b |
7 |
|
8 |
dev-tcltk/tclx: silence gcc11 warnings |
9 |
|
10 |
Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org> |
11 |
|
12 |
dev-tcltk/tclx/files/tclx-8.4.4-gcc11.patch | 192 +++++++++++++++++++++ |
13 |
.../{tclx-8.4.4-r2.ebuild => tclx-8.4.4-r3.ebuild} | 3 +- |
14 |
2 files changed, 194 insertions(+), 1 deletion(-) |
15 |
|
16 |
diff --git a/dev-tcltk/tclx/files/tclx-8.4.4-gcc11.patch b/dev-tcltk/tclx/files/tclx-8.4.4-gcc11.patch |
17 |
new file mode 100644 |
18 |
index 000000000000..6af41afd3ce3 |
19 |
--- /dev/null |
20 |
+++ b/dev-tcltk/tclx/files/tclx-8.4.4-gcc11.patch |
21 |
@@ -0,0 +1,192 @@ |
22 |
+--- a/generic/tclXfcntl.c 2023-03-15 19:34:15.074669138 +0100 |
23 |
++++ b/generic/tclXfcntl.c 2023-03-15 19:33:20.805545639 +0100 |
24 |
+@@ -200,8 +200,12 @@ |
25 |
+ value = (optValue == TCLX_BUFFERING_LINE); |
26 |
+ break; |
27 |
+ case ATTR_KEEPALIVE: |
28 |
+- if (TclXOSgetsockopt (interp, channel, SO_KEEPALIVE, &value) != TCL_OK) |
29 |
++ { |
30 |
++ socklen_t len; |
31 |
++ if (TclXOSgetsockopt (interp, channel, SO_KEEPALIVE, &len) != TCL_OK) |
32 |
+ return TCL_ERROR; |
33 |
++ value = len; |
34 |
++ } |
35 |
+ break; |
36 |
+ default: |
37 |
+ panic ("bug in fcntl get attrib"); |
38 |
+--- a/generic/tclXhandles.c 2023-03-15 19:36:33.992425688 +0100 |
39 |
++++ b/generic/tclXhandles.c 2023-03-15 19:43:05.552120448 +0100 |
40 |
+@@ -20,6 +20,9 @@ |
41 |
+ |
42 |
+ #include "tclExtdInt.h" |
43 |
+ |
44 |
++#include <stdint.h> |
45 |
++#include <inttypes.h> |
46 |
++ |
47 |
+ /* |
48 |
+ * Variable set to contain the alignment factor (in bytes) for this machine. |
49 |
+ * It is set on the first table initialization. |
50 |
+@@ -539,7 +542,7 @@ |
51 |
+ |
52 |
+ entryHdrPtr = HEADER_AREA (entryPtr); |
53 |
+ if (entryHdrPtr->freeLink != ALLOCATED_IDX) |
54 |
+- panic ("Tcl_HandleFree: entry not allocated %x\n", entryHdrPtr); |
55 |
++ panic ("Tcl_HandleFree: entry not allocated %" PRIxPTR "\n", (intptr_t)entryHdrPtr); |
56 |
+ |
57 |
+ entryHdrPtr->freeLink = tblHdrPtr->freeHeadIdx; |
58 |
+ tblHdrPtr->freeHeadIdx = |
59 |
+--- a/generic/tclXkeylist.c 2023-03-15 20:02:16.177763876 +0100 |
60 |
++++ b/generic/tclXkeylist.c 2023-03-15 20:04:46.029420986 +0100 |
61 |
+@@ -17,6 +17,7 @@ |
62 |
+ */ |
63 |
+ |
64 |
+ #include "tclExtdInt.h" |
65 |
++#include <stdint.h> |
66 |
+ |
67 |
+ /* |
68 |
+ * Keyed lists are stored as arrays recursively defined objects. The data |
69 |
+@@ -338,7 +339,7 @@ |
70 |
+ if (keylIntPtr->hashTbl != NULL) { |
71 |
+ Tcl_HashEntry *entryPtr; |
72 |
+ Tcl_HashSearch search; |
73 |
+- int nidx; |
74 |
++ intptr_t nidx; |
75 |
+ |
76 |
+ entryPtr = Tcl_FindHashEntry(keylIntPtr->hashTbl, |
77 |
+ keylIntPtr->entries [entryIdx].key); |
78 |
+@@ -354,7 +355,7 @@ |
79 |
+ */ |
80 |
+ for (entryPtr = Tcl_FirstHashEntry(keylIntPtr->hashTbl, &search); |
81 |
+ entryPtr != NULL; entryPtr = Tcl_NextHashEntry(&search)) { |
82 |
+- nidx = (int) Tcl_GetHashValue(entryPtr); |
83 |
++ nidx = (intptr_t) Tcl_GetHashValue(entryPtr); |
84 |
+ if (nidx > entryIdx) { |
85 |
+ Tcl_SetHashValue(entryPtr, (ClientData) (uintptr_t) (nidx - 1)); |
86 |
+ } |
87 |
+@@ -394,7 +395,8 @@ |
88 |
+ char **nextSubKeyPtr) |
89 |
+ { |
90 |
+ char *keySeparPtr; |
91 |
+- int keyLen, findIdx = -1; |
92 |
++ int keyLen; |
93 |
++ intptr_t findIdx = -1; |
94 |
+ |
95 |
+ keySeparPtr = strchr (key, '.'); |
96 |
+ if (keySeparPtr != NULL) { |
97 |
+@@ -416,7 +418,7 @@ |
98 |
+ } |
99 |
+ entryPtr = Tcl_FindHashEntry(keylIntPtr->hashTbl, key); |
100 |
+ if (entryPtr != NULL) { |
101 |
+- findIdx = (int) Tcl_GetHashValue(entryPtr); |
102 |
++ findIdx = (intptr_t) Tcl_GetHashValue(entryPtr); |
103 |
+ } |
104 |
+ if (keySeparPtr != NULL) { |
105 |
+ key[keyLen] = tmp; |
106 |
+--- a/generic/tclXsignal.c 2023-03-15 20:07:18.687031905 +0100 |
107 |
++++ b/generic/tclXsignal.c 2023-03-15 20:07:55.997447649 +0100 |
108 |
+@@ -463,7 +463,7 @@ |
109 |
+ *----------------------------------------------------------------------------- |
110 |
+ */ |
111 |
+ static int |
112 |
+-BlockSignals (Tcl_Interp *interp, int action, unsigned char signals[]) |
113 |
++BlockSignals (Tcl_Interp *interp, int action, unsigned char signals[MAXSIG]) |
114 |
+ { |
115 |
+ #ifndef NO_SIGACTION |
116 |
+ int signalNum; |
117 |
+--- a/unix/tclXunixDup.c 2023-03-15 20:09:58.482528699 +0100 |
118 |
++++ b/unix/tclXunixDup.c 2023-03-15 20:13:22.981321777 +0100 |
119 |
+@@ -17,6 +17,7 @@ |
120 |
+ */ |
121 |
+ |
122 |
+ #include "tclExtdInt.h" |
123 |
++#include <stdint.h> |
124 |
+ |
125 |
+ |
126 |
+ /*----------------------------------------------------------------------------- |
127 |
+@@ -75,7 +76,8 @@ |
128 |
+ ClientData handle; |
129 |
+ const Tcl_ChannelType *channelType; |
130 |
+ Tcl_Channel newChannel = NULL; |
131 |
+- int srcFileNum, newFileNum = -1; |
132 |
++ intptr_t srcFileNum; |
133 |
++ int newFileNum = -1; |
134 |
+ |
135 |
+ /* |
136 |
+ * On Unix, the channels we can dup share the same file for the read and |
137 |
+@@ -86,7 +88,7 @@ |
138 |
+ } else { |
139 |
+ Tcl_GetChannelHandle (srcChannel, TCL_WRITABLE, &handle); |
140 |
+ } |
141 |
+- srcFileNum = (int) handle; |
142 |
++ srcFileNum = (intptr_t) handle; |
143 |
+ channelType = Tcl_GetChannelType (srcChannel); |
144 |
+ |
145 |
+ /* |
146 |
+--- a/unix/tclXunixId.c 2023-03-15 20:14:58.037829847 +0100 |
147 |
++++ b/unix/tclXunixId.c 2023-03-15 20:15:50.699002979 +0100 |
148 |
+@@ -444,7 +444,7 @@ |
149 |
+ #endif |
150 |
+ char hostNameBuf[MAXHOSTNAMELEN]; |
151 |
+ |
152 |
+- if (objc != 2) |
153 |
++ if (objc != 2) |
154 |
+ return TclX_WrongArgs (interp, objv [0], "host"); |
155 |
+ |
156 |
+ if (gethostname (hostNameBuf, MAXHOSTNAMELEN) < 0) { |
157 |
+--- a/unix/tclXunixOS.c 2023-03-15 20:16:27.021432520 +0100 |
158 |
++++ b/unix/tclXunixOS.c 2023-03-15 20:25:12.202242082 +0100 |
159 |
+@@ -23,6 +23,7 @@ |
160 |
+ |
161 |
+ #include "tclExtdInt.h" |
162 |
+ |
163 |
++#include <stdint.h> |
164 |
+ #ifndef NO_GETPRIORITY |
165 |
+ #include <sys/resource.h> |
166 |
+ #endif |
167 |
+@@ -113,7 +114,7 @@ |
168 |
+ return -1; |
169 |
+ } |
170 |
+ } |
171 |
+- return (int) handle; |
172 |
++ return (intptr_t) handle; |
173 |
+ } |
174 |
+ |
175 |
+ /*----------------------------------------------------------------------------- |
176 |
+@@ -401,7 +402,7 @@ |
177 |
+ if (pid == 0) { |
178 |
+ close (errPipes [0]); |
179 |
+ execl ("/bin/sh", "sh", "-c", command, (char *) NULL); |
180 |
+- write (errPipes [1], &errno, sizeof (errno)); |
181 |
++ if(write (errPipes [1], &errno, sizeof (errno))) {}; |
182 |
+ _exit (127); |
183 |
+ } |
184 |
+ |
185 |
+@@ -918,8 +919,9 @@ |
186 |
+ int |
187 |
+ TclXOSgetsockname (Tcl_Interp *interp, Tcl_Channel channel, void *sockaddr, int sockaddrSize) |
188 |
+ { |
189 |
++ socklen_t siz = sockaddrSize; |
190 |
+ if (getsockname (ChannelToFnum (channel, 0), |
191 |
+- (struct sockaddr *) sockaddr, &sockaddrSize) < 0) { |
192 |
++ (struct sockaddr *) sockaddr, &siz) < 0) { |
193 |
+ TclX_AppendObjResult (interp, Tcl_GetChannelName (channel), ": ", |
194 |
+ Tcl_PosixError (interp), (char *) NULL); |
195 |
+ return TCL_ERROR; |
196 |
+@@ -943,7 +945,7 @@ |
197 |
+ int |
198 |
+ TclXOSgetsockopt (Tcl_Interp *interp, Tcl_Channel channel, int option, socklen_t *valuePtr) |
199 |
+ { |
200 |
+- int valueLen = sizeof (*valuePtr); |
201 |
++ socklen_t valueLen = sizeof (*valuePtr); |
202 |
+ |
203 |
+ if (getsockopt (ChannelToFnum (channel, 0), SOL_SOCKET, option, |
204 |
+ (void*) valuePtr, &valueLen) != 0) { |
205 |
+@@ -1385,7 +1387,7 @@ |
206 |
+ (char *) NULL); |
207 |
+ return TCL_ERROR; |
208 |
+ } |
209 |
+- *fnumPtr = (int) handle; |
210 |
++ *fnumPtr = (intptr_t) handle; |
211 |
+ return TCL_OK; |
212 |
+ } |
213 |
+ |
214 |
|
215 |
diff --git a/dev-tcltk/tclx/tclx-8.4.4-r2.ebuild b/dev-tcltk/tclx/tclx-8.4.4-r3.ebuild |
216 |
similarity index 96% |
217 |
rename from dev-tcltk/tclx/tclx-8.4.4-r2.ebuild |
218 |
rename to dev-tcltk/tclx/tclx-8.4.4-r3.ebuild |
219 |
index 38ea1746b9a3..77d88925c305 100644 |
220 |
--- a/dev-tcltk/tclx/tclx-8.4.4-r2.ebuild |
221 |
+++ b/dev-tcltk/tclx/tclx-8.4.4-r3.ebuild |
222 |
@@ -1,7 +1,7 @@ |
223 |
# Copyright 1999-2023 Gentoo Authors |
224 |
# Distributed under the terms of the GNU General Public License v2 |
225 |
|
226 |
-EAPI=7 |
227 |
+EAPI=8 |
228 |
|
229 |
inherit autotools |
230 |
|
231 |
@@ -26,6 +26,7 @@ PATCHES=( |
232 |
"${FILESDIR}"/${PN}-8.4-ldflags.patch |
233 |
"${FILESDIR}"/${P}-configure-clang16.patch |
234 |
"${FILESDIR}"/${P}-configure-clang16-deux.patch |
235 |
+ "${FILESDIR}"/${P}-gcc11.patch |
236 |
) |
237 |
|
238 |
QA_CONFIG_IMPL_DECL_SKIP=( |