]> granicus.if.org Git - graphviz/commitdiff
pathplan: add support for the dllexport storage-class attribute in pathutil.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:19:48 +0000 (21:19 +0100)
Also, storage-class attributes are now added only when the GVDLL
symbol is defined.

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

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

lib/pathplan/pathutil.h

index 503ed90f6441abbd26b2ed9385b5d94f8117074a..db5fc701bb8f6106693cbd71e8ecf1f872e81cc0 100644 (file)
@@ -27,8 +27,10 @@ extern "C" {
 #endif
 
 /*visual studio*/
-#ifdef _WIN32
-#ifndef PATHPLAN_EXPORTS
+#ifdef GVDLL
+#ifdef PATHPLAN_EXPORTS
+#define PATHUTIL_API __declspec(dllexport)
+#else
 #define PATHUTIL_API __declspec(dllimport)
 #endif
 #endif