Date: Sun, 04 Jan 2026 08:31:07 +0000 From: Cy Schubert <cy@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Cc: Adrian Chadd <adrian@FreeBSD.org> Subject: git: 52ecaddb95e0 - main - sysutils/screen: Fix 64-bit big endian support Message-ID: <695a254b.46540.23a3166@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/ports/commit/?id=52ecaddb95e09dc87de839df68fa9b0aa08957d2 commit 52ecaddb95e09dc87de839df68fa9b0aa08957d2 Author: Adrian Chadd <adrian@FreeBSD.org> AuthorDate: 2026-01-04 08:24:25 +0000 Commit: Cy Schubert <cy@FreeBSD.org> CommitDate: 2026-01-04 08:30:42 +0000 sysutils/screen: Fix 64-bit big endian support PR: 292142 --- sysutils/screen/Makefile | 2 +- sysutils/screen/files/patch-telnet.c | 11 +++ sysutils/screen/files/patch-telnet.h | 11 +++ sysutils/screen/files/patch-window.c | 148 +++++++++++++++++++++++++++++++++++ sysutils/screen/files/patch-window.h | 23 ++++++ 5 files changed, 194 insertions(+), 1 deletion(-) diff --git a/sysutils/screen/Makefile b/sysutils/screen/Makefile index 2d780da3f761..75a4b756814e 100644 --- a/sysutils/screen/Makefile +++ b/sysutils/screen/Makefile @@ -1,6 +1,6 @@ PORTNAME= screen DISTVERSION= 5.0.1 -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES= sysutils MASTER_SITES= GNU \ ftp://ftp.gnu.org/gnu/screen/ \ diff --git a/sysutils/screen/files/patch-telnet.c b/sysutils/screen/files/patch-telnet.c new file mode 100644 index 000000000000..16caef08be2f --- /dev/null +++ b/sysutils/screen/files/patch-telnet.c @@ -0,0 +1,11 @@ +--- telnet.c.orig 2025-05-15 15:31:27 UTC ++++ telnet.c +@@ -228,7 +228,7 @@ void TelProcessLine(char **bufpp, size_t *lenp) + *lenp = 0; + } + +-int DoTelnet(char *buf, size_t *lenp, int f) ++int DoTelnet(char *buf, int *lenp, int f) + { + int echo = !fore->w_telropts[TO_ECHO]; + int cmode = fore->w_telropts[TO_SGA]; diff --git a/sysutils/screen/files/patch-telnet.h b/sysutils/screen/files/patch-telnet.h new file mode 100644 index 000000000000..26863b5dd67d --- /dev/null +++ b/sysutils/screen/files/patch-telnet.h @@ -0,0 +1,11 @@ +--- telnet.h.orig 2025-05-15 15:31:27 UTC ++++ telnet.h +@@ -9,7 +9,7 @@ void TelProcessLine(char **, size_t *); + int TelOpenAndConnect(Window *); + int TelIsline(Window *); + void TelProcessLine(char **, size_t *); +-int DoTelnet(char *, size_t *, int); ++int DoTelnet(char *, int *, int); + int TelIn(Window *, char *, size_t, int); + void TelBreak(Window *); + void TelWindowSize(Window *); diff --git a/sysutils/screen/files/patch-window.c b/sysutils/screen/files/patch-window.c new file mode 100644 index 000000000000..6c101e84a901 --- /dev/null +++ b/sysutils/screen/files/patch-window.c @@ -0,0 +1,148 @@ +--- window.c.orig 2025-05-15 15:31:27 UTC ++++ window.c +@@ -61,7 +61,7 @@ static void WinRestore(void); + static void WinClearLine(int, int, int, int); + static int WinResize(int, int); + static void WinRestore(void); +-static int DoAutolf(char *, size_t *, int); ++static int DoAutolf(char *, int *, int); + static void ZombieProcess(char **, size_t *); + static void win_readev_fn(Event *, void *); + static void win_writeev_fn(Event *, void *); +@@ -74,9 +74,9 @@ static int ForkWindow(Window *, char **, char *); + static void win_destroyev_fn(Event *, void *); + + static int ForkWindow(Window *, char **, char *); +-static void zmodem_found(Window *, int, char *, size_t); ++static void zmodem_found(Window *, int, char *, int); + static void zmodemFin(char *, size_t, void *); +-static int zmodem_parse(Window *, char *, size_t); ++static int zmodem_parse(Window *, char *, int); + + bool VerboseCreate = false; /* XXX move this to user.h */ + +@@ -191,10 +191,10 @@ const struct LayFuncs WinLf = { + NULL + }; + +-static int DoAutolf(char *buf, size_t *lenp, int fr) ++static int DoAutolf(char *buf, int *lenp, int fr) + { + char *p; +- size_t len = *lenp; ++ int len = *lenp; + int trunc = 0; + + for (p = buf; len > 0; p++, len--) { +@@ -215,7 +215,7 @@ static void WinProcess(char **bufpp, size_t *lenp) + + static void WinProcess(char **bufpp, size_t *lenp) + { +- size_t l2 = 0, f, *ilen, l = *lenp, trunc; ++ int l2 = 0, f, *ilen, l = *lenp, trunc; + char *ibuf; + + fore = (Window *)flayer->l_data; +@@ -291,7 +291,7 @@ static void ZombieProcess(char **bufpp, size_t *lenp) + + static void ZombieProcess(char **bufpp, size_t *lenp) + { +- size_t l = *lenp; ++ int l = *lenp; + char *buf = *bufpp, b1[10], b2[10]; + + fore = (Window *)flayer->l_data; +@@ -699,7 +699,7 @@ int MakeWindow(struct NewWindow *newwin) + p->w_readev.data = p->w_writeev.data = (char *)p; + p->w_readev.handler = win_readev_fn; + p->w_writeev.handler = win_writeev_fn; +- p->w_writeev.condpos = (int *)&p->w_inlen; ++ p->w_writeev.condpos = &p->w_inlen; + evenq(&p->w_readev); + evenq(&p->w_writeev); + p->w_paster.pa_slowev.type = EV_TIMEOUT; +@@ -1344,7 +1344,7 @@ int winexec(char **av) + pwin->p_readev.data = pwin->p_writeev.data = (char *)w; + pwin->p_readev.handler = pseu_readev_fn; + pwin->p_writeev.handler = pseu_writeev_fn; +- pwin->p_writeev.condpos = (int *)&pwin->p_inlen; ++ pwin->p_writeev.condpos = &pwin->p_inlen; + if (pwin->p_fdpat & (F_PFRONT << F_PSHIFT * 2 | F_PFRONT << F_PSHIFT)) + evenq(&pwin->p_readev); + evenq(&pwin->p_writeev); +@@ -1378,7 +1378,7 @@ void FreePseudowin(Window *w) + } + evdeq(&pwin->p_readev); + evdeq(&pwin->p_writeev); +- if (w->w_readev.condneg == (int *)&pwin->p_inlen) ++ if (w->w_readev.condneg == &pwin->p_inlen) + w->w_readev.condpos = w->w_readev.condneg = NULL; + evenq(&w->w_readev); + free((char *)pwin); +@@ -1484,7 +1484,7 @@ static void win_readev_fn(Event *event, void *data) + size = IOSIZE - p->w_pwin->p_inlen; + if (size <= 0) { + event->condpos = &const_IOSIZE; +- event->condneg = (int *)&p->w_pwin->p_inlen; ++ event->condneg = &p->w_pwin->p_inlen; + return; + } + } +@@ -1563,7 +1563,7 @@ static void win_writeev_fn(Event *event, void *data) + static void win_writeev_fn(Event *event, void *data) + { + Window *p = (Window *)data; +- size_t len; ++ int len; + if (p->w_inlen) { + if ((len = write(event->fd, p->w_inbuf, p->w_inlen)) <= 0) + len = p->w_inlen; /* dead window */ +@@ -1600,7 +1600,7 @@ static void pseu_readev_fn(Event *event, void *data) + size = IOSIZE - p->w_inlen; + if (size <= 0) { + event->condpos = &const_IOSIZE; +- event->condneg = (int *)&p->w_inlen; ++ event->condneg = &p->w_inlen; + return; + } + } +@@ -1643,7 +1643,7 @@ static void pseu_writeev_fn(Event *event, void *data) + { + Window *p = (Window *)data; + struct pseudowin *pw = p->w_pwin; +- size_t len; ++ int len; + + if (pw->p_inlen == 0) + return; +@@ -1683,10 +1683,10 @@ static void win_destroyev_fn(Event *event, void *data) + WindowDied(p, p->w_exitstatus, 1); + } + +-static int zmodem_parse(Window *p, char *bp, size_t len) ++static int zmodem_parse(Window *p, char *bp, int len) + { + char *b2 = bp; +- for (size_t i = 0; i < len; i++, b2++) { ++ for (int i = 0; i < len; i++, b2++) { + if (p->w_zauto == 0) { + for (; i < len; i++, b2++) + if (*b2 == 030) +@@ -1756,7 +1756,7 @@ static void zmodemFin(char *buf, size_t len, void *dat + } + } + +-static void zmodem_found(Window *p, int send, char *bp, size_t len) ++static void zmodem_found(Window *p, int send, char *bp, int len) + { + char *s; + size_t n; +@@ -1792,7 +1792,7 @@ static void zmodem_found(Window *p, int send, char *bp + display = d; + evdeq(&D_blockedev); + D_readev.condpos = &const_IOSIZE; +- D_readev.condneg = (int *)&p->w_inlen; ++ D_readev.condneg = &p->w_inlen; + ClearAll(); + GotoPos(0, 0); + SetRendition(&mchar_blank); diff --git a/sysutils/screen/files/patch-window.h b/sysutils/screen/files/patch-window.h new file mode 100644 index 000000000000..348fcc223062 --- /dev/null +++ b/sysutils/screen/files/patch-window.h @@ -0,0 +1,23 @@ +--- window.h.orig 2025-05-15 15:31:27 UTC ++++ window.h +@@ -79,7 +79,7 @@ struct pseudowin { + char p_cmd[MAXSTR]; + char p_tty[MAXSTR]; + char p_inbuf[IOSIZE]; /* buffered writing to p_ptyfd */ +- size_t p_inlen; ++ int p_inlen; + }; + + /* bits for fdpat: */ +@@ -157,9 +157,9 @@ struct Window { + int w_poll_zombie_timeout; + int w_ptyfd; /* fd of the master pty */ + char w_inbuf[IOSIZE]; +- size_t w_inlen; ++ int w_inlen; + char w_outbuf[IOSIZE]; +- size_t w_outlen; ++ int w_outlen; + bool w_aflag; /* (-a option) */ + bool w_dynamicaka; /* should we change name */ + char *w_title; /* name of the window */home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?695a254b.46540.23a3166>
