Fix Carve compilation on FreeBSD
authorSergey Sharybin <sergey.vfx@gmail.com>
Thu, 28 Nov 2013 07:52:54 +0000 (13:52 +0600)
committerSergey Sharybin <sergey.vfx@gmail.com>
Thu, 28 Nov 2013 08:00:10 +0000 (14:00 +0600)
Based on the patch from Marcus von Appen, thanks!

extern/carve/lib/triangulator.cpp
extern/carve/patches/clang_is_heap_fix.patch [new file with mode: 0644]
extern/carve/patches/series

index 169e5a33805cdc9f64e076dd96c59564277f5546..bd5a30b0c2b2497e538dde47b49563efcbe530df 100644 (file)
 
 #include <algorithm>
 
 
 #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.
 
 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 (file)
index 0000000..435e408
--- /dev/null
@@ -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.
index 0b1f731805e9376b2cf5331780a748d63a6ec243..5b72b49c8ca306073eb7c12b5ee5dd0babd30aae 100644 (file)
@@ -3,3 +3,4 @@ win32.patch
 mesh_iterator.patch
 mingw.patch
 gcc46.patch
 mesh_iterator.patch
 mingw.patch
 gcc46.patch
+clang_is_heap_fix.patch