From: erg Date: Wed, 30 May 2007 22:28:27 +0000 (+0000) Subject: Fixes so that the stupid way Windows handles dll variables works X-Git-Tag: LAST_LIBGRAPH~32^2~5551 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b2bd2979e38942aa0f3a363ed1760ba2d440f1be;p=graphviz Fixes so that the stupid way Windows handles dll variables works using builtins --- diff --git a/lib/gvc/gvcext.h b/lib/gvc/gvcext.h index 822085d9e..091a486a1 100644 --- a/lib/gvc/gvcext.h +++ b/lib/gvc/gvcext.h @@ -36,7 +36,12 @@ extern "C" { void* address; } lt_symlist_t; + +#if defined(GVDLL) && !defined(ENABLE_LTDL) + extern lt_symlist_t lt_preloaded_symbols[]; +#else extern const lt_symlist_t lt_preloaded_symbols[]; +#endif #ifdef __cplusplus } diff --git a/lib/gvc/gvconfig.c b/lib/gvc/gvconfig.c index 07c776766..cbaa577eb 100644 --- a/lib/gvc/gvconfig.c +++ b/lib/gvc/gvconfig.c @@ -223,6 +223,12 @@ static void gvconfig_plugin_install_builtins(GVC_t * gvc) const lt_symlist_t *s; const char *name; +/* For Windows DLLs using builtins, we need to initialize + * the lt_preloaded_symbols table. + */ +#if defined(GVDLL) && !defined(ENABLE_LTDL) + init_lt_preloaded_symbols(); +#endif s = lt_preloaded_symbols; for (s = lt_preloaded_symbols; (name = s->name); s++) if (name[0] == 'g' && strstr(name, "_LTX_library"))