diff -r 510d5bd079ad boost/iostreams/detail/system_failure.hpp --- a/boost/iostreams/detail/system_failure.hpp Fri Jun 27 15:59:57 2008 -0600 +++ b/boost/iostreams/detail/system_failure.hpp Mon Jun 30 18:21:47 2008 -0600 @@ -18,6 +18,7 @@ #include #include #include +#include #include #include // failure. @@ -73,10 +74,10 @@ { return system_failure(msg.c_str()); } inline void throw_system_failure(const char* msg) -{ throw system_failure(msg); } +{ boost::throw_exception(system_failure(msg)); } inline void throw_system_failure(const std::string& msg) -{ throw system_failure(msg); } +{ boost::throw_exception(system_failure(msg)); } } } } // End namespaces detail, iostreams, boost. diff -r 510d5bd079ad libs/iostreams/src/bzip2.cpp --- a/libs/iostreams/src/bzip2.cpp Fri Jun 27 15:59:57 2008 -0600 +++ b/libs/iostreams/src/bzip2.cpp Mon Jun 30 18:21:47 2008 -0600 @@ -14,6 +14,7 @@ // than using it (possibly importing code). #define BOOST_IOSTREAMS_SOURCE +#include #include #include #include "bzlib.h" // Julian Seward's "bzip.h" header. @@ -65,9 +66,9 @@ case BZ_STREAM_END: return; case BZ_MEM_ERROR: - throw std::bad_alloc(); + boost::throw_exception(std::bad_alloc()); default: - throw bzip2_error(error); + boost::throw_exception(bzip2_error(error)); } } diff -r 510d5bd079ad libs/iostreams/src/file_descriptor.cpp --- a/libs/iostreams/src/file_descriptor.cpp Fri Jun 27 15:59:57 2008 -0600 +++ b/libs/iostreams/src/file_descriptor.cpp Mon Jun 30 18:21:47 2008 -0600 @@ -24,6 +24,7 @@ #include // openmodes, failure. #include #include +#include // OS-specific headers for low-level i/o. @@ -154,7 +155,7 @@ int fd = BOOST_IOSTREAMS_FD_OPEN(path.c_str(), oflag, pmode); if (fd == -1) { - throw BOOST_IOSTREAMS_FAILURE("bad open"); + boost::throw_exception(BOOST_IOSTREAMS_FAILURE("bad open")); } else { pimpl_->handle_ = fd; pimpl_->flags_ = impl::close_on_exit; @@ -172,13 +173,13 @@ #ifdef BOOST_IOSTREAMS_WINDOWS DWORD result; if (!::ReadFile(pimpl_->handle_, s, n, &result, NULL)) - throw detail::bad_read(); + boost::throw_exception(detail::bad_read()); return result == 0 ? -1 : static_cast(result); #else // #ifdef BOOST_IOSTREAMS_WINDOWS errno = 0; std::streamsize result = BOOST_IOSTREAMS_FD_READ(pimpl_->handle_, s, n); if (errno != 0) - throw detail::bad_read(); + boost::throw_exception(detail::bad_read()); return result == 0 ? -1 : result; #endif // #ifdef BOOST_IOSTREAMS_WINDOWS } @@ -192,17 +193,17 @@ if ( dwResult == INVALID_SET_FILE_POINTER && ::GetLastError() != NO_ERROR ) { - throw detail::bad_seek(); + boost::throw_exception(detail::bad_seek()); } } DWORD ignore; if (!::WriteFile(pimpl_->handle_, s, n, &ignore, NULL)) - throw detail::bad_write(); + boost::throw_exception(detail::bad_write()); return n; #else // #ifdef BOOST_IOSTREAMS_WINDOWS int amt = BOOST_IOSTREAMS_FD_WRITE(pimpl_->handle_, s, n); if (amt < n) - throw detail::bad_write(); // Handles blocking fd's only. + boost::throw_exception(detail::bad_write()); // Handles blocking fd's only. return n; #endif // #ifdef BOOST_IOSTREAMS_WINDOWS } @@ -226,7 +227,7 @@ if ( dwResultLow == INVALID_SET_FILE_POINTER && ::GetLastError() != NO_ERROR ) { - throw detail::bad_seek(); + boost::throw_exception(detail::bad_seek()); } else { return offset_to_position( (stream_offset(lDistanceToMoveHigh) << 32) + dwResultLow @@ -236,7 +237,7 @@ if ( off > integer_traits::const_max || off < integer_traits::const_min ) { - throw BOOST_IOSTREAMS_FAILURE("bad offset"); + boost::throw_exception(BOOST_IOSTREAMS_FAILURE("bad offset")); } stream_offset result = BOOST_IOSTREAMS_FD_SEEK( @@ -249,7 +250,7 @@ SEEK_END ) ); if (result == -1) - throw detail::bad_seek(); + boost::throw_exception(detail::bad_seek()); return offset_to_position(result); #endif // #ifdef BOOST_IOSTREAMS_WINDOWS } @@ -261,7 +262,7 @@ #ifdef BOOST_IOSTREAMS_WINDOWS if (i.handle_ != reinterpret_cast(-1)) { if (!::CloseHandle(i.handle_)) - throw BOOST_IOSTREAMS_FAILURE("bad close"); + boost::throw_exception(BOOST_IOSTREAMS_FAILURE("bad close")); i.handle_ = reinterpret_cast(-1); i.flags_ = 0; return; @@ -269,7 +270,7 @@ #else // #ifdef BOOST_IOSTREAMS_WINDOWS if (i.handle_ != -1) { if (BOOST_IOSTREAMS_FD_CLOSE(i.handle_) == -1) - throw BOOST_IOSTREAMS_FAILURE("bad close"); + boost::throw_exception(BOOST_IOSTREAMS_FAILURE("bad close")); i.handle_ = -1; i.flags_ = 0; } diff -r 510d5bd079ad libs/iostreams/src/mapped_file.cpp --- a/libs/iostreams/src/mapped_file.cpp Fri Jun 27 15:59:57 2008 -0600 +++ b/libs/iostreams/src/mapped_file.cpp Mon Jun 30 18:21:47 2008 -0600 @@ -22,6 +22,7 @@ #include // failure. #include #include +#include #ifdef BOOST_IOSTREAMS_WINDOWS # define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers @@ -338,7 +339,7 @@ using namespace std; if (is_open()) - throw BOOST_IOSTREAMS_FAILURE("file already open"); + boost::throw_exception(BOOST_IOSTREAMS_FAILURE("file already open")); if (!pimpl_) pimpl_.reset(new impl_type); else diff -r 510d5bd079ad libs/iostreams/src/zlib.cpp --- a/libs/iostreams/src/zlib.cpp Fri Jun 27 15:59:57 2008 -0600 +++ b/libs/iostreams/src/zlib.cpp Mon Jun 30 18:21:47 2008 -0600 @@ -14,6 +14,7 @@ // than using it (possibly importing code). #define BOOST_IOSTREAMS_SOURCE +#include #include #include #include "zlib.h" // Jean-loup Gailly's and Mark Adler's "zlib.h" header. @@ -78,9 +79,9 @@ //case Z_BUF_ERROR: return; case Z_MEM_ERROR: - throw std::bad_alloc(); + boost::throw_exception(std::bad_alloc()); default: - throw zlib_error(error); + boost::throw_exception(zlib_error(error)); ; } }