View Issue Details

IDProjectCategoryView StatusLast Update
0028838Open CASCADEOCCT:Configurationpublic2021-03-17 09:49
Reporterkgv Assigned Tobugmaster  
PrioritynormalSeverityintegration request 
Status closedResolutionfixed 
Product Version7.1.0 
Target Version7.2.0Fixed in Version7.2.0 
Summary0028838: Configuration - undefine macros coming from X11 headers in place of collision
DescriptionCurrently several name collisions coming from X11 headers (macros Status, Convex, Opposite, FillSolid) are undefined within special header file InterfaceGraphic.hxx, which is supposed to be included instead of X11 headers.

This solution, however, is not very flexible - e.g. user have to know about InterfaceGraphic.hxx existence (while name collision occurs when using other OCCT header files) and conflicts with compilation techniques like precompiled headers.

Therefore, it is proposed to undefined name collisions in the place of their occurrence (e.g. in header files of OCCT classes using the same names as X11 macros). This will not solve the name collision issue completely (user might include X11 after OCCT headers which will make OCCT methods inaccessible), but improve the situation to some degree.
Steps To ReproduceN/A
TagsNo tags attached.
Test case numberNot needed

Relationships

parent of 0028822 closedbugmaster Open CASCADE Configuration, XCAFDoc - fix name collision with macros GetObject() 
parent of 0032220 closedkgv Open CASCADE Configuration, Aspect_VKeySet - eliminate name collision with X11 macros 
child of 0028417 closedbugmaster Community Using PRECOMPILED HEADER to speed up compilation time 

Activities

git

2017-06-13 08:45

administrator   ~0067291

Branch CR28838 has been created by kgv.

SHA-1: c053750532af46e721e234ebae98f8ce27ac749b


Detailed log of new commits:

Author: ski
Date: Wed Feb 15 16:49:23 2017 +0300

    Undefine Convex within TopoDS_TVertex.hxx

Author: abv
Date: Sat Feb 11 09:15:32 2017 +0300

    Undefine CurrentDirectory macro in OSD_Process.hxx to avoid conflict due to possible previous inclusion of windows.h

Author: kgv
Date: Sat Feb 4 13:55:42 2017 +0300

    The macros AddPrinter (coming from WinAPI headers) is now undefined
    within Message_Messenger class definition having method with the same name.

Author: kgv
Date: Sat Feb 4 11:17:02 2017 +0300

    The macros Status, Convex, Opposite, FillSolid (coming from X11 headers)
    are now undefined in place of definition of methods with same name in OCCT headers.
    The usage of variables with name Status is now avoided.

Author: kgv
Date: Fri Feb 3 23:27:02 2017 +0400

    Define GL_GLEXT_LEGACY only if not already defined

git

2017-06-13 08:50

administrator   ~0067292

Branch CR28838_1 has been created by kgv.

SHA-1: ce63ec491114e26151c587ca769cdbbe78fd6c63


Detailed log of new commits:

Author: kgv
Date: Fri Feb 3 23:27:02 2017 +0400

    0028838: Configuration - undefine macros coming from X11 headers in place of collision
    
    The macros Status, Convex, Opposite, FillSolid (coming from X11 headers)
    are now undefined in place of definition of methods with same name in OCCT headers.
    The usage of variables with name Status is now avoided.
    
    GL_GLEXT_LEGACY is now defined only if not already defined.
    
    The macros AddPrinter (coming from WinAPI headers) is now undefined
    within Message_Messenger class definition having method with the same name.
    CurrentDirectory macro is now undefined in OSD_Process.hxx.

kgv

2017-06-13 08:53

developer   ~0067293

Please test the patch.

mkv

2017-06-15 11:40

tester   ~0067442

Dear BugMaster,
Branch CR28838_1 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode.
SHA-1: ce63ec491114e26151c587ca769cdbbe78fd6c63

Number of compiler warnings:

