diff --git a/geom/geocad/inc/TGeoToOCC.h b/geom/geocad/inc/TGeoToOCC.h
index a558b25e1b353e8dee3c97599e7a16c3660c65d4..100874153de9f4f714431c840179b623ff7dcea0 100644
--- a/geom/geocad/inc/TGeoToOCC.h
+++ b/geom/geocad/inc/TGeoToOCC.h
@@ -12,13 +12,26 @@
 #ifndef ROOT_TGeoToOCC
 #define ROOT_TGeoToOCC
 
-// ROOT
+// 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>
+
+#define Printf Printf_opencascade
+#include <TopoDS_Shape.hxx>
+#include <TopoDS_Wire.hxx>
+#undef Printf
+
+//Root
 #include "TGeoXtru.h"
 #include "TGeoCompositeShape.h"
 
-// Cascade
-#include "TOCCExports.h"
-
 #include <fstream>
 
 
@@ -54,6 +67,11 @@ public:
 
 };
 
+// ROOT-9837
+#ifdef Handle
+#undef Handle
+#endif
+
 #endif
 
 
diff --git a/geom/geocad/inc/TOCCExports.h b/geom/geocad/inc/TOCCExports.h
deleted file mode 100644
index 2b90e65f57c67e189139b2c3566ea1a7e2940119..0000000000000000000000000000000000000000
--- a/geom/geocad/inc/TOCCExports.h
+++ /dev/null
@@ -1,34 +0,0 @@
-// @(#)geom/geocad:$Id$
-// Author: Cinzia Luzzi   5/5/2012
-
-/*************************************************************************
- * Copyright (C) 1995-2018, Rene Brun and Fons Rademakers.               *
- * All rights reserved.                                                  *
- *                                                                       *
- * For the licensing terms see $ROOTSYS/LICENSE.                         *
- * For the list of contributors see $ROOTSYS/README/CREDITS.             *
- *************************************************************************/
-
-#ifndef ROOT_TOCCExports
-#define ROOT_TOCCExports
-
-// Combine all OCE headers used by geocad.
-// After including them, #undef Handle.
-
-#define Printf Printf_opencascade
-#include <TDF_Label.hxx>
-#include <TDocStd_Document.hxx>
-#include <Standard_Version.hxx>
-#include <STEPCAFControl_Writer.hxx>
-#include <XCAFDoc_ShapeTool.hxx>
-#include <TopoDS_Shape.hxx>
-#include <TopoDS_Wire.hxx>
-#undef Printf
-
-
-// ROOT-9837
-#if defined(Handle) && !defined(R__Needs_Handle)
-#undef Handle
-#endif
-
-#endif
diff --git a/geom/geocad/inc/TOCCToStep.h b/geom/geocad/inc/TOCCToStep.h
index 2af61cbe608f8a12f8ba5e3150a06250a4683ab8..bd90903f6c124045411eb2a88ab886e49cb51f44 100644
--- a/geom/geocad/inc/TOCCToStep.h
+++ b/geom/geocad/inc/TOCCToStep.h
@@ -16,15 +16,20 @@
 #include "TGeoMatrix.h"
 #include "TGeoToOCC.h"
 
-// We need Handle here; request it and possibly undef it at the end of file.
-#define R__Needs_Handle_Old R__Needs_Handle
-#ifndef R__Needs_Handle
-# define R__Needs_Handle 1
+// 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 "TOCCExports.h"
-#undef R__Needs_Handle
-#define R__Needs_Handle R__Needs_Handle_Old
+
+#include <TDF_Label.hxx>
+#include <XCAFDoc_ShapeTool.hxx>
+#include <TDocStd_Document.hxx>
+#include <STEPCAFControl_Writer.hxx>
+#include <TDF_Label.hxx>
+#include <TopoDS_Shape.hxx>
 
 
 class TOCCToStep {
@@ -63,7 +68,7 @@ public:
 };
 
 // ROOT-9837
-#if defined(Handle) && !defined(R__Needs_Handle)
+#ifdef Handle
 #undef Handle
 #endif
 
diff --git a/geom/geocad/src/TGeoToOCC.cxx b/geom/geocad/src/TGeoToOCC.cxx
index 3ff2099ca163fb4bbfbcd22cbdc7e8ea0e4424bd..10263475c01c5af1b707f9458dc9938c2246a19e 100644
--- a/geom/geocad/src/TGeoToOCC.cxx
+++ b/geom/geocad/src/TGeoToOCC.cxx
@@ -44,10 +44,13 @@ 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 e3d9c32540993c824b48cf7a43199332364a54c8..2909198144ad4d386b8849069df39887b920ebed 100644
--- a/geom/geocad/src/TGeoToStep.cxx
+++ b/geom/geocad/src/TGeoToStep.cxx
@@ -42,12 +42,14 @@ 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 b74b554feefca1087d83b1bb2320ba35dbb3d1f2..1500b12b89aec460625ac6f36f04d02b56d6e665 100644
--- a/geom/geocad/src/TOCCToStep.cxx
+++ b/geom/geocad/src/TOCCToStep.cxx
@@ -26,10 +26,6 @@ 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"