From: Matthias Maier <tamiko@kyomu.43-1.org>
Date: Tue, 23 Dec 2014 20:39:09 +0000 (+0100)
Subject: fix compilation against opencascade on linux targets
X-Git-Tag: v8.2.0-rc1~2^2
X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2788251472ff09fcf49da37059d90485f7478144;p=dealii.git

fix compilation against opencascade on linux targets
---

diff --git a/include/deal.II/opencascade/boundary_lib.h b/include/deal.II/opencascade/boundary_lib.h
index e1633b11a0..af936c0574 100644
--- a/include/deal.II/opencascade/boundary_lib.h
+++ b/include/deal.II/opencascade/boundary_lib.h
@@ -25,8 +25,19 @@
 #include <deal.II/opencascade/utilities.h>
 #include <deal.II/grid/tria_boundary.h>
 
+// We have to clean up certain name clashes prior to any opencascade header
+// inclusion. Unfortunately, this is clumsy and should be resolved by
+// renaming our very own includes someday...
+// --Maier, 2014
+#define HAVE_CONFIG_H
+#undef HAVE_SYS_TYPES_H
+#undef HAVE_SYS_TIMES_H
+#undef HAVE_SYS_TIME_H
+#undef HAVE_UNISTD_H
+#undef HAVE_GETHOSTNAME
 #include <BRepAdaptor_Curve.hxx>
 #include <Adaptor3d_Curve.hxx>
+#undef HAVE_CONFIG_H
 
 DEAL_II_NAMESPACE_OPEN
 
diff --git a/include/deal.II/opencascade/utilities.h b/include/deal.II/opencascade/utilities.h
index 8347fa14d5..d01cc623eb 100644
--- a/include/deal.II/opencascade/utilities.h
+++ b/include/deal.II/opencascade/utilities.h
@@ -23,8 +23,20 @@
 #ifdef DEAL_II_WITH_OPENCASCADE
 
 #include <deal.II/grid/tria.h>
+#include <deal.II/base/point.h>
 
 #include <string>
+
+// We have to clean up certain name clashes prior to any opencascade header
+// inclusion. Unfortunately, this is clumsy and should be resolved by
+// renaming our very own includes someday...
+// --Maier, 2014
+#define HAVE_CONFIG_H
+#undef HAVE_SYS_TYPES_H
+#undef HAVE_SYS_TIMES_H
+#undef HAVE_SYS_TIME_H
+#undef HAVE_UNISTD_H
+#undef HAVE_GETHOSTNAME
 #include <TopoDS_Shape.hxx>
 #include <TopoDS_Face.hxx>
 #include <TopoDS_Edge.hxx>
@@ -36,8 +48,8 @@
 #include <TopoDS_Wire.hxx>
 #include <IFSelect_ReturnStatus.hxx>
 #include <gp_Pnt.hxx>
+#undef HAVE_CONFIG_H
 
-#include <deal.II/base/point.h>
 
 
 DEAL_II_NAMESPACE_OPEN