occt component :
Linux: 0 (0 on master)
Windows: 0 (0 on master)
MacOS : 0 (0 on master)

products component :
Linux: 64 (64 on master)
Windows: 0 (0 on master)
MacOS : 1206

Regressions/Differences/Improvements:
No regressions/differences

Testing cases:
Not needed

Testing on Linux:
occt component :
Total MEMORY difference: 92333642 / 92077580 [+0.28%]
Total CPU difference: 18965.39000000024 / 18989.35000000035 [-0.13%]
products component :
Total MEMORY difference: 33704984 / 33656232 [+0.14%]
Total CPU difference: 6154.110000000062 / 6179.4300000000685 [-0.41%]
Testing on Windows:
occt component :
Total MEMORY difference: 58687336 / 58684365 [+0.01%]
Total CPU difference: 17411.162409298686 / 17488.726106498834 [-0.44%]
products component :
Total MEMORY difference: 24263943 / 24224898 [+0.16%]
Total CPU difference: 6108.952359700067 / 6164.207913900061 [-0.90%]

There are no differences in images found by testdiff.

mkv

2017-06-15 11:41

tester   ~0067443

Dear BugMaster,
Branch CR28838_1 from occt git-repository is TESTED.

git

2017-07-03 08:45

administrator   ~0067889

Branch CR28838 has been deleted by kgv.

SHA-1: c053750532af46e721e234ebae98f8ce27ac749b

git

2017-07-03 08:45

administrator   ~0067890

Branch CR28838_1 has been deleted by kgv.

SHA-1: ce63ec491114e26151c587ca769cdbbe78fd6c63

Related Changesets

occt: master 9fd2d2c3

2017-02-03 19:27:02

kgv


Committer: bugmaster Details Diff
0028838: Configuration - undefine macros coming from X11 headers in place of collision

The macros Status, Convex, Opposite, FillSolid (coming from X11 headers)
are now undefined in place of definition of methods with same name in OCCT headers.
The usage of variables with name Status is now avoided.

GL_GLEXT_LEGACY is now defined only if not already defined.

