]> granicus.if.org Git - graphviz/commitdiff
[nfc] define PATHUTIL_API instead of redefining extern
authorMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Tue, 20 Jul 2021 06:33:23 +0000 (08:33 +0200)
committerMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Wed, 21 Jul 2021 16:29:25 +0000 (18:29 +0200)
lib/pathplan/pathutil.h

index 5efb2db229cfaabe68b1f5f8b75a3d76b5d109fd..070871c0745cb79bc5518fde5c7013c1339f296c 100644 (file)
@@ -29,18 +29,21 @@ extern "C" {
 /*visual studio*/
 #ifdef _WIN32
 #ifndef PATHPLAN_EXPORTS
-#define extern __declspec(dllimport)
+#define PATHUTIL_API __declspec(dllimport)
 #endif
 #endif
 /*end visual studio*/
+#ifndef PATHUTIL_API
+#define PATHUTIL_API extern
+#endif
        typedef double COORD;
-    extern COORD area2(Ppoint_t, Ppoint_t, Ppoint_t);
-    extern int wind(Ppoint_t a, Ppoint_t b, Ppoint_t c);
-    extern COORD dist2(Ppoint_t, Ppoint_t);
+    PATHUTIL_API COORD area2(Ppoint_t, Ppoint_t, Ppoint_t);
+    PATHUTIL_API int wind(Ppoint_t a, Ppoint_t b, Ppoint_t c);
+    PATHUTIL_API COORD dist2(Ppoint_t, Ppoint_t);
 
     int in_poly(Ppoly_t argpoly, Ppoint_t q);
 
-#undef extern
+#undef PATHUTIL_API
 #ifdef __cplusplus
 }
 #endif