Opened 16 years ago
Last modified 15 years ago
#824 closed Bugs (fixed)
BOOST_IOSTREAMS_HAS_LSEEK64 on Mac OS X — at Version 2
| Reported by: | gmsb | Owned by: | Beman Dawes |
|---|---|---|---|
| Milestone: | Component: | iostreams | |
| Version: | None | Severity: | Showstopper |
| Keywords: | Cc: |
Description (last modified by )
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__)
...
Change History (2)
comment:1 by , 15 years ago
| Owner: | changed from to |
|---|---|
| Severity: | → Showstopper |
| Status: | assigned → new |
comment:2 by , 15 years ago
| Component: | None → iostreams |
|---|---|
| Description: | modified (diff) |
Note:
See TracTickets
for help on using tickets.

assigning to actual user "bemandawes" instead of unknown user "beman_dawes"