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.
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