Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r63406 - in trunk: boost/filesystem/v3 libs/filesystem/v3/test
From: bdawes_at_[hidden]
Date: 2010-06-28 10:40:42


Author: bemandawes
Date: 2010-06-28 10:40:40 EDT (Mon, 28 Jun 2010)
New Revision: 63406
URL: http://svn.boost.org/trac/boost/changeset/63406

Log:
Fix old Dinkumware without file stream wchar_t overloads
Text files modified:
   trunk/boost/filesystem/v3/fstream.hpp | 7 ++++---
   trunk/libs/filesystem/v3/test/operations_test.cpp | 7 ++++---
   2 files changed, 8 insertions(+), 6 deletions(-)

Modified: trunk/boost/filesystem/v3/fstream.hpp
==============================================================================
--- trunk/boost/filesystem/v3/fstream.hpp (original)
+++ trunk/boost/filesystem/v3/fstream.hpp 2010-06-28 10:40:40 EDT (Mon, 28 Jun 2010)
@@ -20,9 +20,10 @@
 
 #include <boost/config/abi_prefix.hpp> // must be the last #include
 
-// glibc++ doesn't have wchar_t overloads for file stream paths, so on Windows use
-// path::string() to get a narrow character c_str()
-#if defined(BOOST_WINDOWS_API) && defined(__GLIBCXX__)
+// glibc++ and older Dinkumware don't have wchar_t overloads for file stream paths,
+// so on Windows use path::string() to get a narrow character c_str()
+#if defined(BOOST_WINDOWS_API) \
+ && (defined(__GLIBCXX__) || (defined(_CPPLIB_VER) && _CPPLIB_VER < 405))
 # define BOOST_FILESYSTEM_C_STR string().c_str()
 #else
 # define BOOST_FILESYSTEM_C_STR c_str()

Modified: trunk/libs/filesystem/v3/test/operations_test.cpp
==============================================================================
--- trunk/libs/filesystem/v3/test/operations_test.cpp (original)
+++ trunk/libs/filesystem/v3/test/operations_test.cpp 2010-06-28 10:40:40 EDT (Mon, 28 Jun 2010)
@@ -41,9 +41,10 @@
 # include <windows.h>
 #endif
 
-// glibc++ doesn't have wchar_t overloads for file stream paths, so on Windows use
-// path::string() to get a narrow character c_str()
-#if defined(BOOST_WINDOWS_API) && defined(__GLIBCXX__)
+// glibc++ and older Dinkumware don't have wchar_t overloads for file stream paths,
+// so on Windows use path::string() to get a narrow character c_str()
+#if defined(BOOST_WINDOWS_API) \
+ && (defined(__GLIBCXX__) || (defined(_CPPLIB_VER) && _CPPLIB_VER < 405))
 # define BOOST_FILESYSTEM_C_STR string().c_str()
 #else
 # define BOOST_FILESYSTEM_C_STR c_str()


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