From b2bd2979e38942aa0f3a363ed1760ba2d440f1be Mon Sep 17 00:00:00 2001 From: erg Date: Wed, 30 May 2007 22:28:27 +0000 Subject: [PATCH] Fixes so that the stupid way Windows handles dll variables works using builtins --- lib/gvc/gvcext.h | 5 +++++ lib/gvc/gvconfig.c | 6 ++++++ 2 files changed, 11 insertions(+) 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")) -- 2.40.0