diff options
author | Remko Tronçon <git@el-tramo.be> | 2011-03-14 18:35:17 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2011-03-14 18:35:17 (GMT) |
commit | a135c6ff4dcded5661a2321512960b14cf8c15c8 (patch) | |
tree | b0017ecfe702304f592b9d4e8b943784cff26fb2 /3rdParty/Boost/src/tools/bcp | |
parent | 02d6188ab335e6c62b8341b84579d9549d215118 (diff) | |
download | swift-a135c6ff4dcded5661a2321512960b14cf8c15c8.zip swift-a135c6ff4dcded5661a2321512960b14cf8c15c8.tar.bz2 |
Updated Boost to 1.46.1.
This should hopefuily fix a hang on shutdown on Mac OS X.
Resolves: #782
Release-Notes: Fixed a potential hang on shutdown on Mac OS X.
Diffstat (limited to '3rdParty/Boost/src/tools/bcp')
-rw-r--r-- | 3rdParty/Boost/src/tools/bcp/add_path.cpp | 2 | ||||
-rw-r--r-- | 3rdParty/Boost/src/tools/bcp/bcp.hpp | 6 | ||||
-rw-r--r-- | 3rdParty/Boost/src/tools/bcp/bcp_imp.cpp | 17 | ||||
-rw-r--r-- | 3rdParty/Boost/src/tools/bcp/copy_path.cpp | 22 | ||||
-rw-r--r-- | 3rdParty/Boost/src/tools/bcp/file_types.cpp | 8 | ||||
-rw-r--r-- | 3rdParty/Boost/src/tools/bcp/fileview.cpp | 4 | ||||
-rw-r--r-- | 3rdParty/Boost/src/tools/bcp/fileview.hpp | 6 | ||||
-rw-r--r-- | 3rdParty/Boost/src/tools/bcp/main.cpp | 6 | ||||
-rw-r--r-- | 3rdParty/Boost/src/tools/bcp/output_licence_info.cpp | 2 | ||||
-rw-r--r-- | 3rdParty/Boost/src/tools/bcp/scan_licence.cpp | 4 |
10 files changed, 41 insertions, 36 deletions
diff --git a/3rdParty/Boost/src/tools/bcp/add_path.cpp b/3rdParty/Boost/src/tools/bcp/add_path.cpp index e55e8e3..2ed4a94 100644 --- a/3rdParty/Boost/src/tools/bcp/add_path.cpp +++ b/3rdParty/Boost/src/tools/bcp/add_path.cpp @@ -68,7 +68,7 @@ void bcp_implementation::add_directory(const fs::path& p) // we need to convert *i back into // a relative path, what follows is a hack: // - std::string s(i->string()); + std::string s(i->path().string()); if(m_boost_path.string().size()) s.erase(0, m_boost_path.string().size() + 1); fs::path np = s; diff --git a/3rdParty/Boost/src/tools/bcp/bcp.hpp b/3rdParty/Boost/src/tools/bcp/bcp.hpp index ea2b4d0..bec6364 100644 --- a/3rdParty/Boost/src/tools/bcp/bcp.hpp +++ b/3rdParty/Boost/src/tools/bcp/bcp.hpp @@ -9,6 +9,12 @@ #include <boost/shared_ptr.hpp> +#if defined(BOOST_FILESYSTEM_VERSION) && (BOOST_FILESYSTEM_VERSION != 3) +# error "This library must be built with Boost.Filesystem version 3" +#else +#define BOOST_FILESYSTEM_VERSION 3 +#endif + class bcp_application; typedef boost::shared_ptr<bcp_application> pbcp_application; diff --git a/3rdParty/Boost/src/tools/bcp/bcp_imp.cpp b/3rdParty/Boost/src/tools/bcp/bcp_imp.cpp index c5d7fb4..5801735 100644 --- a/3rdParty/Boost/src/tools/bcp/bcp_imp.cpp +++ b/3rdParty/Boost/src/tools/bcp/bcp_imp.cpp @@ -81,7 +81,7 @@ void bcp_implementation::enable_unix_lines() void bcp_implementation::set_boost_path(const char* p) { // Hack to strip trailing slashes from the path - m_boost_path = (fs::path(p, fs::native) / "boost").parent_path(); + m_boost_path = (fs::path(p) / "boost").parent_path(); fs::path check = m_boost_path / "boost" / "version.hpp"; if(!fs::exists(check)) { @@ -94,7 +94,7 @@ void bcp_implementation::set_boost_path(const char* p) void bcp_implementation::set_destination(const char* p) { - m_dest_path = fs::path(p, fs::native); + m_dest_path = fs::path(p); } void bcp_implementation::add_module(const char* p) @@ -140,7 +140,7 @@ int bcp_implementation::run() if(!m_list_mode && !m_license_mode && !fs::exists(m_dest_path)) { std::string msg("Destination path does not exist: "); - msg.append(m_dest_path.native_file_string()); + msg.append(m_dest_path.string()); std::runtime_error e(msg); boost::throw_exception(e); } @@ -190,15 +190,8 @@ int bcp_implementation::run() // fs::path module; fs::path exmodule; - try{ - module = fs::path(*i); - exmodule = fs::path(*i + ".hpp"); - } - catch(...) - { - module = fs::path(*i, fs::native); - exmodule = fs::path(*i + ".hpp", fs::native); - } + module = fs::path(*i); + exmodule = fs::path(*i + ".hpp"); if(m_scan_mode) { diff --git a/3rdParty/Boost/src/tools/bcp/copy_path.cpp b/3rdParty/Boost/src/tools/bcp/copy_path.cpp index 496696a..85b5de1 100644 --- a/3rdParty/Boost/src/tools/bcp/copy_path.cpp +++ b/3rdParty/Boost/src/tools/bcp/copy_path.cpp @@ -63,7 +63,7 @@ void bcp_implementation::copy_path(const fs::path& p) static std::vector<char> v1, v2; v1.clear(); v2.clear(); - std::ifstream is((m_boost_path / p).native_file_string().c_str()); + std::ifstream is((m_boost_path / p).string().c_str()); std::copy(std::istreambuf_iterator<char>(is), std::istreambuf_iterator<char>(), std::back_inserter(v1)); static boost::regex libname_matcher; @@ -78,9 +78,9 @@ void bcp_implementation::copy_path(const fs::path& p) std::ofstream os; if(m_unix_lines) - os.open((m_dest_path / p).native_file_string().c_str(), std::ios_base::binary | std::ios_base::out); + os.open((m_dest_path / p).string().c_str(), std::ios_base::binary | std::ios_base::out); else - os.open((m_dest_path / p).native_file_string().c_str(), std::ios_base::out); + os.open((m_dest_path / p).string().c_str(), std::ios_base::out); os.write(&*v1.begin(), v1.size()); os.close(); } @@ -89,7 +89,7 @@ void bcp_implementation::copy_path(const fs::path& p) static std::vector<char> v1, v2; v1.clear(); v2.clear(); - std::ifstream is((m_boost_path / p).native_file_string().c_str()); + std::ifstream is((m_boost_path / p).string().c_str()); std::copy(std::istreambuf_iterator<char>(is), std::istreambuf_iterator<char>(), std::back_inserter(v1)); static boost::regex libname_matcher; @@ -111,9 +111,9 @@ void bcp_implementation::copy_path(const fs::path& p) std::ofstream os; if(m_unix_lines) - os.open((m_dest_path / p).native_file_string().c_str(), std::ios_base::binary | std::ios_base::out); + os.open((m_dest_path / p).string().c_str(), std::ios_base::binary | std::ios_base::out); else - os.open((m_dest_path / p).native_file_string().c_str(), std::ios_base::out); + os.open((m_dest_path / p).string().c_str(), std::ios_base::out); os.write(&*v1.begin(), v1.size()); os.close(); } @@ -127,7 +127,7 @@ void bcp_implementation::copy_path(const fs::path& p) static std::vector<char> v1, v2; v1.clear(); v2.clear(); - std::ifstream is((m_boost_path / p).native_file_string().c_str()); + std::ifstream is((m_boost_path / p).string().c_str()); std::copy(std::istreambuf_iterator<char>(is), std::istreambuf_iterator<char>(), std::back_inserter(v1)); static const boost::regex namespace_matcher( @@ -202,20 +202,20 @@ void bcp_implementation::copy_path(const fs::path& p) std::ofstream os; if(m_unix_lines) - os.open((m_dest_path / p).native_file_string().c_str(), std::ios_base::binary | std::ios_base::out); + os.open((m_dest_path / p).string().c_str(), std::ios_base::binary | std::ios_base::out); else - os.open((m_dest_path / p).native_file_string().c_str(), std::ios_base::out); + os.open((m_dest_path / p).string().c_str(), std::ios_base::out); if(v1.size()) os.write(&*v1.begin(), v1.size()); os.close(); } else if(m_unix_lines && !is_binary_file(p)) { - std::ifstream is((m_boost_path / p).native_file_string().c_str()); + std::ifstream is((m_boost_path / p).string().c_str()); std::istreambuf_iterator<char> isi(is); std::istreambuf_iterator<char> end; - std::ofstream os((m_dest_path / p).native_file_string().c_str(), std::ios_base::binary | std::ios_base::out); + std::ofstream os((m_dest_path / p).string().c_str(), std::ios_base::binary | std::ios_base::out); std::ostreambuf_iterator<char> osi(os); std::copy(isi, end, osi); diff --git a/3rdParty/Boost/src/tools/bcp/file_types.cpp b/3rdParty/Boost/src/tools/bcp/file_types.cpp index abc0149..7fc6850 100644 --- a/3rdParty/Boost/src/tools/bcp/file_types.cpp +++ b/3rdParty/Boost/src/tools/bcp/file_types.cpp @@ -23,7 +23,7 @@ bool bcp_implementation::is_source_file(const fs::path& p) ")", boost::regex::perl | boost::regex::icase ); - return boost::regex_match(p.filename(), e); + return boost::regex_match(p.filename().string(), e); } bool bcp_implementation::is_html_file(const fs::path& p) @@ -34,7 +34,7 @@ bool bcp_implementation::is_html_file(const fs::path& p) "html?|css" ")" ); - return boost::regex_match(p.filename(), e); + return boost::regex_match(p.filename().string(), e); } bool bcp_implementation::is_binary_file(const fs::path& p) @@ -52,7 +52,7 @@ bool bcp_implementation::is_binary_file(const fs::path& p) "|" "(Jamfile|makefile|configure)", boost::regex::perl | boost::regex::icase); - return !boost::regex_match(p.leaf(), e); + return !boost::regex_match(p.leaf().string(), e); } @@ -67,6 +67,6 @@ bool bcp_implementation::is_jam_file(const fs::path& p) "(Jamfile|Jamroot)\\.?", boost::regex::perl | boost::regex::icase ); - return boost::regex_match(p.filename(), e); + return boost::regex_match(p.filename().string(), e); } diff --git a/3rdParty/Boost/src/tools/bcp/fileview.cpp b/3rdParty/Boost/src/tools/bcp/fileview.cpp index 845582d..ec9e71a 100644 --- a/3rdParty/Boost/src/tools/bcp/fileview.cpp +++ b/3rdParty/Boost/src/tools/bcp/fileview.cpp @@ -57,11 +57,11 @@ void fileview::close() void fileview::open(const boost::filesystem::path& p) { cow(); - std::ifstream is(p.native_file_string().c_str()); + std::ifstream is(p.string().c_str()); if(!is) { std::string msg("Bad file name: "); - msg += p.native_file_string(); + msg += p.string(); std::runtime_error e(msg); boost::throw_exception(e); } diff --git a/3rdParty/Boost/src/tools/bcp/fileview.hpp b/3rdParty/Boost/src/tools/bcp/fileview.hpp index ede4232..fe76f84 100644 --- a/3rdParty/Boost/src/tools/bcp/fileview.hpp +++ b/3rdParty/Boost/src/tools/bcp/fileview.hpp @@ -7,6 +7,12 @@ * */ +#if defined(BOOST_FILESYSTEM_VERSION) && (BOOST_FILESYSTEM_VERSION != 3) +# error "This library must be built with Boost.Filesystem version 3" +#else +#define BOOST_FILESYSTEM_VERSION 3 +#endif + #include <boost/shared_ptr.hpp> #include <boost/filesystem/path.hpp> diff --git a/3rdParty/Boost/src/tools/bcp/main.cpp b/3rdParty/Boost/src/tools/bcp/main.cpp index a152138..28a5491 100644 --- a/3rdParty/Boost/src/tools/bcp/main.cpp +++ b/3rdParty/Boost/src/tools/bcp/main.cpp @@ -13,9 +13,9 @@ #include <cstring> #include <string> #include <list> +#include "bcp.hpp" #include <boost/filesystem/path.hpp> #include <boost/version.hpp> -#include "bcp.hpp" #ifdef BOOST_NO_STDC_NAMESPACE namespace std{ @@ -60,7 +60,7 @@ int cpp_main(int argc, char* argv[]) // with files that already exist, if they're not portable // names it's too late for us to do anything about it). // - boost::filesystem::path::default_name_check(filesystem_name_check); + /*boost::filesystem::path::default_name_check(filesystem_name_check);*/ // // without arguments just show help: // @@ -68,7 +68,7 @@ int cpp_main(int argc, char* argv[]) { std::cout << "Error: insufficient arguments, don't know what to do." << std::endl; show_usage(); - return 0; + return 1; } // // create the application object: diff --git a/3rdParty/Boost/src/tools/bcp/output_licence_info.cpp b/3rdParty/Boost/src/tools/bcp/output_licence_info.cpp index 26eae7b..2349acc 100644 --- a/3rdParty/Boost/src/tools/bcp/output_licence_info.cpp +++ b/3rdParty/Boost/src/tools/bcp/output_licence_info.cpp @@ -57,7 +57,7 @@ void bcp_implementation::output_license_info() i = m_license_data.begin(); j = m_license_data.end(); - std::ofstream os(m_dest_path.native_file_string().c_str()); + std::ofstream os(m_dest_path.string().c_str()); if(!os) { std::string msg("Error opening "); diff --git a/3rdParty/Boost/src/tools/bcp/scan_licence.cpp b/3rdParty/Boost/src/tools/bcp/scan_licence.cpp index 13a0286..d1bf0bb 100644 --- a/3rdParty/Boost/src/tools/bcp/scan_licence.cpp +++ b/3rdParty/Boost/src/tools/bcp/scan_licence.cpp @@ -239,10 +239,10 @@ void bcp_implementation::scan_license(const fs::path& p, const fileview& v) // Perform the actual conversion if (m_bsl_convert_mode) { try{ - std::ofstream out((m_boost_path / p).native_file_string().c_str()); + std::ofstream out((m_boost_path / p).string().c_str()); if (!out) { std::string msg("Cannot open file for license conversion: "); - msg += p.native_file_string(); + msg += p.string(); std::runtime_error e(msg); boost::throw_exception(e); } |