From 77166e259ee91fde498347de7c3c807d7bff6f1f Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Wed, 12 Jan 2005 12:18:58 +0000 Subject: 20695: Fix Cygwin problem with initialising from pointer to imported variable --- Src/Zle/zleparameter.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Src/Zle/zleparameter.c') 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, -- cgit 1.4.1