Ticket #30187: patch-boost-filesystem3.diff
File patch-boost-filesystem3.diff, 4.1 KB (added by jon.tirsen@…, 13 years ago) |
---|
-
src/datasource_cache.cpp
40 40 41 41 namespace mapnik 42 42 { 43 44 43 //using namespace std; 44 //using namespace boost; 45 45 46 46 bool is_input_plugin (std::string const& filename) 47 47 { … … 72 72 } 73 73 74 74 datasource_ptr ds; 75 map<string,boost::shared_ptr<PluginInfo> >::iterator itr=plugins_.find(*type);75 std::map<string,boost::shared_ptr<PluginInfo> >::iterator itr=plugins_.find(*type); 76 76 if ( itr == plugins_.end() ) 77 77 { 78 78 throw config_error(string("Could not create datasource. No plugin ") + … … 131 131 mutex::scoped_lock lock(mapnik::singleton<mapnik::datasource_cache, 132 132 mapnik::CreateStatic>::mutex_); 133 133 #endif 134 filesystem::path path(str);135 filesystem::directory_iterator end_itr;134 boost::filesystem::path path(str); 135 boost::filesystem::directory_iterator end_itr; 136 136 137 137 138 138 if (exists(path) && is_directory(path)) 139 139 { 140 for ( filesystem::directory_iterator itr(path);itr!=end_itr;++itr )140 for (boost::filesystem::directory_iterator itr(path);itr!=end_itr;++itr ) 141 141 { 142 142 143 143 #if BOOST_VERSION < 103400 144 144 if (!is_directory( *itr ) && is_input_plugin(itr->leaf())) 145 145 #else 146 #if (BOOST_FILESYSTEM_VERSION == 3) 147 if (!is_directory( *itr ) && is_input_plugin(itr->path().filename().string())) 148 #else // v2 146 149 if (!is_directory( *itr ) && is_input_plugin(itr->path().leaf())) 147 150 #endif 148 151 #endif 149 152 { 150 153 try 151 154 { 152 lt_dlhandle module=lt_dlopen(itr->string().c_str()); 155 156 #if (BOOST_FILESYSTEM_VERSION == 3) 157 lt_dlhandle module = lt_dlopen(itr->path().string().c_str()); 158 #else // v2 159 lt_dlhandle module = lt_dlopen(itr->string().c_str()); 160 161 #endif 153 162 if (module) 154 163 { 155 164 datasource_name* ds_name = … … 164 173 } 165 174 else 166 175 { 167 std::clog << "Problem loading plugin library: " << itr->string().c_str() << " (libtool error: " << lt_dlerror() << ")" << std::endl; 176 #if (BOOST_FILESYSTEM_VERSION == 3) 177 std::clog << "Problem loading plugin library: " << itr->path().string() 178 << " (dlopen failed - plugin likely has an unsatified dependency or incompatible ABI)" << std::endl; 179 #else // v2 180 std::clog << "Problem loading plugin library: " << itr->string() 181 << " (dlopen failed - plugin likely has an unsatified dependency or incompatible ABI)" << std::endl; 182 #endif 168 183 } 169 184 } 170 185 catch (...) {} -
src/load_map.cpp
526 526 527 527 map.addLayer(lyr); 528 528 529 } catch (const config_error & ex) { 530 if ( ! name.empty() ) { 529 } 530 catch (const config_error & ex) 531 { 532 if ( ! name.empty() ) 533 { 531 534 ex.append_context(string("(encountered during parsing of layer '") + name + "')"); 532 535 } 533 536 throw; … … 1589 1592 { 1590 1593 boost::filesystem::path xml_path = filename_; 1591 1594 boost::filesystem::path rel_path = *opt_path; 1592 if ( !rel_path.has_root_path() ) { 1595 if ( !rel_path.has_root_path() ) 1596 { 1597 #if (BOOST_FILESYSTEM_VERSION == 3) 1598 boost::filesystem::path full = boost::filesystem::absolute(xml_path.branch_path()/rel_path).normalize(); 1599 #else // v2 1593 1600 boost::filesystem::path full = boost::filesystem::complete(xml_path.branch_path()/rel_path).normalize(); 1601 #endif 1602 1594 1603 #ifdef MAPNIK_DEBUG 1595 1604 std::clog << "\nModifying relative paths to be relative to xml...\n"; 1596 1605 std::clog << "original base path: " << *opt_path << "\n";