]> granicus.if.org Git - graphviz/commitdiff
common: correct storage-class attribute declarations in utils.h
authorMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Mon, 26 Jul 2021 13:33:57 +0000 (15:33 +0200)
committerMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Sat, 25 Dec 2021 21:04:56 +0000 (22:04 +0100)
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.

lib/common/utils.h

index 61bc6816db9d87a4e14b856a77fdf249c0398ff0..11ddc63665a0276a58664c970899592fc42e4da0 100644 (file)
 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