Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r74118 - in sandbox/mmap/boost/mmap/mappble_objects/file: . posix win32
From: dsaritz_at_[hidden]
Date: 2011-08-29 05:36:01


Author: psiha
Date: 2011-08-29 05:36:00 EDT (Mon, 29 Aug 2011)
New Revision: 74118
URL: http://svn.boost.org/trac/boost/changeset/74118

Log:
Added missing include directives.
Fixed compiler errors.
Minor other cleanups.
Text files modified:
   sandbox/mmap/boost/mmap/mappble_objects/file/file.hpp | 5 +++++
   sandbox/mmap/boost/mmap/mappble_objects/file/file.inl | 8 +++-----
   sandbox/mmap/boost/mmap/mappble_objects/file/flags.hpp | 5 +++++
   sandbox/mmap/boost/mmap/mappble_objects/file/flags.inl | 5 ++++-
   sandbox/mmap/boost/mmap/mappble_objects/file/handle.hpp | 2 +-
   sandbox/mmap/boost/mmap/mappble_objects/file/posix/file.inl | 16 +++++-----------
   sandbox/mmap/boost/mmap/mappble_objects/file/posix/open_flags.hpp | 8 +++++---
   sandbox/mmap/boost/mmap/mappble_objects/file/win32/file.inl | 2 +-
   8 files changed, 29 insertions(+), 22 deletions(-)

Modified: sandbox/mmap/boost/mmap/mappble_objects/file/file.hpp
==============================================================================
--- sandbox/mmap/boost/mmap/mappble_objects/file/file.hpp (original)
+++ sandbox/mmap/boost/mmap/mappble_objects/file/file.hpp 2011-08-29 05:36:00 EDT (Mon, 29 Aug 2011)
@@ -39,4 +39,9 @@
 //------------------------------------------------------------------------------
 } // namespace boost
 //------------------------------------------------------------------------------
+
+#ifdef BOOST_MMAP_HEADER_ONLY
+ #include "file.inl"
+#endif // BOOST_MMAP_HEADER_ONLY
+
 #endif // file_hpp

Modified: sandbox/mmap/boost/mmap/mappble_objects/file/file.inl
==============================================================================
--- sandbox/mmap/boost/mmap/mappble_objects/file/file.inl (original)
+++ sandbox/mmap/boost/mmap/mappble_objects/file/file.inl 2011-08-29 05:36:00 EDT (Mon, 29 Aug 2011)
@@ -13,9 +13,7 @@
 ///
 ////////////////////////////////////////////////////////////////////////////////
 //------------------------------------------------------------------------------
-#ifdef _WIN32
- #include "win32/file.inl"
-#else
- #include "posix/file.inl"
-#endif
+#include "../../detail/impl_selection.hpp"
+
+#include BOOST_MMAP_IMPL_INCLUDE( BOOST_PP_EMPTY, BOOST_PP_IDENTITY( /file.inl ) )
 //------------------------------------------------------------------------------

Modified: sandbox/mmap/boost/mmap/mappble_objects/file/flags.hpp
==============================================================================
--- sandbox/mmap/boost/mmap/mappble_objects/file/flags.hpp (original)
+++ sandbox/mmap/boost/mmap/mappble_objects/file/flags.hpp 2011-08-29 05:36:00 EDT (Mon, 29 Aug 2011)
@@ -22,4 +22,9 @@
 #include BOOST_MMAP_IMPL_INCLUDE( BOOST_PP_EMPTY, BOOST_PP_IDENTITY( /mapping_flags.hpp ) )
 #include BOOST_MMAP_IMPL_INCLUDE( BOOST_PP_EMPTY, BOOST_PP_IDENTITY( /open_flags.hpp ) )
 //------------------------------------------------------------------------------
+
+#ifdef BOOST_MMAP_HEADER_ONLY
+ #include "flags.inl"
+#endif // BOOST_MMAP_HEADER_ONLY
+
 #endif // flags_hpp

Modified: sandbox/mmap/boost/mmap/mappble_objects/file/flags.inl
==============================================================================
--- sandbox/mmap/boost/mmap/mappble_objects/file/flags.inl (original)
+++ sandbox/mmap/boost/mmap/mappble_objects/file/flags.inl 2011-08-29 05:36:00 EDT (Mon, 29 Aug 2011)
@@ -13,5 +13,8 @@
 ///
 ////////////////////////////////////////////////////////////////////////////////
 //------------------------------------------------------------------------------
-#include BOOST_MMAP_IMPL_INCLUDE( BOOST_PP_EMPTY, BOOST_PP_IDENTITY( /flags.inl ) )
+#include "../../detail/impl_selection.hpp"
+
+#include BOOST_MMAP_IMPL_INCLUDE( BOOST_PP_EMPTY, BOOST_PP_IDENTITY( /mapping_flags.inl ) )
+#include BOOST_MMAP_IMPL_INCLUDE( BOOST_PP_EMPTY, BOOST_PP_IDENTITY( /open_flags.inl ) )
 //------------------------------------------------------------------------------

