Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r78553 - trunk/boost/wave/util
From: hartmut.kaiser_at_[hidden]
Date: 2012-05-23 10:35:30


Author: hkaiser
Date: 2012-05-23 10:35:30 EDT (Wed, 23 May 2012)
New Revision: 78553
URL: http://svn.boost.org/trac/boost/changeset/78553

Log:
Wave: Fixed #6870: build wave driver failed
Text files modified:
   trunk/boost/wave/util/filesystem_compatibility.hpp | 69 ++++++++++++++++++++++++---------------
   1 files changed, 42 insertions(+), 27 deletions(-)

Modified: trunk/boost/wave/util/filesystem_compatibility.hpp
==============================================================================
--- trunk/boost/wave/util/filesystem_compatibility.hpp (original)
+++ trunk/boost/wave/util/filesystem_compatibility.hpp 2012-05-23 10:35:30 EDT (Wed, 23 May 2012)
@@ -3,7 +3,7 @@
 
     http://www.boost.org/
 
- Copyright (c) 2001-2011 Hartmut Kaiser. Distributed under the Boost
+ Copyright (c) 2001-2012 Hartmut Kaiser. 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)
 =============================================================================*/
@@ -25,12 +25,12 @@
 // interface wrappers for older Boost versions
     inline boost::filesystem::path initial_path()
     {
- return boost::filesystem::initial_path();
+ return boost::filesystem::initial_path();
     }
 
     inline boost::filesystem::path current_path()
     {
- return boost::filesystem::current_path();
+ return boost::filesystem::current_path();
     }
 
     template <typename String>
@@ -43,18 +43,18 @@
 #endif
     }
 
- inline std::string leaf(boost::filesystem::path const& p)
- {
+ inline std::string leaf(boost::filesystem::path const& p)
+ {
 #if BOOST_FILESYSTEM_VERSION >= 3
- return p.leaf().string();
+ return p.leaf().string();
 #else
- return p.leaf();
+ return p.leaf();
 #endif
     }
 
- inline boost::filesystem::path branch_path(boost::filesystem::path const& p)
- {
- return p.branch_path();
+ inline boost::filesystem::path branch_path(boost::filesystem::path const& p)
+ {
+ return p.branch_path();
     }
 
     inline boost::filesystem::path normalize(boost::filesystem::path& p)
@@ -62,12 +62,12 @@
         return p.normalize();
     }
 
- inline std::string native_file_string(boost::filesystem::path const& p)
- {
+ inline std::string native_file_string(boost::filesystem::path const& p)
+ {
 #if BOOST_FILESYSTEM_VERSION >= 3
- return p.string();
+ return p.string();
 #else
- return p.native_file_string();
+ return p.native_file_string();
 #endif
     }
 
@@ -75,7 +75,11 @@
         boost::filesystem::path const& p)
     {
 #if BOOST_FILESYSTEM_VERSION >= 3
+#if BOOST_VERSION >= 105000
+ return boost::filesystem::complete(p, initial_path());
+#else
         return boost::filesystem3::complete(p, initial_path());
+#endif
 #else
         return boost::filesystem::complete(p, initial_path());
 #endif
@@ -85,7 +89,11 @@
         boost::filesystem::path const& p, boost::filesystem::path const& base)
     {
 #if BOOST_FILESYSTEM_VERSION >= 3
+#if BOOST_VERSION >= 105000
+ return boost::filesystem::complete(p, base);
+#else
         return boost::filesystem3::complete(p, base);
+#endif
 #else
         return boost::filesystem::complete(p, base);
 #endif
@@ -95,18 +103,26 @@
 
 // interface wrappers if deprecated functions do not exist
     inline boost::filesystem::path initial_path()
- {
+ {
 #if BOOST_FILESYSTEM_VERSION >= 3
+#if BOOST_VERSION >= 105000
+ return boost::filesystem::detail::initial_path();
+#else
         return boost::filesystem3::detail::initial_path();
+#endif
 #else
         return boost::filesystem::initial_path<boost::filesystem::path>();
 #endif
     }
 
     inline boost::filesystem::path current_path()
- {
+ {
 #if BOOST_FILESYSTEM_VERSION >= 3
+#if BOOST_VERSION >= 105000
+ return boost::filesystem::current_path();
+#else
         return boost::filesystem3::current_path();
+#endif
 #else
         return boost::filesystem::current_path<boost::filesystem::path>();
 #endif
@@ -118,18 +134,18 @@
         return boost::filesystem::path(p);
     }
 
- inline std::string leaf(boost::filesystem::path const& p)
- {
+ inline std::string leaf(boost::filesystem::path const& p)
+ {
 #if BOOST_VERSION >= 104600 && BOOST_FILESYSTEM_VERSION >= 3
         return p.filename().string();
 #else
- return p.filename();
+ return p.filename();
 #endif
     }
 
- inline boost::filesystem::path branch_path(boost::filesystem::path const& p)
- {
- return p.parent_path();
+ inline boost::filesystem::path branch_path(boost::filesystem::path const& p)
+ {
+ return p.parent_path();
     }
 
     inline boost::filesystem::path normalize(boost::filesystem::path& p)
@@ -137,12 +153,12 @@
         return p; // function doesn't exist anymore
     }
 
- inline std::string native_file_string(boost::filesystem::path const& p)
- {
+ inline std::string native_file_string(boost::filesystem::path const& p)
+ {
 #if BOOST_VERSION >= 104600
- return p.string();
+ return p.string();
 #else
- return p.file_string();
+ return p.file_string();
 #endif
     }
 
@@ -166,7 +182,6 @@
 #endif
     }
 #endif
-
 }}}
 
 #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