The macros AddPrinter (coming from WinAPI headers) is now undefined
within Message_Messenger class definition having method with the same name.
CurrentDirectory macro is now undefined in OSD_Process.hxx.
Affected Issues
0028838
mod - src/BRepFeat/BRepFeat_MakeCylindricalHole.hxx Diff File
mod - src/BRepFilletAPI/BRepFilletAPI_MakeFillet2d.hxx Diff File
mod - src/BRepOffset/BRepOffset.cxx Diff File
mod - src/BRepOffset/BRepOffset.hxx Diff File
mod - src/BRepOffset/BRepOffset_Offset.hxx Diff File
mod - src/BRepOffsetAPI/BRepOffsetAPI_DraftAngle.hxx Diff File
mod - src/BRepOffsetAPI/BRepOffsetAPI_MakePipeShell.cxx Diff File
mod - src/BRepTools/BRepTools_ReShape.hxx Diff File
mod - src/BRepTopAdaptor/BRepTopAdaptor_FClass2d.cxx Diff File
mod - src/BSplCLib/BSplCLib.hxx Diff File
mod - src/BSplCLib/BSplCLib_2.cxx Diff File
mod - src/BSplCLib/BSplCLib_CurveComputation.gxx Diff File
mod - src/BSplSLib/BSplSLib.cxx Diff File
mod - src/BSplSLib/BSplSLib.hxx Diff File
mod - src/CDM/CDM_Application.cxx Diff File
mod - src/CDM/CDM_Application.hxx Diff File
mod - src/ChFi2d/ChFi2d_Builder.hxx Diff File
mod - src/ChFiDS/ChFiDS_Spine.hxx Diff File
mod - src/CSLib/CSLib.cxx Diff File
mod - src/CSLib/CSLib.hxx Diff File
mod - src/DNaming/DNaming.cxx Diff File
mod - src/DNaming/DNaming.hxx Diff File
mod - src/DNaming/DNaming_BasicCommands.cxx Diff File
mod - src/FairCurve/FairCurve_EnergyOfBatten.hxx Diff File
mod - src/FairCurve/FairCurve_EnergyOfMVC.hxx Diff File
mod - src/GC/GC_Root.hxx Diff File
mod - src/gce/gce_Root.hxx Diff File
mod - src/GCE2d/GCE2d_Root.hxx Diff File
mod - src/Geom2dConvert/Geom2dConvert.cxx Diff File
mod - src/Geom2dHatch/Geom2dHatch_Hatcher.hxx Diff File
mod - src/Geom2dHatch/Geom2dHatch_Hatching.cxx Diff File
mod - src/Geom2dHatch/Geom2dHatch_Hatching.hxx Diff File
mod - src/GeomConvert/GeomConvert.cxx Diff File
mod - src/HLRBRep/HLRBRep_EdgeData.hxx Diff File
mod - src/HLRBRep/HLRBRep_PolyAlgo.cxx Diff File
mod - src/IGESSelect/IGESSelect_SelectSubordinate.hxx Diff File
mod - src/IntAna/IntAna_IntQuadQuad.cxx Diff File
mod - src/IntAna/IntAna_IntQuadQuad.hxx Diff File
mod - src/IntCurve/IntCurve_IntConicConic_1.cxx Diff File
mod - src/Interface/Interface_Check.hxx Diff File
mod - src/Interface/Interface_CheckIterator.hxx Diff File
mod - src/Interface/Interface_Graph.hxx Diff File
mod - src/InterfaceGraphic/InterfaceGraphic.hxx Diff File
mod - src/IntTools/IntTools_FClass2d.cxx Diff File
mod - src/IntWalk/IntWalk_IWalking_3.gxx Diff File
mod - src/IntWalk/IntWalk_IWalking_4.gxx Diff File
mod - src/IntWalk/IntWalk_IWalking_5.gxx Diff File
mod - src/IntWalk/IntWalk_PWalking.cxx Diff File
mod - src/LProp/LProp_SLProps.gxx Diff File
mod - src/math/math_IntegerVector.hxx Diff File
mod - src/math/math_Matrix.hxx Diff File
mod - src/math/math_Vector.hxx Diff File
mod - src/MeshTest/MeshTest.cxx Diff File
mod - src/Message/Message_Messenger.hxx Diff File
mod - src/OpenGl/OpenGl_GlFunctions.hxx Diff File
mod - src/OSD/OSD_Process.cxx Diff File
mod - src/OSD/OSD_Process.hxx Diff File
mod - src/QABugs/QABugs_18.cxx Diff File
mod - src/QABugs/QABugs_20.cxx Diff File
mod - src/QADNaming/QADNaming.cxx Diff File
mod - src/QADNaming/QADNaming.hxx Diff File
mod - src/QADNaming/QADNaming_BasicCommands.cxx Diff File
mod - src/Resource/Resource_Manager.cxx Diff File
mod - src/SelectMgr/SelectMgr_ViewerSelector.hxx Diff File
mod - src/ShapeAnalysis/ShapeAnalysis_BoxBndTree.hxx Diff File
mod - src/ShapeAnalysis/ShapeAnalysis_CheckSmallFace.hxx Diff File
mod - src/ShapeAnalysis/ShapeAnalysis_Edge.hxx Diff File
mod - src/ShapeAnalysis/ShapeAnalysis_Wire.hxx Diff File
mod - src/ShapeAnalysis/ShapeAnalysis_WireOrder.hxx Diff File
mod - src/ShapeAnalysis/ShapeAnalysis_WireVertex.hxx Diff File
mod - src/ShapeBuild/ShapeBuild_ReShape.hxx Diff File
mod - src/ShapeConstruct/ShapeConstruct_ProjectCurveOnSurface.cxx Diff File
mod - src/ShapeConstruct/ShapeConstruct_ProjectCurveOnSurface.hxx Diff File
mod - src/ShapeFix/ShapeFix_ComposeShell.hxx Diff File
mod - src/ShapeFix/ShapeFix_Edge.hxx Diff File
mod - src/ShapeFix/ShapeFix_Face.hxx Diff File
mod - src/ShapeFix/ShapeFix_Shape.hxx Diff File
mod - src/ShapeFix/ShapeFix_Shell.hxx Diff File
mod - src/ShapeFix/ShapeFix_Solid.hxx Diff File
mod - src/ShapeUpgrade/ShapeUpgrade_FaceDivide.hxx Diff File
mod - src/ShapeUpgrade/ShapeUpgrade_FixSmallCurves.hxx Diff File
mod - src/ShapeUpgrade/ShapeUpgrade_RemoveInternalWires.hxx Diff File
mod - src/ShapeUpgrade/ShapeUpgrade_ShapeDivide.hxx Diff File
mod - src/ShapeUpgrade/ShapeUpgrade_SplitCurve.hxx Diff File
mod - src/ShapeUpgrade/ShapeUpgrade_SplitSurface.hxx Diff File
mod - src/ShapeUpgrade/ShapeUpgrade_WireDivide.hxx Diff File
mod - src/StepBasic/StepBasic_ApplicationProtocolDefinition.hxx Diff File
mod - src/StepBasic/StepBasic_Approval.hxx Diff File
mod - src/StlTransfer/StlTransfer.cxx Diff File
mod - src/TNaming/TNaming_NamedShape.cxx Diff File
mod - src/TopoDS/TopoDS_Shape.hxx Diff File
mod - src/TopoDS/TopoDS_TShape.hxx Diff File
mod - src/TopoDS/TopoDS_TVertex.hxx Diff File
mod - src/TopOpeBRep/TopOpeBRep_Point2d.hxx Diff File
mod - src/TopOpeBRepBuild/FILES Diff File
mod - src/TopOpeBRepBuild/TopOpeBRepBuild_Builder.cxx Diff File
mod - src/TopOpeBRepBuild/TopOpeBRepBuild_Builder.hxx Diff File
mod - src/Transfer/Transfer_Binder.hxx Diff File
mod - src/Transfer/Transfer_TransferIterator.hxx Diff File
mod - src/VrmlConverter/VrmlConverter_ShadedShape.cxx Diff File
mod - src/VrmlData/VrmlData_Scene.hxx Diff File

