]> granicus.if.org Git - graphviz/commitdiff
Fixes so that the stupid way Windows handles dll variables works
authorerg <devnull@localhost>
Wed, 30 May 2007 22:28:27 +0000 (22:28 +0000)
committererg <devnull@localhost>
Wed, 30 May 2007 22:28:27 +0000 (22:28 +0000)
using builtins

lib/gvc/gvcext.h
lib/gvc/gvconfig.c

index 822085d9e5ed1b219e0631251582b67eac0339c6..091a486a1c5eaef278fdad19356b63e0f873bd41 100644 (file)
@@ -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
 }
index 07c776766e42b1a99b4f19a4daa3f2219ad8a2a4..cbaa577eb6d3e209daa4b1c3119057121c8bf3ee 100644 (file)
@@ -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"))