$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
From: eric_at_[hidden]
Date: 2007-12-29 19:58:24
Author: eric_niebler
Date: 2007-12-29 19:58:23 EST (Sat, 29 Dec 2007)
New Revision: 42351
URL: http://svn.boost.org/trac/boost/changeset/42351
Log:
Merged revisions 42322,42330,42341,42343 via svnmerge from 
https://svn.boost.org/svn/boost/trunk
........
  r42322 | igaztanaga | 2007-12-28 01:08:00 -0800 (Fri, 28 Dec 2007) | 2 lines
  
  Ticket #1543: [interprocess] 'streamoff' : is not a member of 'std'
  http://svn.boost.org/trac/boost/ticket/1543
........
  r42330 | troyer | 2007-12-28 22:49:25 -0800 (Fri, 28 Dec 2007) | 1 line
  
  fixed mssing include
........
  r42341 | troyer | 2007-12-29 10:24:11 -0800 (Sat, 29 Dec 2007) | 1 line
  
  Added missing include
........
  r42343 | turkanis | 2007-12-29 11:50:22 -0800 (Sat, 29 Dec 2007) | 1 line
  
  ported changes from branches/iostreams_dev revisions 42306-42342: reworking of low-level file access to address #824, plus rigorous tests for large seeks
........
Added:
   branches/proto/v3/boost/iostreams/detail/config/rtl.hpp
      - copied unchanged from r42343, /trunk/boost/iostreams/detail/config/rtl.hpp
   branches/proto/v3/libs/iostreams/test/large_file_test.cpp
      - copied unchanged from r42343, /trunk/libs/iostreams/test/large_file_test.cpp
Properties modified: 
   branches/proto/v3/   (props changed)
Text files modified: 
   branches/proto/v3/boost/iostreams/detail/streambuf/linked_streambuf.hpp |     2                                         
   branches/proto/v3/boost/serialization/complex.hpp                       |     1                                         
   branches/proto/v3/boost/serialization/utility.hpp                       |     1                                         
   branches/proto/v3/libs/interprocess/test/file_mapping_test.cpp          |     1                                         
   branches/proto/v3/libs/iostreams/src/file_descriptor.cpp                |    65 ++++++++++++++------------------------- 
   branches/proto/v3/libs/iostreams/test/Jamfile.v2                        |    48 +++++++++++++++++-----------            
   6 files changed, 56 insertions(+), 62 deletions(-)
Modified: branches/proto/v3/boost/iostreams/detail/streambuf/linked_streambuf.hpp
==============================================================================
--- branches/proto/v3/boost/iostreams/detail/streambuf/linked_streambuf.hpp	(original)
+++ branches/proto/v3/boost/iostreams/detail/streambuf/linked_streambuf.hpp	2007-12-29 19:58:23 EST (Sat, 29 Dec 2007)
@@ -61,7 +61,7 @@
     template<typename Chain, typename Mode, typename Access>
     friend class chainbuf;
     template<typename U>
-    friend struct member_close_operation; 
+    friend class member_close_operation; 
 #else
     public:
         typedef BOOST_IOSTREAMS_BASIC_STREAMBUF(Ch, Tr) base;
Modified: branches/proto/v3/boost/serialization/complex.hpp
==============================================================================
--- branches/proto/v3/boost/serialization/complex.hpp	(original)
+++ branches/proto/v3/boost/serialization/complex.hpp	2007-12-29 19:58:23 EST (Sat, 29 Dec 2007)
@@ -22,6 +22,7 @@
 
 #include <boost/serialization/nvp.hpp>
 #include <boost/serialization/is_bitwise_serializable.hpp>
