diff -r 23a892ae0220 .hgignore --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.hgignore Fri Oct 02 14:09:28 2009 -0700 @@ -0,0 +1,8 @@ +# This file supports two syntax types, glob and regexp. +# In either case, the backslash is an escape and must be doubled to get a literal backslash + +syntax: glob + +# Exclude object files: +bin.v2 +BoostBuildLog.txt \ No newline at end of file diff -r 23a892ae0220 libs/iostreams/src/mapped_file.cpp --- a/libs/iostreams/src/mapped_file.cpp Thu Oct 01 18:26:10 2009 -0700 +++ b/libs/iostreams/src/mapped_file.cpp Fri Oct 02 14:09:28 2009 -0700 @@ -169,9 +169,9 @@ #ifndef NDEBUG msg += std::string(" (\"") + impl.path_ + "\")"; #endif - if (impl.mapped_handle_ != INVALID_HANDLE_VALUE) + if (impl.mapped_handle_ != NULL) ::CloseHandle(impl.mapped_handle_); - if (impl.handle_ != NULL) + if (impl.handle_ != INVALID_HANDLE_VALUE) ::CloseHandle(impl.handle_); impl.clear(true); throw_system_failure(msg); @@ -399,8 +399,13 @@ return; } +#ifdef BOOST_IOSTREAMS_WINDOWS +bool mapped_file_source::is_open() const +{ return !!pimpl_ && pimpl_->handle_ != INVALID_HANDLE_VALUE; } +#else bool mapped_file_source::is_open() const { return !!pimpl_ && pimpl_->handle_ != 0; } +#endif int mapped_file_source::alignment() { return static_cast(sysconf(_SC_PAGESIZE)); }