[Bf-blender-cvs] [dc71cb5] master: Fix Carve compilation on FreeBSD

Sergey Sharybin noreply at git.blender.org
Thu Nov 28 09:01:10 CET 2013


Commit: dc71cb5f6eddf689df2d3f4823907a95daa3eb5e
Author: Sergey Sharybin
Date:   Thu Nov 28 13:52:54 2013 +0600
http://developer.blender.org/rBdc71cb5f6eddf689df2d3f4823907a95daa3eb5e

Fix Carve compilation on FreeBSD

Based on the patch from Marcus von Appen, thanks!

===================================================================

M	extern/carve/lib/triangulator.cpp
A	extern/carve/patches/clang_is_heap_fix.patch
M	extern/carve/patches/series

===================================================================

diff --git a/extern/carve/lib/triangulator.cpp b/extern/carve/lib/triangulator.cpp
index 169e5a3..bd5a30b 100644
--- a/extern/carve/lib/triangulator.cpp
+++ b/extern/carve/lib/triangulator.cpp
@@ -27,6 +27,13 @@
 
 #include <algorithm>
 
+// Support for latest Clang/LLVM on FreeBSD which does have different libcxx.
+//
+// TODO(sergey): Move it some some more generic header with platform-specific
+//               declarations.
+#ifdef _LIBCPP_VERSION
+#  define __is_heap is_heap
+#endif
 
 namespace {
   // private code related to hole patching.
diff --git a/extern/carve/patches/clang_is_heap_fix.patch b/extern/carve/patches/clang_is_heap_fix.patch
new file mode 100644
index 0000000..435e408
--- /dev/null
+++ b/extern/carve/patches/clang_is_heap_fix.patch
@@ -0,0 +1,17 @@
+diff -r 2e6e59022e6e lib/triangulator.cpp
+--- a/lib/triangulator.cpp	Fri Nov 09 09:35:35 2012 +1100
++++ b/lib/triangulator.cpp	Thu Nov 28 13:34:52 2013 +0600
+@@ -27,6 +27,13 @@
+ 
+ #include <algorithm>
+ 
++// Support for latest Clang/LLVM on FreeBSD which does have different libcxx.
++//
++// TODO(sergey): Move it some some more generic header with platform-specific
++//               declarations.
++#ifdef _LIBCPP_VERSION
++#  define __is_heap is_heap
++#endif
+ 
+ namespace {
+   // private code related to hole patching.
diff --git a/extern/carve/patches/series b/extern/carve/patches/series
index 0b1f731..5b72b49 100644
--- a/extern/carve/patches/series
+++ b/extern/carve/patches/series
@@ -3,3 +3,4 @@ win32.patch
 mesh_iterator.patch
 mingw.patch
 gcc46.patch
+clang_is_heap_fix.patch




More information about the Bf-blender-cvs mailing list