about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--Src/Modules/param_private.c10
2 files changed, 14 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index fb75a1e43..4ab9b14ed 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2016-01-25  Barton E. Schaefer  <schaefer@zsh.org>
+
+	* Jun T.: 37759: Src/Modules/param_private.c: save more function
+	pointers from realparamtab when hacking in their replacements,
+	because restoring from the original external symbols fails for
+	some dynamic link schemes (e.g. 64bit Cygwin).
+
 2016-01-25  Peter Stephenson  <p.stephenson@samsung.com>
 
 	* 37765: Src/builtin.c, Test/C04funcdef.ztst: Use FS_FUNC on
diff --git a/Src/Modules/param_private.c b/Src/Modules/param_private.c
index e13813c3d..2f51cb099 100644
--- a/Src/Modules/param_private.c
+++ b/Src/Modules/param_private.c
@@ -490,7 +490,7 @@ wrap_private(Eprog prog, FuncWrap w, char *name)
     return 1;
 }
 
-static HashNode (*getparamnode) _((HashTable, const char *));
+static GetNodeFunc getparamnode;
 
 /**/
 static HashNode
@@ -567,6 +567,8 @@ static struct features module_features = {
 };
 
 static struct builtin save_local;
+static GetNodeFunc save_getnode2;
+static ScanFunc save_printnode;
 static struct reswd reswd_private = {{NULL, "private", 0}, TYPESET};
 
 /**/
@@ -577,6 +579,8 @@ setup_(UNUSED(Module m))
 
     /* Horrible, horrible hack */
     getparamnode = realparamtab->getnode;
+    save_getnode2 = realparamtab->getnode2;
+    save_printnode = realparamtab->printnode;
     realparamtab->getnode = getprivatenode;
     realparamtab->getnode2 = getprivatenode2;
     realparamtab->printnode = printprivatenode;
@@ -624,8 +628,8 @@ cleanup_(Module m)
     removehashnode(reswdtab, "private");
     
     realparamtab->getnode = getparamnode;
-    realparamtab->getnode2 = gethashnode2;
-    realparamtab->printnode = printparamnode;
+    realparamtab->getnode2 = save_getnode2;
+    realparamtab->printnode = save_printnode;
 
     deletewrapper(m, wrapper);
     return setfeatureenables(m, &module_features, NULL);