]> granicus.if.org Git - graphviz/commitdiff
common: add storage-class attribute declarations in colorprocs.h
authorMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Tue, 27 Jul 2021 09:48:19 +0000 (11:48 +0200)
committerMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Tue, 28 Dec 2021 22:19:39 +0000 (23:19 +0100)
Towards https://gitlab.com/graphviz/graphviz/-/issues/2058.

lib/common/colorprocs.h

index fcf959928b51f8af5d8d0acfe0745992653ae611..bb0db31dd7be3470bdb820437ef932982a856c56 100644 (file)
 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
 }