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