| Summary: | SDL assumes RW_SEEK_SET == SEEK_SET | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Dan Gohman <sunfish> |
| Component: | file | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | sylvain.becker |
| Version: | HG 2.1 | ||
| Hardware: | All | ||
| OS: | Other | ||
|
Description
Dan Gohman
2019-10-08 14:19:15 UTC
Thanks, Fixed https://hg.libsdl.org/SDL/rev/efa5fe44e4e8 (done the same way as window_seek, mem_seek, etc..) Just notice, since linux 3.1, there are also: SEEK_DATA, SEEK_HOLE ... that would have worked before, but I am not seek this is used. I think not in SDL_mixer/ttf/image externals libs Seeking file data and holes Since version 3.1, Linux supports the following additional values for whence: SEEK_DATA Adjust the file offset to the next location in the file greater than or equal to offset containing data. If offset points to data, then the file offset is set to offset. SEEK_HOLE Adjust the file offset to the next hole in the file greater than or equal to offset. If offset points into the middle of a hole, then the file offset is set to offset. If there is no hole past offset, then the file offset is adjusted to the end of the file (i.e., there is an implicit hole at the end of any file). http://man7.org/linux/man-pages/man2/lseek.2.html |