summaryrefslogtreecommitdiff
path: root/sysutils/mc
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2016-12-16 00:02:28 +0000
committerjoerg <joerg@pkgsrc.org>2016-12-16 00:02:28 +0000
commit1b58f85aae0c243061e7c4bb2a31db94bdc49b1e (patch)
treea69597129e02a037c2030dfe0bdca43479e8eb4c /sysutils/mc
parent14600aae4a953a05a2dfd208cbbf39d2443d9a85 (diff)
downloadpkgsrc-1b58f85aae0c243061e7c4bb2a31db94bdc49b1e.tar.gz
Report correct errno value. Recognize and handle plain Bourne shell.
Bump revision.
Diffstat (limited to 'sysutils/mc')
-rw-r--r--sysutils/mc/Makefile3
-rw-r--r--sysutils/mc/distinfo3
-rw-r--r--sysutils/mc/patches/patch-src_subshell_common.c44
3 files changed, 48 insertions, 2 deletions
diff --git a/sysutils/mc/Makefile b/sysutils/mc/Makefile
index 4e9d31a42f8..fa101c40c84 100644
--- a/sysutils/mc/Makefile
+++ b/sysutils/mc/Makefile
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.105 2016/10/19 13:33:25 wiz Exp $
+# $NetBSD: Makefile,v 1.106 2016/12/16 00:02:28 joerg Exp $
DISTNAME= mc-4.8.18
+PKGREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= http://www.midnight-commander.org/downloads/
EXTRACT_SUFX= .tar.bz2
diff --git a/sysutils/mc/distinfo b/sysutils/mc/distinfo
index 782d8fbbd02..c6ebfc783da 100644
--- a/sysutils/mc/distinfo
+++ b/sysutils/mc/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.28 2016/10/19 13:33:25 wiz Exp $
+$NetBSD: distinfo,v 1.29 2016/12/16 00:02:28 joerg Exp $
SHA1 (mc-4.8.18.tar.bz2) = 7dc7839e06eb857122a7919098e80af466cd8c49
RMD160 (mc-4.8.18.tar.bz2) = 2c82ea7946448dd765707441358d9b4a9646a6f0
@@ -6,4 +6,5 @@ SHA512 (mc-4.8.18.tar.bz2) = ed19d91fbf36e191be345b7a86bf3528a4149b2a8099e8db7d1
Size (mc-4.8.18.tar.bz2) = 3336440 bytes
SHA1 (patch-ac) = d01357b685acd8e863510248ed7519ae2821757f
SHA1 (patch-ad) = 4484b91511cf5bac73f4ae940988d46239e2cd95
+SHA1 (patch-src_subshell_common.c) = 6fc3a92e6116527f7ead9d9515906add0b30ff5e
SHA1 (patch-src_vfs_extfs_helpers_Makefile.in) = c5d4735ce9548714731fdb1227e1acac78f11332
diff --git a/sysutils/mc/patches/patch-src_subshell_common.c b/sysutils/mc/patches/patch-src_subshell_common.c
new file mode 100644
index 00000000000..7028abbdbf7
--- /dev/null
+++ b/sysutils/mc/patches/patch-src_subshell_common.c
@@ -0,0 +1,44 @@
+$NetBSD: patch-src_subshell_common.c,v 1.1 2016/12/16 00:02:28 joerg Exp $
+
+Report error from read since tcsetattr can replace errno.
+Recognize /bin/sh as valid shell and don't complain about it.
+
+--- src/subshell/common.c.orig 2016-09-22 18:24:12.000000000 +0000
++++ src/subshell/common.c
+@@ -303,6 +303,7 @@ init_subshell_child (const char *pty_nam
+
+ case SHELL_ASH_BUSYBOX:
+ case SHELL_DASH:
++ case SHELL_SH:
+ /* Do we have a custom init file ~/.local/share/mc/ashrc? */
+ init_file = mc_config_get_full_path ("ashrc");
+
+@@ -496,7 +497,7 @@ static gboolean
+ feed_subshell (int how, gboolean fail_on_error)
+ {
+ fd_set read_set; /* For 'select' */
+- int bytes; /* For the return value from 'read' */
++ int serrno, bytes; /* For the return value from 'read' */
+ int i; /* Loop counter */
+
+ struct timeval wtime; /* Maximum time we wait for the subshell */
+@@ -551,15 +552,16 @@ feed_subshell (int how, gboolean fail_on
+ /* for (i=0; i<5; ++i) * FIXME -- experimental */
+ {
+ bytes = read (mc_global.tty.subshell_pty, pty_buffer, sizeof (pty_buffer));
++ serrno = errno;
+
+ /* The subshell has died */
+- if (bytes == -1 && errno == EIO && !subshell_alive)
++ if (((bytes == -1 && errno == EIO) || bytes == 0) && !subshell_alive)
+ return FALSE;
+
+- if (bytes <= 0)
++ if (bytes < 0)
+ {
+ tcsetattr (STDOUT_FILENO, TCSANOW, &shell_mode);
+- fprintf (stderr, "read (subshell_pty...): %s\r\n", unix_error_string (errno));
++ fprintf (stderr, "read (subshell_pty...): %s\r\n", unix_error_string (serrno));
+ exit (EXIT_FAILURE);
+ }
+