Boost logo

Boost :

From: SourceForge.net (noreply_at_[hidden])
Date: 2007-01-31 11:35:45


Bugs item #1649025, was opened at 2007-01-31 16:35
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=107586&aid=1649025&group_id=7586

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Gareth Sylvester-Bradley (gmsb)
Assigned to: Nobody/Anonymous (nobody)
Summary: BOOST_IOSTREAMS_HAS_LSEEK64 on Mac OS X

Initial Comment:
Mac OS X has 64-bit file offsets but uses the standard lseek call rather than lseek64.

The following is one fix for file_descriptor::seek() but there's no doubt a better way...

Change lines 203 and 218 from:

  203 #ifndef BOOST_IOSTREAMS_HAS_LSEEK64
  204 if ( off > integer_traits<long>::const_max ||
  205 off < integer_traits<long>::const_min )
  206 {
  207 throw BOOST_IOSTREAMS_FAILURE("bad offset");
  208 }
  209 #endif
  210
  211 stream_offset result =
  212 #ifdef BOOST_IOSTREAMS_HAS_LSEEK64
  213 lseek64
  214 #else
  215 lseek
  216 #endif
  217 ( pimpl_->fd_,
  218 #ifdef BOOST_IOSTREAMS_HAS_LSEEK64
  219 off,
  220 #else
  221 static_cast<long>(off),
  222 #endif
  223 way == BOOST_IOS::beg ?
  224 SEEK_SET :
  225 way == BOOST_IOS::cur ?
  226 SEEK_CUR :
  227 SEEK_END );

To:

  203 #if !defined(BOOST_IOSTREAMS_HAS_LSEEK64) && !defined(__MACH__)
  ...
  218 #if defined(BOOST_IOSTREAMS_HAS_LSEEK64) || defined(__MACH__)
  ...

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=107586&aid=1649025&group_id=7586

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Boost-bugs mailing list
Boost-bugs_at_[hidden]
https://lists.sourceforge.net/lists/listinfo/boost-bugs


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk