summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortron <tron>2009-02-23 13:18:56 +0000
committertron <tron>2009-02-23 13:18:56 +0000
commit72c0725e49564c081272748cf0e4c8a8149ee9e4 (patch)
treea8280e3b51a52c1863383ffe862e86b46387dd8d
parent5b184870fd8f83adb021faa164de9f64826d5d70 (diff)
downloadpkgsrc-72c0725e49564c081272748cf0e4c8a8149ee9e4.tar.gz
Pullup ticket #2706 - requested by adrianp
pdksh: bug fix Revisions pulled up: - shells/pdksh/Makefile 1.18 - shells/pdksh/files/c_ulimit.c 1.4 - shells/pdksh/files/lex.c 1.4 --- Module Name: pkgsrc Committed By: tnn Date: Sat Feb 21 20:06:30 UTC 2009 Modified Files: pkgsrc/shells/pdksh: Makefile pkgsrc/shells/pdksh/files: c_ulimit.c lex.c Log Message: Merge the following revisions from NetBSD src: c_ulimit.c 1.9: avoid sign extension problem lex.c 1.13: bugfix related to nested quotes Bump PKGREVISION.
-rw-r--r--shells/pdksh/Makefile4
-rw-r--r--shells/pdksh/files/c_ulimit.c4
-rw-r--r--shells/pdksh/files/lex.c50
3 files changed, 22 insertions, 36 deletions
diff --git a/shells/pdksh/Makefile b/shells/pdksh/Makefile
index 9054989cc9b..f02654c60a8 100644
--- a/shells/pdksh/Makefile
+++ b/shells/pdksh/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.17 2008/06/19 18:36:51 joerg Exp $
+# $NetBSD: Makefile,v 1.17.10.1 2009/02/23 13:18:56 tron Exp $
#
DISTNAME= pdksh-5.2.14
-PKGREVISION= 3
+PKGREVISION= 4
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/c_ulimit.c b/shells/pdksh/files/c_ulimit.c
index 004982f1f53..c206aa88021 100644
--- a/shells/pdksh/files/c_ulimit.c
+++ b/shells/pdksh/files/c_ulimit.c
@@ -1,4 +1,4 @@
-/* $NetBSD: c_ulimit.c,v 1.3 2008/06/15 14:20:08 tnn Exp $ */
+/* $NetBSD: c_ulimit.c,v 1.3.10.1 2009/02/23 13:18:56 tron Exp $ */
/*
ulimit -- handle "ulimit" builtin
@@ -187,7 +187,7 @@ c_ulimit(wp)
bi_errorf("invalid limit: %s", wp[0]);
return 1;
}
- val = rval * l->factor;
+ val = (unsigned long)rval * l->factor;
}
}
if (all) {
diff --git a/shells/pdksh/files/lex.c b/shells/pdksh/files/lex.c
index 2ec5018f7f3..76ca3a65aa7 100644
--- a/shells/pdksh/files/lex.c
+++ b/shells/pdksh/files/lex.c
@@ -1,4 +1,4 @@
-/* $NetBSD: lex.c,v 1.3 2008/06/15 14:20:09 tnn Exp $ */
+/* $NetBSD: lex.c,v 1.3.10.1 2009/02/23 13:18:56 tron Exp $ */
/*
* lexical analysis and source input
@@ -328,41 +328,27 @@ yylex(cf)
*wp++ = COMSUB;
/* Need to know if we are inside double quotes
* since sh/at&t-ksh translate the \" to " in
- * "`..\"..`".
- * This is not done in posix mode (section
- * 3.2.3, Double Quotes: "The backquote shall
- * retain its special meaning introducing the
- * other form of command substitution (see
- * 3.6.3). The portion of the quoted string
- * from the initial backquote and the
- * characters up to the next backquote that
- * is not preceded by a backslash (having
- * escape characters removed) defines that
- * command whose output replaces `...` when
- * the word is expanded."
- * Section 3.6.3, Command Substitution:
- * "Within the backquoted style of command
- * substitution, backslash shall retain its
- * literal meaning, except when followed by
- * $ ` \.").
+ * "`..\"..`". POSIX also requires this.
+ * An earlier version of ksh misinterpreted
+ * the POSIX specification and performed
+ * removal of backslash escapes only if
+ * posix mode was not in effect.
*/
statep->ls_sbquote.indquotes = 0;
- if (!Flag(FPOSIX)) {
- Lex_state *s = statep;
- Lex_state *base = state_info.base;
- while (1) {
- for (; s != base; s--) {
- if (s->ls_state == SDQUOTE) {
- statep->ls_sbquote.indquotes = 1;
- break;
- }
- }
- if (s != base)
- break;
- if (!(s = s->ls_info.base))
+ Lex_state *s = statep;
+ Lex_state *base = state_info.base;
+ while (1) {
+ for (; s != base; s--) {
+ if (s->ls_state == SDQUOTE) {
+ statep->ls_sbquote.indquotes = 1;
break;
- base = s-- - STATE_BSIZE;
+ }
}
+ if (s != base)
+ break;
+ if (!(s = s->ls_info.base))
+ break;
+ base = s-- - STATE_BSIZE;
}
break;
default: