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/libs/filesystem/v2 | |
parent | 02d6188ab335e6c62b8341b84579d9549d215118 (diff) | |
download | swift-contrib-a135c6ff4dcded5661a2321512960b14cf8c15c8.zip swift-contrib-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/libs/filesystem/v2')
-rw-r--r-- | 3rdParty/Boost/src/libs/filesystem/v2/src/v2_operations.cpp | 12 | ||||
-rw-r--r-- | 3rdParty/Boost/src/libs/filesystem/v2/src/v2_path.cpp | 6 |
2 files changed, 9 insertions, 9 deletions
diff --git a/3rdParty/Boost/src/libs/filesystem/v2/src/v2_operations.cpp b/3rdParty/Boost/src/libs/filesystem/v2/src/v2_operations.cpp index 10df199..f29153c 100644 --- a/3rdParty/Boost/src/libs/filesystem/v2/src/v2_operations.cpp +++ b/3rdParty/Boost/src/libs/filesystem/v2/src/v2_operations.cpp @@ -44,7 +44,7 @@ #include <boost/filesystem/v2/operations.hpp> #include <boost/scoped_array.hpp> -#include <boost/throw_exception.hpp> +#include <boost/assert.hpp> #include <boost/detail/workaround.hpp> #include <cstdlib> // for malloc, free @@ -93,7 +93,6 @@ using boost::system::system_category; #include <cstring> #include <cstdio> // for remove, rename #include <cerrno> -#include <cassert> // #include <iostream> // for debugging only; comment out when not in use #ifdef BOOST_NO_STDC_NAMESPACE @@ -294,7 +293,7 @@ namespace if ( p1.handle != INVALID_HANDLE_VALUE || p2.handle != INVALID_HANDLE_VALUE ) { return std::make_pair( ok, false ); } - assert( p1.handle == INVALID_HANDLE_VALUE + BOOST_ASSERT( p1.handle == INVALID_HANDLE_VALUE && p2.handle == INVALID_HANDLE_VALUE ); { return std::make_pair( error_code( error1, system_category()), false ); } } @@ -724,7 +723,7 @@ namespace boost || ((mode&~std::ios_base::binary) == (std::ios_base::in|std::ios_base::out|std::ios_base::trunc)) ) disposition = CREATE_ALWAYS; - else assert( 0 && "invalid mode argument" ); + else BOOST_ASSERT( 0 && "invalid mode argument" ); HANDLE handle ( ::CreateFileW( ph.c_str(), access, FILE_SHARE_DELETE | FILE_SHARE_READ | FILE_SHARE_WRITE, 0, @@ -1215,8 +1214,9 @@ namespace boost if ( ::stat( from_file_ph.c_str(), &from_stat ) != 0 ) { return error_code( errno, system_category() ); } - int oflag = O_CREAT | O_WRONLY; - if ( fail_if_exists ) oflag |= O_EXCL; + int oflag = O_CREAT | O_WRONLY | O_TRUNC; + if ( fail_if_exists ) + oflag |= O_EXCL; if ( (outfile = ::open( to_file_ph.c_str(), oflag, from_stat.st_mode )) < 0 ) { int open_errno = errno; diff --git a/3rdParty/Boost/src/libs/filesystem/v2/src/v2_path.cpp b/3rdParty/Boost/src/libs/filesystem/v2/src/v2_path.cpp index 7adeaff..16f6583 100644 --- a/3rdParty/Boost/src/libs/filesystem/v2/src/v2_path.cpp +++ b/3rdParty/Boost/src/libs/filesystem/v2/src/v2_path.cpp @@ -86,7 +86,7 @@ namespace boost void wpath_traits::imbue( const std::locale & new_loc ) { - if ( locked ) boost::throw_exception( + if ( locked ) BOOST_FILESYSTEM_THROW( wfilesystem_error( "boost::filesystem::wpath_traits::imbue() after lockdown", make_error_code( system::errc::not_supported ) ) ); @@ -144,7 +144,7 @@ namespace boost if ( converter()->out( state, src.c_str(), src.c_str()+src.size(), from_next, work.get(), work.get()+work_size, to_next ) != std::codecvt_base::ok ) - boost::throw_exception( boost::filesystem::wfilesystem_error( + BOOST_FILESYSTEM_THROW( boost::filesystem::wfilesystem_error( "boost::filesystem::wpath::to_external conversion error", ph, system::error_code( system::errc::invalid_argument, system::system_category() ) ) ); *to_next = '\0'; @@ -163,7 +163,7 @@ namespace boost if ( converter()->in( state, src.c_str(), src.c_str()+src.size(), from_next, work.get(), work.get()+work_size, to_next ) != std::codecvt_base::ok ) - boost::throw_exception( boost::filesystem::wfilesystem_error( + BOOST_FILESYSTEM_THROW( boost::filesystem::wfilesystem_error( "boost::filesystem::wpath::to_internal conversion error", system::error_code( system::errc::invalid_argument, system::system_category() ) ) ); *to_next = L'\0'; |