]> granicus.if.org Git - graphviz/commitdiff
lib/edgepaint: add support for the dllexport storage-class attribute in lab_gamut.h
authorMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Sat, 31 Jul 2021 21:51:00 +0000 (23:51 +0200)
committerMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Mon, 13 Dec 2021 06:35:52 +0000 (07:35 +0100)
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.

lib/edgepaint/lab_gamut.h

index 66bf57dd2aa74187ca0bead45381a6f774ac29de..5a6dddb0316b068c0625c0a658e004a82e17afc7 100644 (file)
 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