From: Magnus Jacobsson Date: Thu, 22 Jul 2021 14:00:24 +0000 (+0200) Subject: pathplan: add support for the dllexport storage-class attribute in vis.h X-Git-Tag: 3.0.0~121^2~16 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=af191452e7853cef93536968c35bd3b008e57e01;p=graphviz pathplan: add support for the dllexport storage-class attribute in vis.h 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. --- diff --git a/lib/pathplan/vis.h b/lib/pathplan/vis.h index c8c3e20b6..da23c37df 100644 --- a/lib/pathplan/vis.h +++ b/lib/pathplan/vis.h @@ -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