From: Magnus Jacobsson Date: Mon, 26 Jul 2021 13:33:57 +0000 (+0200) Subject: common: correct storage-class attribute declarations in utils.h X-Git-Tag: 3.0.0~110^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=811c7fd5a592257a8525d6de92178dfa122c4b86;p=graphviz common: correct storage-class attribute declarations in utils.h This will allow removing the utils.h symbols from the gvc.def file in an upcoming commit. Towards https://gitlab.com/graphviz/graphviz/-/issues/2058. --- diff --git a/lib/common/utils.h b/lib/common/utils.h index 61bc6816d..11ddc6366 100644 --- a/lib/common/utils.h +++ b/lib/common/utils.h @@ -19,15 +19,16 @@ extern "C" { #endif -/*visual studio*/ -#ifdef _WIN32 -#ifndef GVC_EXPORTS +#ifdef GVDLL +#ifdef GVC_EXPORTS +#define UTILS_API __declspec(dllexport) +#else #define UTILS_API __declspec(dllimport) #endif #endif -/*end visual studio*/ + #ifndef UTILS_API -#define UTILS_API extern +#define UTILS_API /* nothing */ #endif // options to tweak the behavior of XML escaping