update screen
Hanno Böck

Hanno Böck commited on 2023-01-22 17:55:29
Zeige 3 geänderte Dateien mit 752 Einfügungen und 4 Löschungen.

... ...
@@ -1,6 +1,6 @@
1 1
 AUX screen-4.3.0-no-utempter.patch 341 BLAKE2B 3339783b3574f82f093c82a613ad18c5c58c184c082c2c311281cdd57e7176abae0f5935466a4a8b4d931d1d1b93d8f0a4e6b558a268553af4a0170061e6ebfe SHA512 f4191ba1ecac3076f958f56309c0a1d523b455fa4e3388f1cfca59c8ccff0afdfb20ef18d54794ba539b2b6d1511ed599dc44787344dc5ccce2902c9b9848155
2 2
 AUX screen-4.6.2-utmp-exit.patch 1558 BLAKE2B e08e83f8b9f0cd09cd9bad4486a75d71bd899a7917954702ece0837099639079a746138374cbeaf71072cca64ae36a3c2a32250123c6747089e724272227e0dd SHA512 0e7c6c224f6fb8e01650b778cb2b155942752504dc97112d9594b7fa0da1bb8bd828240a2519b1c21f1c162181da89a8daa51ef7f74c8ced0b85cdb3e911a67c
3
+AUX screen-4.9.0-configure-implicit-function-decls.patch 16667 BLAKE2B 6079042dae21c51b81176aadf27314cf0502fcee995bd9668102bc114ac0c2fdb6587fe2c647cbd92d994cb9b6fdba9e259a1f0a6bd7cf7d7905c3f7e36e8aff SHA512 c9ff18fccba0a0ed19e64509ea128b91bbb6fac405e8395ce724435f1af2f2015f645342aa1fc1b4cb023927412db6e1c242c8060a81deab2a8c064523dedd4d
3 4
 AUX screenrc 10412 BLAKE2B f4866f4a83b22c37484b66e4c7d52ec479fe12ae3e72e5c9e769b1b543ecf04d14ef4339e1c72064741cbf39502ef82d3beb213326a30889f128e135f60bd528 SHA512 06fbec5e28480a2c369330fac0c94faa47e5d28e037d9fefd0cb3e813002c504866dc8ac86872b7ac6f16059a219e396a9c425b578b8afe882153ddb506158f7
4 5
 DIST screen-4.9.0.tar.gz 798229 BLAKE2B 0f64a14ce9a719bd4a6d045c55069769045a09ee2086c44c2e3d9da6d1e5ada2f094e00e16029767e1155ce35d4f360d0e2879995eefa052f3214ced71b7617c SHA512 18bbb085d77ecd02cbc02fa88a945c39f06e0c6de4eeaa16b278440dac5c9896811abbe0838144e997cd344ae08b9530399fa8fcb31a65fc571ead90e8307f84
