summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-03-14 18:35:17 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-03-14 18:35:17 (GMT)
commita135c6ff4dcded5661a2321512960b14cf8c15c8 (patch)
treeb0017ecfe702304f592b9d4e8b943784cff26fb2 /3rdParty/Boost/src/boost/filesystem/v3
parent02d6188ab335e6c62b8341b84579d9549d215118 (diff)
downloadswift-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/boost/filesystem/v3')
-rw-r--r--3rdParty/Boost/src/boost/filesystem/v3/fstream.hpp3
-rw-r--r--3rdParty/Boost/src/boost/filesystem/v3/operations.hpp103
-rw-r--r--3rdParty/Boost/src/boost/filesystem/v3/path.hpp3
3 files changed, 77 insertions, 32 deletions
diff --git a/3rdParty/Boost/src/boost/filesystem/v3/fstream.hpp b/3rdParty/Boost/src/boost/filesystem/v3/fstream.hpp
index 235aa79..60a2a3b 100644
--- a/3rdParty/Boost/src/boost/filesystem/v3/fstream.hpp
+++ b/3rdParty/Boost/src/boost/filesystem/v3/fstream.hpp
@@ -27,7 +27,8 @@
// on Windows, except for standard libaries known to have wchar_t overloads for
// file stream I/O, use path::string() to get a narrow character c_str()
#if defined(BOOST_WINDOWS_API) \
- && !(defined(_CPPLIB_VER) && _CPPLIB_VER >= 405) // not (Dinkumware with overloads)
+ && (!defined(_CPPLIB_VER) || _CPPLIB_VER < 405 || defined(_STLPORT_VERSION))
+ // !Dinkumware || early Dinkumware || STLPort masquerading as Dinkumware
# define BOOST_FILESYSTEM_C_STR string().c_str() // use narrow, since wide not available
#else // use the native c_str, which will be narrow on POSIX, wide on Windows
# define BOOST_FILESYSTEM_C_STR c_str()
diff --git a/3rdParty/Boost/src/boost/filesystem/v3/operations.hpp b/3rdParty/Boost/src/boost/filesystem/v3/operations.hpp
index cf47c56..7d1608d 100644
--- a/3rdParty/Boost/src/boost/filesystem/v3/operations.hpp
+++ b/3rdParty/Boost/src/boost/filesystem/v3/operations.hpp
@@ -25,6 +25,7 @@
#include <boost/filesystem/v3/path.hpp>
#include <boost/detail/scoped_enum_emulation.hpp>
+#include <boost/detail/bitmask.hpp>
#include <boost/system/error_code.hpp>
#include <boost/system/system_error.hpp>
#include <boost/shared_ptr.hpp>
@@ -75,8 +76,8 @@ namespace boost
fifo_file,
socket_file,
reparse_file, // Windows: FILE_ATTRIBUTE_REPARSE_POINT that is not a symlink
- type_unknown, // file does exist, but isn't one of the above types or
- // we don't have strong enough permission to find its type
+ type_unknown, // file does exist, but isn't one of the above types or
+ // we don't have strong enough permission to find its type
_detail_directory_symlink // internal use only; never exposed to users
};
@@ -84,7 +85,8 @@ namespace boost
class BOOST_FILESYSTEM_DECL file_status
{
public:
- explicit file_status(file_type v = status_error) : m_value(v) {}
+ file_status() : m_value(status_error) {}
+ explicit file_status(file_type v) : m_value(v) {}
void type(file_type v) { m_value = v; }
file_type type() const { return m_value; }
@@ -122,7 +124,7 @@ namespace boost
};
BOOST_SCOPED_ENUM_START(copy_option)
- {fail_if_exists, overwrite_if_exists};
+ {none, fail_if_exists = none, overwrite_if_exists};
BOOST_SCOPED_ENUM_END
//--------------------------------------------------------------------------------------//
@@ -191,6 +193,8 @@ namespace boost
BOOST_FILESYSTEM_DECL
path system_complete(const path& p, system::error_code* ec=0);
BOOST_FILESYSTEM_DECL
+ path temp_directory_path(system::error_code* ec=0);
+ BOOST_FILESYSTEM_DECL
path unique_path(const path& p, system::error_code* ec=0);
} // namespace detail
@@ -258,9 +262,7 @@ namespace boost
// forward declarations
path current_path(); // fwd declaration
-# ifndef BOOST_FILESYSTEM_NO_DEPRECATED
path initial_path();
-# endif
BOOST_FILESYSTEM_DECL
path absolute(const path& p, const path& base=current_path());
@@ -331,17 +333,17 @@ namespace boost
void create_directory_symlink(const path& to, const path& from, system::error_code& ec)
{detail::create_directory_symlink(to, from, &ec);}
inline
- void create_hard_link(const path& to, const path& from) {detail::create_hard_link(to, from);}
+ void create_hard_link(const path& to, const path& new_hard_link) {detail::create_hard_link(to, new_hard_link);}
inline
- void create_hard_link(const path& to, const path& from, system::error_code& ec)
- {detail::create_hard_link(to, from, &ec);}
+ void create_hard_link(const path& to, const path& new_hard_link, system::error_code& ec)
+ {detail::create_hard_link(to, new_hard_link, &ec);}
inline
- void create_symlink(const path& to, const path& from) {detail::create_symlink(to, from);}
+ void create_symlink(const path& to, const path& new_symlink) {detail::create_symlink(to, new_symlink);}
inline
- void create_symlink(const path& to, const path& from, system::error_code& ec)
- {detail::create_symlink(to, from, &ec);}
+ void create_symlink(const path& to, const path& new_symlink, system::error_code& ec)
+ {detail::create_symlink(to, new_symlink, &ec);}
inline
path current_path() {return detail::current_path();}
@@ -372,7 +374,6 @@ namespace boost
inline
boost::uintmax_t hard_link_count(const path& p, system::error_code& ec)
{return detail::hard_link_count(p, &ec);}
-# ifndef BOOST_FILESYSTEM_NO_DEPRECATED
inline
path initial_path() {return detail::initial_path();}
@@ -383,7 +384,6 @@ namespace boost
path initial_path() {return initial_path();}
template <class Path>
path initial_path(system::error_code& ec) {return detail::initial_path(&ec);}
-# endif
inline
std::time_t last_write_time(const path& p) {return detail::last_write_time(p);}
@@ -446,6 +446,12 @@ namespace boost
path system_complete(const path& p, system::error_code& ec)
{return detail::system_complete(p, &ec);}
inline
+ path temp_directory_path() {return detail::temp_directory_path();}
+
+ inline
+ path temp_directory_path(system::error_code& ec)
+ {return detail::temp_directory_path(&ec);}
+ inline
path unique_path(const path& p="%%%%-%%%%-%%%%-%%%%")
{ return detail::unique_path(p); }
inline
@@ -633,6 +639,17 @@ namespace detail
// //
//--------------------------------------------------------------------------------------//
+ BOOST_SCOPED_ENUM_START(symlink_option)
+ {
+ none,
+ no_recurse = none, // don't follow directory symlinks (default behavior)
+ recurse, // follow directory symlinks
+ _detail_no_push = recurse << 1 // internal use only
+ };
+ BOOST_SCOPED_ENUM_END
+
+ BOOST_BITMASK(BOOST_SCOPED_ENUM(symlink_option))
+
namespace detail
{
struct recur_dir_itr_imp
@@ -640,9 +657,9 @@ namespace detail
typedef directory_iterator element_type;
std::stack< element_type, std::vector< element_type > > m_stack;
int m_level;
- bool m_no_push_request;
+ BOOST_SCOPED_ENUM(symlink_option) m_options;
- recur_dir_itr_imp() : m_level(0), m_no_push_request(false) {}
+ recur_dir_itr_imp() : m_level(0), m_options(symlink_option::none) {}
void increment(system::error_code* ec); // ec == 0 means throw on error
@@ -658,9 +675,11 @@ namespace detail
void recur_dir_itr_imp::increment(system::error_code* ec)
// ec == 0 means throw on error
{
- if (m_no_push_request)
- { m_no_push_request = false; }
- else if (is_directory(m_stack.top()->status()))
+ if ((m_options & symlink_option::_detail_no_push) == symlink_option::_detail_no_push)
+ m_options &= ~symlink_option::_detail_no_push;
+ else if (is_directory(m_stack.top()->status())
+ && (!is_symlink(m_stack.top()->symlink_status())
+ || (m_options & symlink_option::recurse) == symlink_option::recurse))
{
if (ec == 0)
m_stack.push(directory_iterator(m_stack.top()->path()));
@@ -714,27 +733,41 @@ namespace detail
recursive_directory_iterator(){} // creates the "end" iterator
- explicit recursive_directory_iterator(const path& dir_path)
+ explicit recursive_directory_iterator(const path& dir_path,
+ BOOST_SCOPED_ENUM(symlink_option) opt = symlink_option::none)
: m_imp(new detail::recur_dir_itr_imp)
{
+ m_imp->m_options = opt;
m_imp->m_stack.push(directory_iterator(dir_path));
if (m_imp->m_stack.top() == directory_iterator())
{ m_imp.reset (); }
}
recursive_directory_iterator(const path& dir_path,
+ BOOST_SCOPED_ENUM(symlink_option) opt,
+ system::error_code & ec)
+ : m_imp(new detail::recur_dir_itr_imp)
+ {
+ m_imp->m_options = opt;
+ m_imp->m_stack.push(directory_iterator(dir_path, ec));
+ if (m_imp->m_stack.top() == directory_iterator())
+ { m_imp.reset (); }
+ }
+
+ recursive_directory_iterator(const path& dir_path,
system::error_code & ec)
: m_imp(new detail::recur_dir_itr_imp)
{
+ m_imp->m_options = symlink_option::none;
m_imp->m_stack.push(directory_iterator(dir_path, ec));
if (m_imp->m_stack.top() == directory_iterator())
{ m_imp.reset (); }
}
- recursive_directory_iterator& increment(system::error_code* ec)
+ recursive_directory_iterator& increment(system::error_code& ec)
{
BOOST_ASSERT(m_imp.get() && "increment() on end recursive_directory_iterator");
- m_imp->increment(ec);
+ m_imp->increment(&ec);
return *this;
}
@@ -744,12 +777,17 @@ namespace detail
return m_imp->m_level;
}
- bool no_push_request() const
+ bool no_push_pending() const
{
- BOOST_ASSERT(m_imp.get() && "no_push_request() on end recursive_directory_iterator");
- return m_imp->m_no_push_request;
+ BOOST_ASSERT(m_imp.get() && "is_no_push_requested() on end recursive_directory_iterator");
+ return (m_imp->m_options & symlink_option::_detail_no_push)
+ == symlink_option::_detail_no_push;
}
+# ifndef BOOST_FILESYSTEM_NO_DEPRECATED
+ bool no_push_request() const { return no_push_pending(); }
+# endif
+
void pop()
{
BOOST_ASSERT(m_imp.get() && "pop() on end recursive_directory_iterator");
@@ -757,10 +795,13 @@ namespace detail
if (m_imp->m_stack.empty()) m_imp.reset(); // done, so make end iterator
}
- void no_push()
+ void no_push(bool value=true)
{
BOOST_ASSERT(m_imp.get() && "no_push() on end recursive_directory_iterator");
- m_imp->m_no_push_request = true;
+ if (value)
+ m_imp->m_options |= symlink_option::_detail_no_push;
+ else
+ m_imp->m_options &= ~symlink_option::_detail_no_push;
}
file_status status() const
@@ -799,7 +840,8 @@ namespace detail
{
BOOST_ASSERT(m_imp.get() && "increment of end recursive_directory_iterator");
m_imp->increment(0);
- if (m_imp->m_stack.empty()) m_imp.reset(); // done, so make end iterator
+ if (m_imp->m_stack.empty())
+ m_imp.reset(); // done, so make end iterator
}
bool equal(const recursive_directory_iterator& rhs) const
@@ -963,6 +1005,7 @@ namespace boost
using filesystem3::file_type;
using filesystem3::filesystem_error;
using filesystem3::hard_link_count;
+ using filesystem3::initial_path;
using filesystem3::is_directory;
using filesystem3::is_directory;
using filesystem3::is_empty;
@@ -973,6 +1016,7 @@ namespace boost
using filesystem3::read_symlink;
using filesystem3::recursive_directory_iterator;
using filesystem3::regular_file;
+ using filesystem3::reparse_file;
using filesystem3::remove;
using filesystem3::remove_all;
using filesystem3::rename;
@@ -984,12 +1028,13 @@ namespace boost
using filesystem3::status_error;
using filesystem3::status_known;
using filesystem3::symlink_file;
+ using filesystem3::symlink_option;
using filesystem3::symlink_status;
using filesystem3::system_complete;
+ using filesystem3::temp_directory_path;
using filesystem3::type_unknown;
using filesystem3::unique_path;
# ifndef BOOST_FILESYSTEM_NO_DEPRECATED
- using filesystem3::initial_path;
using filesystem3::is_regular;
using filesystem3::status_unknown;
using filesystem3::symbolic_link_exists;
diff --git a/3rdParty/Boost/src/boost/filesystem/v3/path.hpp b/3rdParty/Boost/src/boost/filesystem/v3/path.hpp
index 1cd1522..f81b631 100644
--- a/3rdParty/Boost/src/boost/filesystem/v3/path.hpp
+++ b/3rdParty/Boost/src/boost/filesystem/v3/path.hpp
@@ -452,7 +452,6 @@ namespace filesystem3
void m_erase_redundant_separator(string_type::size_type sep_pos);
string_type::size_type m_parent_path_end() const;
- void m_portable();
path& m_normalize();
@@ -479,7 +478,7 @@ namespace filesystem3
class path::iterator
: public boost::iterator_facade<
- iterator,
+ path::iterator,
path const,
boost::bidirectional_traversal_tag >
{