From: Magnus Jacobsson Date: Mon, 19 Apr 2021 19:21:55 +0000 (+0200) Subject: Correct MSVC storage-class in geomprocs.h. Removes 19 warnings X-Git-Tag: 2.47.2~3^2~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=69398522f9513396275a9ae72789d3b8832f5a8a;p=graphviz Correct MSVC storage-class in geomprocs.h. Removes 19 warnings Avoid setting __declspec(dllimport) when gvc is being exported. Removes the following warnings from the Windows CMake builds: C:\Users\magja\graphviz\lib\common\geom.c(20,1): warning C4273: 'mkbox': inconsistent dll linkage [C:\Users\magja\graphviz\build\lib\common\common_obj.vcxproj] C:\Users\magja\graphviz\lib\common\geom.c(41,1): warning C4273: 'mkboxf': inconsistent dll linkage [C:\Users\magja\graphviz\build\lib\common\common_obj.vcxproj] C:\Users\magja\graphviz\lib\common\geom.c(84,1): warning C4273: 'lineToBox': inconsistent dll linkage [C:\Users\magja\graphviz\build\lib\common\common_obj.vcxproj] C:\Users\magja\graphviz\lib\common\geom.c(194,1): warning C4273: 'rect2poly': inconsistent dll linkage [C:\Users\magja\graphviz\build\lib\common\common_obj.vcxproj] C:\Users\magja\graphviz\lib\common\geom.c(229,1): warning C4273: 'cwrotatep': inconsistent dll linkage [C:\Users\magja\graphviz\build\lib\common\common_obj.vcxproj] C:\Users\magja\graphviz\lib\common\geom.c(257,1): warning C4273: 'cwrotatepf': inconsistent dll linkage [C:\Users\magja\graphviz\build\lib\common\common_obj.vcxproj] C:\Users\magja\graphviz\lib\common\geom.c(285,1): warning C4273: 'ccwrotatep': inconsistent dll linkage [C:\Users\magja\graphviz\build\lib\common\common_obj.vcxproj] C:\Users\magja\graphviz\lib\common\geom.c(313,1): warning C4273: 'ccwrotatepf': inconsistent dll linkage [C:\Users\magja\graphviz\build\lib\common\common_obj.vcxproj] C:\Users\magja\graphviz\lib\common\geom.c(341,1): warning C4273: 'flip_rec_box': inconsistent dll linkage [C:\Users\magja\graphviz\build\lib\common\common_obj.vcxproj] C:\Users\magja\graphviz\lib\common\geom.c(357,1): warning C4273: 'flip_rec_boxf': inconsistent dll linkage [C:\Users\magja\graphviz\build\lib\common\common_obj.vcxproj] C:\Users\magja\graphviz\lib\common\geom.c(378,1): warning C4273: 'ptToLine2': inconsistent dll linkage [C:\Users\magja\graphviz\build\lib\common\common_obj.vcxproj] C:\Users\magja\graphviz\lib\common\geom.c(395,1): warning C4273: 'line_intersect': inconsistent dll linkage [C:\Users\magja\graphviz\build\lib\common\common_obj.vcxproj] LINK : warning LNK4217: symbol 'ptToLine2' defined in 'geom.obj' is imported by 'emit.obj' in function 'check_control_points' [C:\Users\magja\graphviz\build\lib\gvc\gvc.vcxproj] LINK : warning LNK4217: symbol 'rect2poly' defined in 'geom.obj' is imported by 'emit.obj' in function 'emit_map_rect' [C:\Users\magja\graphviz\build\lib\gvc\gvc.vcxproj] LINK : warning LNK4217: symbol 'ccwrotatepf' defined in 'geom.obj' is imported by 'postproc.obj' in function 'gv_postprocess' [C:\Users\magja\graphviz\build\lib\gvc\gvc.vcxproj] LINK : warning LNK4286: symbol 'ccwrotatepf' defined in 'geom.obj' is imported by 'shapes.obj' [C:\Users\magja\graphviz\build\lib\gvc\gvc.vcxproj] LINK : warning LNK4217: symbol 'flip_rec_boxf' defined in 'geom.obj' is imported by 'shapes.obj' in function 'record_path' [C:\Users\magja\graphviz\build\lib\gvc\gvc.vcxproj] LINK : warning LNK4217: symbol 'cwrotatepf' defined in 'geom.obj' is imported by 'shapes.obj' in function 'compassPoint' [C:\Users\magja\graphviz\build\lib\gvc\gvc.vcxproj] LINK : warning LNK4217: symbol 'lineToBox' defined in 'geom.obj' is imported by 'utils.obj' in function 'overlap_bezier' [C:\Users\magja\graphviz\build\lib\gvc\gvc.vcxproj] --- diff --git a/lib/common/geomprocs.h b/lib/common/geomprocs.h index 7885afdfd..8b368ddb2 100644 --- a/lib/common/geomprocs.h +++ b/lib/common/geomprocs.h @@ -25,9 +25,11 @@ extern "C" { #ifdef GVDLL #define extern __declspec(dllexport) #else +#ifndef GVC_EXPORTS #define extern __declspec(dllimport) #endif #endif +#endif extern box mkbox(point p, point q); extern boxf mkboxf(pointf p, pointf q);