summaryrefslogtreecommitdiff
path: root/shells
diff options
context:
space:
mode:
authorrichard <richard@pkgsrc.org>2016-06-05 04:44:56 +0000
committerrichard <richard@pkgsrc.org>2016-06-05 04:44:56 +0000
commit5394048e375630283a5ca5575bbdd6f384a59ecf (patch)
tree5992fdd55c0ea2da056894a697549a56f4297e03 /shells
parent8e52562d72f374255b65b8c5233127507fb29521 (diff)
downloadpkgsrc-5394048e375630283a5ca5575bbdd6f384a59ecf.tar.gz
PR/51142: address for/select loop compatibility with ksh93 in pdksh
Diffstat (limited to 'shells')
-rw-r--r--shells/pdksh/Makefile4
-rw-r--r--shells/pdksh/files/exec.c4
-rw-r--r--shells/pdksh/files/syn.c11
3 files changed, 7 insertions, 12 deletions
diff --git a/shells/pdksh/Makefile b/shells/pdksh/Makefile
index f6494366aaf..43c72abb5ad 100644
--- a/shells/pdksh/Makefile
+++ b/shells/pdksh/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.23 2015/09/07 06:43:48 dsainty Exp $
+# $NetBSD: Makefile,v 1.24 2016/06/05 04:44:56 richard Exp $
#
DISTNAME= pdksh-5.2.14
-PKGREVISION= 6
+PKGREVISION= 7
CATEGORIES= shells
MASTER_SITES= ftp://ftp.cs.mun.ca/pub/pdksh/ \
http://gd.tuwien.ac.at/utils/shells/pdksh/ \
diff --git a/shells/pdksh/files/exec.c b/shells/pdksh/files/exec.c
index 734d4846d9b..65adac40bac 100644
--- a/shells/pdksh/files/exec.c
+++ b/shells/pdksh/files/exec.c
@@ -1,4 +1,4 @@
-/* $NetBSD: exec.c,v 1.3 2008/06/15 14:20:09 tnn Exp $ */
+/* $NetBSD: exec.c,v 1.4 2016/06/05 04:44:56 richard Exp $ */
/*
* execute command tree
@@ -334,7 +334,7 @@ execute(t, flags)
}
#ifdef KSH
else { /* TSELECT */
- for (;;) {
+ while (*ap != NULL) {
if (!(cp = do_selectargs(ap, is_first))) {
rv = 1;
break;
diff --git a/shells/pdksh/files/syn.c b/shells/pdksh/files/syn.c
index d3bce2eb5e3..d7514d1b4a9 100644
--- a/shells/pdksh/files/syn.c
+++ b/shells/pdksh/files/syn.c
@@ -1,4 +1,4 @@
-/* $NetBSD: syn.c,v 1.3 2008/06/15 14:20:09 tnn Exp $ */
+/* $NetBSD: syn.c,v 1.4 2016/06/05 04:44:56 richard Exp $ */
/*
* shell parser (C version)
@@ -609,13 +609,8 @@ wordlist()
XPput(args, yylval.cp);
if (c != '\n' && c != ';')
syntaxerr((char *) 0);
- if (XPsize(args) == 0) {
- XPfree(args);
- return NULL;
- } else {
- XPput(args, NULL);
- return (char **) XPclose(args);
- }
+ XPput(args, NULL);
+ return (char **) XPclose(args);
}
/*