Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r74003 - in sandbox/mmap/boost/mmap: detail handles handles/posix handles/win32 mappble_objects/file
From: dsaritz_at_[hidden]
Date: 2011-08-22 08:01:49


Author: psiha
Date: 2011-08-22 08:01:48 EDT (Mon, 22 Aug 2011)
New Revision: 74003
URL: http://svn.boost.org/trac/boost/changeset/74003

Log:
Fixed wrong include directives.
Added the helper detail/impl_selection.hpp header.
Added:
   sandbox/mmap/boost/mmap/detail/impl_selection.hpp (contents, props changed)
   sandbox/mmap/boost/mmap/handles/handle.hpp
      - copied, changed from r74001, /sandbox/mmap/boost/mmap/mappble_objects/file/file.hpp
   sandbox/mmap/boost/mmap/handles/handle.inl
      - copied, changed from r74001, /sandbox/mmap/boost/mmap/mappble_objects/file/file.inl
Text files modified:
   sandbox/mmap/boost/mmap/handles/handle.hpp | 22 +++++++++-------------
   sandbox/mmap/boost/mmap/handles/handle.inl | 8 +++-----
   sandbox/mmap/boost/mmap/handles/posix/handle.inl | 2 +-
   sandbox/mmap/boost/mmap/handles/win32/handle.inl | 8 ++++++++
   sandbox/mmap/boost/mmap/mappble_objects/file/file.inl | 8 ++++----
   sandbox/mmap/boost/mmap/mappble_objects/file/flags.inl | 4 ++--
   6 files changed, 27 insertions(+), 25 deletions(-)

Added: sandbox/mmap/boost/mmap/detail/impl_selection.hpp
==============================================================================
--- (empty file)
+++ sandbox/mmap/boost/mmap/detail/impl_selection.hpp 2011-08-22 08:01:48 EDT (Mon, 22 Aug 2011)
@@ -0,0 +1,38 @@
+////////////////////////////////////////////////////////////////////////////////
+///
+/// \file impl_selection.hpp
+/// ------------------------
+///
+/// Copyright (c) Domagoj Saric 2011.
+///
+/// Use, modification and distribution is subject to 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)
+///
+/// For more information, see http://www.boost.org
+///
+////////////////////////////////////////////////////////////////////////////////
+//------------------------------------------------------------------------------
+#pragma once
+#ifndef impl_selection_hpp__05AF14B5_B23B_4CB8_A253_FD2D07B37ECF
+#define impl_selection_hpp__05AF14B5_B23B_4CB8_A253_FD2D07B37ECF
+//------------------------------------------------------------------------------
+#include "boost/preprocessor/cat.hpp"
+#include "boost/preprocessor/stringize.hpp"
+//------------------------------------------------------------------------------
+#if defined( _WIN32 )
+ #define BOOST_MMAP_IMPL /win32/
+#elif defined( _WIN32_WINNT )
+ #define BOOST_MMAP_IMPL /nt/
+#elif defined( BOOST_HAS_UNISTD_H )
+ #define BOOST_MMAP_IMPL /posix/
+#endif
+
+#define BOOST_MMAP_IMPL_INCLUDE( prefix_path, include ) \
+ BOOST_PP_STRINGIZE \
+ ( \
+ BOOST_PP_CAT( BOOST_PP_CAT( prefix_path, BOOST_MMAP_IMPL ), include ) \
+ )
+
+//------------------------------------------------------------------------------
+#endif // impl_selection_hpp

Copied: sandbox/mmap/boost/mmap/handles/handle.hpp (from r74001, /sandbox/mmap/boost/mmap/mappble_objects/file/file.hpp)
==============================================================================
--- /sandbox/mmap/boost/mmap/mappble_objects/file/file.hpp (original)
+++ sandbox/mmap/boost/mmap/handles/handle.hpp 2011-08-22 08:01:48 EDT (Mon, 22 Aug 2011)
@@ -1,9 +1,9 @@
 ////////////////////////////////////////////////////////////////////////////////
 ///
-/// \file file.hpp
-/// --------------
+/// \file handle.hpp
+/// ----------------
 ///
-/// Copyright (c) Domagoj Saric 2010.-2011.
+/// Copyright (c) Domagoj Saric 2011.
 ///
 /// Use, modification and distribution is subject to the Boost Software License, Version 1.0.
 /// (See accompanying file LICENSE_1_0.txt or copy at
@@ -13,17 +13,13 @@
 ///
 ////////////////////////////////////////////////////////////////////////////////
 //------------------------------------------------------------------------------
