From nobody Tue Oct 01 20:12:50 2024 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 4XJ8J339pwz5XKwv; Tue, 01 Oct 2024 20:12:51 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XJ8J30lbjz4jrq; Tue, 1 Oct 2024 20:12:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727813571; 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=L3srjAJvrfxFRL9m6IuEbdFXoixs3Gl+/QVb7N2LdEA=; b=ZgtwFMnRrNTRcfIaACrBUP1b9J69xZ9OYy/TlNdNP+CJtAfCdK6pdWPGzQ8pvGCPT0dd20 8XxWHO0lBaIlcYIw9ebzGyoyHVzAkcjTp+4hvVpgZX/xy82qPVfVekLFKeSKLexOSgFwp/ tlQeT+lguGNRqF05lJMJQhCNJot2N4sSsohVBzYx9PBsV2PJTYKxNXEhkQG7XPmAdrQgyr PDpR2+Q/C5aUDwizP4GPRMGFJRARa40giDfrgM7Ci5Zmv8yR1T27fthI2xRgZC7roHt1xS pkHFb99MCJPn4kaTzfZFfHe3WWIKII8q1UpTrCp6h34NK55YnryNgwabA6kIKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727813571; 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=L3srjAJvrfxFRL9m6IuEbdFXoixs3Gl+/QVb7N2LdEA=; b=Ik8RbT6jCo0UKw+FoV1rKOtRhlCGsaRdg5iTlgPQwI+0U7dqIUQwaAbnWtoAJsoOM0y/ZJ oimWdpqONYqutdoszrx1lx80/TIElrffx7IJutBt2HAZKK/Ery4XjWn7WUyW6gayFxKNKw tnB1KX/swe/JWIg0lwKY1SnbN5uOCGmmDDarL23Rue19cnV4PesVVXJp57n9IzVo1MHUtJ SOWNiHzOwJnb6zPB1kPR25XCii9BPuQyT6ZAf2B1vZYd07b03IMm1deo9R91e+DOncztqv HZGK61SNy8ZUBddYm0LBm7Mfl6F13XnVz/DPIoVHWft8yfKCkOhX5SdFKc5siQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727813571; a=rsa-sha256; cv=none; b=VWRFFtkLFupOes8vTDv5ljLGy4O9ltaHwDfrRYGFEq/KmEkPpYYZSsetJK1yiZHc3CfKdA n6ZFWlVMDIQnJFbUohqagvK6r2u0q7Bg48oFmR/R47zcpL0KbZj3caAac40+rGETV3PANM UQWx30cfxwBH0G+hD558v6KHSetn4HwDvGLA9e/W9nge56sBgiMn/ue4D0MAvCaXEIrqIG 9q331F5jwBHbqhgrx/CWpVD0sm/A8MvVroxRnZGpC+FZHEOqUM3gxTyXlwyxNEXZOEbYs/ SCnAxPlWe+zP3JFGIM8nrM0xIuzRWZEmMwpLuVSZEHC7uFkMH350j4M7l6BNUw== 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 4XJ8J30MqnzsFy; Tue, 1 Oct 2024 20:12:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 491KCoqX049812; Tue, 1 Oct 2024 20:12:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 491KCot9049809; Tue, 1 Oct 2024 20:12:50 GMT (envelope-from git) Date: Tue, 1 Oct 2024 20:12:50 GMT Message-Id: <202410012012.491KCot9049809@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Brooks Davis Subject: git: 993ca87fedcc - main - japanese/mh: include errno.h for errno 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: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 993ca87fedcc6e2b7902c4438687dbb891f9de61 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/ports/commit/?id=993ca87fedcc6e2b7902c4438687dbb891f9de61 commit 993ca87fedcc6e2b7902c4438687dbb891f9de61 Author: Brooks Davis AuthorDate: 2024-09-30 23:03:36 +0000 Commit: Brooks Davis CommitDate: 2024-10-01 20:11:47 +0000 japanese/mh: include errno.h for errno errno must be accessed by a macro from errno.h. Due to the sheer number of instances use REINPLACE_CMD to replace most instances of "extern int errno;" with "#include ". In a few places the errno decleration was a function-scope global where including a header didn't make sense patch those out (the files already included errno.h). This isn't the most elegant, but it's the least of the issues with this code. PR: 281787 Approved by: portmgr (build fix blanket), mikael --- japanese/mh/Makefile | 5 ++++- japanese/mh/files/patch-sbr_ruserpass.c | 10 ++++++++++ japanese/mh/files/patch-uip_mshcmds.c | 19 +++++++++++++++++++ japanese/mh/files/patch-zotnet_mf_muinc.c | 10 ++++++++++ japanese/mh/files/patch-zotnet_mf_uminc.c | 10 ++++++++++ 5 files changed, 53 insertions(+), 1 deletion(-) diff --git a/japanese/mh/Makefile b/japanese/mh/Makefile index 85df8866578c..7d7d53ceab23 100644 --- a/japanese/mh/Makefile +++ b/japanese/mh/Makefile @@ -1,6 +1,6 @@ PORTNAME= mh PORTVERSION= ${VERSION}.j${JP_VERSION} -PORTREVISION= 7 +PORTREVISION= 8 CATEGORIES= japanese mail MASTER_SITES= ftp://ftp.laic.u-hyogo.ac.jp/pub/net/mh/ DISTNAME= ${PORTNAME}-${VERSION}-JP-${JP_VERSION} @@ -47,6 +47,9 @@ post-patch: print; \ }' ${i}.rf > ${i}.tmp && ${MV} ${i}.tmp ${i}.rf) .endfor + ${FIND} ${WRKSRC} -type f \! -name \*.orig | \ + xargs grep -l "extern[ ]*int[ ]*errno" | \ + xargs ${REINPLACE_CMD} -e "s/^extern[ ]*int[ ]*errno;/#include /" post-install: ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/* diff --git a/japanese/mh/files/patch-sbr_ruserpass.c b/japanese/mh/files/patch-sbr_ruserpass.c new file mode 100644 index 000000000000..5a79334e4e5d --- /dev/null +++ b/japanese/mh/files/patch-sbr_ruserpass.c @@ -0,0 +1,10 @@ +--- sbr/ruserpass.c.orig ++++ sbr/ruserpass.c +@@ -66,7 +66,6 @@ + char myname[MAXHOSTNAMELEN], *mydomain; + int t, i, c, usedefault = 0; + struct stat stb; +- extern int errno; + + hdir = getenv("HOME"); + if (hdir == NULL) diff --git a/japanese/mh/files/patch-uip_mshcmds.c b/japanese/mh/files/patch-uip_mshcmds.c new file mode 100644 index 000000000000..f3269a64f34a --- /dev/null +++ b/japanese/mh/files/patch-uip_mshcmds.c @@ -0,0 +1,19 @@ +--- uip/mshcmds.c.orig ++++ uip/mshcmds.c +@@ -29,8 +29,6 @@ + + /* */ + +-extern int errno; +- + /* BURST */ + static char delim3[] = "-------";/* from burst.c */ + +@@ -3529,7 +3527,6 @@ + (void) strcpy (tmpfil, m_scratch ("", invo_name)); + if ((out = fopen (tmpfil, "w")) == NULL) { + int olderr; +- extern int errno; + char newfil[80]; + + olderr = errno; diff --git a/japanese/mh/files/patch-zotnet_mf_muinc.c b/japanese/mh/files/patch-zotnet_mf_muinc.c new file mode 100644 index 000000000000..3799145a8f03 --- /dev/null +++ b/japanese/mh/files/patch-zotnet_mf_muinc.c @@ -0,0 +1,10 @@ +--- zotnet/mf/muinc.c.orig ++++ zotnet/mf/muinc.c +@@ -81,7 +81,6 @@ + { + int count, + fd; +- extern int errno; + + for (count = 2; count > 0; count--) + if ((fd = lkopen (file, 1)) == NOTOK) diff --git a/japanese/mh/files/patch-zotnet_mf_uminc.c b/japanese/mh/files/patch-zotnet_mf_uminc.c new file mode 100644 index 000000000000..31409c6db9b3 --- /dev/null +++ b/japanese/mh/files/patch-zotnet_mf_uminc.c @@ -0,0 +1,10 @@ +--- zotnet/mf/uminc.c.orig ++++ zotnet/mf/uminc.c +@@ -86,7 +86,6 @@ + int clear, + count, + fd; +- extern int errno; + struct stat stbuf; + + for (clear = FALSE, count = 2; count > 0; count--)