This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
streamoff __basic_file<char>::seekoff(streamoff __off, ios_base::seekdir __way) - { return lseek(this->fd(), __off, __way); } + { +#ifdef _GLIBCXX_USE_LFS + return lseek64(this->fd(), __off, __way); +#else + if (__off > std::numeric_limits<off_t>::max()) + return -1L; + return lseek(this->fd(), __off, __way); +#endif + }
off_t is a *signed* quantity, therefore, in the non-LFS case, we must fail both when __off > std::numeric_limits<off_t>::max() and when __off < std::numeric_limits<off_t>::min().
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |