Boost logo

Boost-Commit :

From: technews_at_[hidden]
Date: 2008-01-02 15:57:22


Author: turkanis
Date: 2008-01-02 15:57:22 EST (Wed, 02 Jan 2008)
New Revision: 42419
URL: http://svn.boost.org/trac/boost/changeset/42419

Log:
fix for Dinkumware with _WIN64. Previous code assumed that static cast to std::streamoff was the same as the implementation defined macro _FPOSOFF; now we call _FPOSOFF directly
Text files modified:
   branches/iostreams_dev/boost/iostreams/positioning.hpp | 10 ++++++----
   1 files changed, 6 insertions(+), 4 deletions(-)

Modified: branches/iostreams_dev/boost/iostreams/positioning.hpp
==============================================================================
--- branches/iostreams_dev/boost/iostreams/positioning.hpp (original)
+++ branches/iostreams_dev/boost/iostreams/positioning.hpp 2008-01-02 15:57:22 EST (Wed, 02 Jan 2008)
@@ -68,8 +68,8 @@
 {
     // Use implementation-specific member function seekpos().
     return fpos_t_to_offset(pos.seekpos()) +
- stream_offset(std::streamoff(pos)) -
- stream_offset(std::streamoff(pos.seekpos()));
+ static_cast<stream_offset>(static_cast<std::streamoff>(pos)) -
+ static_cast<stream_offset>(_FPOSOFF(pos.seekpos()));
 }
 
 # else // # if defined(_CPPLIB_VER) //----------------------------------------//
@@ -80,8 +80,10 @@
 {
     // use implementation-specific member function get_fpos_t().
     return fpos_t_to_offset(pos.get_fpos_t()) +
- stream_offset(std::streamoff(pos)) -
- stream_offset(std::streamoff(pos.get_fpos_t()));
+ static_cast<stream_offset>(static_cast<std::streamoff>(pos)) -
+ static_cast<stream_offset>(
+ static_cast<std::streamoff>(pos.get_fpos_t())
+ );
 }
 
 # endif // # if defined(_CPPLIB_VER) //---------------------------------------//


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