From nobody Tue Jul 18 14:57:07 2023 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4R529J0Cc3z4gxCG; Tue, 18 Jul 2023 14:57:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4R529H6tMCz45hW; Tue, 18 Jul 2023 14:57:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1689692228; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5UyDK3sv2nrm0+ve8hy2lhZN1IT4EKO1efndT3jMPjA=; b=hJdI3pY92PiMlzfF/cLLr6g3vpWzx6IaX50A2valpjtXCTRvbe9bVVo5uW7E93cAkGept8 uoEdAYmkYa+hNhOAzC4GXcmUQpfElHDi9RveZ45unjWNoTfFxeFFb3pRO/5UwRvC/CaZgg QyFMbnX67ROdqGW8IuELcoy94Rf0wGd1k1YcclpZMFgd9UEGMKTRAIhQxGugzKEfpQ3Fg2 KJKb9N1Bdw7v1UrZLvnZBHSLrwPGKz0pg5QvOE8xcCESTpwQ1xRR3n6he/B+C0cN9yVVZ1 k9jk/yhOAHfy8hMMR5tE7e1dlPSoobnmW3TniyaQD724K6K6SUeeFoJs4RGEsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1689692228; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5UyDK3sv2nrm0+ve8hy2lhZN1IT4EKO1efndT3jMPjA=; b=E8OuN9FRoLaa4RFNRelDvkKoxnrk5g0jFZ8+Akfo1Fjc9fEepmdFERNeTUHNnzTVDRAngi g9ZOc1GuDAW7utUzG86kcnmUhq4s2ZdKPTlGPujrQ6I9hzkpT+frSy3aIObwbeV/4su+HS /AlH64xYXFVSLKaqBdzsmrxH073mJtevsAYfNkXuYU21pj0mAv9Gv+WljDz+2yd9POH3LP BxuFetqpLDc8oWNRwIYZAZgy8XqMrVxMRYwFzPDd5SVNZFUSZbwqlr+AyScR59DUIIqHWa ENxmvvufv9n+58vfguExF4za9WNS1RvVy8wSDRZDwnTpIwLpllsSOCUZOoVcuA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1689692228; a=rsa-sha256; cv=none; b=MyW/1wHShZdAyTBal9cMkw05dZq6Wtf8q/J7YEh/A2E8v+KHdpw97v/XtmdAdQMNkoFdxZ MAmZAXAyno12Sd8hci7XVSSOEkP6SBXISGKrul7STpxgw/4WKyk7LU6GjW6+MVgIzMGvxl 5c0VOYNck9zabegk9dPiE8FKVcKJXTISn6FMFlX+kolBQtewQnSF2oVba/cKRWmoJuOsl0 I+sh4F6BEnkd46pSZWuTKu22sge4xKTLUTuCvKiZImJAKvphF6QnGFV/mOIZsmF/LwXBWw p3EdZOd6awfFB/6pdg93cKprUR+lSEy9c24v0qF2mlQop3gP70lZeVqVYvLFew== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4R529H5ztJz18hR; Tue, 18 Jul 2023 14:57:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 36IEv7nP082183; Tue, 18 Jul 2023 14:57:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 36IEv7Sj082182; Tue, 18 Jul 2023 14:57:07 GMT (envelope-from git) Date: Tue, 18 Jul 2023 14:57:07 GMT Message-Id: <202307181457.36IEv7Sj082182@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Cy Schubert Subject: git: 5ba8ffefe59e - main - mail/xmail: Fix pty handling List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5ba8ffefe59e7d478164fcacaae5e5aa720c402c Auto-Submitted: auto-generated The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/ports/commit/?id=5ba8ffefe59e7d478164fcacaae5e5aa720c402c commit 5ba8ffefe59e7d478164fcacaae5e5aa720c402c Author: Cy Schubert AuthorDate: 2023-07-18 14:10:12 +0000 Commit: Cy Schubert CommitDate: 2023-07-18 14:56:40 +0000 mail/xmail: Fix pty handling Modernize to work with openpty(). Else we get this: Error: xmail cannot open master/slave pipe connection MFH: 2023Q3 --- mail/xmail/Makefile | 2 +- mail/xmail/files/patch-Imakefile | 6 ++--- mail/xmail/files/patch-callMail.c | 50 ++++++++++++++++++++++++++++++++++----- 3 files changed, 48 insertions(+), 10 deletions(-) diff --git a/mail/xmail/Makefile b/mail/xmail/Makefile index 2b2d48a81e30..092e307b2878 100644 --- a/mail/xmail/Makefile +++ b/mail/xmail/Makefile @@ -14,7 +14,7 @@ LICENSE_FILE= ${WRKSRC}/COPYRIGHT USES= imake xorg USE_XORG= ice sm x11 xaw xbitmaps xext xmu xpm xt -CFLAGS+= -Wno-incompatible-function-pointer-types +CFLAGS+= -Wno-incompatible-function-pointer-types -lutil post-patch: # Fix the build with -fno-common (for Clang 11 and GCC 10) diff --git a/mail/xmail/files/patch-Imakefile b/mail/xmail/files/patch-Imakefile index fd65a954a33a..fb417e91b9bd 100644 --- a/mail/xmail/files/patch-Imakefile +++ b/mail/xmail/files/patch-Imakefile @@ -1,5 +1,5 @@ ---- Imakefile.orig Mon Jan 30 22:41:47 1995 -+++ Imakefile Wed Oct 15 09:52:37 2003 +--- Imakefile.orig 1995-01-30 13:41:47.000000000 -0800 ++++ Imakefile 2023-07-18 07:06:05.053673000 -0700 @@ -1,63 +1,62 @@ -/* */# -/* */# @(#)Imakefile - for xmail version 1 patchlevel 5 @@ -103,7 +103,7 @@ DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB) -LOCAL_LIBRARIES = $(LIBXPM) $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XLIB) $(COMPFACE) $(LPT) -+LOCAL_LIBRARIES = $(LIBXPM) $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XLIB) $(COMPFACE) $(LPT) -lcompat ++LOCAL_LIBRARIES = $(LIBXPM) $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XLIB) $(COMPFACE) $(LPT) -lcompat -lutil SRCS = Mailwatch.c HelpText.c actions.c callMail.c callbacks.c \ confirm.c directory.c environs.c handler.c mail.c parser.c \ diff --git a/mail/xmail/files/patch-callMail.c b/mail/xmail/files/patch-callMail.c index 53fcd326af4e..685cdde53584 100644 --- a/mail/xmail/files/patch-callMail.c +++ b/mail/xmail/files/patch-callMail.c @@ -1,6 +1,17 @@ ---- callMail.c.orig Thu Jan 26 21:52:01 1995 -+++ callMail.c Wed Feb 4 23:30:07 1998 -@@ -38,11 +38,10 @@ +--- callMail.c.orig 1995-01-26 21:52:01.000000000 -0800 ++++ callMail.c 2023-07-18 07:01:24.570712000 -0700 +@@ -34,15 +34,21 @@ + #include + #include + ++#ifdef __FreeBSD__ ++#include ++#include ++#include ++#include ++#endif ++ + #if defined(AIXV3) || defined(_IBMR2) #include #endif @@ -14,7 +25,7 @@ #include #if defined(att) #include -@@ -81,7 +80,7 @@ +@@ -81,7 +87,7 @@ #ifdef hpux #define PTYCHAR2 "fedcba9876543210" #else /* !hpux */ @@ -23,7 +34,23 @@ #endif /* !hpux */ #endif /* !PTYCHAR2 */ -@@ -207,8 +206,8 @@ +@@ -91,6 +97,7 @@ + char pseudo_tty[20]; + + ++#ifndef __FreeBSD__ + /* + ** @(#) openMaster - searches for and opens a pty master. If it finds one, + ** it returns the value of the file descriptor. If not, +@@ -197,6 +204,7 @@ + #endif + return(-1); /* look for more master/slave pairs */ + } /* openSlave */ ++#endif /* __FreeBSD__ */ + + + /* +@@ -207,30 +215,34 @@ callMail(argv) char *argv[]; { @@ -34,7 +61,18 @@ #else struct sgttyb Sgtty; #endif -@@ -223,14 +222,14 @@ + int slave; /* file descriptor to slave pty */ + + ++#ifdef __FreeBSD__ ++ openpty(&mail_fd, &slave, NULL, NULL, NULL); ++#else + for (;;) { /* find a pair, or master fails */ + mail_fd = openMaster(); + if ((slave = openSlave(mail_fd)) != -1) + break; + } ++#endif /* ** Set minimal requirements for slave connection (no echo, no NL->CR, keep TABS) */