From: Magnus Jacobsson Date: Tue, 27 Jul 2021 09:48:19 +0000 (+0200) Subject: common: add storage-class attribute declarations in colorprocs.h X-Git-Tag: 3.0.0~99^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d04ef9f8e2f54c6d0ab3ab0bba8ef312cd4e8827;p=graphviz common: add storage-class attribute declarations in colorprocs.h Towards https://gitlab.com/graphviz/graphviz/-/issues/2058. --- diff --git a/lib/common/colorprocs.h b/lib/common/colorprocs.h index fcf959928..bb0db31dd 100644 --- a/lib/common/colorprocs.h +++ b/lib/common/colorprocs.h @@ -18,9 +18,23 @@ extern "C" { #endif -extern void setColorScheme (char* s); -extern int colorxlate(char *str, gvcolor_t * color, color_type_t target_type); -extern char *canontoken(char *str); +#ifdef GVDLL +#ifdef GVC_EXPORTS +#define COLORPROCS_API __declspec(dllexport) +#else +#define COLORPROCS_API __declspec(dllimport) +#endif +#endif + +#ifndef COLORPROCS_API +#define COLORPROCS_API /* nothing */ +#endif + +COLORPROCS_API void setColorScheme (char* s); +COLORPROCS_API int colorxlate(char *str, gvcolor_t * color, color_type_t target_type); +COLORPROCS_API char *canontoken(char *str); + +#undef COLORPROCS_API #ifdef __cplusplus }