Patch #32074: Fix compilation with boost 1.50
authorSergey Sharybin <sergey.vfx@gmail.com>
Wed, 11 Jul 2012 14:48:47 +0000 (14:48 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Wed, 11 Jul 2012 14:48:47 +0000 (14:48 +0000)
This patch switches from boost's filesystem v2 to v3.

This should be completely smooth due to filesystem v3 is pretty
old already.

Patch by Sven-Hendrik Haase (aka svenstaro), thanks!

intern/cycles/util/util_cache.cpp
intern/cycles/util/util_path.cpp

index 44d784ba74135ba4c2c0617bb5d91cb1e021876d..2924ed30b8816e6424f0af7c7f14fcfe0ab8aee6 100644 (file)
@@ -26,8 +26,6 @@
 #include "util_path.h"
 #include "util_types.h"
 
-#define BOOST_FILESYSTEM_VERSION 2
-
 #include <boost/filesystem.hpp> 
 #include <boost/algorithm/string.hpp>
 
@@ -117,7 +115,7 @@ void Cache::clear_except(const string& name, const set<string>& except)
                boost::filesystem::directory_iterator it(dir), it_end;
 
                for(; it != it_end; it++) {
-                       string filename = it->path().filename();
+                       string filename = it->path().filename().string();
 
                        if(boost::starts_with(filename, name))
                                if(except.find(filename) == except.end())
index 717aa34c4265769bacce5137bcb8dd808fa14edb..53dbfe9a42c8b1d205bba7e5417b9eb836e0e52f 100644 (file)
@@ -26,8 +26,6 @@ OIIO_NAMESPACE_USING
 
 #include <stdio.h>
 
-#define BOOST_FILESYSTEM_VERSION 2
-
 #include <boost/filesystem.hpp> 
 #include <boost/algorithm/string.hpp>
 
@@ -60,7 +58,7 @@ string path_user_get(const string& sub)
 
 string path_filename(const string& path)
 {
-       return boost::filesystem::path(path).filename();
+       return boost::filesystem::path(path).filename().string();
 }
 
 string path_dirname(const string& path)