Issue History

Date Modified Username Field Change
2017-06-13 08:35 kgv New Issue
2017-06-13 08:35 kgv Assigned To => kgv
2017-06-13 08:36 kgv Relationship added parent of 0028822
2017-06-13 08:36 kgv Relationship added child of 0028417
2017-06-13 08:45 git Note Added: 0067291
2017-06-13 08:50 git Note Added: 0067292
2017-06-13 08:53 kgv Note Added: 0067293
2017-06-13 08:53 kgv Assigned To kgv => bugmaster
2017-06-13 08:53 kgv Status new => resolved
2017-06-13 08:53 kgv Status resolved => reviewed
2017-06-14 19:04 mkv Assigned To bugmaster => mkv
2017-06-15 11:40 mkv Note Added: 0067442
2017-06-15 11:41 mkv Note Added: 0067443
2017-06-15 11:41 mkv Assigned To mkv => bugmaster
2017-06-15 11:41 mkv Status reviewed => tested
2017-06-15 11:41 mkv Test case number => Not needed
2017-06-16 17:17 bugmaster Changeset attached => occt master 9fd2d2c3
2017-06-16 17:17 bugmaster Status tested => verified
2017-06-16 17:17 bugmaster Resolution open => fixed
2017-07-03 08:45 git Note Added: 0067889
2017-07-03 08:45 git Note Added: 0067890
2017-09-29 16:18 aiv Fixed in Version => 7.2.0
2017-09-29 16:28 aiv Status verified => closed
2021-03-17 09:49 kgv Relationship added parent of 0032220