summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-11-24 20:33:19 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-11-24 20:35:17 (GMT)
commit332d60c56dfaa11fdd135088279d15cd5983b3d4 (patch)
treedd77717a4e1732da929d5ff8a0471fa3f005e201 /3rdParty/Boost/src/tools
parent90c44a10fec26d2a0935b2d62e82b6a5be028373 (diff)
downloadswift-332d60c56dfaa11fdd135088279d15cd5983b3d4.zip
swift-332d60c56dfaa11fdd135088279d15cd5983b3d4.tar.bz2
Upgraded Boost to 1.45.0.
Diffstat (limited to '3rdParty/Boost/src/tools')
-rw-r--r--3rdParty/Boost/src/tools/bcp/add_path.cpp43
-rw-r--r--3rdParty/Boost/src/tools/bcp/copy_path.cpp55
-rw-r--r--3rdParty/Boost/src/tools/bcp/fileview.cpp2
3 files changed, 68 insertions, 32 deletions
diff --git a/3rdParty/Boost/src/tools/bcp/add_path.cpp b/3rdParty/Boost/src/tools/bcp/add_path.cpp
index 04530c6..e55e8e3 100644
--- a/3rdParty/Boost/src/tools/bcp/add_path.cpp
+++ b/3rdParty/Boost/src/tools/bcp/add_path.cpp
@@ -71,10 +71,11 @@ void bcp_implementation::add_directory(const fs::path& p)
std::string s(i->string());
if(m_boost_path.string().size())
s.erase(0, m_boost_path.string().size() + 1);
- if(!m_dependencies.count(fs::path(s)))
+ fs::path np = s;
+ if(!m_dependencies.count(np))
{
- m_dependencies[fs::path(s)] = p; // set up dependency tree
- add_path(fs::path(s));
+ m_dependencies[np] = p; // set up dependency tree
+ add_path(np);
}
++i;
}
@@ -290,6 +291,24 @@ void bcp_implementation::add_file_dependencies(const fs::path& p, bool scanfile)
continue;
}
include_file = i->str();
+ fs::path test_file(m_boost_path / p.branch_path() / include_file);
+ if(fs::exists(test_file) && !fs::is_directory(test_file) && (p.branch_path().string() != "boost"))
+ {
+ if(!m_dependencies.count(p.branch_path() / include_file))
+ {
+ m_dependencies[p.branch_path() / include_file] = p;
+ add_path(p.branch_path() / include_file);
+ }
+ }
+ else if(fs::exists(m_boost_path / include_file))
+ {
+ if(!m_dependencies.count(include_file))
+ {
+ m_dependencies[include_file] = p;
+ add_path(include_file);
+ }
+ }
+ ++i;
}
catch(const fs::filesystem_error&)
{
@@ -297,24 +316,6 @@ void bcp_implementation::add_file_dependencies(const fs::path& p, bool scanfile)
++i;
continue;
}
- fs::path test_file(m_boost_path / p.branch_path() / include_file);
- if(fs::exists(test_file) && !fs::is_directory(test_file) && (p.branch_path().string() != "boost"))
- {
- if(!m_dependencies.count(p.branch_path() / include_file))
- {
- m_dependencies[p.branch_path() / include_file] = p;
- add_path(p.branch_path() / include_file);
- }
- }
- else if(fs::exists(m_boost_path / include_file))
- {
- if(!m_dependencies.count(include_file))
- {
- m_dependencies[include_file] = p;
- add_path(include_file);
- }
- }
- ++i;
}
//
// Now we need to scan for Boost.Preprocessor includes that
diff --git a/3rdParty/Boost/src/tools/bcp/copy_path.cpp b/3rdParty/Boost/src/tools/bcp/copy_path.cpp
index af99b62..496696a 100644
--- a/3rdParty/Boost/src/tools/bcp/copy_path.cpp
+++ b/3rdParty/Boost/src/tools/bcp/copy_path.cpp
@@ -58,7 +58,33 @@ void bcp_implementation::copy_path(const fs::path& p)
//
// do text based copy if requested:
//
- if(m_namespace_name.size() && m_lib_names.size() && is_jam_file(p))
+ if(p.leaf() == "Jamroot")
+ {
+ static std::vector<char> v1, v2;
+ v1.clear();
+ v2.clear();
+ std::ifstream is((m_boost_path / p).native_file_string().c_str());
+ std::copy(std::istreambuf_iterator<char>(is), std::istreambuf_iterator<char>(), std::back_inserter(v1));
+
+ static boost::regex libname_matcher;
+ if(libname_matcher.empty())
+ {
+ libname_matcher.assign("boost_");
+ }
+
+ regex_replace(std::back_inserter(v2), v1.begin(), v1.end(), libname_matcher, m_namespace_name + "_");
+ std::swap(v1, v2);
+ v2.clear();
+
+ 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);
+ else
+ os.open((m_dest_path / p).native_file_string().c_str(), std::ios_base::out);
+ os.write(&*v1.begin(), v1.size());
+ os.close();
+ }
+ else if(m_namespace_name.size() && m_lib_names.size() && is_jam_file(p))
{
static std::vector<char> v1, v2;
v1.clear();
@@ -106,25 +132,33 @@ void bcp_implementation::copy_path(const fs::path& p)
static const boost::regex namespace_matcher(
"(?|"
- "(namespace\\s+)boost(_\\w+)?"
+ "(namespace\\s+)boost(_\\w+)?(?:(\\s*::\\s*)phoenix)?"
"|"
"(namespace\\s+)(adstl|phoenix|rapidxml)\\>"
"|"
- "()boost((?:_\\w+)?\\s*(?:::|,|\\)))"
+ "()\\<boost((?:_(?!intrusive_tags)\\w+)?\\s*(?:::))(?:(\\s*)phoenix)?"
"|"
- "()((?:adstl|phoenix|rapidxml)\\s*(?:::|,|\\)))"
+ "()\\<((?:adstl|phoenix|rapidxml)\\s*(?:::))"
"|"
- "(namespace\\s+\\w+\\s*=\\s*(?:::\\s*)?)boost(_\\w+)?"
+ "(namespace\\s+\\w+\\s*=\\s*(?:::\\s*)?)boost(_\\w+)?(?:(\\s*::\\s*)phoenix)?"
"|"
- "(namespace\\s+\\w+\\s*=\\s*(?:::\\s*)?)(adstl|phoenix|rapidxml)\\>"
+ "(namespace\\s+\\w+\\s*=\\s*(?:::\\s*)?(?:\\w+\\s*::\\s*)?)(adstl|phoenix|rapidxml)\\>"
"|"
- "(^\\s*#\\s*define[^\\n]+)boost((?:_\\w+)?\\s*)$"
+ "(^\\s*#\\s*define\\s+\\w+\\s+)boost((?:_\\w+)?\\s*)$"
"|"
"(^\\s*#\\s*define[^\\n]+)((?:adstl|phoenix|rapidxml)\\s*)$"
+ "|"
+ "()boost(_asio_detail_posix_thread_function|_regex_free_static_mutex)"
+ "|"
+ "()(lw_thread_routine|at_thread_exit|on_process_enter|on_process_exit|on_thread_enter|on_thread_exit|tss_cleanup_implemented)"
+ "|"
+ "(BOOST_CLASS_REQUIRE4?[^;]*)boost((?:_\\w+)?\\s*,)"
+ "|"
+ "(\\(\\s*)boost(\\s*\\))"
")"
- );
+ );
- regex_replace(std::back_inserter(v2), v1.begin(), v1.end(), namespace_matcher, "$1" + m_namespace_name + "$2");
+ regex_replace(std::back_inserter(v2), v1.begin(), v1.end(), namespace_matcher, "$1" + m_namespace_name + "$2(?3$3" + m_namespace_name + "phoenix)", boost::regex_constants::format_all);
std::swap(v1, v2);
v2.clear();
@@ -171,7 +205,8 @@ void bcp_implementation::copy_path(const fs::path& p)
os.open((m_dest_path / p).native_file_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.write(&*v1.begin(), v1.size());
+ if(v1.size())
+ os.write(&*v1.begin(), v1.size());
os.close();
}
else if(m_unix_lines && !is_binary_file(p))
diff --git a/3rdParty/Boost/src/tools/bcp/fileview.cpp b/3rdParty/Boost/src/tools/bcp/fileview.cpp
index da2bcc4..845582d 100644
--- a/3rdParty/Boost/src/tools/bcp/fileview.cpp
+++ b/3rdParty/Boost/src/tools/bcp/fileview.cpp
@@ -73,7 +73,7 @@ void fileview::open(const boost::filesystem::path& p)
// iterators:
fileview::const_iterator fileview::begin() const
{
- return &(pimpl->m_data[0]);
+ return pimpl->m_data.size() ? &(pimpl->m_data[0]) : 0;
}
fileview::const_iterator fileview::end() const