diff options
author | tnn <tnn@pkgsrc.org> | 2009-02-21 20:06:30 +0000 |
---|---|---|
committer | tnn <tnn@pkgsrc.org> | 2009-02-21 20:06:30 +0000 |
commit | 98164b3a8b0e6296773b0e9741026f7a3ba778d1 (patch) | |
tree | c0fe87c56446cee1497f710021f14b4e3097591d | |
parent | 7941a1d28226a9d8813d56cb2ce0ac16ce281865 (diff) | |
download | pkgsrc-98164b3a8b0e6296773b0e9741026f7a3ba778d1.tar.gz |
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/Makefile | 4 | ||||
-rw-r--r-- | shells/pdksh/files/c_ulimit.c | 4 | ||||
-rw-r--r-- | shells/pdksh/files/lex.c | 50 |
3 files changed, 22 insertions, 36 deletions
diff --git a/shells/pdksh/Makefile b/shells/pdksh/Makefile index 9054989cc9b..01378265cbc 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.18 2009/02/21 20:06:30 tnn 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..3f7282b4530 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.4 2009/02/21 20:06:30 tnn 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..502f0662574 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.4 2009/02/21 20:06:30 tnn 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: |