]> granicus.if.org Git - graphviz/commitdiff
Correct MSVC storage-class in geomprocs.h. Removes 19 warnings
authorMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Mon, 19 Apr 2021 19:21:55 +0000 (21:21 +0200)
committerMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Wed, 19 May 2021 19:00:49 +0000 (21:00 +0200)
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]

lib/common/geomprocs.h

index 7885afdfdad27a8def5687ad1437b79760031134..8b368ddb2320777892ad0c3b32f823107b09e7c7 100644 (file)
@@ -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);