about summary refs log tree commit diff
path: root/Src/Zle
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2005-01-12 12:18:58 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2005-01-12 12:18:58 +0000
commit77166e259ee91fde498347de7c3c807d7bff6f1f (patch)
tree6382fbe91a8f5eb8b96a3095ed9b602957d826ce /Src/Zle
parent43ac170305e270dbc7759464a995071a161d3692 (diff)
downloadzsh-77166e259ee91fde498347de7c3c807d7bff6f1f.tar.gz
zsh-77166e259ee91fde498347de7c3c807d7bff6f1f.tar.xz
zsh-77166e259ee91fde498347de7c3c807d7bff6f1f.zip
20695: Fix Cygwin problem with initialising from pointer to imported variable zsh-4.2.2
Diffstat (limited to 'Src/Zle')
-rw-r--r--Src/Zle/zleparameter.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/Src/Zle/zleparameter.c b/Src/Zle/zleparameter.c
index ed415c960..bf6b60479 100644
--- a/Src/Zle/zleparameter.c
+++ b/Src/Zle/zleparameter.c
@@ -167,12 +167,19 @@ struct pardef {
     Param pm;
 };
 
+/*
+ * This is a duplicate of stdhash_gsu.  On some systems
+ * (such as Cygwin) we can't put a pointer to an imported variable
+ * in a compile-time initialiser, so we use this instead.
+ */
+static const struct gsu_hash zlestdhash_gsu =
+{ hashgetfn, hashsetfn, stdunsetfn };
 static const struct gsu_array keymaps_gsu =
 { keymapsgetfn, arrsetfn, stdunsetfn };
 
 static struct pardef partab[] = {
     { "widgets", PM_READONLY,
-      getpmwidgets, scanpmwidgets, &stdhash_gsu,
+      getpmwidgets, scanpmwidgets, &zlestdhash_gsu,
       NULL, NULL },
     { "keymaps", PM_ARRAY|PM_SPECIAL|PM_READONLY,
       NULL, NULL, NULL,