From: Magnus Jacobsson Date: Tue, 20 Jul 2021 06:33:23 +0000 (+0200) Subject: [nfc] define PATHUTIL_API instead of redefining extern X-Git-Tag: 2.49.0~51^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=025014b5bfa8a2f44ea66903b98b3def544f1283;p=graphviz [nfc] define PATHUTIL_API instead of redefining extern --- diff --git a/lib/pathplan/pathutil.h b/lib/pathplan/pathutil.h index 5efb2db22..070871c07 100644 --- a/lib/pathplan/pathutil.h +++ b/lib/pathplan/pathutil.h @@ -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