-#ifndef file_hpp__D3705ED0_EC0D_4747_A789_1EE17252B6E2
-#define file_hpp__D3705ED0_EC0D_4747_A789_1EE17252B6E2
+#ifndef handle_hpp__67A36E06_53FF_4361_9786_9E04A3917CD3
+#define handle_hpp__67A36E06_53FF_4361_9786_9E04A3917CD3
 #pragma once
 //------------------------------------------------------------------------------
-#ifdef _WIN32
- #include "win32/file.hpp"
- #include "win32/flags.hpp"
-#else
- #include "posix/file.hpp"
- #include "posix/flags.hpp"
-#endif
+#include "../detail/impl_selection.hpp"
+
+#include BOOST_MMAP_IMPL_INCLUDE( ., handle.hpp )
 //------------------------------------------------------------------------------
 namespace boost
 {
@@ -46,4 +42,4 @@
 //------------------------------------------------------------------------------
 } // namespace boost
 //------------------------------------------------------------------------------
-#endif // file_hpp
+#endif // handle_hpp

Copied: sandbox/mmap/boost/mmap/handles/handle.inl (from r74001, /sandbox/mmap/boost/mmap/mappble_objects/file/file.inl)
==============================================================================
--- /sandbox/mmap/boost/mmap/mappble_objects/file/file.inl (original)
+++ sandbox/mmap/boost/mmap/handles/handle.inl 2011-08-22 08:01:48 EDT (Mon, 22 Aug 2011)
@@ -13,9 +13,7 @@
 ///
 ////////////////////////////////////////////////////////////////////////////////
 //------------------------------------------------------------------------------
-#ifdef _WIN32
- #include "../win32_file/handle.inl"
-#else
- #include "../posix_file/handle.inl"
-#endif
+#include "../detail/impl_selection.hpp"
+
+#include BOOST_MMAP_IMPL_INCLUDE( ., handle.inl )
 //------------------------------------------------------------------------------

Modified: sandbox/mmap/boost/mmap/handles/posix/handle.inl
==============================================================================
--- sandbox/mmap/boost/mmap/handles/posix/handle.inl (original)
+++ sandbox/mmap/boost/mmap/handles/posix/handle.inl 2011-08-22 08:01:48 EDT (Mon, 22 Aug 2011)
@@ -15,7 +15,7 @@
 //------------------------------------------------------------------------------
 #include "handle.hpp"
 
-#include "../../../detail/impl_inline.hpp"
+#include "../../detail/impl_inline.hpp"
 
 #include "boost/assert.hpp"
 

Modified: sandbox/mmap/boost/mmap/handles/win32/handle.inl
==============================================================================
--- sandbox/mmap/boost/mmap/handles/win32/handle.inl (original)
+++ sandbox/mmap/boost/mmap/handles/win32/handle.inl 2011-08-22 08:01:48 EDT (Mon, 22 Aug 2011)
@@ -23,6 +23,10 @@
     #define WIN32_LEAN_AND_MEAN
 #endif // WIN32_LEAN_AND_MEAN
 #include "windows.h"
+
+#ifdef BOOST_MSVC
+ #include "io.h"
+#endif // BOOST_MSVC
 //------------------------------------------------------------------------------
 namespace boost
 {
@@ -61,3 +65,7 @@
 //------------------------------------------------------------------------------
 } // boost
 //------------------------------------------------------------------------------
+
+#ifndef BOOST_MMAP_HEADER_ONLY
+ #include "../posix/handle.inl"
+#endif // BOOST_MMAP_HEADER_ONLY

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-22 08:01:48 EDT (Mon, 22 Aug 2011)
@@ -1,7 +1,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 ///
-/// \file handle.inl
-/// ----------------
+/// \file file.inl
+/// --------------
 ///
 /// Copyright (c) Domagoj Saric 2010.-2011.
 ///
@@ -14,8 +14,8 @@
 ////////////////////////////////////////////////////////////////////////////////
 //------------------------------------------------------------------------------
 #ifdef _WIN32
- #include "../win32_file/handle.inl"
+ #include "win32/file.inl"
 #else
- #include "../posix_file/handle.inl"
+ #include "posix/file.inl"
 #endif
 //------------------------------------------------------------------------------

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-22 08:01:48 EDT (Mon, 22 Aug 2011)
@@ -14,8 +14,8 @@
 ////////////////////////////////////////////////////////////////////////////////
 //------------------------------------------------------------------------------
 #ifdef _WIN32
- #include "../win32_file/flags.inl"
+ #include "win32/flags.inl"
 #else
- #include "../posix_file/flags.inl"
+ #include "posix/flags.inl"
 #endif
 //------------------------------------------------------------------------------


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