Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r73470 - in sandbox/mmap/boost/mmap: . mappble_objects/posix_file mappble_objects/win32_file
From: dsaritz_at_[hidden]
Date: 2011-08-01 06:18:58


Author: psiha
Date: 2011-08-01 06:18:57 EDT (Mon, 01 Aug 2011)
New Revision: 73470
URL: http://svn.boost.org/trac/boost/changeset/73470

Log:
Fixed various compilation errors.
Text files modified:
   sandbox/mmap/boost/mmap/mappble_objects/posix_file/handle.hpp | 20 ++++++++------------
   sandbox/mmap/boost/mmap/mappble_objects/win32_file/handle.hpp | 17 ++++++-----------
   sandbox/mmap/boost/mmap/mappble_objects/win32_file/handle.inl | 6 +++---
   sandbox/mmap/boost/mmap/mapped_view.hpp | 1 +
   4 files changed, 18 insertions(+), 26 deletions(-)

Modified: sandbox/mmap/boost/mmap/mappble_objects/posix_file/handle.hpp
==============================================================================
--- sandbox/mmap/boost/mmap/mappble_objects/posix_file/handle.hpp (original)
+++ sandbox/mmap/boost/mmap/mappble_objects/posix_file/handle.hpp 2011-08-01 06:18:57 EDT (Mon, 01 Aug 2011)
@@ -17,12 +17,16 @@
 #define handle_hpp__63113526_C3F1_46DC_850E_D8D8C62031DB
 #pragma once
 //------------------------------------------------------------------------------
+#include "boost/config.hpp"
+
 #ifdef BOOST_MSVC
     #include "../win32_file/handle.hpp"
 #endif
 
 #include "boost/assert.hpp"
 #include "boost/noncopyable.hpp"
+
+#include <cstddef>
 //------------------------------------------------------------------------------
 namespace boost
 {
@@ -63,22 +67,14 @@
     handle_t const handle_;
 };
 
-
-#ifdef _WIN32
- typedef windows_handle native_handle;
-#else
- typedef posix_handle native_handle;
-#endif // _WIN32
-typedef native_handle::handle_t native_handle_t;
-
 //------------------------------------------------------------------------------
 } // namespace guard
 
-guard::native_handle create_file( char const * file_name, guard::native_handle::flags const & );
-guard::native_handle create_file( char const * file_name, guard::native_handle::flags const &, unsigned int desired_size );
+guard::posix_handle create_file( char const * file_name, guard::posix_handle::flags const & );
+guard::posix_handle create_file( char const * file_name, guard::posix_handle::flags const &, unsigned int desired_size );
 
-bool set_file_size( guard::native_handle_t, std::size_t desired_size );
-std::size_t get_file_size( guard::native_handle_t );
+bool set_file_size( guard::posix_handle::handle_t, std::size_t desired_size );
+std::size_t get_file_size( guard::posix_handle::handle_t );
 
 //------------------------------------------------------------------------------
 } // namespace mmap

Modified: sandbox/mmap/boost/mmap/mappble_objects/win32_file/handle.hpp
==============================================================================
--- sandbox/mmap/boost/mmap/mappble_objects/win32_file/handle.hpp (original)
+++ sandbox/mmap/boost/mmap/mappble_objects/win32_file/handle.hpp 2011-08-01 06:18:57 EDT (Mon, 01 Aug 2011)
@@ -19,6 +19,8 @@
 //------------------------------------------------------------------------------
 #include "boost/assert.hpp"
 #include "boost/noncopyable.hpp"
+
+#include <cstddef>
 //------------------------------------------------------------------------------
 namespace boost
 {
@@ -49,21 +51,14 @@
     handle_t const handle_;
 };
 
-#ifdef _WIN32
- typedef windows_handle native_handle;
-#else
- typedef posix_handle native_handle;
-#endif // _WIN32
-typedef native_handle::handle_t native_handle_t;
-
 //------------------------------------------------------------------------------
 } // namespace guard
 
-guard::native_handle create_file( char const * file_name, guard::native_handle::flags const & );
-guard::native_handle create_file( char const * file_name, guard::native_handle::flags const &, unsigned int desired_size );
+guard::windows_handle create_file( char const * file_name, guard::windows_handle::flags const & );
+guard::windows_handle create_file( char const * file_name, guard::windows_handle::flags const &, unsigned int desired_size );
 
-bool set_file_size( guard::native_handle_t, std::size_t desired_size );
-std::size_t get_file_size( guard::native_handle_t );
+bool set_file_size( guard::windows_handle::handle_t, std::size_t desired_size );
+std::size_t get_file_size( guard::windows_handle::handle_t );
 
 //------------------------------------------------------------------------------
 } // namespace mmap

Modified: sandbox/mmap/boost/mmap/mappble_objects/win32_file/handle.inl
==============================================================================
--- sandbox/mmap/boost/mmap/mappble_objects/win32_file/handle.inl (original)
+++ sandbox/mmap/boost/mmap/mappble_objects/win32_file/handle.inl 2011-08-01 06:18:57 EDT (Mon, 01 Aug 2011)
@@ -55,7 +55,7 @@
 
 
 BOOST_IMPL_INLINE
-guard::native_handle create_file( char const * const file_name, guard::native_handle::flags const & flags )
+guard::windows_handle create_file( char const * const file_name, guard::windows_handle::flags const & flags )
 {
     BOOST_ASSERT( file_name );
 
@@ -73,7 +73,7 @@
 
 
 BOOST_IMPL_INLINE
-bool set_file_size( guard::native_handle_t const file_handle, std::size_t const desired_size )
+bool set_file_size( guard::windows_handle::handle_t const file_handle, std::size_t const desired_size )
 {
     // It is 'OK' to send null/invalid handles to Windows functions (they will
     // simply fail), this simplifies error handling (it is enough to go through
@@ -91,7 +91,7 @@
 
 
 BOOST_IMPL_INLINE
-std::size_t get_file_size( guard::native_handle_t const file_handle )
+std::size_t get_file_size( guard::windows_handle::handle_t const file_handle )
 {
     DWORD const file_size( ::GetFileSize( file_handle, 0 ) );
     BOOST_ASSERT( ( file_size != INVALID_FILE_SIZE ) || ( file_handle == INVALID_HANDLE_VALUE ) || ( ::GetLastError() == NO_ERROR ) );

Modified: sandbox/mmap/boost/mmap/mapped_view.hpp
==============================================================================
--- sandbox/mmap/boost/mmap/mapped_view.hpp (original)
+++ sandbox/mmap/boost/mmap/mapped_view.hpp 2011-08-01 06:18:57 EDT (Mon, 01 Aug 2011)
@@ -18,6 +18,7 @@
 #pragma once
 //------------------------------------------------------------------------------
 //...zzz...
+#include "mappble_objects/file/handle.hpp"
 #include "mappble_objects/posix_file/handle.hpp"
 #ifdef _WIN32
 #include "mappble_objects/win32_file/handle.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