diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2005-01-12 12:18:58 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2005-01-12 12:18:58 +0000 |
commit | 77166e259ee91fde498347de7c3c807d7bff6f1f (patch) | |
tree | 6382fbe91a8f5eb8b96a3095ed9b602957d826ce /Src/Modules | |
parent | 43ac170305e270dbc7759464a995071a161d3692 (diff) | |
download | zsh-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/Modules')
-rw-r--r-- | Src/Modules/parameter.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Src/Modules/parameter.c b/Src/Modules/parameter.c index 6b7db0387..c6a6eca71 100644 --- a/Src/Modules/parameter.c +++ b/Src/Modules/parameter.c @@ -1812,6 +1812,13 @@ struct pardef { Param pm; }; +/* + * This is a duplicate of nullsethash_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 pmnullsethash_gsu = +{ hashgetfn, nullsethashfn, NULL }; static const struct gsu_hash pmcommands_gsu = { hashgetfn, setpmcommands, stdunsetfn }; static const struct gsu_hash pmfunctions_gsu = @@ -1848,7 +1855,7 @@ static const struct gsu_array historywords_gsu = static struct pardef partab[] = { { "parameters", PM_READONLY, - getpmparameter, scanpmparameters, &nullsethash_gsu, + getpmparameter, scanpmparameters, &pmnullsethash_gsu, NULL, NULL }, { "commands", 0, getpmcommand, scanpmcommands, &pmcommands_gsu, |