From: Emden R. Gansner Date: Tue, 7 Jan 2014 20:24:52 +0000 (-0500) Subject: Fix bug 2401; also removed the need for the separate gvpack_builtins.c file. X-Git-Tag: 2.38.0~122 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=73590c8d18ced6a5721704783cd84006f6ec2ea8;p=graphviz Fix bug 2401; also removed the need for the separate gvpack_builtins.c file. --- diff --git a/cmd/tools/Makefile.am b/cmd/tools/Makefile.am index 33a7cdcda..45a72b185 100644 --- a/cmd/tools/Makefile.am +++ b/cmd/tools/Makefile.am @@ -141,7 +141,7 @@ gc_LDADD = \ gc.1.pdf: $(srcdir)/gc.1 - @GROFF@ -Tps -man $(srcdir)/gc.1 | @PS2PDF@ - - >gc.1.pdf -gvpack_SOURCES = gvpack.c gvpack_builtins.c +gvpack_SOURCES = gvpack.c gvpack_CPPFLAGS = $(AM_CPPFLAGS) -DDEMAND_LOADING=0 gvpack_LDADD = \ @@ -152,7 +152,7 @@ gvpack_LDADD = \ $(top_builddir)/plugin/neato_layout/libgvplugin_neato_layout.la if ENABLE_STATIC -gvpack_static_SOURCES = gvpack.c gvpack_builtins.c +gvpack_static_SOURCES = gvpack.c gvpack_static_CPPFLAGS = $(AM_CPPFLAGS) -DDEMAND_LOADING=0 gvpack_static_LDADD = \ $(top_builddir)/plugin/neato_layout/libgvplugin_neato_layout_C.la \ diff --git a/cmd/tools/gvpack.c b/cmd/tools/gvpack.c index 8864d764e..0b74e34e1 100644 --- a/cmd/tools/gvpack.c +++ b/cmd/tools/gvpack.c @@ -50,6 +50,22 @@ #pragma comment( lib, "gvplugin_neato_layout.lib" ) #endif +/*visual studio*/ +#if defined(WIN32) +#define extern __declspec(dllimport) +#endif +/*end visual studio*/ +extern gvplugin_library_t gvplugin_neato_layout_LTX_library; +#undef extern + +lt_symlist_t lt_preloaded_symbols[] = { +#if defined(WIN32) + { "gvplugin_neato_layout_LTX_library", 0 }, +#else + { "gvplugin_neato_layout_LTX_library", (void*)(&gvplugin_neato_layout_LTX_library) }, +#endif + { 0, 0 } +}; /* gvpack: * Input consists of graphs in dot format. @@ -877,6 +893,9 @@ int main(int argc, char *argv[]) doPack = (pinfo.mode != l_undef); +#if defined(WIN32) + lt_preloaded_symbols[0].address = (void*)(&gvplugin_neato_layout_LTX_library); +#endif gvc = gvContextPlugins(lt_preloaded_symbols, DEMAND_LOADING); gs = readGraphs(&cnt, gvc); if (cnt == 0) diff --git a/cmd/tools/gvpack.vcproj b/cmd/tools/gvpack.vcproj index fd6378d18..733e842ff 100644 --- a/cmd/tools/gvpack.vcproj +++ b/cmd/tools/gvpack.vcproj @@ -1,207 +1,203 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cmd/tools/gvpack_builtins.c b/cmd/tools/gvpack_builtins.c index 01e5b46bd..bcac04d34 100644 --- a/cmd/tools/gvpack_builtins.c +++ b/cmd/tools/gvpack_builtins.c @@ -13,6 +13,11 @@ #include "gvplugin.h" +/*visual studio*/ +#if defined(WIN32) +#define extern __declspec(dllimport) +#endif +/*end visual studio*/ extern gvplugin_library_t gvplugin_neato_layout_LTX_library; lt_symlist_t lt_preloaded_symbols[] = {