Fix bug for add_glob:

Do not stop scanning if we see '$' as it does more harm than good.
  For $HOME/tm we should return $HOME/tm*

Set license to BSD (not "public domain" due to sigact.[ch]).

Submitted by:	Simon Gerraty <sjg@juniper.net>
Obtained from:	NetBSD
Approved by:	skreuzer
This commit is contained in:
David E. O'Brien
2012-06-05 01:59:27 +00:00
parent 59a9476e94
commit aa4e597344
2 changed files with 11 additions and 1 deletions

View File

@@ -7,7 +7,7 @@
PORTNAME= pdksh
PORTVERSION= 5.2.14p2
PORTREVISION= 3
PORTREVISION= 4
CATEGORIES= shells
MASTER_SITES= http://gd.tuwien.ac.at/utils/shells/pdksh/ \
ftp://ftp.lip6.fr/pub/unix/shells/pdksh/ \
@@ -20,6 +20,7 @@ PATCH_DIST_STRIP= -p2
MAINTAINER= skreuzer@FreeBSD.org
COMMENT= The Public Domain Korn Shell
LICENSE= BSD
GNU_CONFIGURE= yes
MAN1= ksh.1

View File

@@ -8,3 +8,12 @@
cp += 2;
}
@@ -847,7 +847,7 @@ add_glob(str, slen)
for (s = toglob; *s; s++) {
if (*s == '\\' && s[1])
s++;
- else if (*s == '*' || *s == '[' || *s == '?' || *s == '$'
+ else if (*s == '*' || *s == '[' || *s == '?'
|| (s[1] == '(' /*)*/ && strchr("*+?@!", *s)))
break;
else if (ISDIRSEP(*s))