diff --git a/app-misc/screen/patches/screen-4.99.0_git.patchset b/app-misc/screen/patches/screen-4.99.0_git.patchset index 7017189cb..7e62ad575 100644 --- a/app-misc/screen/patches/screen-4.99.0_git.patchset +++ b/app-misc/screen/patches/screen-4.99.0_git.patchset @@ -1,118 +1,137 @@ -From 5d5125c8ae00e1f357a4e71fcd743a9cbd447f99 Mon Sep 17 00:00:00 2001 +From d4c14b8e4d524dc4514b2c0a2e552f157e562ec7 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= +Date: Mon, 17 Jul 2017 15:52:00 +0200 +Subject: [PATCH 1/7] add dirent.h test back to configure + +--- + src/configure.ac | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/configure.ac b/src/configure.ac +index 9e46f00..0cdb199 100644 +--- a/src/configure.ac ++++ b/src/configure.ac +@@ -85,6 +85,9 @@ dnl + AC_CHECK_HEADERS(langinfo.h) + + dnl ++AC_CHECK_HEADERS(dirent.h) ++ ++dnl + dnl Check user changeable stuff + dnl + +-- +2.7.0 + + +From b9a8a260fd996b540cf785ce248875a7d59756de Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= +Date: Mon, 17 Jul 2017 15:52:54 +0200 +Subject: [PATCH 2/7] remove hardcoded -lutil + +AC_SEARCH_LIBS prepends the found lib already. +--- + src/configure.ac | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/src/configure.ac b/src/configure.ac +index 0cdb199..069c261 100644 +--- a/src/configure.ac ++++ b/src/configure.ac +@@ -76,7 +76,6 @@ dnl + AC_CHECK_HEADERS(pty.h util.h libutil.h) + AC_SEARCH_LIBS([openpty], [util openpty], [ + AC_DEFINE(HAVE_OPENPTY) +- LIBS="$LIBS -lutil" + ], [ + AC_MSG_ERROR([unable to find openpty() function]) + ]) +-- +2.7.0 + + +From d5b66363fd030051f9d9fe2609f513df5647db5c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= +Date: Mon, 17 Jul 2017 15:53:45 +0200 +Subject: [PATCH 3/7] fix mismatched types in prototype + +not everyone defines pid_t as int... +--- + src/display.h | 2 +- + src/screen.h | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/display.h b/src/display.h +index 967585c..d29abad 100644 +--- a/src/display.h ++++ b/src/display.h +@@ -307,7 +307,7 @@ do \ + } \ + while (0) + +-Display *MakeDisplay (char *, char *, char *, int, int, struct mode *); ++Display *MakeDisplay (char *, char *, char *, int, pid_t, struct mode *); + void FreeDisplay (void); + void DefProcess (char **, size_t *); + void DefRedisplayLine (int, int, int, int); +diff --git a/src/screen.h b/src/screen.h +index 1dd4fb2..b1cd577 100644 +--- a/src/screen.h ++++ b/src/screen.h +@@ -220,7 +220,7 @@ void SigHup (int); + void eexit (int) __attribute__((__noreturn__)); + void Detach (int); + void Hangup (void); +-void Kill (int, int); ++void Kill (pid_t, int); + void Msg (int, const char *, ...) __attribute__((format(printf, 2, 3))); + void Panic (int, const char *, ...) __attribute__((format(printf, 2, 3))) __attribute__((__noreturn__)); + void QueryMsg (int, const char *, ...) __attribute__((format(printf, 2, 3))); +-- +2.7.0 + + +From 2242916e8c18e6883f1a8d0a1bb98188314e50d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Fri, 20 Jun 2014 17:16:37 +0200 -Subject: [PATCH 1/7] Haiku port: Check for some libraries +Subject: [PATCH 4/7] Haiku port: Check for some libraries * libnetwork for sockets, * libbsd for getpass. --- - src/configure.ac | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) + src/configure.ac | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/configure.ac b/src/configure.ac -index 1a75020..32e70c1 100644 +index 069c261..dd22c1b 100644 --- a/src/configure.ac +++ b/src/configure.ac -@@ -460,7 +460,9 @@ AC_TRY_LINK([ - #include - ],[nl_langinfo(CODESET);], AC_MSG_RESULT(yes);AC_DEFINE(HAVE_NL_LANGINFO), AC_MSG_RESULT(no)) +@@ -74,7 +74,7 @@ AC_SEARCH_LIBS([crypt], [crypt], [], [ --AC_SEARCH_LIBS(gethostname, nsl) -+AC_SEARCH_LIBS(gethostname, nsl network) + dnl + AC_CHECK_HEADERS(pty.h util.h libutil.h) +-AC_SEARCH_LIBS([openpty], [util openpty], [ ++AC_SEARCH_LIBS([openpty], [util openpty bsd], [ + AC_DEFINE(HAVE_OPENPTY) + ], [ + AC_MSG_ERROR([unable to find openpty() function]) +@@ -195,6 +195,10 @@ AC_DEFINE_UNQUOTED(PTY_MODE, $with_pty_mode) + dnl -- with_pty_group + AC_DEFINE_UNQUOTED(PTY_GROUP, $with_pty_group) + ++AC_SEARCH_LIBS(socket, network) + +AC_CHECK_LIB(bsd, getpass) - - AC_CHECK_FUNCS(vsnprintf strftime) - ++ + dnl -- with_pty_rofs + AS_IF([test "x$with_pty_rofs" == "xyes"], [ + AC_DEFINE(PTY_ROFS) -- -2.2.2 +2.7.0 -From 7bb5fac13c66db7d08ba64644e84616f9e0e90bf Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= -Date: Fri, 20 Jun 2014 17:18:32 +0200 -Subject: [PATCH 2/7] Haiku port: temporary workaround for missing utmp - ---- - src/acconfig.h | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/src/acconfig.h b/src/acconfig.h -index 656e117..85f7e8e 100644 ---- a/src/acconfig.h -+++ b/src/acconfig.h -@@ -99,7 +99,9 @@ - * If screen is installed with permissions to update /etc/utmp (such - * as if it is installed set-uid root), define UTMPOK. - */ --#define UTMPOK -+#ifndef __HAIKU__ -+# define UTMPOK -+#endif - - /* Set LOGINDEFAULT to one (1) - * if you want entries added to /etc/utmp by default, else set it to --- -2.2.2 - - -From 10ed906797cfefcc86d64f332f27353e971cce58 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= -Date: Thu, 24 Sep 2015 01:28:59 +0200 -Subject: [PATCH 3/7] configure.in: drop test on $posix which is not set - anymore - ---- - src/configure.ac | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/src/configure.ac b/src/configure.ac -index 32e70c1..dc1e827 100644 ---- a/src/configure.ac -+++ b/src/configure.ac -@@ -438,9 +438,7 @@ dnl - if test -z "$butterfly"; then - AC_CHECKING(for termio or termios) - AC_TRY_CPP([#include ], AC_DEFINE(TERMIO), --if test -n "$posix"; then - AC_TRY_CPP([#include ], AC_DEFINE(TERMIO)) --fi - ) - fi - --- -2.2.2 - - -From be47c3c666aeb0d011df42414d91c75ae75e4d1e Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= -Date: Thu, 24 Sep 2015 01:29:12 +0200 -Subject: [PATCH 4/7] configure.in: fix libnetwork test for Haiku - -gethostname is actually in libroot so won't bring libnetwork in. ---- - src/configure.ac | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/configure.ac b/src/configure.ac -index dc1e827..e463484 100644 ---- a/src/configure.ac -+++ b/src/configure.ac -@@ -458,7 +458,8 @@ AC_TRY_LINK([ - #include - ],[nl_langinfo(CODESET);], AC_MSG_RESULT(yes);AC_DEFINE(HAVE_NL_LANGINFO), AC_MSG_RESULT(no)) - --AC_SEARCH_LIBS(gethostname, nsl network) -+AC_SEARCH_LIBS(gethostname, nsl) -+AC_SEARCH_LIBS(socket, network) - - AC_CHECK_LIB(bsd, getpass) - --- -2.2.2 - - -From 46fc9b17c2a6d1ffc1ca3f5e723b075a39de373c Mon Sep 17 00:00:00 2001 +From db40947a2526d8be1fd83ec6fa3165b3ca48fdaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Thu, 24 Sep 2015 01:30:00 +0200 Subject: [PATCH 5/7] Haiku port: temporary workaround undefined TIOCCONS @@ -123,10 +142,10 @@ We should either implement it or do something else, really. 1 file changed, 2 insertions(+) diff --git a/src/tty.c b/src/tty.c -index 1e2debb..8f3fa16 100644 +index cd4acb9..9258348 100644 --- a/src/tty.c +++ b/src/tty.c -@@ -832,8 +832,10 @@ int TtyGrabConsole(int fd, int on, char *rc_name) +@@ -830,8 +830,10 @@ int TtyGrabConsole(int fd, bool on, char *rc_name) InitTTY(&new1, 0); SetMode(&new1, &new2, 0, 0); SetTTY(consredirfd[1], &new2); @@ -138,10 +157,10 @@ index 1e2debb..8f3fa16 100644 Msg(errno, "%s: ioctl TIOCCONS failed", rc_name); close(consredirfd[0]); -- -2.2.2 +2.7.0 -From 06ff2ea9d27451b9cf086c075b0d2cb91d9f2bd6 Mon Sep 17 00:00:00 2001 +From 7d985ccce374ad4a21a4f3b1acc6dd7268f1dc7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Thu, 24 Sep 2015 01:30:42 +0200 Subject: [PATCH 6/7] define _NSIG as NSIG if not defined @@ -152,10 +171,10 @@ Neither seem to be part of POSIX, btw. 1 file changed, 4 insertions(+) diff --git a/src/attacher.c b/src/attacher.c -index 5fbf444..bcf6b40 100644 +index 684f56b..46638ab 100644 --- a/src/attacher.c +++ b/src/attacher.c -@@ -42,6 +42,10 @@ +@@ -45,6 +45,10 @@ #include #endif @@ -167,10 +186,10 @@ index 5fbf444..bcf6b40 100644 #include "socket.h" #include "tty.h" -- -2.2.2 +2.7.0 -From ce083e275a8153c5845e3ba39fc7269102049c40 Mon Sep 17 00:00:00 2001 +From 0754ddf08ae65591b2236ab8441fcef16376e533 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Thu, 24 Sep 2015 01:34:32 +0200 Subject: [PATCH 7/7] sched: actually calculate the nfds arg to select @@ -182,10 +201,10 @@ higher nfds than actually set in the masks. 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/sched.c b/src/sched.c -index 0c3053d..60ae5f5 100644 +index bd0048f..a1dea95 100644 --- a/src/sched.c +++ b/src/sched.c -@@ -105,6 +105,7 @@ void sched() +@@ -107,6 +107,7 @@ void sched() Event *timeoutev = 0; struct timeval timeout; int nsel; @@ -193,7 +212,7 @@ index 0c3053d..60ae5f5 100644 for (;;) { if (calctimeout) -@@ -136,7 +137,15 @@ void sched() +@@ -138,7 +139,15 @@ void sched() FD_SET(ev->fd, &w); } @@ -211,5 +230,5 @@ index 0c3053d..60ae5f5 100644 if (errno != EINTR) { Panic(errno, "select"); -- -2.2.2 +2.7.0