Modified: sandbox/mmap/boost/mmap/mappble_objects/file/handle.hpp
==============================================================================
--- sandbox/mmap/boost/mmap/mappble_objects/file/handle.hpp (original)
+++ sandbox/mmap/boost/mmap/mappble_objects/file/handle.hpp 2011-08-29 05:36:00 EDT (Mon, 29 Aug 2011)
@@ -35,7 +35,7 @@
 
     typedef handle_ref< file_handle<Impl> > reference;
 
- operator reference () const { return reference( get() ); }
+ operator reference () const { return reference( this->get() ); }
 };
 
 //------------------------------------------------------------------------------

Modified: sandbox/mmap/boost/mmap/mappble_objects/file/posix/file.inl
==============================================================================
--- sandbox/mmap/boost/mmap/mappble_objects/file/posix/file.inl (original)
+++ sandbox/mmap/boost/mmap/mappble_objects/file/posix/file.inl 2011-08-29 05:36:00 EDT (Mon, 29 Aug 2011)
@@ -15,23 +15,17 @@
 //------------------------------------------------------------------------------
 #include "file.hpp"
 
-#include "flags.hpp"
+#include "open_flags.hpp"
 #include "../../../detail/impl_inline.hpp"
+#include "../../../detail/posix.hpp"
+#include "../../../mapping/posix.hpp"
 
 #include "boost/assert.hpp"
 
-#ifdef BOOST_MSVC
- #pragma warning ( disable : 4996 ) // "The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name."
- #include "io.h"
- #include "wchar.h"
-#else
- #include "sys/mman.h" // mmap, munmap.
- #include "sys/stat.h"
- #include "sys/types.h" // struct stat.
- #include "unistd.h" // sysconf.
-#endif // BOOST_MSVC
 #include "errno.h"
 #include "fcntl.h"
+#include "sys/stat.h"
+#include "sys/types.h"
 //------------------------------------------------------------------------------
 namespace boost
 {

Modified: sandbox/mmap/boost/mmap/mappble_objects/file/posix/open_flags.hpp
==============================================================================
--- sandbox/mmap/boost/mmap/mappble_objects/file/posix/open_flags.hpp (original)
+++ sandbox/mmap/boost/mmap/mappble_objects/file/posix/open_flags.hpp 2011-08-29 05:36:00 EDT (Mon, 29 Aug 2011)
@@ -30,6 +30,8 @@
 
 template <typename Impl> struct file_open_flags;
 
+typedef unsigned int flags_t;
+
 // Implementation note:
 // Using structs with public members and factory functions to enable (almost)
 // zero-overhead 'link-time' conversion to native flag formats and to allow the
@@ -49,7 +51,7 @@
             write = O_WRONLY,
             execute = O_RDONLY,
             all = read | write | execute
- }
+ };
     };
 
     struct open_policy
@@ -72,7 +74,7 @@
             sequential_access = BOOST_MMAP_POSIX_STANDARD_LINUX_OSX_MSVC( 0, 0, 0, O_SEQUENTIAL ),
             avoid_caching = BOOST_MMAP_POSIX_STANDARD_LINUX_OSX_MSVC( 0, O_DIRECT, 0, 0 ),
             temporary = BOOST_MMAP_POSIX_STANDARD_LINUX_OSX_MSVC( 0, 0, 0, O_TEMPORARY | _O_SHORT_LIVED ),
- }
+ };
     };
 
     struct on_construction_rights
@@ -82,7 +84,7 @@
             read = BOOST_MMAP_POSIX_STANDARD_LINUX_OSX_MSVC( S_IRUSR, S_IRUSR, S_IRUSR, _S_IREAD ),
             write = BOOST_MMAP_POSIX_STANDARD_LINUX_OSX_MSVC( S_IWUSR, S_IWUSR, S_IWUSR, _S_IWRITE ),
             execute = BOOST_MMAP_POSIX_STANDARD_LINUX_OSX_MSVC( S_IXUSR, S_IXUSR, S_IXUSR, _S_IEXEC )
- }
+ };
     };
 
     static file_open_flags<posix> create

Modified: sandbox/mmap/boost/mmap/mappble_objects/file/win32/file.inl
==============================================================================
--- sandbox/mmap/boost/mmap/mappble_objects/file/win32/file.inl (original)
+++ sandbox/mmap/boost/mmap/mappble_objects/file/win32/file.inl 2011-08-29 05:36:00 EDT (Mon, 29 Aug 2011)
@@ -15,7 +15,7 @@
 //------------------------------------------------------------------------------
 #include "file.hpp"
 
-#include "flags.hpp"
+#include "open_flags.hpp"
 #include "../../detail/impl_inline.hpp"
 #include "../../detail/windows.hpp"
 


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