From: Magnus Jacobsson Date: Tue, 20 Jul 2021 05:39:46 +0000 (+0200) Subject: [nfc] define GVIO_API instead of redefining extern X-Git-Tag: 2.49.0~51^2~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=344a97d807e09c302a2eb83b3c941d7ab0974538;p=graphviz [nfc] define GVIO_API instead of redefining extern --- diff --git a/lib/gvc/gvio.h b/lib/gvc/gvio.h index fc7d48013..e3a8cf50f 100644 --- a/lib/gvc/gvio.h +++ b/lib/gvc/gvio.h @@ -18,31 +18,34 @@ extern "C" { #endif #ifdef GVDLL -#define extern __declspec(dllexport) +#define GVIO_API __declspec(dllexport) #else -#define extern +#define GVIO_API #endif /*visual studio*/ #ifdef _WIN32 #ifndef GVC_EXPORTS -#undef extern -#define extern __declspec(dllimport) +#undef GVIO_API +#define GVIO_API __declspec(dllimport) #endif #endif /*end visual studio*/ +#ifndef GVIO_API +#define GVIO_API extern +#endif - extern size_t gvwrite (GVJ_t * job, const char *s, size_t len); - extern int gvferror (FILE *stream); - extern int gvputc(GVJ_t * job, int c); - extern int gvputs(GVJ_t * job, const char *s); - extern int gvflush (GVJ_t * job); - extern void gvprintf(GVJ_t * job, const char *format, ...); - extern void gvprintdouble(GVJ_t * job, double num); - extern void gvprintpointf(GVJ_t * job, pointf p); - extern void gvprintpointflist(GVJ_t * job, pointf *p, int n); - -#undef extern + GVIO_API size_t gvwrite (GVJ_t * job, const char *s, size_t len); + GVIO_API int gvferror (FILE *stream); + GVIO_API int gvputc(GVJ_t * job, int c); + GVIO_API int gvputs(GVJ_t * job, const char *s); + GVIO_API int gvflush (GVJ_t * job); + GVIO_API void gvprintf(GVJ_t * job, const char *format, ...); + GVIO_API void gvprintdouble(GVJ_t * job, double num); + GVIO_API void gvprintpointf(GVJ_t * job, pointf p); + GVIO_API void gvprintpointflist(GVJ_t * job, pointf *p, int n); + +#undef GVIO_API #ifdef __cplusplus }