enblend-enfuse (4.0+dfsg-4) 11_ftbfs_boost1.46.1.diff

Summary

 src/filenameparse.cc |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

    
download this patch

Patch contents

# HG changeset patch
# User tmodes
# Date 1304442990 -7200
# Node ID 6b2244bb400b33cbe5710e1028455f60f2baaca0
# Parent  204a5532bf683119446f8cc5268a9ef030c2de0d
Fixes compilation with BOOST_FILESYSTEM_VERSION 3 [756245]

diff --git a/src/filenameparse.cc b/src/filenameparse.cc
--- a/src/filenameparse.cc
+++ b/src/filenameparse.cc
@@ -50,7 +50,13 @@
 #ifdef HAVE_BOOST_FILESYSTEM
 #include <boost/filesystem.hpp>
 
+#if BOOST_FILESYSTEM_VERSION < 3
 typedef boost::filesystem::basic_path<std::string, boost::filesystem::path_traits> basic_path;
+#define GETPATHSTRING(x) x
+#else
+typedef boost::filesystem::path basic_path;
+#define GETPATHSTRING(x) (x).string()
+#endif
 #endif
 
 
@@ -95,7 +101,7 @@
 {
 #ifdef HAVE_BOOST_FILESYSTEM
     const basic_path path(aFilename);
-    return path.leaf();
+    return GETPATHSTRING(path.leaf());
 #else
     const std::string::size_type separator = aFilename.rfind(PATH_SEPARATOR);
     return
@@ -179,7 +185,7 @@
         }
         else
         {
-            directories.push_back(*p);
+            directories.push_back(GETPATHSTRING(*p));
         }
     }
     basic_path result;