[packages/pdksh] - added defer-unalias patch (so that unexecuted function definition doesn't remove alias of same nam
qboosh
qboosh at pld-linux.org
Fri Sep 21 22:23:38 CEST 2018
commit 4763efea0acd393f3171783770634ae4b620945c
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Fri Sep 21 22:26:47 2018 +0200
- added defer-unalias patch (so that unexecuted function definition doesn't remove alias of same name)
pdksh-defer-unalias.patch | 39 +++++++++++++++++++++++++++++++++++++++
pdksh.spec | 4 +++-
2 files changed, 42 insertions(+), 1 deletion(-)
---
diff --git a/pdksh.spec b/pdksh.spec
index 83e7fd0..a499624 100644
--- a/pdksh.spec
+++ b/pdksh.spec
@@ -28,6 +28,7 @@ Patch1: %{name}-debian.patch
Patch2: %{name}-tablesize.patch
Patch3: %{name}-memcpy.patch
Patch4: %{name}-history.patch
+Patch5: %{name}-defer-unalias.patch
Patch9: %{name}-no_stop_alias.patch
Patch10: %{name}-man_no_plusminus.patch
Patch11: %{name}-circumflex.patch
@@ -116,12 +117,13 @@ komendami powłoki sh(1).
W tym pakiecie jest pdksh skonsolidowany statycznie.
%prep
-%setup -q
+%setup -q
%{?with_static:%patch0 -p0}
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
+%patch5 -p1
%patch9 -p1
%patch11 -p1
%patch13 -p1
diff --git a/pdksh-defer-unalias.patch b/pdksh-defer-unalias.patch
new file mode 100644
index 0000000..0094d7c
--- /dev/null
+++ b/pdksh-defer-unalias.patch
@@ -0,0 +1,39 @@
+--- pdksh-5.2.14/exec.c.orig 2018-09-21 21:09:25.763470692 +0200
++++ pdksh-5.2.14/exec.c 2018-09-21 21:49:09.843443470 +0200
+@@ -932,11 +932,20 @@
+ const char *name;
+ struct op *t;
+ {
++ int nhash;
+ struct tbl *tp;
+ int was_set = 0;
+
++ nhash = hash(name);
++
++ if (t != NULL && !(t->u.ksh_func)) {
++ /* drop same-name aliases for POSIX functions */
++ if ((tp = tsearch(&aliases, name, nhash)))
++ tdelete(tp);
++ }
++
+ while (1) {
+- tp = findfunc(name, hash(name), TRUE);
++ tp = findfunc(name, nhash, TRUE);
+
+ if (tp->flag & ISSET)
+ was_set = 1;
+--- pdksh-5.2.14/lex.c.orig 2018-09-21 21:09:25.766804025 +0200
++++ pdksh-5.2.14/lex.c 2018-09-21 21:48:05.983444200 +0200
+@@ -759,11 +759,7 @@
+
+ if (last_terminal_was_bracket) {
+ /* The token is probably part of function's definition,
+- * and is should not be aliased. Moreover we remove the alias
+- * so it won't clash with the function name
+- * robert at debian.org, Feb 26th, 2005
+- */
+- tdelete(p);
++ * and is should not be aliased. */
+ } else {
+ register Source *s;
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/pdksh.git/commitdiff/4763efea0acd393f3171783770634ae4b620945c
More information about the pld-cvs-commit
mailing list