Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r69220 - in trunk: boost/filesystem/v3 libs/filesystem/v3/test
From: bdawes_at_[hidden]
Date: 2011-02-23 15:16:44


Author: bemandawes
Date: 2011-02-23 15:16:41 EST (Wed, 23 Feb 2011)
New Revision: 69220
URL: http://svn.boost.org/trac/boost/changeset/69220

Log:
Fix for STLPort (#5217)
Text files modified:
   trunk/boost/filesystem/v3/fstream.hpp | 3 ++-
   trunk/libs/filesystem/v3/test/fstream_test.cpp | 3 +++
   2 files changed, 5 insertions(+), 1 deletions(-)

Modified: trunk/boost/filesystem/v3/fstream.hpp
==============================================================================
--- trunk/boost/filesystem/v3/fstream.hpp (original)
+++ trunk/boost/filesystem/v3/fstream.hpp 2011-02-23 15:16:41 EST (Wed, 23 Feb 2011)
@@ -27,7 +27,8 @@
 // on Windows, except for standard libaries known to have wchar_t overloads for
 // file stream I/O, use path::string() to get a narrow character c_str()
 #if defined(BOOST_WINDOWS_API) \
- && !(defined(_CPPLIB_VER) && _CPPLIB_VER >= 405) // not (Dinkumware with overloads)
+ && (!defined(_CPPLIB_VER) || _CPPLIB_VER < 405 || defined(_STLPORT_VERSION))
+ // !Dinkumware || early Dinkumware || STLPort masquerading as Dinkumware
 # define BOOST_FILESYSTEM_C_STR string().c_str() // use narrow, since wide not available
 #else // use the native c_str, which will be narrow on POSIX, wide on Windows
 # define BOOST_FILESYSTEM_C_STR c_str()

Modified: trunk/libs/filesystem/v3/test/fstream_test.cpp
==============================================================================
--- trunk/libs/filesystem/v3/test/fstream_test.cpp (original)
+++ trunk/libs/filesystem/v3/test/fstream_test.cpp 2011-02-23 15:16:41 EST (Wed, 23 Feb 2011)
@@ -149,6 +149,9 @@
 {
   if (argc > 1) cleanup = false;
 
+ std::cout << "BOOST_FILESYSTEM_C_STR defined as \""
+ << BOOST_STRINGIZE(BOOST_FILESYSTEM_C_STR) << "\"\n";
+
   // test narrow characters
   std::cout << "narrow character tests:\n";
   test("fstream_test_foo");


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