diff --git a/geom/geocad/inc/TGeoToOCC.h b/geom/geocad/inc/TGeoToOCC.h index 100874153de9f4f714431c840179b623ff7dcea0..474db2df47eceba3e18976cfcbd59d695587745d 100644 --- a/geom/geocad/inc/TGeoToOCC.h +++ b/geom/geocad/inc/TGeoToOCC.h @@ -12,14 +12,6 @@ #ifndef ROOT_TGeoToOCC #define ROOT_TGeoToOCC -// ROOT-9837: manage the macro called Handle defined -// in the Standard_Macro.hxx file. The name `Handle` -// cannot leak out of these headers otherwise name -// clashes will occour. -#ifndef Handle -#define Handle(ClassName) Handle_##ClassName -#endif - //Cascade #include <Standard_Version.hxx> @@ -68,7 +60,7 @@ public: }; // ROOT-9837 -#ifdef Handle +#if defined(Handle) && !defined(R__Needs_Handle) #undef Handle #endif diff --git a/geom/geocad/inc/TOCCToStep.h b/geom/geocad/inc/TOCCToStep.h index bd90903f6c124045411eb2a88ab886e49cb51f44..4786a71e38319f7a324bcc9aff0ff02409937ae3 100644 --- a/geom/geocad/inc/TOCCToStep.h +++ b/geom/geocad/inc/TOCCToStep.h @@ -16,14 +16,6 @@ #include "TGeoMatrix.h" #include "TGeoToOCC.h" -// ROOT-9837: manage the macro called Handle defined -// in the Standard_Macro.hxx file. The name `Handle` -// cannot leak out of these headers otherwise name -// clashes will occour. -#ifndef Handle -#define Handle(ClassName) Handle_##ClassName -#endif - #include <TDF_Label.hxx> #include <XCAFDoc_ShapeTool.hxx> #include <TDocStd_Document.hxx> @@ -68,7 +60,7 @@ public: }; // ROOT-9837 -#ifdef Handle +#if defined(Handle) && !defined(R__Needs_Handle) #undef Handle #endif diff --git a/geom/geocad/src/TGeoToOCC.cxx b/geom/geocad/src/TGeoToOCC.cxx index 10263475c01c5af1b707f9458dc9938c2246a19e..3ff2099ca163fb4bbfbcd22cbdc7e8ea0e4424bd 100644 --- a/geom/geocad/src/TGeoToOCC.cxx +++ b/geom/geocad/src/TGeoToOCC.cxx @@ -44,13 +44,10 @@ A log file is created in `/tmp/TGeoCad.log` */ +// Do not #undef Handle: +#define R__Needs_Handle + #include "TGeoToOCC.h" -// ROOT-9837: the macro `Handle` has been undefined -// we need to redefine it as it is done in the oce -// header Standard_Macro.hxx -#ifndef Handle -#define Handle(ClassName) Handle_##ClassName -#endif //Cascade diff --git a/geom/geocad/src/TGeoToStep.cxx b/geom/geocad/src/TGeoToStep.cxx index 2909198144ad4d386b8849069df39887b920ebed..e3d9c32540993c824b48cf7a43199332364a54c8 100644 --- a/geom/geocad/src/TGeoToStep.cxx +++ b/geom/geocad/src/TGeoToStep.cxx @@ -42,14 +42,12 @@ including level 3. To compile the TGeoCad module on ROOT, OpenCascade must be installed! */ +// Do not #undef Handle: +#define R__Needs_Handle + #include "TGeoManager.h" #include "TOCCToStep.h" -// ROOT-9837: the macro `Handle` has been undefined -// we need to redefine it as it is done in the oce -// header Standard_Macro.hxx -#ifndef Handle -#define Handle(ClassName) Handle_##ClassName -#endif + #include "TGeoToStep.h" #include "TString.h" #include "TClass.h" diff --git a/geom/geocad/src/TOCCToStep.cxx b/geom/geocad/src/TOCCToStep.cxx index 1500b12b89aec460625ac6f36f04d02b56d6e665..b74b554feefca1087d83b1bb2320ba35dbb3d1f2 100644 --- a/geom/geocad/src/TOCCToStep.cxx +++ b/geom/geocad/src/TOCCToStep.cxx @@ -26,6 +26,10 @@ reproduce the ROOT tree that will be written to the STEP file using the OCCWriteStep(const char * fname ) method. */ + +// Do not #undef Handle: +#define R__Needs_Handle + #include "TOCCToStep.h" #include "TGeoToOCC.h"