+#include <boost/serialization/split_free.hpp>
 
 namespace boost { 
 namespace serialization {
Modified: branches/proto/v3/boost/serialization/utility.hpp
==============================================================================
--- branches/proto/v3/boost/serialization/utility.hpp	(original)
+++ branches/proto/v3/boost/serialization/utility.hpp	2007-12-29 19:58:23 EST (Sat, 29 Dec 2007)
@@ -23,6 +23,7 @@
 #include <boost/type_traits/remove_const.hpp>
 #include <boost/serialization/nvp.hpp>
 #include <boost/serialization/is_bitwise_serializable.hpp>
+#include <boost/mpl/and.hpp>
 
 namespace boost { 
 namespace serialization {
Modified: branches/proto/v3/libs/interprocess/test/file_mapping_test.cpp
==============================================================================
--- branches/proto/v3/libs/interprocess/test/file_mapping_test.cpp	(original)
+++ branches/proto/v3/libs/interprocess/test/file_mapping_test.cpp	2007-12-29 19:58:23 EST (Sat, 29 Dec 2007)
@@ -11,6 +11,7 @@
 #include <boost/interprocess/detail/config_begin.hpp>
 #include <fstream>
 #include <iostream>
+#include <ios>
 #include <boost/interprocess/file_mapping.hpp>
 #include <boost/interprocess/mapped_region.hpp>
 #include <memory>
Modified: branches/proto/v3/libs/iostreams/src/file_descriptor.cpp
==============================================================================
--- branches/proto/v3/libs/iostreams/src/file_descriptor.cpp	(original)
+++ branches/proto/v3/libs/iostreams/src/file_descriptor.cpp	2007-12-29 19:58:23 EST (Sat, 29 Dec 2007)
@@ -1,4 +1,4 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright Jonathan Turkanis 2003-2007.
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
 
@@ -13,19 +13,19 @@
 #define BOOST_IOSTREAMS_SOURCE
 
 #include <cassert>
-#include <boost/config.hpp> // BOOST_JOIN
+#include <cerrno>
+#include <cstdio>                                 // SEEK_SET, etc.
+#include <boost/config.hpp>                       // BOOST_JOIN
 #include <boost/iostreams/detail/error.hpp>
 #include <boost/iostreams/detail/config/dyn_link.hpp>
+#include <boost/iostreams/detail/config/rtl.hpp>  // BOOST_IOSTREAMS_FD_XXX
 #include <boost/iostreams/detail/config/windows_posix.hpp>
-#include <boost/iostreams/detail/ios.hpp>  // openmodes, failure.
+#include <boost/iostreams/detail/ios.hpp>         // openmodes, failure.
 #include <boost/iostreams/device/file_descriptor.hpp>
 #include <boost/integer_traits.hpp>
 
     // OS-specific headers for low-level i/o.
 
-#include <cassert>
-#include <cstdio>        // SEEK_SET, etc.
-#include <errno.h>
 #include <fcntl.h>       // file opening flags.
 #include <sys/stat.h>    // file access permissions.
 #ifdef BOOST_IOSTREAMS_WINDOWS
@@ -40,17 +40,6 @@
 # include <unistd.h>     // low-level file i/o.
 #endif
 
-// Names of runtime library routines vary.
-#if defined(__BORLANDC__)
-# define BOOST_RTL(x) BOOST_JOIN(_rtl_, x)
-#else
-# if defined(BOOST_IOSTREAMS_WINDOWS) && !defined(__CYGWIN__)
-#  define BOOST_RTL(x) BOOST_JOIN(_, x)
-# else
-#  define BOOST_RTL(x) ::x
-# endif
-#endif
-
 namespace boost { namespace iostreams {
 
 //------------------Implementation of file_descriptor-------------------------//
@@ -126,6 +115,9 @@
     }
     if (m & BOOST_IOS::trunc)
         oflag |= O_CREAT;
+    #ifdef _LARGEFILE64_SOURCE
+        oflag |= O_LARGEFILE;
+    #endif
 
         // Calculate pmode argument to open.
 
@@ -135,7 +127,7 @@
 
         // Open file.
 
-    int fd = BOOST_RTL(open)(path.c_str(), oflag, pmode);
+    int fd = BOOST_IOSTREAMS_FD_OPEN(path.c_str(), oflag, pmode);
     if (fd == -1) {
         throw BOOST_IOSTREAMS_FAILURE("bad open");
     } else {
@@ -156,7 +148,7 @@
     }
 #endif
     errno = 0;
-    std::streamsize result = BOOST_RTL(read)(pimpl_->fd_, s, n);
+    std::streamsize result = BOOST_IOSTREAMS_FD_READ(pimpl_->fd_, s, n);
     if (errno != 0)
         throw detail::bad_read();
     return result == 0 ? -1 : result;
@@ -181,7 +173,7 @@
         return n;
     }
 #endif
-    int amt = BOOST_RTL(write)(pimpl_->fd_, s, n);
+    int amt = BOOST_IOSTREAMS_FD_WRITE(pimpl_->fd_, s, n);
     if (amt < n)
         throw detail::bad_write(); // Handles blocking fd's only.
     return n;
@@ -215,32 +207,21 @@
         }
     }
 #endif // #ifdef BOOST_IOSTREAMS_WINDOWS
-
-#ifndef BOOST_IOSTREAMS_HAS_LSEEK64
-    if ( off > integer_traits<long>::const_max ||
-         off < integer_traits<long>::const_min )
+    if ( off > integer_traits<BOOST_IOSTREAMS_FD_OFFSET>::const_max ||
+         off < integer_traits<BOOST_IOSTREAMS_FD_OFFSET>::const_min )
     {
         throw BOOST_IOSTREAMS_FAILURE("bad offset");
     }
-#endif
-
     stream_offset result =
-        #ifdef BOOST_IOSTREAMS_HAS_LSEEK64
-            lseek64
-        #else
-            lseek
-        #endif
-            ( pimpl_->fd_,
-              #ifdef BOOST_IOSTREAMS_HAS_LSEEK64
-                  off,
-              #else
-                  static_cast<long>(off),
-              #endif
-              way == BOOST_IOS::beg ?
+        BOOST_IOSTREAMS_FD_SEEK(
+            pimpl_->fd_,
+            static_cast<BOOST_IOSTREAMS_FD_OFFSET>(off),
+            ( way == BOOST_IOS::beg ?
                   SEEK_SET :
-                      way == BOOST_IOS::cur ?
-                          SEEK_CUR :
-                          SEEK_END );
+                  way == BOOST_IOS::cur ?
+                      SEEK_CUR :
+                      SEEK_END ) 
+        );
     if (result == -1)
         throw detail::bad_seek();
     return offset_to_position(result);
@@ -260,7 +241,7 @@
     }
 #endif
     if (i.fd_ != -1) {
-        if (BOOST_RTL(close)(i.fd_) == -1)
+        if (BOOST_IOSTREAMS_FD_CLOSE(i.fd_) == -1)
             throw BOOST_IOSTREAMS_FAILURE("bad close");
         i.fd_ = -1;
         i.flags_ = 0;
Modified: branches/proto/v3/libs/iostreams/test/Jamfile.v2
==============================================================================
--- branches/proto/v3/libs/iostreams/test/Jamfile.v2	(original)
+++ branches/proto/v3/libs/iostreams/test/Jamfile.v2	2007-12-29 19:58:23 EST (Sat, 29 Dec 2007)
@@ -11,7 +11,8 @@
 
 local NO_BZIP2 = [ modules.peek : NO_BZIP2 ] ;
 local NO_ZLIB = [ modules.peek : NO_ZLIB ] ;
-
+local LARGE_FILE_TEMP = [ modules.peek : LARGE_FILE_TEMP ] ;
+local LARGE_FILE_KEEP = [ modules.peek : LARGE_FILE_KEEP ] ;
 
 rule test-iostreams ( sources * : requirements * ) {
     return [
@@ -30,7 +31,6 @@
         ] ;
 }
 
-
     local all-tests = 
           [ test-iostreams array_test.cpp ]
           [ test-iostreams auto_close_test.cpp ]
@@ -39,9 +39,6 @@
           [ test-iostreams 
                 code_converter_test.cpp    
                 detail/utf8_codecvt_facet.cpp ]
-                         
-              #: # build requirements 
-              #  std::locale-support ]   
           [ test-iostreams compose_test.cpp ]
           [ test-iostreams component_access_test.cpp ]
           [ test-iostreams copy_test.cpp ]
@@ -54,13 +51,7 @@
                 file_descriptor_test.cpp 
                 ../build//boost_iostreams : <link>static ]
           [ test-iostreams filtering_stream_test.cpp ]
-          [ test-iostreams 
-                finite_state_filter_test.cpp 
-              : # build requirements 
-                # FIXME: yet to implement
-                #std::locale-support 
-          ]
-
+          [ test-iostreams finite_state_filter_test.cpp ]
           [ test-iostreams flush_test.cpp ]
           [ test-iostreams invert_test.cpp ]
           [ test-iostreams line_filter_test.cpp ]
@@ -87,18 +78,37 @@
           [ test-iostreams wide_stream_test.cpp ]
           ;  
 
+      if $(LARGE_FILE_KEEP) 
+      {
+          all-tests += 
+              [ test-iostreams 
+                    large_file_test.cpp 
+                    ../build//boost_iostreams 
+                  : <define>LARGE_FILE_KEEP=$(LARGE_FILE_KEEP)
+                    $(KEEP) ] ;
+      }
+      if $(LARGE_FILE_TEMP)
+      {
+          all-tests += 
+              [ test-iostreams 
+                    large_file_test.cpp 
+                    ../build//boost_iostreams 
+                  : <define>LARGE_FILE_TEMP=$(LARGE_FILE_TEMP)
+                    $(KEEP) ] ;
+      }
       if ! $(NO_BZIP2)
       {     
           all-tests += [ test-iostreams 
-              bzip2_test.cpp ../build//boost_iostreams ] ;
-      }         
+                    bzip2_test.cpp ../build//boost_iostreams ] ;
+      }
       if ! $(NO_ZLIB)
       {              
-          all-tests += [ test-iostreams 
-                         gzip_test.cpp ../build//boost_iostreams ]
-                       [ test-iostreams 
-                         zlib_test.cpp ../build//boost_iostreams ] ;
-      }          
+          all-tests += 
+              [ test-iostreams 
+                    gzip_test.cpp ../build//boost_iostreams ]
+              [ test-iostreams 
+                    zlib_test.cpp ../build//boost_iostreams ] ;
+      }
           
     test-suite "iostreams" : $(all-tests) ;