]> granicus.if.org Git - graphviz/commitdiff
pathplan: add support for the dllexport storage-class attribute in vis.h
authorMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Thu, 22 Jul 2021 14:00:24 +0000 (16:00 +0200)
committerMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Sun, 19 Dec 2021 20:20:12 +0000 (21:20 +0100)
Also, storage-class attributes are now added only when the GVDLL
symbol is defined.

This will allow removing the viz.h symbols from the pathplan.def file
in an upcoming commit.

Towards https://gitlab.com/graphviz/graphviz/-/issues/2058.

lib/pathplan/vis.h

index c8c3e20b613a2740ba1ddcb29146fb5586d68534..da23c37df93666211ec2e21268dd987190e0934b 100644 (file)
@@ -38,8 +38,10 @@ extern "C" {
        /* this is computed from the above */
        array2 vis;
     };
-#ifdef _WIN32
-#ifndef PATHPLAN_EXPORTS
+#ifdef GVDLL
+#ifdef PATHPLAN_EXPORTS
+#define VIS_API __declspec(dllexport)
+#else
 #define VIS_API __declspec(dllimport)
 #endif
 #endif