5
-EBUILD screen-4.9.0.ebuild 3726 BLAKE2B 33d94350bf154c8c25a371181133acbdd08adb0554923d0a727fe39babf39901fcd24dc8a6b899d974e3509a63dc5dcc23ac60647a1b741ab2986836e12767d8 SHA512 198ef89eb2dba1e5eff7bcfbc14de3bbfe7692cd8576ae51b6aef7f78d4b6af94432e15f172d06c05ce4109da628c0e1491b09779e6a8c934726e00172c5dcc4
6
-MISC metadata.xml 1783 BLAKE2B 6b1b392339f6786f95c151a7f311c24adf76c32d23e0f5bf50ff97571ab7e0a7b878d1ccac6938a01c2783c4f54eb0644dfd1f35b9bc602590fce96eed4a4e99 SHA512 fc4a716f118ab74b7757035ffadaaeebd47ba512a8ff123a7f5df4fa8fd2b384a66d4da88f8b78e7c16314b710e2346cfa6fc644c22f059d065cc1778565d060
6
+EBUILD screen-4.9.0-r1.ebuild 3801 BLAKE2B 371153d0e6ab88c520622a1ffdc58ac05d44972f0d595dbe7ef45863b99630cf6435bece218456089b39cdd3631dfea65e5c6050440f17461e6f52e2288a9e0f SHA512 aafafa8e3a7ce28a50037bc57246d9b43c6928021c2618dc36954d0c4e410f5336b8d77819140b1eae8bd43750d1ee8fa624e6bd502239ef39f58bd6d88fec9d
... ...
@@ -0,0 +1,747 @@
1
+https://bugs.gentoo.org/869371
2
+
3
+Upstream variant: https://lists.gnu.org/archive/html/screen-devel/2022-08/msg00000.html
4
+--- a/configure.ac
5
++++ b/configure.ac
6
+@@ -157,10 +157,11 @@ if test -n "$ULTRIX"; then
7
+ fi
8
+ AC_CHECKING(for POSIX.1)
9
+ AC_EGREP_CPP(YES_IS_DEFINED,
10
+ [#include <sys/types.h>
11
+ #include <unistd.h>
12
++int
13
+ main () {
14
+ #ifdef _POSIX_VERSION
15
+   YES_IS_DEFINED;
16
+ #endif
17
+ ], AC_NOTE(- you have a POSIX system) AC_DEFINE(POSIX) posix=1)
18
+@@ -231,10 +232,11 @@ dnl
19
+ 
20
+ AC_CHECKING(BSD job jontrol)
21
+ AC_TRY_LINK(
22
+ [#include <sys/types.h>
23
+ #include <sys/ioctl.h>
24
++#include <unistd.h>
25
+ ], [
26
+ #ifdef POSIX
27
+ tcsetpgrp(0, 0);
28
+ #else
29
+ int x = TIOCSPGRP;
30
+@@ -248,48 +250,64 @@ int y = TIOCNOTTY;
31
+ 
32
+ dnl
33
+ dnl    ****  setresuid(), setreuid(), seteuid()  ****
34
+ dnl
35
+ AC_CHECKING(setresuid)
36
+-AC_TRY_LINK(,[
37
++AC_TRY_LINK(
38
++[#include <unistd.h>
39
++], [
40
+ setresuid(0, 0, 0);
41
+ ], AC_DEFINE(HAVE_SETRESUID))
42
+ AC_CHECKING(setreuid)
43
+-AC_TRY_LINK(,[
44
++AC_TRY_LINK(
45
++[#include <unistd.h>
46
++], [
47
+ setreuid(0, 0);
48
+ ], AC_DEFINE(HAVE_SETREUID))
49
+ dnl
50
+ dnl seteuid() check:
51
+ dnl   linux seteuid was broken before V1.1.11
52
+ dnl   NeXT, AUX, ISC, and ultrix are still broken (no saved uid support)
53
+ dnl   Solaris seteuid doesn't change the saved uid, bad for
54
+ dnl     multiuser screen sessions
55
+ AC_CHECKING(seteuid)
56
+-AC_TRY_LINK(,[
57
++AC_TRY_LINK(
58
++[#include <unistd.h>
59
++],[
60
+ #if defined(linux) || defined(NeXT) || defined(_AUX_SOURCE) || defined(AUX) || defined(ultrix) || (defined(sun) && defined(SVR4)) || defined(ISC) || defined(sony_news)
61
+-seteuid_is_broken(0);
62
++int seteuid_is_broken(int); seteuid_is_broken(0);
63
+ #else
64
+ seteuid(0);
65
+ #endif
66
+ ], AC_DEFINE(HAVE_SETEUID))
67
+ 
68
+ dnl execvpe
69
+ AC_CHECKING(execvpe)
70
+-AC_TRY_LINK(,[
71
++AC_TRY_LINK(
72
++[#include <unistd.h>
73
++],[
74
+     execvpe(0, 0, 0);
75
+ ], AC_DEFINE(HAVE_EXECVPE)
76
+ CFLAGS="$CFLAGS -D_GNU_SOURCE")
77
+ 
78
+ dnl
79
+ dnl    ****  select()  ****
80
+ dnl
81
+ 
82
+ AC_CHECKING(select)
83
+-AC_TRY_LINK(,[select(0, 0, 0, 0, 0);],, 
84
++AC_TRY_LINK(
85
++[#include <sys/select.h>
86
++],[
87
++    select(0, 0, 0, 0, 0);
88
++],, 
89
+ LIBS="$LIBS -lnet -lnsl"
90
+ AC_CHECKING(select with $LIBS)
91
+-AC_TRY_LINK(,[select(0, 0, 0, 0, 0);],, 
92
++AC_TRY_LINK(
93
++[#include <sys/select.h>
94
++],[
95
++    select(0, 0, 0, 0, 0);
96
++],, 
97
+ AC_MSG_ERROR(!!! no select - no screen))
98
+ )
99
+ dnl
100
+ dnl    ****  FIFO tests  ****
101
+ dnl
102
+@@ -314,11 +332,11 @@ AC_TRY_RUN([
103
+ #define S_IFIFO 0010000
104
+ #endif
105
+ 
106
+ char *fin = "/tmp/conftest$$";
107
+ 
108
+-main()
109
++int main()
110
+ {
111
+   struct stat stb;
112
+   fd_set f;
113
+ 
114
+   (void)alarm(5);
115
+@@ -326,40 +344,40 @@ main()
116
+ #ifdef POSIX
117
+   if (mkfifo(fin, 0777))
118
+ #else
119
+   if (mknod(fin, S_IFIFO|0777, 0))
120
+ #endif
121
+-    exit(1);
122
++    return 1;
123
+   if (stat(fin, &stb) || (stb.st_mode & S_IFIFO) != S_IFIFO)
124
+-    exit(1);
125
++    return 1;
126
+   close(0);
127
+ #ifdef __386BSD__
128
+   /*
129
+    * The next test fails under 386BSD, but screen works using fifos.
130
+    * Fifos in O_RDWR mode are only used for the BROKEN_PIPE case and for
131
+    * the select() configuration test.
132
+    */
133
+-  exit(0);
134
++  return 0;
135
+ #endif
136
+   if (open(fin, O_RDONLY | O_NONBLOCK))
137
+-    exit(1);
138
++    return 1;
139
+   if (fork() == 0)
140
+     {
141
+       close(0);
142
+       if (open(fin, O_WRONLY | O_NONBLOCK))
143
+-	exit(1);
144
++        return 1;
145
+       close(0);
146
+       if (open(fin, O_WRONLY | O_NONBLOCK))
147
+-	exit(1);
148
++        return 1;
149
+       if (write(0, "TEST", 4) == -1)
150
+-	exit(1);
151
+-      exit(0);
152
++        return 1;
153
++      return 0;
154
+     }
155
+   FD_SET(0, &f);
156
+   if (select(1, &f, 0, 0, 0) == -1)
157
+-    exit(1);
158
+-  exit(0);
159
++    return 1;
160
++  return 0;
161
+ }
162
+ ], AC_NOTE(- your fifos are usable) fifo=1,
163
+ AC_NOTE(- your fifos are not usable),
164
+ AC_NOTE(- skipping check because we are cross compiling; assuming fifos are usable) fifo=1)
165
+ rm -f /tmp/conftest*
166
+@@ -385,30 +403,31 @@ AC_TRY_RUN([
167
+ #define S_IFIFO 0010000
168
+ #endif
169
+ 
170
+ char *fin = "/tmp/conftest$$";
171
+ 
172
++int
173
+ main()
174
+ {
175
+   struct timeval tv;
176
+   fd_set f;
177
+ 
178
+ #ifdef POSIX
179
+   if (mkfifo(fin, 0600))
180
+ #else
181
+   if (mknod(fin, S_IFIFO|0600, 0))
182
+ #endif
183
+-    exit(1);
184
++    return 1;
185
+   close(0);
186
+   if (open(fin, O_RDONLY|O_NONBLOCK))
187
+-    exit(1);
188
++    return 1;
189
+   FD_SET(0, &f);
190
+   tv.tv_sec = 1;
191
+   tv.tv_usec = 0;
192
+   if (select(1, &f, 0, 0, &tv))
193
+-    exit(1);
194
+-  exit(0);
195
++    return 1;
196
++  return 0;
197
+ }
198
+ ], AC_NOTE(- your implementation is ok), 
199
+ AC_NOTE(- you have a broken implementation) AC_DEFINE(BROKEN_PIPE) fifobr=1,
200
+ AC_NOTE(- skipping check because we are cross compiling; assuming fifo implementation is ok))
201
+ rm -f /tmp/conftest*
202
+@@ -432,46 +455,48 @@ AC_TRY_RUN([
203
+ 
204
+ #include <sys/stat.h>
205
+ #include <fcntl.h>
206
+ #include <sys/socket.h>
207
+ #include <sys/un.h>
208
++#include <signal.h>
209
+ 
210
+ char *son = "/tmp/conftest$$";
211
+ 
212
++int
213
+ main()
214
+ {
215
+   int s1, s2, l;
216
+   struct sockaddr_un a;
217
+   fd_set f;
218
+ 
219
+   (void)alarm(5);
220
+   if ((s1 = socket(AF_UNIX, SOCK_STREAM, 0)) == -1)
221
+-    exit(1);
222
++    return 1;
223
+   a.sun_family = AF_UNIX;
224
+   strcpy(a.sun_path, son);
225
+   (void) unlink(son);
226
+   if (bind(s1, (struct sockaddr *) &a, strlen(son)+2) == -1)
227
+-    exit(1);
228
++    return 1;
229
+   if (listen(s1, 2))
230
+-    exit(1);
231
++    return 1;
232
+   if (fork() == 0)
233
+     {
234
+       if ((s2 = socket(AF_UNIX, SOCK_STREAM, 0)) == -1)
235
+ 	kill(getppid(), 3);
236
+       (void)connect(s2, (struct sockaddr *)&a, strlen(son) + 2);
237
+       if (write(s2, "HELLO", 5) == -1)
238
+ 	kill(getppid(), 3);
239
+-      exit(0);
240
++      return 0;
241
+     }
242
+   l = sizeof(a);
243
+   close(0);
244
+   if (accept(s1, &a, &l))
245
+-    exit(1);
246
++    return 1;
247
+   FD_SET(0, &f);
248
+   if (select(1, &f, 0, 0, 0) == -1)
249
+-    exit(1);
250
+-  exit(0);
251
++    return 1;
252
++  return 0;
253
+ }
254
+ ], AC_NOTE(- your sockets are usable) sock=1,
255
+ AC_NOTE(- your sockets are not usable),
256
+ AC_NOTE(- skipping check because we are cross compiling; assuming sockets are usable) sock=1)
257
+ rm -f /tmp/conftest*
258
+@@ -491,26 +516,27 @@ AC_TRY_RUN([
259
+ #include <sys/socket.h>
260
+ #include <sys/un.h>
261
+ 
262
+ char *son = "/tmp/conftest$$";
263
+ 
264
++int
265
+ main()
266
+ {
267
+   int s;
268
+   struct stat stb;
269
+   struct sockaddr_un a;
270
+   if ((s = socket(AF_UNIX, SOCK_STREAM, 0)) == -1)
271
+-    exit(0);
272
++    return 0;
273
+   a.sun_family = AF_UNIX;
274
+   strcpy(a.sun_path, son);
275
+   (void) unlink(son);
276
+   if (bind(s, (struct sockaddr *) &a, strlen(son)+2) == -1)
277
+-    exit(0);
278
++    return 0;
279
+   if (stat(son, &stb))
280
+-    exit(1);
281
++    return 1;
282
+   close(s);
283
+-  exit(0);
284
++  return 0;
285
+ }
286
+ ],AC_NOTE(- you are normal),
287
+ AC_NOTE(- unix domain sockets are not kept in the filesystem)
288
+ AC_DEFINE(SOCK_NOT_IN_FS) socknofs=1,
289
+ AC_NOTE(- skipping check because we are cross compiling; assuming sockets are normal))
290
+@@ -545,122 +571,167 @@ char *nam = "/tmp/conftest$$";
291
+ #endif
292
+ #ifndef S_IFIFO
293
+ #define S_IFIFO 0010000
294
+ #endif
295
+ 
296
++int
297
+ main()
298
+ {
299
+   fd_set f;
300
+ 
301
+ #ifdef __FreeBSD__
302
+ /* From Andrew A. Chernov (ache@astral.msk.su):
303
+  * opening RDWR fifo fails in BSD 4.4, but select return values are
304
+  * right.
305
+  */
306
+-  exit(0);
307
++  return 0;
308
+ #endif
309
+   (void)alarm(5);
310
+ #ifdef POSIX
311
+   if (mkfifo(nam, 0777))
312
+ #else
313
+   if (mknod(nam, S_IFIFO|0777, 0))
314
+ #endif
315
+-    exit(1);
316
++    return 1;
317
+   close(0);
318
+   if (open(nam, O_RDWR | O_NONBLOCK))
319
+-    exit(1);
320
++    return 1;
321
+   if (write(0, "TEST", 4) == -1)
322
+-    exit(1);
323
++    return 1;
324
+ 
325
+ #else
326
+ 
327
+ #include <sys/types.h>
328
+ #include <sys/socket.h>
329
+ #include <sys/un.h>
330
++#include <signal.h>
331
+ 
332
++int
333
+ main()
334
+ {
335
+   int s1, s2, l;
336
+   struct sockaddr_un a;
337
+   fd_set f;
338
+ 
339
+   (void)alarm(5);
340
+   if ((s1 = socket(AF_UNIX, SOCK_STREAM, 0)) == -1)
341
+-    exit(1);
342
++    return 1;
343
+   a.sun_family = AF_UNIX;
344
+   strcpy(a.sun_path, nam);
345
+   (void) unlink(nam);
346
+   if (bind(s1, (struct sockaddr *) &a, strlen(nam)+2) == -1)
347
+-    exit(1);
348
++    return 1;
349
+   if (listen(s1, 2))
350
+-    exit(1);
351
++    return 1;
352
+   if (fork() == 0)
353
+     {
354
+       if ((s2 = socket(AF_UNIX, SOCK_STREAM, 0)) == -1)
355
+ 	kill(getppid(), 3);
356
+       (void)connect(s2, (struct sockaddr *)&a, strlen(nam) + 2);
357
+       if (write(s2, "HELLO", 5) == -1)
358
+ 	kill(getppid(), 3);
359
+-      exit(0);
360
++      return 0;
361
+     }
362
+   l = sizeof(a);
363
+   close(0);
364
+   if (accept(s1, (struct sockaddr *)&a, &l))
365
+-    exit(1);
366
++    return 1;
367
+ #endif
368
+ 
369
+ 
370
+   FD_SET(0, &f);
371
+   if (select(1, &f, 0, 0, 0) == -1)
372
+-    exit(1);
373
++    return 1;
374
+   if (select(1, &f, &f, 0, 0) != 2)
375
+-    exit(1);
376
+-  exit(0);
377
++    return 1;
378
++  return 0;
379
+ }
380
+ ],AC_NOTE(- select is ok),
381
+ AC_NOTE(- select can't count) AC_DEFINE(SELECT_BROKEN),
382
+ AC_NOTE(- skipping check because we are cross compiling; assuming select is ok))
383
+ 
384
+ dnl
385
+ dnl    ****  termcap or terminfo  ****
386
+ dnl
387
+ AC_CHECKING(for tgetent)
388
+-AC_TRY_LINK(,tgetent((char *)0, (char *)0);,,
389
++AC_TRY_LINK([
390
++    #include <curses.h>
391
++    #include <term.h>
392
++], [
393
++    tgetent((char *)0, (char *)0);
394
++],,
395
+ olibs="$LIBS"
396
+ LIBS="-lcurses $olibs"
397
+ AC_CHECKING(libcurses)
398
+-AC_TRY_LINK(,[
399
++AC_TRY_LINK([#include <curses.h>
400
++    #include <term.h>
401
++],[
402
+ #ifdef __hpux
403
+ __sorry_hpux_libcurses_is_totally_broken_in_10_10();
404
+ #else
405
+ tgetent((char *)0, (char *)0);
406
+ #endif
407
+ ],,
408
+ LIBS="-ltermcap $olibs"
409
+ AC_CHECKING(libtermcap)
410
+-AC_TRY_LINK(,tgetent((char *)0, (char *)0);,,
411
++AC_TRY_LINK(
412
++[#include <curses.h>
413
++    #include <term.h>
414
++],[
415
++    tgetent((char *)0, (char *)0);
416
++],,
417
+ LIBS="-ltermlib $olibs"
418
+ AC_CHECKING(libtermlib)
419
+-AC_TRY_LINK(,tgetent((char *)0, (char *)0);,,
420
++AC_TRY_LINK(
421
++[#include <curses.h>
422
++    #include <term.h>
423
++],[
424
++    tgetent((char *)0, (char *)0);
425
++],,
426
+ LIBS="-lncursesw $olibs"
427
+ AC_CHECKING(libncursesw)
428
+-AC_TRY_LINK(,tgetent((char *)0, (char *)0);,,
429
++AC_TRY_LINK(
430
++[#include <curses.h>
431
++    #include <term.h>
432
++],[
433
++    tgetent((char *)0, (char *)0);
434
++],,
435
+ LIBS="-ltinfow $olibs"
436
+ AC_CHECKING(libtinfow)
437
+-AC_TRY_LINK(,tgetent((char *)0, (char *)0);,,
438
++AC_TRY_LINK(
439
++[#include <curses.h>
440
++    #include <term.h>
441
++],[
442
++    tgetent((char *)0, (char *)0);
443
++],,
444
+ LIBS="-lncurses $olibs"
445
+ AC_CHECKING(libncurses)
446
+-AC_TRY_LINK(,tgetent((char *)0, (char *)0);,,
447
++AC_TRY_LINK(
448
++[#include <curses.h>
449
++    #include <term.h>
450
++],[
451
++    tgetent((char *)0, (char *)0);
452
++],,
453
+ LIBS="-ltinfo $olibs"
454
+ AC_CHECKING(libtinfo)
455
+-AC_TRY_LINK(,tgetent((char *)0, (char *)0);,,
456
++AC_TRY_LINK(
457
++[#include <curses.h>
458
++    #include <term.h>
459
++],[
460
++    tgetent((char *)0, (char *)0);
461
++],,
462
+ AC_MSG_ERROR(!!! no tgetent - no screen)))))))))
463
+ 
464
+ AC_TRY_RUN([
465
++#include <curses.h>
466
++#include <string.h>
467
++#include <term.h>
468
++
469
++int
470
+ main()
471
+ {
472
+- exit(strcmp(tgoto("%p1%d", 0, 1), "1") ? 0 : 1);
473
++ return(strcmp(tgoto("%p1%d", 0, 1), "1") ? 0 : 1);
474
+ }], AC_NOTE(- you use the termcap database),
475
+ AC_NOTE(- you use the terminfo database) AC_DEFINE(TERMINFO),
476
+ AC_NOTE(- skipping check because we are cross compiling; assuming terminfo database is used) AC_DEFINE(TERMINFO))
477
+ AC_CHECKING(ospeed)
478
+ AC_TRY_LINK(extern short ospeed;,ospeed=5;,,AC_DEFINE(NEED_OSPEED))
479
+@@ -677,11 +748,15 @@ fi
480
+ 
481
+ if test "$cross_compiling" = no ; then
482
+ AC_CHECKING(for SVR4 ptys)
483
+ sysvr4ptys=
484
+ if test -c /dev/ptmx ; then
485
+-AC_TRY_LINK([],[ptsname(0);grantpt(0);unlockpt(0);],[AC_DEFINE(HAVE_SVR4_PTYS)
486
++AC_TRY_LINK([
487
++    #include <stdlib.h>
488
++], [
489
++    ptsname(0);grantpt(0);unlockpt(0);
490
++],[AC_DEFINE(HAVE_SVR4_PTYS)
491
+ sysvr4ptys=1])
492
+ fi
493
+ fi
494
+ 
495
+ AC_CHECK_FUNCS(getpt)
496
+@@ -733,33 +808,36 @@ AC_CHECKING(default tty permissions/group)
497
+ rm -f conftest_grp
498
+ AC_TRY_RUN([
499
+ #include <sys/types.h>
500
+ #include <sys/stat.h>
501
+ #include <stdio.h>
502
++#include <stdlib.h>
503
++#include <unistd.h>
504
++int
505
+ main()
506
+ {
507
+   struct stat sb;
508
+   char *x,*ttyname();
509
+   int om, m;
510
+   FILE *fp;
511
+ 
512
+-  if (!(x = ttyname(0))) exit(1);
513
+-  if (stat(x, &sb)) exit(1);
514
++  if (!(x = ttyname(0))) return 1;
515
++  if (stat(x, &sb)) return 1;
516
+   om = sb.st_mode;
517
+-  if (om & 002) exit(0);
518
++  if (om & 002) return 0;
519
+   m = system("mesg y");
520
+-  if (m == -1 || m == 127) exit(1);
521
+-  if (stat(x, &sb)) exit(1);
522
++  if (m == -1 || m == 127) return 1;
523
++  if (stat(x, &sb)) return 1;
524
+   m = sb.st_mode;
525
+-  if (chmod(x, om)) exit(1);
526
+-  if (m & 002) exit(0);
527
+-  if (sb.st_gid == getgid()) exit(1);
528
++  if (chmod(x, om)) return 1;
529
++  if (m & 002) return 0;
530
++  if (sb.st_gid == getgid()) return 1;
531
+   if (!(fp=fopen("conftest_grp", "w")))
532
+-    exit(1);
533
++    return 1;
534
+   fprintf(fp, "%d\n", sb.st_gid);
535
+   fclose(fp);
536
+-  exit(0);
537
++  return 0;
538
+ }
539
+ ],[
540
+     if test -f conftest_grp; then
541
+ 	ptygrp=`cat conftest_grp`
542
+ 	AC_NOTE([- pty mode: $ptymode, group: $ptygrp])
543
+@@ -869,17 +942,25 @@ AC_CHECKING(for libutil(s))
544
+ test -f /usr/lib/libutils.a && LIBS="$LIBS -lutils"
545
+ test -f /usr/lib/libutil.a && LIBS="$LIBS -lutil"
546
+ fi
547
+ 
548
+ AC_CHECKING(getloadavg)
549
+-AC_TRY_LINK(,[getloadavg((double *)0, 0);],
550
++AC_TRY_LINK(
551
++[
552
++    #include <stdlib.h>
553
++],[
554
++    getloadavg((double *)0, 0);],
555
+ AC_DEFINE(LOADAV_GETLOADAVG) load=1,
556
+ if test "$cross_compiling" = no && test -f /usr/lib/libkvm.a ; then
557
+ olibs="$LIBS"
558
+ LIBS="$LIBS -lkvm"
559
+ AC_CHECKING(getloadavg with -lkvm)
560
+-AC_TRY_LINK(,[getloadavg((double *)0, 0);],
561
++AC_TRY_LINK(
562
++[
563
++    #include <stdlib.h>
564
++],[
565
++    getloadavg((double *)0, 0);],
566
+ AC_DEFINE(LOADAV_GETLOADAVG) load=1, LIBS="$olibs")
567
+ fi
568
+ )
569
+ 
570
+ if test -z "$load" ; then
571
+@@ -931,10 +1012,11 @@ else
572
+ 
573
+ $nlist64
574
+ 
575
+ struct nlist nl[2];
576
+ 
577
++int
578
+ main()
579
+ {
580
+ #if !defined(_AUX_SOURCE) && !defined(AUX)
581
+ # ifdef NLIST_NAME_UNION
582
+   nl[0].n_un.n_name = "$av";
583
+@@ -944,12 +1026,12 @@ main()
584
+ #else
585
+   strncpy(nl[0].n_name, "$av", sizeof(nl[0].n_name));
586
+ #endif
587
+   nlist(LOADAV_UNIX, nl);
588
+   if (nl[0].n_value == 0)
589
+-    exit(1);
590
+-  exit(0);
591
++    return 1;
592
++  return 0;
593
+ }
594
+   ],avensym=$av;break)
595
+   if test "$av" = _Loadavg; then
596
+     nlist64='#define nlist nlist64'
597
+   fi
598
+@@ -1068,21 +1150,22 @@ void
599
+ hand()
600
+ {
601
+   got++;
602
+ }
603
+ 
604
++int
605
+ main()
606
+ {
607
+   /* on hpux we use sigvec to get bsd signals */
608
+ #ifdef __hpux
609
+   (void)signal(SIGCLD, hand);
610
+   kill(getpid(), SIGCLD);
611
+   kill(getpid(), SIGCLD);
612
+   if (got < 2)
613
+-    exit(1);
614
++    return 1;
615
+ #endif
616
+-  exit(0);
617
++  return 0;
618
+ }
619
+ ],,AC_DEFINE(SYSVSIGS),:)
620
+ 
621
+ fi
622
+ 
623
+@@ -1107,14 +1190,22 @@ oldlibs="$LIBS"
624
+ LIBS="$LIBS -lsun"
625
+ AC_CHECKING(IRIX sun library)
626
+ AC_TRY_LINK(,,,LIBS="$oldlibs")
627
+ 
628
+ AC_CHECKING(syslog)
629
+-AC_TRY_LINK(,[closelog();], , [oldlibs="$LIBS"
630
++AC_TRY_LINK(
631
++[#include <syslog.h>
632
++], [
633
++    closelog();
634
++], , [oldlibs="$LIBS"
635
+ LIBS="$LIBS -lbsd"
636
+ AC_CHECKING(syslog in libbsd.a)
637
+-AC_TRY_LINK(, [closelog();], AC_NOTE(- found.), [LIBS="$oldlibs"
638
++AC_TRY_LINK(
639
++[#include <syslog.h>
640
++], [
641
++    closelog();
642
++], AC_NOTE(- found.), [LIBS="$oldlibs"
643
+ AC_NOTE(- bad news: syslog missing.) AC_DEFINE(NOSYSLOG)])])
644
+ 
645
+ AC_EGREP_CPP(YES_IS_DEFINED,
646
+ [#ifdef M_UNIX
647
+    YES_IS_DEFINED;
648
+@@ -1147,66 +1238,87 @@ fi
649
+ dnl AC_CHECK_HEADER(shadow.h, AC_DEFINE(SHADOWPW))
650
+ AC_CHECKING(getspnam)
651
+ AC_TRY_LINK([#include <shadow.h>], [getspnam("x");],AC_DEFINE(SHADOWPW))
652
+ 
653
+ AC_CHECKING(getttyent)
654
+-AC_TRY_LINK(,[getttyent();], AC_DEFINE(GETTTYENT))
655
++AC_TRY_LINK(
656
++[
657
++    #include <ttyent.h>
658
++],[
659
++    getttyent();
660
++], AC_DEFINE(GETTTYENT))
661
+ 
662
+ AC_CHECKING(fdwalk)
663
+ AC_TRY_LINK([#include <stdlib.h>], [fdwalk(NULL, NULL);],AC_DEFINE(HAVE_FDWALK))
664
+ 
665
+ AC_CHECKING(whether memcpy/memmove/bcopy handles overlapping arguments)
666
+ AC_TRY_RUN([
667
++#include <string.h>
668
++
669
++int
670
+ main() {
671
+   char buf[10];
672
+   strcpy(buf, "abcdefghi");
673
+   bcopy(buf, buf + 2, 3);
674
+   if (strncmp(buf, "ababcf", 6))
675
+-    exit(1);
676
++    return 1;
677
+   strcpy(buf, "abcdefghi");
678
+   bcopy(buf + 2, buf, 3);
679
+   if (strncmp(buf, "cdedef", 6))
680
+-    exit(1);
681
+-  exit(0); /* libc version works properly.  */
682
++    return 1;
683
++  return 0; /* libc version works properly.  */
684
+ }], AC_DEFINE(USEBCOPY),,:)
685
+ 
686
+ AC_TRY_RUN([
687
++#include <string.h>
688
++
689
+ #define bcopy(s,d,l) memmove(d,s,l)
690
++int
691
+ main() {
692
+   char buf[10];
693
+   strcpy(buf, "abcdefghi");
694
+   bcopy(buf, buf + 2, 3);
695
+   if (strncmp(buf, "ababcf", 6))
696
+-    exit(1);
697
++    return 1;
698
+   strcpy(buf, "abcdefghi");
699
+   bcopy(buf + 2, buf, 3);
700
+   if (strncmp(buf, "cdedef", 6))
701
+-    exit(1);
702
+-  exit(0); /* libc version works properly.  */
703
++    return 1;
704
++  return 0; /* libc version works properly.  */
705
+ }], AC_DEFINE(USEMEMMOVE),,
706
+   AC_NOTE(- skipping check because we are cross compiling; use memmove) AC_DEFINE(USEMEMMOVE))
707
+ 
708
+ 
709
+ AC_TRY_RUN([
710
++#include <string.h>
711
++
712
+ #define bcopy(s,d,l) memcpy(d,s,l)
713
++int
714
+ main() {
715
+   char buf[10];
716
+   strcpy(buf, "abcdefghi");
717
+   bcopy(buf, buf + 2, 3);
718
+   if (strncmp(buf, "ababcf", 6))
719
+-    exit(1);
720
++    return 1;
721
+   strcpy(buf, "abcdefghi");
722
+   bcopy(buf + 2, buf, 3);
723
+   if (strncmp(buf, "cdedef", 6))
724
+-    exit(1);
725
+-  exit(0); /* libc version works properly.  */
726
++    return 1;
727
++  return 0; /* libc version works properly.  */
728
+ }], AC_DEFINE(USEMEMCPY),,:)
729
+ 
730
+ AC_SYS_LONG_FILE_NAMES
731
+ 
732
+ AC_MSG_CHECKING(for vsprintf)
733
+-AC_TRY_LINK([#include <stdarg.h>],[va_list valist; vsprintf(0,0,valist);], AC_MSG_RESULT(yes);AC_DEFINE(USEVARARGS), AC_MSG_RESULT(no))
734
++AC_TRY_LINK(
735
++[
736
++    #include <stdarg.h>
737
++    #include <stdio.h>
738
++],
739
++[
740
++    va_list valist; vsprintf(0,0,valist);
741
++], AC_MSG_RESULT(yes);AC_DEFINE(USEVARARGS), AC_MSG_RESULT(no))
742
+ 
743
+ AC_HEADER_DIRENT
744
+ 
745
+ AC_MSG_CHECKING(for setenv)
746
+ if test -z "$ac_setenv_args"; then
747
+
... ...
@@ -10,7 +10,7 @@ HOMEPAGE="https://www.gnu.org/software/screen/"
10 10
 
11 11
 if [[ ${PV} != 9999 ]] ; then
12 12
 	SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
13
-	KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
13
+	KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
14 14
 else
15 15
 	inherit git-r3
16 16
 	EGIT_REPO_URI="https://git.savannah.gnu.org/git/screen.git"
... ...
@@ -18,7 +18,7 @@ else
18 18
 	S="${WORKDIR}"/${P}/src
19 19
 fi
20 20
 
21
-LICENSE="GPL-2"
21
+LICENSE="GPL-3+"
22 22
 SLOT="0"
23 23
 IUSE="debug nethack pam selinux multiuser"
24 24
 
... ...
@@ -34,6 +34,7 @@ PATCHES=(
34 34
 	# Don't use utempter even if it is found on the system.
35 35
 	"${FILESDIR}"/${PN}-4.3.0-no-utempter.patch
36 36
 	"${FILESDIR}"/${PN}-4.6.2-utmp-exit.patch
37
+	"${FILESDIR}"/${PN}-4.9.0-configure-implicit-function-decls.patch
37 38
 )
38 39
 
39 40
 src_prepare() {
40 41