]> granicus.if.org Git - graphviz/commitdiff
gdtclft: use only GVDLL to enable dllexport storage-class attribute for Gdtclft_SafeInit
authorMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Sun, 2 Jan 2022 18:35:05 +0000 (19:35 +0100)
committerMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Wed, 12 Jan 2022 07:51:21 +0000 (08:51 +0100)
Instead of using __CYGWIN__ and __WIN32__, rely on that GVDLL is
correctly set for all platforms.

Towards https://gitlab.com/graphviz/graphviz/-/issues/2173.

tclpkg/gdtclft/gdtclft.c

index 0de5b5059d399cf081de7fda30b4a3b7eb9ef2e5..fbe9d8520ff2583d6f0b130548db625e7d57a8b9 100644 (file)
@@ -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)