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/Modules/parameter.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Src/Modules') 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, -- cgit 1.4.1