[Boost-bugs] [Boost C++ Libraries] #2522: iostreams/stream_offset_64bit_test fails on QNX 6.4.0

Subject: [Boost-bugs] [Boost C++ Libraries] #2522: iostreams/stream_offset_64bit_test fails on QNX 6.4.0
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2008-11-21 11:13:26

#2522: iostreams/stream_offset_64bit_test fails on QNX 6.4.0
 Reporter: Niklas Angare <li51ckf02_at_[hidden]> | Owner: turkanis
     Type: Bugs | Status: new
Milestone: Boost 1.38.0 | Component: iostreams
  Version: Boost Development Trunk | Severity: Problem
 Keywords: |
 ...with the Dinkumware 5 library.

 It fails on the first iteration and reports this:[[BR]]
 * sizeof(fpos_t) = 16[[BR]]
 * sizeof(streamoff) = 4[[BR]]
 * sizeof(stream_offset) = 8[[BR]]

 The constructor of std::streampos (fpos<_Mbstatet>) puts the value in a
 streamoff so the most significant 32 bits get chopped off.

 Defining BOOST_IOSTREAMS_HAS_DINKUMWARE_FPOS results in this:[[BR]]
 positioning.hpp: In function 'std::streampos
 positioning.hpp:52: error: no matching function for call to
 iosfwd:32: note: candidates are: std::fpos<_Statetype>::fpos(_Statetype,
 std::fpos_t) [with _Statetype = _Mbstatet][[BR]]
 iosfwd:27: note:
 std::fpos<_Statetype>::fpos(std::streamoff) [with _Statetype =
 iosfwd:23: note: std::fpos<_Mbstatet>::fpos(const

 std::fpos_t is defined like this:[[BR]]
 struct _Fpost {[[BR]]
  _Off64t _Off;[[BR]]
  _Mbstatet _Wstate;[[BR]]

 I wrote this simple test:[[BR]]
 std::fpos_t fpos = { 100000000000LL, std::mbstate_t() };[[BR]]
 std::streampos pos(std::mbstate_t(), fpos);[[BR]]
 std::cout << _FPOSOFF(pos.seekpos()) << std::endl;

 It prints 100 billion. Is there a better way to initialize fpos_t? I'm not
 sure it's correct to use the default value for mbstate_t but
 offset_to_position() currently does it.

Ticket URL: <https://svn.boost.org/trac/boost/ticket/2522>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:49:59 UTC