From: Magnus Jacobsson Date: Sat, 31 Jul 2021 21:51:00 +0000 (+0200) Subject: lib/edgepaint: add support for the dllexport storage-class attribute in lab_gamut.h X-Git-Tag: 3.0.0~129^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b535677e6b6479930b8c77050bd6c3d048b3c0df;p=graphviz lib/edgepaint: add support for the dllexport storage-class attribute in lab_gamut.h Also, storage-class attributes are now added only when the GVDLL symbol is defined. This removes the need to use a .def file. Towards https://gitlab.com/graphviz/graphviz/-/issues/2058. --- diff --git a/lib/edgepaint/lab_gamut.h b/lib/edgepaint/lab_gamut.h index 66bf57dd2..5a6dddb03 100644 --- a/lib/edgepaint/lab_gamut.h +++ b/lib/edgepaint/lab_gamut.h @@ -14,8 +14,12 @@ extern "C" { #endif -#if defined(_WIN32) && !defined(LAB_GAMUT_EXPORTS) +#ifdef GVDLL +#ifdef LAB_GAMUT_EXPORTS +#define EXTERN __declspec(dllexport) +#else #define EXTERN __declspec(dllimport) +#endif #else #define EXTERN /* nothing */ #endif