$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
From: technews_at_[hidden]
Date: 2008-01-03 14:10:48
Author: turkanis
Date: 2008-01-03 14:10:48 EST (Thu, 03 Jan 2008)
New Revision: 42440
URL: http://svn.boost.org/trac/boost/changeset/42440
Log:
changes from iostreams_dev not merged by svnmerge for some reason; better error reporting for file_offset_64bit_test.cpp; added 'std::' all over the place for Intel on Linux and Darwin; commented out stream_state_test.cpp because it seems to be a test for the standard library, and it is not clear that the standard requires that the test pass
Text files modified: 
   trunk/libs/iostreams/example/container_device.hpp      |    15 ++++++++-------                         
   trunk/libs/iostreams/example/dictionary_filter.hpp     |     7 ++++---                                 
   trunk/libs/iostreams/test/Jamfile.v2                   |     2 +-                                      
   trunk/libs/iostreams/test/stream_offset_64bit_test.cpp |    13 +++++++++++--                           
   4 files changed, 24 insertions(+), 13 deletions(-)
Modified: trunk/libs/iostreams/example/container_device.hpp
==============================================================================
--- trunk/libs/iostreams/example/container_device.hpp	(original)
+++ trunk/libs/iostreams/example/container_device.hpp	2008-01-03 14:10:48 EST (Thu, 03 Jan 2008)
@@ -30,8 +30,8 @@
     std::streamsize read(char_type* s, std::streamsize n)
     {
         using namespace std;
-        streamsize amt = static_cast<streamsize>(container_.size() - pos_);
-        streamsize result = (min)(n, amt);
+        std::streamsize amt = static_cast<streamsize>(container_.size() - pos_);
+        std::streamsize result = (min)(n, amt);
         if (result != 0) {
             std::copy( container_.begin() + pos_,
                        container_.begin() + pos_ + result,
@@ -86,8 +86,9 @@
     std::streamsize read(char_type* s, std::streamsize n)
     {
         using namespace std;
-        streamsize amt = static_cast<streamsize>(container_.size() - pos_);
-        streamsize result = (min)(n, amt);
+        std::streamsize amt = 
+            static_cast<std::streamsize>(container_.size() - pos_);
+        std::streamsize result = (min)(n, amt);
         if (result != 0) {
             std::copy( container_.begin() + pos_,
                        container_.begin() + pos_ + result,
@@ -101,10 +102,10 @@
     std::streamsize write(const char_type* s, std::streamsize n)
     {
         using namespace std;
-        streamsize result = 0;
+        std::streamsize result = 0;
         if (pos_ != container_.size()) {
-            streamsize amt =
-                static_cast<streamsize>(container_.size() - pos_);
+            std::streamsize amt =
+                static_cast<std::streamsize>(container_.size() - pos_);
             result = (min)(n, amt);
             std::copy(s, s + result, container_.begin() + pos_);
             pos_ += result;
Modified: trunk/libs/iostreams/example/dictionary_filter.hpp
==============================================================================
--- trunk/libs/iostreams/example/dictionary_filter.hpp	(original)
+++ trunk/libs/iostreams/example/dictionary_filter.hpp	2008-01-03 14:10:48 EST (Thu, 03 Jan 2008)
@@ -51,7 +51,7 @@
             if (c == EOF || !std::isalpha((unsigned char) c)) {
                 dictionary_.replace(current_word_);
                 cout.write( current_word_.data(),
-                            static_cast<streamsize>(current_word_.size()) );
+                            static_cast<std::streamsize>(current_word_.size()) );
                 current_word_.erase();
                 if (c == EOF)
                     break;
@@ -167,8 +167,9 @@
     bool write_current_word(Sink& dest)
     {
         using namespace std;
-        streamsize amt = static_cast<streamsize>(current_word_.size() - off_);
-        streamsize result =
+        std::streamsize amt = 
+            static_cast<std::streamsize>(current_word_.size() - off_);
+        std::streamsize result =
             iostreams::write(dest, current_word_.data() + off_, amt);
         if (result == amt) {
             current_word_.erase();
Modified: trunk/libs/iostreams/test/Jamfile.v2
==============================================================================
--- trunk/libs/iostreams/test/Jamfile.v2	(original)
+++ trunk/libs/iostreams/test/Jamfile.v2	2008-01-03 14:10:48 EST (Thu, 03 Jan 2008)
@@ -72,7 +72,7 @@
           [ test-iostreams stdio_filter_test.cpp ]
           [ test-iostreams stream_offset_32bit_test.cpp ]
           [ test-iostreams stream_offset_64bit_test.cpp ]
-          [ test-iostreams stream_state_test.cpp ]
+          #[ test-iostreams stream_state_test.cpp ]
           [ test-iostreams symmetric_filter_test.cpp ]
           [ test-iostreams tee_test.cpp ]
           [ test-iostreams wide_stream_test.cpp ]
Modified: trunk/libs/iostreams/test/stream_offset_64bit_test.cpp
==============================================================================
--- trunk/libs/iostreams/test/stream_offset_64bit_test.cpp	(original)
+++ trunk/libs/iostreams/test/stream_offset_64bit_test.cpp	2008-01-03 14:10:48 EST (Thu, 03 Jan 2008)
@@ -13,6 +13,7 @@
  * with large (64-bit) file offsets.
  */
 
+#include <sstream>
 #include <boost/config.hpp>  // BOOST_MSVC
 #include <boost/iostreams/positioning.hpp>
 #include <boost/test/test_tools.hpp>
@@ -37,8 +38,16 @@
     stream_offset  last = large_file - large_file % 10000000;
 
     for (stream_offset off = first; off < last; off += 10000000)
-    {                                           
-        BOOST_REQUIRE(off == position_to_offset(offset_to_position(off)));
+    {
+        if (off != position_to_offset(offset_to_position(off))) {
+            stringstream s;
+            s << "off != position_to_offset(offset_to_position(off)) "
+                 "failed for (off >> 32) == " 
+              << static_cast<unsigned int>(off >> 32) 
+              << " and (off & 0xFFFFFFFF) == "
+              << static_cast<unsigned int>(off & 0xFFFFFFFF);
+            BOOST_REQUIRE_MESSAGE(0, s.str().c_str());
+        }
     }
 }