From: Magnus Jacobsson Date: Sun, 2 Jan 2022 18:35:05 +0000 (+0100) Subject: gdtclft: use only GVDLL to enable dllexport storage-class attribute for Gdtclft_SafeInit X-Git-Tag: 3.0.0~71^2~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=86f542bf4286230de12b39a56f9cea79fb4630e4;p=graphviz gdtclft: use only GVDLL to enable dllexport storage-class attribute for Gdtclft_SafeInit Instead of using __CYGWIN__ and __WIN32__, rely on that GVDLL is correctly set for all platforms. Towards https://gitlab.com/graphviz/graphviz/-/issues/2173. --- diff --git a/tclpkg/gdtclft/gdtclft.c b/tclpkg/gdtclft/gdtclft.c index 0de5b5059..fbe9d8520 100644 --- a/tclpkg/gdtclft/gdtclft.c +++ b/tclpkg/gdtclft/gdtclft.c @@ -1275,15 +1275,11 @@ int Gdtclft_Init(Tcl_Interp * interp) return TCL_OK; } -#ifdef __CYGWIN__ -int Gdtclft_SafeInit(Tcl_Interp * interp) -#else -#ifdef __WIN32__ +#ifdef GVDLL __declspec(dllexport) int Gdtclft_SafeInit(Tcl_Interp *interp) #else int Gdtclft_SafeInit(Tcl_Interp * interp) #endif -#endif { Tcl_CmdInfo info; if (Gdtclft_Init(interp) != TCL_OK || Tcl_GetCommandInfo(interp, "gd", &info) != 1)