|
Boost-Commit : |
From: bdawes_at_[hidden]
Date: 2007-09-09 13:48:19
Author: bemandawes
Date: 2007-09-09 13:48:17 EDT (Sun, 09 Sep 2007)
New Revision: 39174
URL: http://svn.boost.org/trac/boost/changeset/39174
Log:
Posix and Linux fixes
Text files modified:
trunk/libs/filesystem/src/operations.cpp | 2 +-
trunk/libs/filesystem/src/path.cpp | 6 +++---
trunk/libs/system/test/error_code_test.cpp | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
Modified: trunk/libs/filesystem/src/operations.cpp
==============================================================================
--- trunk/libs/filesystem/src/operations.cpp (original)
+++ trunk/libs/filesystem/src/operations.cpp 2007-09-09 13:48:17 EDT (Sun, 09 Sep 2007)
@@ -1096,7 +1096,7 @@
}
BOOST_FILESYSTEM_DECL error_code
- set_current_path_api( std::string & ph )
+ set_current_path_api( const std::string & ph )
{
return error_code( ::chdir( ph.c_str() )
? errno : 0, system_category );
Modified: trunk/libs/filesystem/src/path.cpp
==============================================================================
--- trunk/libs/filesystem/src/path.cpp (original)
+++ trunk/libs/filesystem/src/path.cpp 2007-09-09 13:48:17 EDT (Sun, 09 Sep 2007)
@@ -115,7 +115,7 @@
const internal_string_type & src )
{
locked = true;
- std::size_t work_size( converter->max_length() * (src.size()+1) );
+ std::size_t work_size( converter()->max_length() * (src.size()+1) );
boost::scoped_array<char> work( new char[ work_size ] );
std::mbstate_t state;
const internal_string_type::value_type * from_next;
@@ -125,7 +125,7 @@
work.get()+work_size, to_next ) != std::codecvt_base::ok )
boost::throw_exception( boost::filesystem::wfilesystem_error(
"boost::filesystem::wpath::to_external conversion error",
- ph, system::posix::invalid_argument ) );
+ ph, system::error_code( system::posix::invalid_argument, system_category ) ) );
*to_next = '\0';
return external_string_type( work.get() );
}
@@ -144,7 +144,7 @@
work.get()+work_size, to_next ) != std::codecvt_base::ok )
boost::throw_exception( boost::filesystem::wfilesystem_error(
"boost::filesystem::wpath::to_internal conversion error",
- system::posix::invalid_argument ) );
+ system::error_code( system::posix::invalid_argument, system_category ) ) );
*to_next = L'\0';
return internal_string_type( work.get() );
}
Modified: trunk/libs/system/test/error_code_test.cpp
==============================================================================
--- trunk/libs/system/test/error_code_test.cpp (original)
+++ trunk/libs/system/test/error_code_test.cpp 2007-09-09 13:48:17 EDT (Sun, 09 Sep 2007)
@@ -197,7 +197,7 @@
BOOST_CHECK( ec == Linux::dot_dot_error );
BOOST_CHECK( ec == error_code( EDOTDOT, system_category ) );
BOOST_CHECK( ec == error_code( Linux::dot_dot_error, system_category ) );
- BOOST_CHECK( ec.default_error_condition().category() == posix_category );
+ BOOST_CHECK( ec.default_error_condition().category() == system_category );
# endif
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk